]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
Makefile.in: Update to use common.opt and lang_opt_files.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
d7b42618
NB
12003-06-14 Neil Booth <neil@daikokuya.co.uk>
2
3 * Make-lang.in: Remove c-options.o.
4
0a8cb79e
NN
52003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
6
9e7d1164
NN
7 * lex.c: Convert to ISO C.
8
362efdc1
NN
9 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
10 * init.c: removes use of PARAMS macro. Use ISO style function
11 declarations. (Not copyright-significant change.)
12
cec57f72
NN
13 * rtti.c: Remove PARAMS.
14
0a8cb79e
NN
15 * typeck2.c: Convert to ISO C.
16
79b59cc3
MM
172003-06-12 Mark Mitchell <mark@codesourcery.com>
18
19 PR c++/10635
20 * typeck.c (build_c_cast): Check that the destination type is
21 complete.
22
df7f7b9c
MM
232003-06-11 Mark Mitchell <mark@codesourcery.com>
24
25 PR c++/10432
26 * cp-tree.h (finish_declarator): Remove.
27 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
28 erroneous declarations.
29 * semantics.c (finish_declarator): Remove.
30
35b4a576
RS
312003-06-11 Roger Sayle <roger@eyesopen.com>
32
33 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
34 global static constructor/destructor if it will be empty, i.e.
35 either doesn't call any ctors/dtors or only calls pure or const
36 ctors/dtors.
37
a5512a2f
MM
382003-06-11 Mark Mitchell <mark@codesourcery.com>
39
24386c5e
MM
40 * mangle.c (tm_p.h): Include it.
41 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
42
a5512a2f
MM
43 PR c++/11131
44 * tree.c (cp_cannot_inline_fn): Check for "inline" before
45 instantiation.
46
0c16e8d6
JM
472003-06-10 Jason Merrill <jason@redhat.com>
48
49 PR c++/10968
e9bbabab 50 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
0c16e8d6 51
d192828a
GK
522003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
53
54 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
55 (start_cleanup_cnt): New.
56
d58b7c2d
MM
572003-06-10 Mark Mitchell <mark@codesourcery.com>
58
59 PR c++/11131
60 * cp-tree.h (template_for_substitution): Declare.
61 * decl2.c (mark_used): Use it when figuring out whether or not a
62 function is inline.
63 * pt.c (template_for_substitution): Give it external linkage.
64 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
65 possible.
66
94d3ea58
ZW
672003-06-09 Zack Weinberg <zack@codesourcery.com>
68
69 PR 8861
70 * mangle.c (write_real_cst): New function. Implement
71 ABI-compliant mangling of floating-point literals when
72 -fabi-version>=2; provide backward compatibility with 3.3 when
73 -fabi-version=1 (with warning). Clarify commentary.
74 (write_template_arg_literal): Use write_real_cst.
75
55c6e1a6
AJ
762003-06-07 Andreas Jaeger <aj@suse.de>
77
78 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
79
2772ef3e
NB
802003-06-07 Neil Booth <neil@daikokuya.co.uk>
81
82 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
83 (LANG_HOOKS_HANDLE_OPTION): Override.
84 * cp-tree.h (cxx_init_options): Update.
85 * lex.c (cxx_init_options): Update.
86
8f231b5d
JH
87Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
88
89 * Make-lang.in: Add support for stageprofile and stagefeedback
90
88d5a16e
R
912003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
92
93 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
94
81c0e50a
AJ
952003-06-04 Andreas Jaeger <aj@suse.de>
96
97 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
98
dbe85b80
JM
992003-06-03 Jason Merrill <jason@redhat.com>
100
94d3ea58 101 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
dbe85b80 102
94d3ea58 103 * cp/decl.c (reshape_init): Handle vectors.
dbe85b80 104
94d3ea58 105 * testsuite/g++.dg/init/array10.C: New.
dbe85b80 106
6c07f448
KL
1072003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
108
109 PR c++/10940
110 * pt.c (check_explicit_specialization): Check for 'static'
111 earlier.
112
522801e7
DN
1132003-05-31 Diego Novillo <dnovillo@redhat.com>
114
115 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
116 the operand of a CONSTRUCTOR node.
117
82a2669e
GDR
1182003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
119
120 * decl.c (cp_binding_level::this_entity): Rename from this_class.
121 (cxx_scope_descriptor): New function.
122 (cxx_scope_debug): Likewise.
123 (push_binding_level): Use it.
124 (pop_binding_level): Likewise.
125 (suspend_binding_level): Likewise.
126 (resume_binding_level): Likewise.
127 (pushlevel_class): Adjust use of this_class.
128 (pushtag): Likewise.
129 (lookup_name_real): Likewise.
130 (global_scope_name): New variable.
131 (initialize_predefined_identifiers): Initialize it.
132 (push_namespace): Use it.
133 (make_cxx_scope): New function.
134 (pushlevel): Use it.
135 (pushlevel_class): Likewise.
136 (push_binding_level): Simplify. Loose the last two arguments.
137 (make_binding_level): Remove.
138 (initial_push__namespace_scope): New function.
139 (push_namespace): Use it. Simplify.
55c6e1a6 140 (cxx_init_decl_processing): Likewise.
82a2669e
GDR
141 (declare_namespace_level): Remove.
142
76d3baad
KL
1432003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
144
145 PR c++/10956
146 * pt.c (instantiate_decl): Don't use full template arguments if
147 we are dealing with specializations.
148
f37e2274
GDR
1492003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
150
151 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
152 (binding_depth): Unconditionally define.
153 (is_class_level): Likewise.
154 (indent): Likewise. Take an indenting parameter.
55c6e1a6 155 (push_binding_level): Remove conditional definittion.
f37e2274
GDR
156 (pop_binding_level): Likewise.
157 (suspend_binding_level): Likewise.
158 (resume_binding_level): Likewise.
159 (pushlevel): Likewise.
160 (pushlevel_class): Likewise.
161 (poplevel_class): Likewise.
162 (pop_everything): Likewise.
163
5f52c0e0
GDR
1642003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
165
166 * name-lookup.h (global_scope_p): New macro.
167 * decl.c (pop_binding_level): Use it. Don't refer directly to
55c6e1a6 168 global_binding_level.
5f52c0e0
GDR
169 (suspend_binding_level): Likewise.
170 (global_bindings_p): Likewise.
171 (print_other_binding_stack): Likewise.
172 (print_binding_stack): Likewise.
173 (maybe_push_to_top_level): Likewise.
174 (pushdecl_namespace_level): Likewise.
175 (cxx_init_decl_processing): Likewise.
176 (start_decl): Likewise.
177 (cp_finish_decl): Likewise.
178 (start_function): Likewise.
179 (global_binding_level): Remove.
180
b7fc8b57
KL
1812003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
182
183 * parser.c (cp_parser_explicit_instantiation): Restore old
184 access before template instantiation.
185
0de12fcc
GK
1862003-05-23 Geoffrey Keating <geoffk@apple.com>
187
188 * lang-specs.h: Use -o to specify preprocessor's output file.
189 Make -no-integrated-cpp work when building PCH files.
190
43b26a01
KL
1912003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
192
193 PR c++/10682
194 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
195 check for implicitly created typedef to an enum.
196
49b7aacb
JM
1972003-05-21 Jason Merrill <jason@redhat.com>
198
199 * init.c (build_vec_delete): Copy the address into a temporary
200 variable before calling build_vec_delete_1.
201 * decl2.c (delete_sanity): Don't call stabilize_reference.
202
b190f239
NS
2032003-05-21 Nathan Sidwell <nathan@codesourcery.com>
204
205 * pt.c (register_specialization): Update the decl's location,
206 if necessary.
207 (check_explicit_specialization): Likewise.
208
58228df6
KG
2092003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
210
211 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
212
16e31964
DS
2132003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
214
215 PR c++/9738
216 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
217 if the old decl had instantiated DECL_RTL.
218 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
219
a01fff59
MA
2202003-05-19 Matt Austern <austern@apple.com>
221
222 * lang-options.h: Document -Wno-invalid-offsetof
223 * typeck.c (build_class_member_access_expr): Don't complain about
224 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
55c6e1a6 225
7e8f3096
AP
2262003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
227
228 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
229 (binding_entry_make): Make entry->chain NULL after getting an entry.
230 fix the spelling of chain in a comment.
231 (binding_table_free): speed up by having temporary variable.
232 (binding_table_new): set table->chain to be NULL after allocating
55c6e1a6 233 a table.
7e8f3096
AP
234 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
235 binding->previous to NULL after getting an binding for speed.
55c6e1a6 236
5e0c54e5
GDR
2372003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
238
239 * cp-tree.h (struct lang_type_class): Replace data member tags
240 with hash-table nested_udts.
241 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
242 * class.c (unreverse_member_declarations): Don't touch
55c6e1a6 243 CLASSTYPE_TAGS.
5e0c54e5
GDR
244 (pushclass): Use cxx_remember_type_decls.
245 * decl.c (struct cp_binding_level): Replace data member tags with
246 hash-table type_decls.
247 (pop_binding_level): Handle level->type_decls.
248 (kept_level_p): Adjust.
249 (poplevel): Remove unused local variable.
250 (bt_print_entry): New function.
251 (print_binding_level): Use it.
252 (push_namespace): Build current_binding_level->type_decls.
253 (maybe_process_template_type_declaration): Adjust.
254 (pushtag): Likewise.
255 (clear_anon_tags): Use binding_table_remove_anonymous_types.
256 (gettags): Remove.
257 (cxx_remember_type_decls): Rename from storetags. Adjust.
258 (lookup_tag): Use binding_table_find_anon_type. Tidy.
259 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
260 (cxx_init_decl_processing): Build global_binding_level->type_decls.
261 (store_parm_decls): Remove pointless code.
262 * name-lookup.c (free_binding_entry): New variable.
263 (ENTRY_INDEX): New macro.
264 (struct binding_table_s): New datatype.
265 (binding_entry_make): New function.
266 (binding_entry_free): Likewise.
267 (binding_table_construct): Likewise.
268 (binding_table_free): Likewise.
269 (binding_table_new): Likewise.
270 (binding_table_expand): Likewise.
271 (binding_table_insert): Likewise.
272 (binding_table_find): Likewise.
273 (binding_table_find_anon_type): Likewise.
274 (binding_table_reverse_maybe_remap): Likewise.
275 (binding_table_remove_anonymous_types): Likewise.
276 (binding_table_foreach): Likewise.
277 * name-lookup.h (binding_table): New type.
278 (binding_entry): Likewise.
279 (bt_foreach_proc): Likewise.
280 (struct binding_entry_s): New datatype.
281 (SCOPE_DEFAULT_HT_SIZE): New macro.
282 (CLASS_SCOPE_HT_SIZE): Likewise.
283 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
284 (NAMESPACE_STD_HT_SIZE): Likewise.
285 (GLOBAL_SCOPE_HT_SIZE): Likewise.
286 (binding_table_new): Declare.
287 (binding_table_free): Likewise.
288 (binding_table_insert): Likewise.
289 (binding_table_find_anon_type): Likewise.
290 (binding_table_reverse_maybe_remap): Likewise.
291 (binding_table_remove_anonymous_types): Likewise.
292 (binding_table_foreach): Likewise.
293 (binding_table_find): Likewise.
294 (cxx_remember_type_decls): Likewise.
295 * pt.c (bt_instantiate_type_proc): New function.
296 (do_type_instantiation): Use it.
297 * search.c (lookup_field_r): Use binding_table_find.
298
25903d03
KL
2992003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
300
301 * semantics.c (perform_deferred_access_checks): Don't discard
302 checked access.
303
e34d07f2
KG
3042003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
305
306 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
307 libiberty VA_ macros, always use stdarg.
308 * rtti.c (create_pseudo_type_info): Likewise.
309 * tree.c (build_min_nt, build_min): Likewise.
310
90ff44cf
KG
3112003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
312
313 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
314 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
315 collapse multiple function calls into one.
55c6e1a6 316 * tree.c (debug_binfo): Likewise.
90ff44cf 317
9cefd2ca
JM
3182003-05-15 Jason Merrill <jason@redhat.com>
319
320 PR c++/5388
321 * call.c (conditional_conversion): Don't consider implicit
55c6e1a6 322 conversions if T2 is a base of T1.
9cefd2ca
JM
323 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
324 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
325
326 * parser.c (cp_parser_primary_expression): Convert a static data
327 member from reference.
328
dffbbe80
MM
3292003-05-15 Mark Mitchell <mark@codesourcery.com>
330
8f4b394d
MM
331 * call.c (build_op_delete_call): Avoid creating unnecessary types.
332 * class.c (instantiate_type): Remove tests for tf_no_attributes.
333 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
334 (COMPARE_NO_ATTRIBUTES): Remove.
335 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
336
dffbbe80
MM
337 PR c++/8385
338 * semantics.c (finish_typeof): Refine type-dependency check.
339
a65cddcf
JM
3402003-05-13 Jason Merrill <jason@redhat.com>
341
342 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
343 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
344
afb19ffb
KL
3452003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
346
347 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
348
9f01ded6
KL
3492003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
350
351 PR c++/10230, c++/10481
352 * semantics.c (finish_non_static_data_member): Handle when the
353 non-static member is not from a base of the current class type.
354
fcea7401
KL
3552003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
356
357 PR c++/10552
358 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
359 template and has dependent context.
360
7d021397
KL
3612003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
362
363 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
364
78757caa
KL
3652003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
366
367 PR c++/9252
368 * cp-tree.h (saved_scope): Remove check_access field.
369 (tsubst_flags_t): Remove tf_parsing.
370 * decl.c (maybe_push_to_top_level): Don't initialize
371 scope_chain->check_access.
372 (make_typename_type, make_unbound_class_template): Don't use
373 tf_parsing.
374 (register_dtor_fn): Use push/pop_deferring_access_checks
375 instead of scope_chain->check_access.
376 * method.c (use_thunk): Likewise.
377 * parser.c (cp_parser_explicit_instantiation
378 (cp_parser_constructor_declarator_p): Don't call
379 push/pop_deferring_access_checks here.
380 (cp_parser_template_argument, cp_parser_class_name): Don't use
381 tf_parsing.
382 (yyparse): Check flag_access_control.
383 * pt.c (instantiate_class_template): Call
384 push/pop_deferring_access_checks.
385 * semantics.c (push_deferring_access_checks): Propagate
386 dk_no_check.
387 (perform_or_defer_access_check): Make sure basetype_path is
388 a type before comparison.
389 * call.c (build_op_delete_call, build_over_call): Use
390 perform_or_defer_access_check.
391 * class.c (alter_access): Likewise.
392 * init.c (build_offset_ref): Likewise.
393 * lex.c (do_identifier): Likewise.
394 * method.c (hack_identifier): Likewise.
395 * search.c (lookup_member): Likewise.
396 * semantics.c (finish_non_static_data_member): Likewise.
397 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
398 instead of flag_access_control.
399
8d241e0b
KL
4002003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
401
402 PR c++/9554
403 * parser.c (cp_parser_class_name): Remove check_access parameter.
404 All caller adjusted. Update declaration.
405 (cp_parser_lookup_name): Likewise.
406 * semantics.c (push_deferring_access_checks): Change parameter type
407 to enum deferring_kind. All caller adjusted.
408 (resume_deferring_access_checks): Adjust to use new enum.
409 (stop_deferring_access_checks): Likewise.
410 (perform_or_defer_access_check): Likewise.
411 * cp-tree.h (deferring_kind): New enum.
412 (deferred_access): Adjust field type.
413 (push_deferring_access_checks): Update declaration.
414
88e98cfe
KL
4152003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
416
417 PR c++/10555, c++/10576
418 * pt.c (lookup_template_class): Handle class template with
419 multiple levels of parameters when one of the levels contain
420 errors.
421
8b5e2ce4
JM
4222003-05-08 Jason Merrill <jason@redhat.com>
423
424 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
425 expression. Undo some of the recent reorg.
426
a944ceb9
RH
4272003-05-07 Richard Henderson <rth@redhat.com>
428
9cefd2ca
JM
429 PR c++/10570
430 * cfns.gperf: Comment out POSIX thread cancellation points,
431 plus abort and raise.
432 * cfns.h: Regenerate.
a944ceb9 433
a65fd2d7
JM
4342003-05-07 Jason Merrill <jason@redhat.com>
435
436 * call.c (build_conditional_expr): Don't assume that the folded
437 expression has result_type.
438
d219f3ff
KL
4392003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
440
441 * typeck.c (build_unary_op): Deal with const qualifier in
442 invalid pointer-to-member earlier.
443
5f7262e6
JM
4442003-05-05 Jason Merrill <jason@redhat.com>
445
446 PR c++/9537
447 * call.c (conditional_conversion): Build an RVALUE_CONV if
448 we're just changing the cv-quals.
449 (build_conditional_expr): Don't call convert to change
450 cv-quals.
451
16692dd5
KL
4522003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
453
454 PR c++/10496
455 * typeck.c (build_unary_op): Don't output const qualifier when
456 output invalid pointer-to-member diagnostics.
457
7df87825
KL
4582003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
459
460 * decl.c: Fix typos.
461
4b41d9eb
KL
4622003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
463
464 PR c++/4494
465 * decl.c (start_function): Use same_type_p to check return type
466 of main.
467
87f85ea0
ZW
4682003-05-03 Zack Weinberg <zack@codesourcery.com>
469
470 PR c/10604
471 * cp/typeck.c (build_x_compound_expr): No need to check
472 extra_warnings as well as warn_unused_value.
473
5dc5d13c
KL
4742003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
475
476 PR c++/9364, c++/10553, c++/10586
477 * decl.c (make_typename_type): Don't crash on illegal code.
478
82a98427
NS
4792003-05-03 Nathan Sidwell <nathan@codesourcery.com>
480
481 * class.c (finish_struct): Use location_t and input_location
482 directly.
483 * decl.c (make_label_decl): Likewise.
484 (use_label): Likewise.
485 * decl2.c (warn_if_unknown_interface): Likewise.
486 (start_static_initialization_or_destruction): Likewise.
487 (generate_ctor_or_dtor_function): Likewise.
488 (finish_file): Likewise.
489 * error.c (print_instantiation_full_context): Likewise.
490 * init.c (create_temporary_var): Likewise.
491 * method.c (synthesize_method): Likewise.
492 * parser.c (cp_token): Likewise.
493 (cp_lexer_set_source_position_from_token): Likewise.
494 (cp_lexer_get_preprocessor_token): Likewise.
495 (cp_parser_statement): Likewise.
496 * pt.c (tsubst_friend_function): Likewise.
497 (instantiate_class_template): Likewise.
498 (tsubst_decl): Likewise.
499 (tsubst): Likewise.
500 (instantiate_decl): Likewise.
501 * semantics.c (begin_class_definition): Likewise.
502 (expand_body): Likewise.
503
3489e061
NS
5042003-05-01 Nathan Sidwell <nathan@codesourcery.com>
505
506 * class.c (finish_struct): Rename lineno to input_line.
507 * decl.c (push_binding_level, pop_binding_level,
508 suspend_binding_level, resume_binding_level, make_label_decl,
509 use_label, start_function): Likewise.
510 * decl2.c (warn_if_unknown_interface,
511 start_static_initialization_or_destruction,
512 generate_ctor_or_dtor_function, finish_file): Likewise.
513 * error.c (cp_line_of, print_instantiation_full_context,
514 print_instantiation_context): Likewise.
515 * except.c (check_handlers_1, check_handlers): Likewise.
516 * init.c (create_temporary_var): Likewise.
517 * method.c (use_thunk, synthesize_method): Likewise.
518 * parser.c (cp_lexer_set_source_position_from_token,
519 cp_lexer_get_preprocessor_token): Likewise.
520 * pt.c (push_tinst_level, pop_tinst_level,
521 tsubst_friend_function, instantiate_class_template, tsubst_decl,
522 tsubst, tsubst_expr, instantiate_decl): Likewise.
523 * semantics.c (genrtl_try_block, finish_label_stmt,
524 begin_class_definition, expand_body,
87f85ea0 525 genrtl_finish_function): Likewise.
3489e061
NS
526 * tree.c (build_min_nt, build_min): Likewise.
527
49bf4577
MM
5282003-05-01 Mark Mitchell <mark@codesourcery.com>
529
530 * decl2.c (comdat_linkage): Don't externalize explicit
531 instantiations.
532
d0af00af
KL
5332003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
534
535 PR c++/10554
536 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
537 is not NULL.
538
85209a3c
SB
5392003-05-01 Steven Bosscher <steven@gcc.gnu.org>
540
541 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
542 (struct lang_identifier): ... to here.
543 (LANG_ID_FIELD): Remove.
544 (SET_LANG_ID): Remove.
545 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
546 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
547 (IDENTIFIER_IMPLICIT_DECL): Likewise.
548 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
549 (IDENTIFIER_ERROR_LOCUS): Likewise.
550 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
551
d12a7283
KL
5522003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
553
554 PR c++/8772
555 * pt.c (convert_template_argument): Correct diagnostic.
556
d7ed5e55
KL
5572003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
558
559 PR c++/9432, c++/9528
560 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
561
152c16a9
GDR
5622003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
563
564 * decl.c (check_previous_goto_1): Adjust prototype.
565 (check_previous_goto): Adjust use.
566 (check_switch_goto): Likewise.
567 (use_label): Adjust.
568 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
569 (struct named_label_use_list): Use location_t datatype.
570
1f6f0cb6
MM
5712003-04-29 Mark Mitchell <mark@codesourcery.com>
572
573 PR c++/10551
574 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
575 that have not yet been written out.
576
60cde936
MM
5772003-04-29 Mark Mitchell <mark@codesourcery.com>
578
555456b1
MM
579 PR c++/10549
580 * class.c (layout_class_type): Mark overlong bitfields as having
581 the maximum size permitted by their type, after layout.
582
60cde936
MM
583 PR c++/10527
584 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
585
8e854b76
KL
5862003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
587
588 * call.c (build_operator_new_call): Fix typo.
589 * lang-options.h: Likewise.
590
0dbc5cd3
MM
5912003-04-29 Mark Mitchell <mark@codesourcery.com>
592
75135253
MM
593 PR c++/10515
594 * cp-tree.h (lookup_field_1): Declare it.
595 * search.c (lookup_field_1): Make it public.
596 * decl.c (reshape_init): Handle designated initializers.
597
0dbc5cd3
MM
598 * decl.c (maybe_commonize_var): Further tweak support for systems
599 without weak symbols.
600
9e6aaf5e
MM
6012003-04-27 Mark Mitchell <mark@codesourcery.com>
602
603 * decl.c (maybe_commonize_var): Fix thinko in last patch.
604
0b50d7f1
MM
6052003-04-27 Mark Mitchell <mark@codesourcery.com>
606
772f8889
MM
607 PR c++/10506
608 * method.c (use_thunk): Decrement immediate_size_expand.
609
610 PR c++/10503
611 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
612 (DECL_MAYBE_TEMPLATE): Remove.
613 * class.c (fixed_type_or_null): Avoid infinite recursion.
614
0b50d7f1
MM
615 * decl.c (maybe_commonize_var): Make the code match the comments.
616 * pt.c (instantiate_decl): Move call to import_export_decl.
617
e2b69423
MM
6182003-04-26 Mark Mitchell <mark@codesourcery.com>
619
620 * decl2.c (finish_file): Fix merge botch.
621
ea56c40c
MM
6222003-04-25 Mark Mitchell <mark@codesourcery.com>
623
624 * decl2.c (finish_file): Don't call import_export_decl for
625 functions that are not defined.
626 (handle_class_head): Robustify.
627 * pt.c (instantiate_decl): Do not call cp_finish_decl for
628 variables that are not defined.
629
9804b5b8
SP
6302003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
631
87f85ea0 632 * call.c (print_z_candidates): Fix off by one error.
9804b5b8 633
f8986275
NS
6342003-04-24 Nathan Sidwell <nathan@codesourcery.com>
635
636 PR c++/10337
637 * call.c (joust): Don't warn about conversion ops that are exact
638 or cv-conversions. Rearrange to avoid multiple type comparisons.
639
374ca7f7
MM
6402003-04-23 Mark Mitchell <mark@codesourcery.com>
641
642 PR c++/10471
643 * call.c (build_cxx_call): Robustify.
644
6338b358
NB
6452003-04-23 Neil Booth <neil@daikokuya.co.uk>
646
647 * Make-lang.in (lex.o): Remove mbchar.h.
648 * lex.c (MULTIBYTE_CHARS): Lose.
649 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
650 in c-lex.c.
651
4223f82f
MM
6522003-04-23 Mark Mitchell <mark@codesourcery.com>
653
654 PR c++/9847
655 * cp-tree.h (duplicate_tag_error): Remove.
656 * class.c (duplicate_tag_error): Remove.
657 * semantics.c (begin_class_definition): Return immediately for a
658 duplicate class definition.
659
660 PR c++/10451
661 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
662
6adb9463
MM
6632003-04-22 Mark Mitchell <mark@codesourcery.com>
664
ae2196c2
MM
665 PR c++/10446
666 * search.c (lookup_fnfields_1): Handle empty slots in the method
667 vector.
87f85ea0 668
befcd99b
MM
669 PR c++/10428
670 * decl.c (check_elaborated_type_specifier): New function, split
671 out from ...
672 (xref_tag): ... here. Use the new function in more places.
673
6adb9463
MM
674 * rtti.c (throw_bad_typeid): Use build_cxx_call.
675
b2dd096b
MM
6762003-04-21 Mark Mitchell <mark@codesourcery.com>
677
678 * call.c (build_over_call): Use build_cxx_call.
679 (build_cxx_call): New method, split out of build_over_call.
680 * cp-tree.h (language_function): Add can_throw.
681 (build_cxx_call): Declare it.
682 * decl.c (finish_function): If a function does not contain any
683 calls to functions that can throw an exception, indicate that
684 fact.
685 * decl2.c (mark_used): Do not defer the instantiation of
686 functions, if the current function does not throw.
687 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
688 * pt.c (instantiate_decl): Make sure import_export_decl is called
689 before emitting things.
690 * rtti.c (throw_bad_cast): Use build_cxx_call.
691 (build_dynamic_cast_1): Likewise.
692 * typeck.c (build_function_call): Likewise.
693
8de9bb0e
NS
6942003-04-21 Nathan Sidwell <nathan@codesourcery.com>
695
696 PR c++/9881
697 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
698 expressions. Reverts my 2002-08-08 patch.
87f85ea0 699
8de9bb0e
NS
700 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
701 cheaper early exit.
702
299f79b5
NS
7032003-04-20 Nathan Sidwell <nathan@codesourcery.com>
704
705 * cp/decl2.c (start_static_storage_duration_function): Take count
706 arg, don't check if it wraps round.
707 (generate_ctor_or_dtor_function): Add locus arg, use it.
708 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
709 locus.
710 (finish_file): Set line numbers to past EOF for synthesized
711 functions.
712
7132003-04-20 Nathan Sidwell <nathan@codesourcery.com>
de0c0e69
NS
714
715 PR c++/10405
716 * search.c (lookup_field_1): Final scan goes backwards for
717 types, forwards for non-types.
718
220a35cc
RS
7192003-04-17 Roger Sayle <roger@eyesopen.com>
720
721 PR c/10375
722 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
723 "nothrow" function attributes.
724
09d2f85f
KL
7252003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
726
727 PR c++/10347
728 * pt.c (type_dependent_expression_p): Handle array new.
729
5eb10628
MM
7302003-04-15 Mark Mitchell <mark@codesourcery.com>
731
732 PR c++/10381
733 * parser.c (cp_parser_primary_expression): Reorganize logic for
734 dealing with name lookup failures.
735
ac5f3b67
JM
7362003-04-15 Jason Merrill <jason@redhat.com>
737
738 * decl2.c (mark_used): Don't instantiate anything if
739 skip_evaluation.
740
e6237031
ZL
7412003-04-14 Ziemowit Laski <zlaski@apple.com>
742
743 * tree.c (build_cplus_array_type_1): Do not call
744 uses_template_parms() on a NULL index_type.
745
1331d16f
RS
7462003-04-13 Roger Sayle <roger@eyesopen.com>
747
748 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
749
f4f4610e
MM
7502003-04-12 Mark Mitchell <mark@codesourcery.com>
751
752 PR c++/10300
753 * init.c (build_new_1): Reorganize.
754
dcf92453
ZW
7552003-04-12 Zack Weinberg <zack@codesourcery.com>
756
757 * class.c (initialize_array)
758 * decl.c (reshape_init)
759 * decl2.c (build_expr_from_tree)
760 * init.c (build_zero_init)
761 * pt.c (tsubst_copy, tsubst_copy_and_build)
762 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
763 (ptm_initializer, class_initializer, get_pseudo_ti_init)
764 * semantics.c (finish_compound_literal)
765 * typeck.c (build_ptrmemfunc1)
766 * typeck2.c (store_init_value, process_init_constructor)
767 (build_functional_cast): Use build_constructor.
768
2bd02043
ZW
7692003-04-12 Zack Weinberg <zack@codesourcery.com>
770
771 * call.c (print_z_candidates): Use gcc_gettext_width, not
772 strlen, to determine how much padding to use.
773
339a28b9
ZW
7742003-04-10 Zack Weinberg <zack@codesourcery.com>
775
776 * decl.c: Update all calls to shadow_warning.
777
1e099144
MM
7782003-04-10 Mark Mitchell <mark@codesourcery.com>
779
780 * class.c (layout_class_type): Correct handling for overlong
781 bit-fields whose width is the same as an integer type.
782
d78e771d
ZW
7832003-04-06 Zack Weinberg <zack@codesourcery.com>
784
785 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
786 * cp-lang.c (cp_tree_size): New function.
787 (LANG_HOOKS_TREE_SIZE): Override.
788
789 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
790 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
791 (union lang_tree_node): Remove common and srcloc members.
792 (build_srcloc_here): Don't prototype.
793 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
794 * pt.c (pending_templates): Correct comment.
795 * tree.c (build_srcloc, build_srcloc_here): Kill.
796
d2a6f3c0
ZW
7972003-04-06 Zack Weinberg <zack@codesourcery.com>
798
799 * call.c: Include intl.h.
800 (print_z_candidate): Always use inform; get rid of errfn
801 argument. Reorganize so that all the strings get picked up
802 by xgettext. Note obligation of caller to pass first argument
803 through gettext.
804 (print_z_candidates): Update to match. Indent second and
805 successive candidates by strlen() of translated message.
806 (joust): Restructure ambiguous-conversion pedwarn so that
807 translators see a complete sentence. Update calls to
808 print_z_candidate.
809
810 * Make-lang.in (cp/call.o): Update dependencies.
811
ff955512
KG
8122003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
813
814 * decl.c (set_current_binding_level): Delete, revert last change.
815 (current_binding_level): Modify to allow it as as lvalue.
816
da247ccc
KG
8172003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
818
819 * name-lookup.c (find_binding): Pass appropriate pointer type to
820 POP_TIMEVAR_AND_RETURN.
821
d893ff33
KG
8222003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
823
824 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
825 * cp-tree.h: Don't insist on having GNUC.
826
78d55cc8
JM
8272003-04-03 Jason Merrill <jason@redhat.com>
828
55a2af0c
JM
829 * cvt.c (ocp_convert): Only abort if we try to convert an object
830 of TREE_ADDRESSABLE type.
831
78d55cc8
JM
832 * class.c (build_vtable): Set DECL_ALIGN here.
833 (get_vtable_decl): Not here.
834 (layout_vtable_decl): Or here.
835 (create_vtable_ptr): Or here.
836 (layout_class_type): Or here.
837 (check_bitfield_decl): Don't mess with field alignment.
838
de94b46c
KG
8392003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
840
841 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
842 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
843 * rtti.c (dfs_class_hint_mark): Likewise.
844
845 * decl.c (push_local_name, push_class_level_binding,
846 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
847 functions returning void.
848 * decl2.c (add_using_namespace): Likewise.
849
850 * decl.c (print_binding_level, print_other_binding_stack,
851 print_binding_stack): Cast argument of %p specifier to void*.
852 * ptree.c (cxx_print_decl): Likewise.
853
854 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
855 VAR_FUNCTION_OR_PARM_DECL_CHECK,
856 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
857 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
858 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
859
860 * decl.c (set_current_binding_level): New macro. Use throughout
861 when setting the current binding level.
862
863 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
864 in enum.
865 * method.c (mangling_flags): Likewise.
866
867 * cp-tree.h (lang_type_header): Add __extension__ and use
868 CHAR_BITFIELD for members.
869
0de298af
GK
8702003-04-02 Geoffrey Keating <geoffk@apple.com>
871
872 PR other/9274
873 * mangle.c: Include gt-cp-mangle.h.
874 (subst_identifiers): Mark with GTY.
875 * config-lang.in (gtfiles): Add cp/mangle.c.
876 * Make-lang.in: (gt-cp-mangle.h): New rule.
877 (cp/mangle.o): Depends on gt-cp-mangle.h.
878
28ea4c88
AP
8792003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
880
0de298af 881 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
28ea4c88
AP
882 after \$(srcdir)/cp/name-lookup.h.
883 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
884 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
0de298af
GK
885 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
886 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
d2a6f3c0 887
adff28c3
JM
8882003-03-31 Jason Merrill <jason@redhat.com>
889
890 PR java/10145
891 * class.c (check_field_decl): Don't set DECL_ALIGN.
892
c717c5af
MM
8932003-03-30 Mark Mitchell <mark@codesourcery.com>
894
895 PR c++/7647
896 * decl.c (grokdeclarator): Tidy, slightly.
897 * search.c (lookup_field_1): Add want_type parameter.
898 (lookup_field_r): Adjust call to lookup_field_1.
899
7c71dc2b
GDR
9002003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
901
902 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
903
ed3cf953
GDR
9042003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
905
906 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
d2a6f3c0 907 prototype.
ed3cf953
GDR
908 (cxx_scope_find_binding_for_name): Likewise.
909 * decl.c (find_binding: Move to name-lookup.c.
910 (binding_for_name): Likewise.
911 (cxx_scope_find_binding_for_name): Likewise.
912 (BINDING_LEVEL): Remove.
913 (push_binding): Tidy.
914 (push_class_binding): Likewise.
915 (pop_binding): Likewise.
916 (poplevel): Likewise.
917 (poplevel_class): Likewise.
918 (set_identifier_type_value_with_scope): Likewise.
919 (push_overloaded_decl): Likewise.
920 (lookup_tag): Likewise.
921 (unqualified_namespace_lookup): Likewise.
922 (lookup_name_current_level): Likewise.
923 (maybe_inject_for_scope_var): Likewise.
924 (namespace_binding): Move to name-lookup.c.
925 (set_namespace_binding): Likewise.
926 * decl2.c (lookup_using_namespace): Tidy.
927 (qualified_lookup_using_namespace): Likewise.
928 (do_toplevel_using_decl): Likewise.
929 * name-lookup.c: Include "timevar.h"
930 * name-lookup.h (cxx_scope): Declare.
931 (struct cxx_binding): Lose member "has_level". Adjust "scope"
932 member declaration.
933 (BINDING_SCOPE): Adjust definition.
934 (BINDING_HAS_LEVEL_P): Remove.
935
aed81407
GDR
9362003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
937
938 * name-lookup.c: New file.
939 * name-lookup.h: Likewise..
940 * decl.c (push_binding): Adjust use cxx_binding_make.
941 (free_bindings): Move to name-lookup.c
942 (pop_binding): Use cxx_binding_free.
943 (binding_for_name): Tidy.
944 * cp-tree.h: Include "name-lookup.h"
945 (cxx_binding_make): Move to name-lookup.h
946 (cxx_binding_clear): Likewise.
947 (struct cxx_binding): Likewise.
948 (LOCAL_BINDING_P): Likewise.
949 (INHERITED_VALUE_BINDING_P): Likewise.
950 (BINDING_SCOPE): Likewise.
951 (BINDING_HAS_LEVEL_P): Likewise.
952 (BINDING_VALUE): Likewise.
953 (BINDING_TYPE): Likewise.
954 * config-lang.in (gtfiles): Add cp/name-lookup.h
955 * Make-lang.in (cp/name-lookup.o): New rule.
956 (CXX_OBJS): Add cp/name-lookup.o
957 (CXX_TREE_H): Add cp/name-lookup.h
958
f7b9026e
JM
9592003-03-28 Jason Merrill <jason@redhat.com>
960
961 PR c++/10245
962 * cvt.c (force_rvalue): New fn.
963 * call.c (build_conditional_expr): Use it.
964 * cp-tree.h: Declare it.
965
2d30fe53
MS
9662003-03-28 Mike Stump <mrs@apple.com>
967
968 * error.c (dump_expr): Add 0x to printed hex numbers to make
969 output match source code better.
970
400fbc08
MM
9712003-03-28 Mark Mitchell <mark@codesourcery.com>
972
316a2456
MM
973 PR c++/10218
974 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
975 definitions.
976
400fbc08
MM
977 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
978 non-existant ssdf_decls array.
979 (finish_file): Call generator_ctor_or_dtor_function when there are
980 static constructors or destructors and no other static
981 initializations.
982
433cd9c9
NS
9832003-03-28 Nathan Sidwell <nathan@codesourcery.com>
984
985 PR c++/10047
986 * decl2.c (finish_file): Don't warn about explicitly instantiated
987 inline decls.
988
544aef8c
NS
9892003-03-27 Nathan Sidwell <nathan@codesourcery.com>
990
991 PR c++/10224
992 * pt.c (lookup_template_class): Only check instantiated args if
993 they do not contain template parameters.
994
649fc72d
NS
9952003-03-27 Nathan Sidwell <nathan@codesourcery.com>
996
997 PR c++/10158
998 * parser.c (cp_parser_function_definition): Set
999 DECL_INITIALIZED_IN_CLASS for members.
1000 * pt.c (instantiate_decl): Only reduce the template args for
1001 friends that are not defined in class.
1002
d8c8524d
JM
10032003-03-25 Jason Merrill <jason@redhat.com>
1004
1005 * call.c (print_z_candidate): Change name of first arg to msgid.
1006 (joust): Add comment for translators.
1007
1c82cc90 10082003-03-24 Nathan Sidwell <nathan@codesourcery.com>
d2a6f3c0 1009
1c82cc90 1010 PR c++/9898, PR c++/383, DR 322
649fc72d 1011 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
1c82cc90
NS
1012 through reference types on both PARM and ARG.
1013
a5fcc895
NS
10142003-03-24 Nathan Sidwell <nathan@codesourcery.com>
1015
1016 PR c++/10119
649fc72d 1017 * error.c (dump_expr) <BASELINK>: Use dump_expr.
a5fcc895 1018 * pt.c (maybe_fold_nontype_args): New function.
649fc72d
NS
1019 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
1020 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
1021 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
a5fcc895
NS
1022 maybe_fold_nontype_args.
1023
2ef6c975
NS
10242003-03-24 Nathan Sidwell <nathan@codesourcery.com>
1025
1026 PR c++/10026
649fc72d 1027 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2ef6c975 1028
f29a2bd1
MM
10292003-03-23 Mark Mitchell <mark@codesourcery.com>
1030
1031 PR c++/7086
2ef6c975
NS
1032 * typeck.c (cxx_mark_addressable): Adjust call to
1033 gen_mem_addressof or put_var_into_stack.
f29a2bd1 1034
3e4a3562
NS
10352003-03-22 Nathan Sidwell <nathan@codesourcery.com>
1036
1037 PR c++/9978, c++/9708
1038 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
1039 * call.c (add_template_candidate_real): Adjust
1040 instantiate_template call.
1041 * class.c (resolve_address_of_overloaded_function): Likewise.
1042 * decl.c (build_enumerator): Set TREE_CONSTANT.
1043 * pt.c (check_instantiated_args): New.
1044 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
1045 TREE_READONLY.
1046 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
1047 (reduce_template_parm_level): Likewise.
1048 (process_template_parm): Likewise.
1049 (check_explicit_specialization): Adjust instantiate_template call.
1050 (convert_template_argument): Don't check non-type argument here.
1051 (lookup_template_class): Check them here.
1052 (tsubst_friend_function): Adjust instantiate_template call.
1053 (instantiate_template): Add tsubst_flags parameter, use it. Check
1054 instantiated args.
1055
d9b2742a
ZW
10562003-03-21 Zack Weinberg <zack@codesourcery.com>
1057
1058 * decl.c: Update calls to shadow_warning.
1059
f3146d75
NS
10602003-03-21 Nathan Sidwell <nathan@codesourcery.com>
1061
1062 PR c++/9898
1063 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
1064 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
1065
963142fc
MM
10662003-03-20 Mark Mitchell <mark@codesourcery.com>
1067
1068 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
1069 friends.
1070 * cp/pt.c (instantiate_class_template): Fix formatting.
1071
a260bce6
MA
10722003-03-14 Matt Austern <austern@apple.com>
1073
1074 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
1075 (unemitted_tinfo_decl_p): Remove.
1076 (emit_tinfo_decl): Change declaration to remove unused parameter.
1077 * decl2.c (finish_file): Change tinfo emission to loop through
1078 unemitted_tinfo_decls array instead of looping through all decls.
1079 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
1080 unused second parameter.
1081 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
1082 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
1083 (emit_tinfo_decl): remove unused second parameter, add assertion
d9b2742a
ZW
1084 that decl hasn't already been emitted.
1085
2bd3ecad
NN
10862003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
1087
1088 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
1089 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
1090 return statements.
1091
b9747e59
JM
10922003-03-19 Jason Merrill <jason@redhat.com>
1093
1094 PR c++/8316, c++/9315, c++/10136
1095 * call.c (print_z_candidate): Split out from...
1096 (print_z_candidiates): ...here.
1097 (joust): Use it.
1098
10326855
RS
10992003-03-17 Roger Sayle <roger@eyesopen.com>
1100
b9747e59 1101 PR c++/10031
10326855
RS
1102 * decl.c (duplicate_decls): Use the new type when prototyping
1103 anticipated decls, even when the types match. This defines the
1104 exception list for the built-in function.
1105
bdaa131b
JM
11062003-03-17 Jason Merrill <jason@redhat.com>
1107
1108 PR c++/10091
d9b2742a 1109 * typeck.c (build_class_member_access_expr): Compare
bdaa131b
JM
1110 TYPE_MAIN_VARIANTs.
1111
ec20aa6c
MM
11122003-03-17 Mark Mitchell <mark@codesourcery.com>
1113
1114 PR c++/9639
1115 * parser.c (cp_parser_declarator_id): Clear parser->scope.
1116
35e939ae
JM
11172003-03-16 Jason Merrill <jason@redhat.com>
1118
1119 PR c++/9993
1120 * decl.c (finish_function): Only allow the NRVO to use variables
1121 declared at function scope.
1122
40a4184c
AJ
11232003-03-17 Andreas Jaeger <aj@suse.de>
1124
1125 * Make-lang.in (cp/TAGS): Remove.
1126
1f5a253a
NS
11272003-03-16 Nathan Sidwell <nathan@codesourcery.com>
1128
1129 PR c++/9629
1130 * cp-tree.h (struct language_function): Add in_base_initializer.
1131 (in_base_initializer): define it.
1132 (expand_member_init): Remove INIT param.
1133 * init.c (expand_member_init): Remove INIT param, return the member.
1134 (emit_mem_initializers): Set in_base_initializer.
1135 * class.c (build_base_path): Check in_base_initializer.
1136 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
1137 * pt.c (tsubst_initializer_list): Likewise.
1138
4f907b59
GDR
11392003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
1140
1141 * decl.c (binding_for_name): Fix initialization thinko.
1142
ac2768ff 11432003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
40a4184c 1144
af6fd53f
GDR
1145 Compile-time improvement: 2/n.
1146 * cp-tree.h (struct cxx_binding): New datatype;
1147 (struct lang_identifier): Use it.
1148 (LOCAL_BINDING_P): Adjust definition.
1149 (INHERITED_VALUE_BINDING_P): Likewise.
1150 (BINDING_SCOPE): Likewise.
1151 (BINDING_HAS_LEVEL_P): Likewise.
1152 (BINDING_VALUE): Likewise.
1153 (BINDING_TYPE): Likewise.
1154 (IDENTIFIER_VALUE): Likewise.
1155 (struct tree_binding): Remove.
1156 (TS_CP_BINDING): Likewise.
1157 ((union lang_tree_node): Remove field "binding".
1158 (cxx_binding_clear): New macro.
1159 (binding_for_name): Adjust return type.
1160 (qualified_lookup_using_namespace): Adjust prototype.
1161 (lookup_using_namespace): Adjust prototype.
1162 (cxx_scope_find_binding_for_name): Declare.
1163 * cp-tree.def: Remove CPLUS_BINDING definition.
1164 * decl.c (push_binding): Adjust local variable type.
1165 (add_binding): Likewise.
1166 (push_class_binding): Likewise.
1167 (pop_binding): Likewise.
1168 (poplevel): Likewise.
1169 (poplevel_class): Likewise.
1170 (free_bindings): Adjust type.
1171 (find_binding): Adjust return type, add a third parameter. Remove
40a4184c 1172 non-useful assertion now that we use static typing.
af6fd53f 1173 (cxx_scope_find_binding_for_name): New function.
40a4184c 1174 (binding_for_name): Use it. Adjust local variable type. Simplify.
af6fd53f
GDR
1175 (namespace_binding): Simplify.
1176 (set_namespace_binding): Likewise.
1177 (set_identifier_type_value_with_scope): Adjust local variable type.
1178 (lookup_tag): Don't type-abuse of local variable 'old'.
1179 (lookup_namespace_name): Likewise. Allocate binding on stack.
1180 (select_decl): Adjust prototype.
1181 (unqualified_namespace_lookup): Allocate binding on stack.
1182 Don't type-abuse of local variable 'val'.
1183 (lookup_name_real): Likewise.
1184 (maybe_inject_for_scope_var): Adjust local variable type.
1185 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
1186 (namespace_binding): Adjust logic, simplify.
1187 (BINDING_LEVEL): Adjust definition.
1188 (push_class_level_binding): Adjust local variable type.
1189 (struct cxx_saved_binding): Adjust field 'binding' type.
1190 * decl2.c (ambiguous_decl): Adjust prototype.
1191 (lookup_using_namespace): Adjust local variable type.
1192 (qualified_lookup_using_namespace): Catch type error and correct
1193 ensueing logic error.
1194 (do_nonmember_using_decl): Adjust local variable type. Allocate
1195 temporary cxx_binding on stack.
1196 (do_toplevel_using_decl): Adjust local variable type.
1197 * ptree.c (cxx_print_cxx_binding): New function.
1198 (cxx_print_identifier): Use it.
1199 (cxx_print_xnode): Delete CPLUS_BINDING case label.
1200
6a87d634
RS
12012003-03-15 Roger Sayle <roger@eyesopen.com>
1202
1203 * tree.c (count_functions): Fix whitespace.
1204
c1bad961
NB
12052003-03-15 Neil Booth <neil@daikokuya.co.uk>
1206
1207 * Make-lang.in: Update.
1208
6e049fcd
KL
12092003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1210
1211 PR c++/6440
1212 * pt.c (maybe_process_partial_specialization): Handle
1213 member class template when enclosing class template is
1214 explicit specialized.
1215 (most_general_template): Stop looking when DECL is already
1216 specialized.
1217
0171b21c
JM
12182003-03-13 Jason Merrill <jason@redhat.com>
1219
1220 PR c++/9420
1221 * search.c (lookup_conversions): Call complete_type here.
1222 * call.c (implicit_conversion): Not here.
1223
26f86471
MM
12242003-03-13 Mark Mitchell <mark@codesourcery.com>
1225
45707d31
MM
1226 * decl2.c (do_nonmember_using_decl): Correct handling of
1227 simultaneous type/non-type bindings.
1228
26f86471
MM
1229 * call.c (initialize_reference): Remove bogus assertion.
1230 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
1231
847311f4
AL
12322003-03-12 Andrew Lewycky <andrew@mxc.ca>
1233
1234 PR c++/7050
1235 * expr.c (cxx_expand_expr): Return const0_rtx for throw
1236 expressions.
1237
2601a4ee
MM
12382003-03-11 Mark Mitchell <mark@codesourcery.com>
1239
e1145e7f 1240 PR c++/9474
2601a4ee
MM
1241 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1242 to merge old and new declarations.
1243
2bfe542b
AO
12442003-03-12 Alexandre Oliva <aoliva@redhat.com>
1245
1246 * g++.1: Remove.
1247 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
1248 (cp/g++.1): Build it from scratch in the build tree.
1249 (c++.install-man): Depend on it. Install it from the build tree.
1250 (c++.mostlyclean): Clean it.
1251
0c33daff
MM
12522003-03-11 Mark Mitchell <mark@codesourcery.com>
1253
3033f0ed 1254 PR c++/9474
2601a4ee
MM
1255 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
1256 to merge old and new declarations.
1257
0c33daff
MM
1258 PR c++/9924
1259 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
1260
cf237c19
JM
12612003-03-11 Jason Merrill <jason@redhat.com>
1262
1263 PR c++/9820
40a4184c 1264 * search.c (lookup_member): Fix handling of functions in a class
cf237c19
JM
1265 being defined.
1266
436f8a4c
MM
12672003-03-11 Mark Mitchell <mark@codesourcery.com>
1268
1269 PR c++/8700
1270 * call.c (convert_class_to_reference): Adjust usage of
1271 splice_viable.
1272 (any_viable): Remove.
1273 (splice_viable): Combine with any_viable.
1274 (print_z_candidates): Avoid printing duplicates.
1275 (build_user_type_conversion_1): Adjust usage of splice_viable.
1276 (build_new_function_call): Likewise.
1277 (build_operator_new_call): Likewise.
1278 (build_object_call): Likewise.
1279 (build_conditional_expr): Likewise.
1280 (build_new_op): Likewise.
1281 (build_new_method_call): Likewise.
1282 (joust): Remove spurious comment.
1283 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
1284 * decl2.c (arg_assoc_class): Simplify.
1285 * friend.c (add_friend): Likewise.
1286
5b8e011c
JM
12872003-03-11 Jason Merrill <jason@redhat.com>
1288
1289 PR c++/8660
40a4184c 1290 * decl2.c (check_classfn): A member template only matches a
5b8e011c
JM
1291 member template.
1292
cb60f38d
NB
12932003-03-11 Neil Booth <neil@daikokuya.co.uk>
1294
1295 * Make-lang.in (CXX_C_OBJS): Update.
1296 * lang-specs.h: Don't define __GNUG__ here.
1297
125e6594
MM
12982003-03-10 Mark Mitchell <mark@codesourcery.com>
1299
1300 * call.c (perform_overload_resolution): New function.
1301 (build_new_function_call): Use it.
1302 (build_operator_new_call): Likewise.
1303 (add_candidates): Add explicit_targs and template_only parameters.
1304 (build_new_op): Adjust accordingly.
1305 * cp-tree.h (build_operator_new_call): New function.
1306 (build_function_call_real): Remove.
1307 (build_function_call_maybe): Likewise.
1308 * init.c (build_new_1): Use build_operator_new_call.
1309 * typeck.c (build_function_call_real): Rename to ...
1310 (build_function_call): ... this.
1311
87d7d780 13122003-03-10 Devang Patel <dpatel@apple.com>
40a4184c 1313
87d7d780
DP
1314 PR c++/9394
1315 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
125e6594 1316
6e9554e1
JM
13172003-03-10 Jason Merrill <jason@redhat.com>
1318
70f0e288
JM
1319 PR c++/9798
1320 * decl.c (push_using_directive): Push before recursing.
1321
1322 PR c++/9868, c++/9524
6e9554e1
JM
1323 * call.c (resolve_scoped_fn_name): Handle the case of a function
1324 pointer member.
1325
1326 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
1327 argument in the pointer-to-member case.
1328
f6d19bfe
MM
13292003-03-09 Mark Mitchell <mark@codesourcery.com>
1330
1d719415
MM
1331 PR c++/9373
1332 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
1333 pointers to member functions.
1334
f6d19bfe
MM
1335 PR c++/8534
1336 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
1337 in pointer-to-member-function types.
1338
d9b4e85e
GDR
13392003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1340
1341 * expr.c (cplus_expand_constant): Use C90 prototype style.
1342 (cxx_expand_expr): Likewise.
1343
ca9e1382
KL
13442003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1345
1346 PR c++/9970
1347 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
1348 functions.
1349
00a221f0
GK
13502003-03-08 Geoffrey Keating <geoffk@apple.com>
1351
1352 * lang-specs.h (c++-header): Change .pch to .gch.
1353
4bfec483
NB
13542003-03-08 Neil Booth <neil@daikokuya.co.uk>
1355
1356 * cp-tree.h (cxx_init): Update prototype.
1357 * lex.c (cxx_init): Similarly.
1358
089d6ea7
MM
13592003-03-08 Mark Mitchell <mark@codesourcery.com>
1360
0e136342
MM
1361 PR c++/9823
1362 * cp-tree.h (begin_mem_initializers): Remove.
1363 * parser.c (cp_parser_mem_initializer_list): Inline it here.
1364 Do not call finish_mem_initializers if not in a constructor.
1365 (cp_parser_class_head): Fix typo in error message.
1366 * semantics.c (begin_mem_initializers): Remove.
1367 * testsuite/g++.dg/parser/constructor1.C: New test.
1368
089d6ea7
MM
1369 PR c++/9809
1370 * call.c (add_function_candidate): Skip builtin fuctions that have
1371 not yet been declared.
1372
1373 PR c++/9982
1374 * init.c (build_new_1): Correct logic for determining whether or
1375 not to use an array cookie.
1376
1377 PR c++/9524
1378 * parser.c (cp_parser_postfix_expression): Call
1379 finish_non_static_data_member, even when processing_template_decl.
1380
1381 PR c++/9912
1382 * cp-tree.h (is_ancestor): New function.
1383 (handle_class_head): Change prototype.
1384 * decl2.c (is_namespace_ancestor): Rename to ...
1385 (namespace_anecestor): ... this.
1386 (set_decl_namespace): Adjust accordingly.
1387 (handle_class_head): Remove unncessary parameters.
1388 * parser.c (cp_parser_class_head): Check that
1389 nested-name-specifiers are used appropriately.
40a4184c 1390
aa6e8ed3
MM
13912003-03-07 Mark Mitchell <mark@codesourcery.com>
1392
1393 * call.c (reference_binding): Remove REF_IS_VAR parameter.
1394 (implicit_conversion): Adjust call to reference_binding.
1395 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
1396 (initialize_reference): Adjust handling for references bound to
1397 rvalues.
1398 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
1399 prototype.
1400 (real_non_cast_lvalue_p): New method.
1401 * cvt.c (build_up_reference): Adjust use of
1402 make_temporary_var_for_ref_to_temp.
89d11511 1403 * tree.c (real_non_cast_lvalue_p): New method.
40a4184c 1404
5cc3d3b8
GDR
14052003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
1406
1407 * except.c (init_exception_processing): Use C90 prototype style.
1408 (cp_protect_cleanup_actions): Likewise.
1409 (prepare_eh_type): Likewise.
1410 (build_eh_type_type): Likewise.
1411 (build_exc_ptr): Likewise.
1412 (do_begin_catch): Likewise.
1413 (dtor_nothrow): Likewise.
1414 (do_end_catch): Likewise.
1415 (push_eh_cleanup): Likewise.
1416 (decl_is_java_type): Likewise.
1417 (choose_personality_routine): Likewise.
1418 (initialize_handler_parm): Likewise.
1419 (expand_start_catch_block): Likewise.
1420 (expand_end_catch_block): Likewise.
1421 (begin_eh_spec_block): Likewise.
1422 (finish_eh_spec_block): Likewise.
1423 (do_allocate_exception): Likewise.
1424 (do_free_exception): Likewise.
1425 (wrap_cleanups_r): Likewise.
1426 (stabilize_throw_expr): Likewise.
1427 (build_throw): Likewise.
1428 (complete_ptr_ref_or_void_ptr_p): Likewise.
1429 (is_admissible_throw_operand): Likewise.
1430 (nothrow_libfn_p): Likewise.
1431 (can_convert_eh): Likewise.
1432 (check_handlers_1): Likewise.
1433 (check_handlers): Likewise.
40a4184c 1434
3d938426
MM
14352003-03-06 Mark Mitchell <mark@codesourcery.com>
1436
1437 * call.c (merge_conversion_sequences): New function.
1438 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
1439 (convert_class_to_reference): Correct handling of second
1440 standard conversion sequence in a user-defined conversion
1441 sequence.
1442 (build_user_type_conversion_1): Use merge_conversion_sequences.
1443 * cp-tree.def: Add comments for CONV nodes.
9534f4bc 1444 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
40a4184c 1445
3f8548e7
GDR
14462003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
1447
1448 * error.c (init_error): Use C90 prototype style.
1449 (dump_scope): Likewise.
1450 (dump_qualifiers): Likewise.
1451 (dump_template_argument): Likewise.
1452 (dump_template_argument_list): Likewise.
1453 (dump_template_parameter): Likewise.
1454 (dump_template_bindings): Likewise.
1455 (dump_type): Likewise.
1456 (dump_typename): Likewise.
1457 (class_key_or_enum): Likewise.
1458 (dump_aggr_type): Likewise.
1459 (dump_type_prefix): Likewise.
1460 (dump_type_suffix): Likewise.
1461 (dump_global_iord): Likewise.
1462 (dump_simple_decl): Likewise.
1463 (dump_decl): Likewise.
1464 (dump_template_decl): Likewise.
1465 (dump_function_decl): Likewise.
1466 (dump_parameters): Likewise.
1467 (dump_exception_spec): Likewise.
1468 (dump_function_name): Likewise.
1469 (dump_template_parms): Likewise.
1470 (dump_char): Likewise.
1471 (dump_expr_list): Likewise.
1472 (dump_expr): Likewise.
1473 (dump_binary_op): Likewise.
1474 (dump_unary_op): Likewise.
1475 (type_as_string): Likewise.
1476 (expr_as_string): Likewise.
1477 (decl_as_string): Likewise.
1478 (context_as_string): Likewise.
1479 (lang_decl_name): Likewise.
1480 (cp_file_of): Likewise.
1481 (cp_line_of): Likewise.
1482 (decl_to_string): Likewise.
1483 (expr_to_string): Likewise.
1484 (fndecl_to_string): Likewise.
1485 (code_to_string): Likewise.
1486 (language_to_string): Likewise.
1487 (parm_to_string): Likewise.
1488 (op_to_string): Likewise.
1489 (type_to_string): Likewise.
1490 (assop_to_string): Likewise.
1491 (args_to_string): Likewise.
1492 (cv_to_string): Likewise.
1493 (cxx_print_error_function): Likewise.
1494 (cp_diagnostic_starter): Likewise.
1495 (cp_diagnostic_finalizer): Likewise.
1496 (cp_print_error_function): Likewise.
1497 (function_category): Likewise.
1498 (print_instantiation_full_context): Likewise.
1499 (print_instantiation_partial_context): Likewise.
1500 (maybe_print_instantiation_context): Likewise.
1501 (print_instantiation_context): Likewise.
1502 (cp_printer): Likewise.
1503 (print_integer): Likewise.
1504 (print_non_consecutive_character): Likewise.
1505 (locate_error): Likewise.
1506
3d1df1fa
MM
15072003-03-06 Mark Mitchell <mark@codesourcery.com>
1508
5e256996
MM
1509 PR c++/9965
1510 * call.c (reference_binding): Add ref_is_var parameter.
1511 (implicit_conversion): Adjust call to reference_binding.
1512 (initialize_reference): Likewise.
1513
07681121
MM
1514 PR c++/9400
1515 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
1516 PARM_DECLs.
1517
3d1df1fa
MM
1518 PR c++/9791
1519 * class.c (get_basefndecls): Use lookup_fnfields_1.
1520
8a6393df
KL
15212003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1522
1523 PR c++/9188
1524 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
1525 in error message.
1526 (cp_parser_single_declaration): Likewise.
1527
c965b169
JM
15282003-03-05 Jason Merrill <jason@redhat.com>
1529
1530 PR c++/9440
1531 * call.c (build_conditional_expr): Use convert rather than an
1532 explicit NOP_EXPR.
1533
1d555f7a
MA
15342003-03-02 Matt Austern <austern@apple.com>
1535
1536 * decl.c (cp_binding_level): Add static_decls varray member.
1537 (add_decl_to_level): Add static/inline namespace scope
1538 declarations to static_decls array.
1539 (wrapup_global_for_namespace): Pass static_decls only, instead of
1540 all decls, to wrapup_global_declarations/check_global_declarations.
1541 (push_namespace): Initialize static_decls for ordinary namespaces.
1542 (cxx_init_decl_processing): Initialize static_decls for global
1543 namespace.
40a4184c 1544
8234c6c1
MM
15452003-03-05 Mark Mitchell <mark@codesourcery.com>
1546
1547 * class.c (end_of_class): Correct thinko.
1548
dc2b3526
NN
15492003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
1550
1551 * config-lang.in: Replace ${libstdcxx_version} by its value.
1552
000d38ea
GDR
15532003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1554
d9b2742a
ZW
1555 * cp-tree.h (cxx_saved_binding): Declare.
1556 (struct saved_scope): Adjust type of field 'old_binding'.
1557 * decl.c (cxx_saved_binding_make): New macro.
1558 (struct cxx_saved_binding): Define.
1559 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
1560 C++ bindings.
1561 (maybe_push_to_top_level): Adjust local variable type.
1562 (pop_from_top_level): Likewise.
40a4184c 1563
b87141b3
TT
15642003-03-04 Tom Tromey <tromey@redhat.com>
1565
1566 * Make-lang.in (c++.tags): New target.
1567
f20d8e39
NB
15682003-03-04 Neil Booth <neil@daikokuya.co.uk>
1569
1570 * Make-lang.in: Update.
1571
f5d70cc0
JM
15722003-03-03 Jason Merrill <jason@redhat.com>
1573
1574 * decl.c (finish_enum): Do set the type in a template. Simplify.
1575 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
1576
7993382e
MM
15772003-03-03 Mark Mitchell <mark@codesourcery.com>
1578
1579 PR c++/9878
1580 * call.c (convert_class_to_reference): Correct conversion
1581 sequences.
1582 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
1583 (implicit_conversion): Adjust call to reference_binding.
1584 (add_candidate): Change type of candidates parameter.
1585 (add_function_candidate): Likewise.
1586 (add_conv_candidate): Likewise.
1587 (build_builtin_candidate): Likewise.
1588 (add_builtin_candidate): Likewise.
1589 (add_builtin_candidates): Likewise.
1590 (add_template_candidate_real): Likewise.
1591 (add_template_candidate): Likewise.
1592 (add_template_conv_candidate): Likewise.
1593 (build_user_type_conversion_1): Adjust accordingly.
1594 (build_object_call): Likewise.
1595 (build_conditional_expr): Likewise.
1596 (add_candidates): Likewise.
1597 (build_new_op): Likewise.
1598 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
1599 (build_new_method_call): Adjust calls to add_function_candidate.
1600 (make_temporary_var_for_ref_to_temp): New function.
1601 (initialize_reference): Add decl parameter.
1602 * class.c (build_rtti_vtbl_entries): Use build_address and
1603 build_nop.
1604 * cp-tree.h (initialize_reference): Change prototype.
1605 (make_temporary_var_for_ref_to_temp): New function.
1606 (build_type_conversion): Change prototype.
1607 (build_address): New function.
1608 (build_nop): Likewise.
1609 * cvt.c (cp_convert_to_pointer): Adjust call to
1610 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
1611 Use build_nop.
1612 (convert_to_pointer_force): Use build_nop.
1613 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
1614 (convert_to_reference): Adjust call to build_type_conversion.
1615 (ocp_convert): Likewise.
1616 (build_type_conversion): Remove for_sure parameter.
1617 * decl.c (grok_reference_init): Use initialize_reference.
1618 * typeck.c (build_address): New function.
1619 (build_nop): Likewise.
1620 (build_unary_op): Use them.
1621 (build_ptrmemfunc): Tidy slightly.
1622 (convert_for_initialization): Adjust call to
1623 initialize_reference.
1624 * typeck2.c (store_init_value): Remove #if 0'd code.
40a4184c 1625
d1a74aa7
JM
16262003-03-03 Jason Merrill <jason@redhat.com>
1627
1628 * decl.c (start_function): Clear DECL_NUM_STMTS.
1629
1630 * class.c (get_vtable_decl): Use vtbl_type_node.
1631 (build_primary_vtable): Check for it.
1632
6e1b3a7c
AH
16332003-03-02 Aldy Hernandez <aldyh@redhat.com>
1634
08162287 1635 * decl.c (check_initializer): Check for vector_opaque_p.
6e1b3a7c 1636
8a035a6b
AH
16372003-03-02 Ashif Harji <asharji@uwaterloo.ca>
1638
1639 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
1640 invoke an external cpp during compilation.
1641
456d8864
GDR
16422003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1643
1644 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
1645 that of warning().
1646 (start_decl): Likewise.
1647 (start_function): Likewise.
1648
5793b276
NB
16492003-03-01 Neil Booth <neil@daikokuya.co.uk>
1650
1651 * Make-lang.in (CXX_C_OBJS): Update.
1652
b063b379 16532003-02-28 Mark Mitchell <mark@codesourcery.com>
1d62c33e
MM
1654
1655 PR c++/9892
1656 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
1657 instantiating it.
1658
704a0bbd
AH
16592003-02-28 Aldy Hernandez <aldyh@redhat.com>
1660
d9b2742a
ZW
1661 * parser.c (cp_parser_init_declarator): Revert opaque
1662 vector_opaque_p change.
1663 Do not include target.h.
704a0bbd 1664
1cb8292f
MM
16652003-02-28 Mark Mitchell <mark@codesourcery.com>
1666
1667 PR c++/9879
1668 * cp-tree.h (build_zero_init): Add parameter.
1669 * decl.c (cp_finish_decl): Adjust call.
1670 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
1671 calls.
1672 (build_default_init): Add nelts parameter. Adjust calls to
1673 build_zero_init.
1674 (build_new_1): Adjust call to build_default_init.
1675 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
40a4184c 1676
fdedded1
DP
16772003-02-26 Devang Patel <dpatel@apple.com>
1678
2ef6c975
NS
1679 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1680 required. Postpone enum setting for template decls.
1681 (build_enumerator): Delay copying value node until finish_enum
1682 (). Remove #if 0'ed code.
fdedded1
DP
1683 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1684 (tsubst_copy): Add check for enum type.
40a4184c 1685
cec24319
MM
16862003-02-25 Mark Mitchell <mark@codesourcery.com>
1687
1688 PR c++/9683
1689 * decl2.c (prune_vars_needing_no_initialization): Do not throw
1690 away initializations for DECL_EXTERNAL VAR_DECLs.
1691 (finish_file): Adjust accordingly.
1692 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1693
7d9f2df2
GDR
16942003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
1695
08162287
JM
1696 * decl.c (add_binding): Time TV_NAME_LOOKUP.
1697 (push_class_binding): Likewise.
1698 (set_namespace_binding): Likewise.
7d9f2df2 1699
353b4fc0
MM
17002003-02-24 Mark Mitchell <mark@codesourcery.com>
1701
1702 PR c++/9836
1703 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1704 specializations back to the main template.
1705 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1706 * pt.c (resolve_typename_type): Likewise.
1707
8b6a662e
JO
17082003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
1709
1710 PR c++/9778
1711 * pt.c (tsubst_copy_and_build): For a templated function inside a
1712 scope, process template arguments.
1713
9e236a9d
KL
17142003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1715
1716 PR c++/9602
1717 * typeck2.c (abstract_virtuals_error): Don't check when
1718 TYPE is still template parameter dependent.
1719
ca099ac8
MM
17202003-02-23 Mark Mitchell <mark@codesourcery.com>
1721
1722 PR c++/5333
1723 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1724 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1725 * pt.c (instantiate_class_template): Don't try to instantiate
1726 dependent types.
1727 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
40a4184c 1728
2fff6d71
MM
17292003-02-21 Mark Mitchell <mark@codesourcery.com>
1730
1731 PR c++/9749
1732 * decl.c (grokdeclarator): Do not allow parameters with variably
1733 modified types.
1734
7fb1c86d
NS
17352003-02-21 Nathan Sidwell <nathan@codesourcery.com>
1736
1f5a253a 1737 * search.c (grow_bfs_bases): Remove. Fold into ...
7fb1c86d
NS
1738 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1739 in previous patch.
1740
63a3cd3e
MM
17412003-02-20 Mark Mitchell <mark@codesourcery.com>
1742
1743 PR c++/9729
1744 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1745 when the G++ 3.2 ABI prevents correct compilation.
1746
dbbf88d1
NS
17472003-02-20 Nathan Sidwell <nathan@codesourcery.com>
1748
1749 Change base class access representation. Share virtual base
1750 binfos.
1751 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1752 call.
1753 * cp/class.c (build_base_path): Likewise.
1754 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1755 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1756 (make_new_vtable): Adjust.
1757 (force_canonical_binfo_r): Delete.
1758 (force_canonical_binfo): Delete.
1759 (mark_primary_virtual_base): Delete.
1760 (dfs_unshared_virtual_bases): Delete.
1761 (mark_primary_bases): Adjust.
1762 (maybe_warn_about_overly_private_class): Adjust.
1763 (dfs_base_derived_from): Delete.
1764 (base_derived_from): Follow the inheritance chain.
1765 (struct find_final_overrider_data): Add vpath member.
1766 (dfs_find_final_overrider): Adjust.
1767 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1768 (find_final_overrider): Adjust.
1769 (update_vtable_entry_for_fn): Adjust.
1770 (modify_all_vtables): Adjust.
1771 (walk_subobject_offsets): Adjust.
1772 (layout_nonempty_base_or_field): Adjust.
1773 (layout_empty_base): Remove last parameter. Adjust.
1774 (build_base_field): Adjust.
1775 (build_base_fields): Adjust.
1776 (propagate_binfo_offsets): Remove last parameter. Adjust.
1777 (dfs_set_offset_for_unshared_vbases): Delete.
1778 (layout_virtual_bases): Adjust.
1779 (finish_struct_1): Adjust.
1780 (init_class_processing): Don't init access nodes.
1781 (dfs_get_primary_binfo): Delete.
1782 (get_primary_binfo): Adjust.
1783 (dump_class_hierarchy_r): Remove most derived arg, add IGO
1784 parameter. Adjust.
1785 (dump_class_hierarchy): Adjust.
1786 (finish_vtbls): Adjust.
1787 (get_original_base): Delete.
1788 (build_vtt_inits): Adjust.
1789 (dfs_build_secondary_vptr_vtt_inits): Adjust.
1790 (dfs_ctor_vtable_bases_queue_p): Adjust.
1791 (build_ctor_vtbl_group): Adjust.
1792 (dfs_accumulate_vtbl_inits): Adjust.
1793 (build_vtbl_initializer): Adjust.
1794 (build_vbase_offset_vtbl_entries): Adjust.
1795 (add_vcall_offset_vtbl_entries_1): Adjust.
1796 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1797 (access_*_node): Remove.
1798 (CANONICAL_BINFO): Delete.
1799 (BINFO_UNSHARED_MARKED): Remove.
1800 (BINFO_MARKED): Set LANG_FLAG_0 directly.
1801 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1802 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1803 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1804 Delete.
1805 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1806 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1807 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1808 Delete.
1809 (BINFO_DEPENDENT_BASE_P): New.
1810 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1811 index.
1812 (markedp, unmarkedp): Adjust.
1813 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1814 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1815 find_vbase_instance, binfo_for_vbase): Delete.
1816 (copied_binfo, original_binfo): Declare.
1817 (finish_base_specifier): Add virtual_p arg.
1818 (unshare_base_binfos): Delete.
1819 (copy_base_binfos): Declare.
1820 (reverse_path): Delete.
1821 * cp/decl.c (xref_basetypes): Access and virtuality passed
1822 differently. Don't copy direct base binfos here. Call
1823 copy_base_binfos.
1824 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1825 (initialize_vtbl_ptrs): Adjust.
1826 (expand_member_init): Adjust.
1827 * cp/parser.c (cp_parser_base_specifier): Adjust.
1828 * cp/pt.c (instantiate_class_template): Adjust.
1829 (get_template_base_recursive): Adjust.
1830 * cp/rtti.c (get_pseudo_ti_init): Adjust.
1831 (get_pseudo_ti_desc): Adjust.
1832 * cp/tree.c (unshare_base_binfos): Rename to ...
1833 (copy_base_binfos): ... here, reimplement.
1834 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1835 (reverse_path): Remove.
1836 * cp/typeck.c (get_delta_difference): Adjust error messages.
1837 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1838 * cp/search.c (lookup_base_r): Adjust.
1839 (dynamic_cast_base_recurse): Adjust.
1840 (canonical_binfo): Remove.
1841 (dfs_canonical_queue): Remove.
1842 (dfs_assert_unmarked_p): Remove.
1843 (assert_canonical_unmarked): Remove.
1844 (shared_marked_p, shared_unmarked_p): Remove.
1845 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1846 (dfs_access_in_type): Adjust.
1847 (access_in_type): Adjust.
1848 (dfs_accessible_queue_p): Adjust.
1849 (dfs_accessible_p): Adjust.
1850 (is_subobject_of_p_1, is_subobject_of_p): Remove.
1851 (struct lookup_field_info): Remove from_dep_base_p field.
1852 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1853 (lookup_field_r): Remove dependent base code.
1854 (lookup_member): Likewise.
1855 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1856 (dfs_unmarked_real_bases_queue_p): Remove.
1857 (dfs_marked_real_bases_queue_p): Remove.
1858 (dfs_skip_vbases): Remove.
1859 (dfs_get_pure_virtuals): Adjust.
1860 (markedp, unmarkedp): Adjust.
1861 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1862 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1863 (dfs_unmark): Adjust.
1864 (dfs_get_vbase_types):Remove.
1865 (dfs_build_inheritance_graph_order): Remove.
1866 (get_vbase_types): Remove
1867 (dfs_find_vbase_instance): Remove.
1868 (find_vbase_instance): Remove.
1869 (dfs_debug_unmarkedp): Adjust.
1870 (dependent_base_p): Remove.
1871 (dfs_push_type_decls): Adjust.
1872 (dfs_push_decls): Adjust.
1873 (dfs_no_overlap_yet): Adjust.
1874 (copied_binfo): New function.
1875 (original_binfo): New function.
1876 (binfo_for_vbase): Remove.
1877
860c9ea6
ZW
18782003-02-18 Zack Weinberg <zack@codesourcery.com>
1879
1880 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1881 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1882 vectors, for speed.
1883
6b99d1c0
MM
18842003-02-18 Mark Mitchell <mark@codesourcery.com>
1885
1886 PR c++/9704
1887 * class.c (layout_class_type): In the 3.2 ABI, take into account
1888 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1889
2b59501b 18902003-02-18 Matt Austern <austern@apple.com>
40a4184c 1891
2b59501b
MA
1892 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1893 nothing for C++.
1894 * cp/decl.c (wrapup_globals_for_namespace): Remove special
1895 handling of global namespace.
40a4184c 1896
e17aafd1
GK
18972003-02-18 Geoffrey Keating <geoffk@apple.com>
1898
1899 * cp-tree.h (rid_to_yy): Delete.
1900 (C_RID_YYCODE): Delete.
1901 (finish_file): Delete redundant declaration.
1902
04b03085
JM
19032003-02-18 Jason Merrill <jason@redhat.com>
1904
1905 PR c++/9623
1906 * decl.c (reshape_init): Don't mess with initializer labels.
1907
08162287
JM
1908 PR c++/9485
1909 * parser.c (cp_parser_postfix_expression): Set idk properly for
1910 object->scope::member.
1911
bf7c02dd
BE
19122003-02-18 Ben Elliston <bje@redhat.com>
1913
1914 PR other/7350
1915 * decl.c (duplicate_decls): Fix typo in comment.
1916
0f3a8219
MEC
19172003-02-17 Michael Elizabeth Chastain <mec@shout.net>
1918
c7adfa01 1919 PR debug/9717
0f3a8219
MEC
1920 * class.c (build_base_field): Mark fields for base classes with
1921 DECL_IGNORED_P.
1922
db77ef4c
KL
19232003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1924
1925 PR c++/9457
1926 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1927 CONSTRUCTOR_ELTS only once.
1928
0df4ae96
KL
19292003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1930
1931 PR c++/9459
1932 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1933 (dump_type_suffix): Likewise.
1934
86ac0575
NS
19352003-02-14 Nathan Sidwell <nathan@codesourcery.com>
1936
1937 * search.c: ANSIfy function declarations and definitions.
1938 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1939 * call.c (build_method_call, resolve_scoped_fn_name,
1940 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1941 calls.
1942 * class.c (handle_using_decl): Likewise.
1943 * decl.c (make_typename_type, make_unmound_class_template,
1944 start_decl, compute_array_index_type): Likewise.
1945 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1946 * init.c (expand_member_init, build_member_call): Likewise.
1947 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1948 resolve_typename_type): Likewise.
1949 * typeck.c (lookup_destructor, finish_class_member_access_exprm
1950 build_prememfunc_access_expr): Likewise.
1951
fd295cb2
GDR
19522003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1953
1954 * decl2.c: Include "timevar.h".
1955 (namespace_ancestor): Time name lookup.
1956 (add_using_namespace): Likewise.
1957 (lookup_using_namespace): Likewise.
1958 (qualified_lookup_using_namespace): Likewise.
1959 (decl_namespace): Likewise.
1960 (lookup_arg_dependent): Likewise.
1961 * lex.c (do_identifier): Likewise.
1962 (do_scoped_id): Likewise.
1963 * pt.c (lookup_template_class): Likewise.
1964
62ed060f
AP
19652003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
1966
d9b2742a 1967 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
40a4184c 1968
22ffcc6f
GDR
19692003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
1970
1971 * decl.c: Include "timevar.h".
1972 (poplevel): Time name lookup.
1973 (find_binding): Likewise.
1974 (push_namespace): Likewise.
1975 (pop_nested_namespace): Likewise.
1976 (store_bindings): Likewise.
1977 (maybe_push_to_top_level): Likewise.
1978 (pop_from_top_level): Likewise.
1979 (push_local_name): Likewise.
1980 (pushtag): Likewise.
1981 (pushdecl): Likewise.
1982 (pushdecl_with_scope): Likewise.
1983 (pushdecl_namespace_level): Likewise.
1984 (pushdecl_top_level): Likewise.
1985 (pushdecl_class_level): Likewise.
1986 (push_class_level_binding): Likewise.
1987 (push_using_decl): Likewise.
1988 (push_using_directive): Likewise.
1989 (push_overloaded_decl): Likewise.
1990 (lookup_label): Likewise.
1991 (define_label): Likewise.
1992 (lookup_tag): Likewise.
1993 (lookup_tag_reverse): Likewise.
1994 (lookup_namespace_name): Likewise.
1995 (select_decl): Likewise.
1996 (unqualified_namespace_lookup): Likewise.
1997 (lookup_name_real): Likewise.
1998 (lookup_name_current_level): Likewise.
1999 (lookup_type_current_level): Likewise.
2000 (maybe_inject_for_scope_var): Likewise.
2001 (xref_tag): Likewise.
2002
2003 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
40a4184c 2004
6a540f3c
PE
20052003-02-12 Phil Edwards <pme@gcc.gnu.org>
2006
2007 * decl.c (build_enumerator): Remove unneeded test.
2008
7a93f739
DN
20092003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
2010
2011 * cp-tree.h (struct lang_type_header): Make all fields unsigned
2012 char.
2013
b80f8ef3
MM
20142003-02-03 Mark Mitchell <mark@codesourcery.com>
2015
2016 PR c++/7129
2017 * call.c (z_candidate): Add args.
2018 (convert_class_to_reference): Set it.
2019 (implicit_conversion): Tidy.
2020 (add_candidate): Add args parameter.
2021 (add_function_candidate): Adjust call to add_candidate.
2022 (add_conv_candidate): Likewise.
2023 (build_builtin_candidate): Likewise.
2024 (build_user_type_conversion_1): Eliminate wasteful tree_cons
2025 usage.
2026 (build_new_function_call): Likewise.
2027 (build_object_call): Likewise.
2028 (add_candidates): New function.
2029 (build_new_op): Use it.
2030 (covert_like_real): Adjust call to build_over_call.
2031 (build_over_call): Remove args parameter.
2032 * operators.def: Add <?= and >?=.
2033
271bd540
RS
20342003-02-01 Richard Sandiford <rsandifo@redhat.com>
2035
2036 * typeck.c (build_indirect_ref): Don't check flag_volatile.
2037
db0f613d
KL
20382003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2039
2040 PR c++/8849
2041 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
2042
1824b90d
NS
20432003-01-31 Nathan Sidwell <nathan@codesourcery.com>
2044
2045 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
2046 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
2047 (BINFO_LANG_ELTS): New #define.
2048 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
2049
f099d360
GK
20502003-01-30 Geoffrey Keating <geoffk@apple.com>
2051
2052 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
2053
5552b43c
MM
20542003-01-30 Mark Mitchell <mark@codesourcery.com>
2055
2056 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
2057 for class types.
2058 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
2059 rather than TYPE_LANG_FLAG_0.
2060 (TYPE_BUILT_IN): Remove.
2061 (TYPE_DEPENDENT_P): New macro.
2062 (TYPE_DEPENDENT_P_VALID): Likewise.
2063 (lang_type_class): Add fields_readonly.
2064 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
2065 * pt.c (dependent_type_p_r): New function, split out from ...
2066 (dependent_type_p): ... here. Memoize results.
2067 * search.c (dependent_base_p): Use dependent_type_p, not
2068 uses_template_parms.
2069 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
2070 for class types.
2071
14d22dd6
MM
20722003-01-29 Mark Mitchell <mark@codesourcery.com>
2073
2074 * call.c (build_field_call): Use build_new_op, not build_opfncall.
2075 (prep_operand): New function.
2076 (build_new_op): Use it. Remove dead code.
2077 * class.c (pushclass): Change "modify" parameter type from int to
2078 bool.
2079 (currently_open_class): Use same_type_p, not pointer equality.
2080 (push_nested_class): Adjust calls to pushclass, remove modify
2081 parameter.
2082 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
2083 (pushclass): Change prototype.
2084 (push_nested_class): Likewise.
2085 (grokoptypename): Remove.
2086 (build_opfncall): Remove.
2087 (value_dependent_expression_p): Declare.
2088 (resolve_typename_type): Likewise.
2089 (resolve_typename_type_in_current_instantiation): Likewise.
2090 (enter_scope_of): Remove.
2091 (tsubst): Remove.
2092 (tsubst_expr): Likewise.
2093 (tsubst_copy): Likewise.
2094 (tsubst_copy_and_build): Likewise.
2095 * decl.c (warn_about_implicit_typename_lookup): Remove.
2096 (finish_case_label): Return error_mark_node for erroneous labels.
2097 (start_decl): Adjust calls to push_nested_class.
2098 (grokfndecl): Call push_scope/pop_scope around call to
2099 duplicate_decls.
2100 (grokdeclarator): Do not call tsubst.
2101 (start_function): Adjust calls to push_nested_class.
2102 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
2103 (check_classfn): Use push_scope/pop_scope around type comparisions.
2104 (grokoptypename): Remove.
2105 (push_sscope): Adjust call to push_nested_class.
2106 * error.c (dump_type): Show cv-qualification of typename types.
2107 * init.c (build_member_call): Use build_new_op, not
2108 build_opfncall.
2109 * method.c (build_opfncall): Remove.
2110 * parser.c (cp_parser): Add allow_non_constant_expression_p and
2111 non_constant_expression_p.
2112 (cp_parser_constant_expression): Adjust prototype.
2113 (cp_parser_resolve_typename_type): Remove.
2114 (cp_parser_non_constant_expression): New function.
2115 (cp_parser_non_constant_id_expression): Likewise.
2116 (cp_parser_new): Set allow_non_constant_expression_p and
2117 non_constant_expression_p.
2118 (cp_parser_primary_expression): Reject `this' and `va_arg' in
2119 constant-expressions. Note that dependent names aren't really
2120 constant.
2121 (cp_parser_postfix_expression): Reject conversions to non-integral
2122 types in constant-expressions. Neither are increments or
2123 decrements.
2124 (cp_parser_unary_expression): Reject increments and decrements in
2125 constant-expressions.
2126 (cp_parser_direct_new_declarator): Adjust call to
2127 cp_parser_constant_expression.
2128 (cp_parser_cast_expression): Reject conversions to non-integral
2129 types in constant-expressions.
2130 (cp_parser_assignment_expression): Rejects assignments in
2131 constant-expressions.
2132 (cp_parser_expression): Reject commas in constant-expressions.
2133 (cp_parser_labeled_statement): Adjust call to
2134 cp_parser_constant_expression.
2135 (cp_parser_direct_declarator): Simplify array bounds, even in
2136 templates, when they are non-dependent. Use
2137 resolve_typename_type, not cp_parser_resolve_typename_type.
2138 (cp_parser_class_head): Use resolve_typename_type, not
2139 cp_parser_resolve_typename_type.
2140 (cp_parser_member_declaration): Adjust call to
2141 cp_parser_constant_expression.
2142 (cp_parser_constant_initializer): Likewise.
2143 (cp_parser_constructor_declarator): Use resolve_typename_type, not
2144 cp_parser_resolve_typename_type.
2145 (cp_parser_late_parsing_default_args): Adjust call to
2146 push_nested_class.
2147 * pt.c (tsubst): Give it internal linkage.
2148 (tsubst_expr): Likewise.
2149 (tsubst_copy): Likewise.
2150 (tsubst_copy_and_build): Likewise.
2151 (push_access_scope_real): Likewise.
2152 (tsubst_friend_class): Likewise.
2153 (instantiate_class_template): Adjust call to pushclass.
2154 (value_dependent_expression_p): Give it external linkage.
2155 Robustify.
2156 (resolve_typename_type): New function.
2157 * semantics.c (finish_call_expr): Use build_new_op, not
2158 build_opfncall.
2159 (begin_constructor_declarator): Remove.
2160 (begin_class_definition): Adjust call to pushclass.
2161 (enter_scope_of): Remove.
2162 * typeck.c (comptypes): Resolve typename types as appropriate.
2163 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
2164 (build_x_compound_expr): Likewise.
2165 (build_modify_expr): Likewise.
2166 (build_x_modify_expr): Likewise.
2167 * typeck2.c (build_x_arrow): Likewise.
40a4184c 2168
be5a07ac
FJ
21692003-01-29 Fariborz Jahanian <fjahanian@apple.com>
2170
d9b2742a 2171 * pt.c (last_pending_template) Declare GTY().
be5a07ac 2172
710b73e6
KL
21732003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2174
2175 PR c++/8591
2176 * parser.c (cp_parser_elaborated_type_specifier): Convert
2177 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
2178 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
2179
f2ce60b8
NS
21802003-01-28 Nathan Sidwell <nathan@codesourcery.com>
2181
9ae58faf
NS
2182 PR c++/9437
2183 * pt.c (unify): Don't unify '*T' with 'U C::*'.
2184
f2ce60b8
NS
2185 PR c++/3902
2186 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
2187 inside a declarator.
2188
a2ddc397
NS
21892003-01-27 Nathan Sidwell <nathan@codesourcery.com>
2190
2191 * class.c (update_vtable_entry_for_fn): Add index parameter.
2192 Generate vcall thunk for covariant overriding from a virtual
2193 primary base.
2194 (dfs_modify_vtables): Adjust.
2195
bbaab916
NS
21962003-01-25 Nathan Sidwell <nathan@codesourcery.com>
2197
2198 PR c++/9403
2199 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
2200 template keyword.
2201 (cp_parser_base_specifier): Look for and consume a
2202 TEMPLATE keyword. Replace switch with array index.
2203
2204 PR c++/795
2205 * semantics.c (finish_non_static_data_member): Remember the
2206 field's type even in a template.
2207
2208 PR c++/9415
2209 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
2210 already scoped.
40a4184c 2211
bbaab916
NS
2212 PR c++/8545
2213 * parser.c (cp_parser_cast_expression): Be more tentative.
2214
fb8eab96
KL
22152003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2216
2217 * cp-tree.h (flagged_type_tree_s): Remove.
2218 (check_for_new_type): Likewise.
2219 * typeck2.c (check_for_new_type): Likewise.
2220
c38e9817
NN
22212003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
2222
ee42dd9d
NN
2223 * dump.c: ANSIfy function declarations and definitions.
2224
c38e9817
NN
2225 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
2226
c006d942
MM
22272003-01-22 Mark Mitchell <mark@codesourcery.com>
2228
2229 PR c++/9354
2230 * init.c (build_new): Set the type of the new-expression, even
2231 when processing_templte_decl.
2232
2233 PR c++/9216
2234 * parser.c (cp_parser_primary_expression): Improve error message
2235 for templates used in an expression context.
2236
2237 PR c++/8696
2238 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
2239 parse when encountering "typedef".
2240
94edc4ab
NN
22412003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
2242
2243 * class.c, parser.c: ANSIfy function definitions and declarations.
2244
e0860732
MM
22452003-01-22 Mark Mitchell <mark@codesourcery.com>
2246
65a5559b
MM
2247 PR c++/9328
2248 * error.c (dump_decl): For an OVERLOAD, just print the name of the
2249 function; it doesn't make sense to try to print its type.
2250 * semantics.c (finish_typeof): Issue errors about invalid uses.
2251
e0860732
MM
2252 PR c++/9298
2253 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
2254 function.
2255 (cp_parser_expression_statement): Use it.
2256 (cp_parser_explicit_instantiation): Likewise.
2257 * pt.c (do_decl_instantiation): Improve error handling logic.
40a4184c 2258
1fb3244a
MM
22592003-01-22 Mark Mitchell <mark@codesourcery.com>
2260
4eb6d609
MM
2261 PR c++/9384
2262 * parser.c (cp_parser_using_declaration): Issue error messages
2263 about name resolution failures here.
2264
1fb3244a
MM
2265 PR c++/9388
2266 * class.c (currently_open_derived_class): Use dependent_type_p.
2267 * cp-tree.h (dependent_type_p): New function.
2268 (dependent_template_arg_p): Likewise.
2269 (dependent_template_p): Likewise.
2270 (type_dependent_expression_p): Likewise.
2271 * parser.c (cp_parser_dependent_type_p): Remove.
2272 (cp_parser_value_dependent_type_p): Likewise.
2273 (cp_parser_type_dependent_expression_p): Likewise.
2274 (cp_parser_dependent_template_arg_p): Likewise.
2275 (cp_parser_dependent_template_id_p): Likewise.
2276 (cp_parser_dependent_template_p): Likewise.
2277 (cp_parser_diagnose_invalid_type_name): Replace
2278 cp_parser_dependent_type_p with dependent_type_p, etc.
2279 (cp_parser_primary_expresion): Likewise.
2280 (cp_parser_nested_name_specifier_opt): Likewise.
2281 (cp_parser_postfix_expression): Likewise.
2282 (cp_parser_unary_expression): Likewise.
2283 (cp_parser_template_name): Likewise.
2284 (cp_parser_class_name): Likewise.
2285 (cp_parser_lookup_name): Likewise.
2286 * pt.c (dependent_type_p): New function.
2287 (value_dependent_expression_p): Likewise.
2288 (type_dependent_expression_p): Likewise.
2289 (dependent_template_arg_p): Likewise.
2290 (dependent_template_id_p): Likewise.
2291 (dependent_template_p): Likewise.
40a4184c 2292
1fb3244a
MM
2293 PR c++/9285
2294 PR c++/9294
00b51d29 2295 * parser.c (cp_parser_simple_declaration): Return quickly when
d9b2742a 2296 encountering errors.
1fb3244a 2297
dd859b8a
KG
22982003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2299
2300 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
2301
753225c1
JM
23022003-01-17 Jason Merrill <jason@redhat.com>
2303
2304 PR c++/9167, c++/9358
2305 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
2306
77b996cc
JM
23072003-01-17 Jason Merrill <jason@redhat.com>
2308
2309 PR c++/9342
2310 * call.c (build_conditional_expr): Always do lvalue-rvalue
2311 conversion.
2312
5dae1114
MM
23132003-01-17 Mark Mitchell <mark@codesourcery.com>
2314
2315 PR c++/9294
2316 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
2317 * cp-tree.h (BASELINK_BINFO): Adjust.
2318 (BASELINK_FUNCTIONS): Likewise.
2319 (BASELINK_ACCESS_BINFO): Likewise.
2320 (tree_baselink): New structure.
2321 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
2322 (lang_tree_node): Add baselink.
2323 * decl.c (cp_tree_node_structure): Add BASELINK case.
2324 * search.c (build_baselink): Adjust.
2325 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
2326 test from TREE_LIST case.
2327
2328 PR c++/9272
2329 * parser.c (cp_parser_constructor_declarator_p): Do not assume
2330 that a constructor cannot be declared outside of its own class.
40a4184c 2331
5dae1114
MM
2332 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
2333 be resolved, neither can the qualified name.
2334
2335 * rtti.c (get_pseudo_ti_desc): Fix thinko.
2336
a48cccea
JM
23372003-01-16 Jason Merrill <jason@redhat.com>
2338
2339 PR c++/8564
2340 * init.c (build_vec_init): Re-add maxindex parm.
2341 (perform_member_init, build_aggr_init): Pass it.
2342 (build_new_1): Pass it. Use an incomplete array type for full_type.
2343 * typeck.c (build_modify_expr): Pass it.
2344 * cp-tree.h: Adjust.
2345
cc23546e
JO
23462003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
2347
2348 * cp-tree.h (tsubst_copy_and_build): New declaration.
2349 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
2350 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
2351 (tsubst_copy_and_build): New function.
2352
8fbc5ae7
MM
23532003-01-16 Mark Mitchell <mark@codesourcery.com>
2354
2355 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
2356 (PARTIAL_INSTANTIATION_P): Remove.
2357 (IMPLICIT_TYPENAME_P): Likewise.
2358 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
2359 (build_typename_type): Remove declaration.
2360 (parmlist_is_exprlist): Likewise.
2361 * decl.c (build_typename_type): Make it static, remove third
2362 parameter.
2363 (push_class_binding): Don't do implicit typename stuff.
2364 (make_typename_type): Likewise.
2365 (lookup_name_real): Likewise.
2366 (grokdeclarator): Don't try to convert declarations into
2367 initializations. Don't do implicit typename stuff.
2368 (parmlist_is_exprlist): Remove.
2369 (xref_basetypes): Simplify.
2370 * decl2.c (grokfield): Don't try to convert declarations into
2371 initializations.
2372 (build_anon_union_vars): Do this while processing templates, too.
2373 (finish_anon_union): Likewise.
2374 * error.c (dump_type): Remove implicit typename handling.
2375 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
2376 (cp_parser_primary_expression): Correct handling of names not
2377 found by unqualified name lookup in templates.
2378 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
2379 of types when possible.
2380 (cp_parser_simple_declaration): Complain intelligently about some
2381 invalid declarations.
2382 (cp_parser_member_declaration): Likewise.
2383 (cp_parser_constructor_declarator_p): Don't check when we're in a
2384 function scope.
2385 * pt.c (instantiate_class_template): Remove
2386 PARTIAL_INSTANTIATION_P gunk.
2387 * search.c (lookup_field_r): Don't build implicit typenames.
2388 (marked_pushdecls_p): Don't enter dependent base types.
2389 (unmarked_pushdecls_p): Likewise.
2390 * semantics.c (begin_class_definition): Remove implicit typename
2391 stuff.
2392
712becab
NS
23932003-01-16 Nathan Sidwell <nathan@codesourcery.com>
2394
2395 PR c++/9212
2396 * parser.c (cp_parser_direct_declarator): If accepting either
2397 abstract or named, the name must be an unqualified-id.
2398
fc555370
KG
23992003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2400
2401 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
2402
dd1b7476
KG
24032003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2404
2405 * decl2.c (check_classfn): Fix uninitialized warning.
2406 (build_anon_union_vars): Likewise.
2407 * pt.c (tsubst_copy): Likewise.
2408
a7189b49
JO
24092003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
2410
2411 Further conform g++'s __vmi_class_type_info to the C++ ABI
2412 specification.
2413 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
2414 the specification.
2415 (class_hint_flags): Likewise.
2416
cf22909c
KL
24172003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2418
2419 * config-lang.in: Add semantics.c to gtfiles.
2420 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
2421 (saved_scope): Likewise.
2422 (type_lookups): Remove.
2423 (deferred_access): New structure.
2424 (type_access_control): Remove.
2425 (save_type_access_control): Likewise.
2426 (reset_type_access_control): Likewise.
2427 (decl_type_access_control): Likewise.
2428 (push_deferring_access_checks): Declare.
2429 (resume_deferring_access_checks): Likewise.
2430 (stop_deferring_access_checks): Likewise.
2431 (pop_deferring_access_checks): Likewise.
2432 (get_deferred_access_checks): Likewise.
2433 (pop_to_parent_deferring_access_checks): Likewise.
2434 (perform_deferred_access_checks): Likewise.
2435 (perform_or_defer_access_check): Likewise.
2436 * decl.c (make_typename_type): Use perform_or_defer_access_check.
2437 (make_unbound_class_template): Likewise.
2438 (grokdeclarator): Don't call decl_type_access_control.
2439 * parser.c (cp_parser_context): Remove deferred_access_checks
2440 and deferring_access_checks_p fields.
2441 (cp_parser_context_new): Adjust.
2442 (cp_parser): Remove access_checks_lists.
2443 (cp_parser_defer_access_check): Remove.
2444 (cp_parser_start_deferring_access_checks): Remove.
2445 (cp_parser_stop_deferring_access_checks): Remove.
2446 (cp_parser_perform_deferred_access_checks): Remove.
2447 (cp_parser_nested_name_specifier_opt): Use new deferred access
2448 functions.
2449 (cp_parser_simple_declaration): Likewise.
2450 (cp_parser_template_id): Likewise.
2451 (cp_parser_function_definition): Likewise.
2452 (cp_parser_class_specifier): Likewise.
2453 (cp_parser_lookup_name): Likewise.
2454 (cp_parser_single_declaration): Likewise.
2455 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
2456 (cp_parser_parse_tentatively): Likewise.
2457 (cp_parser_parse_definitely): Likewise.
2458 (yyparse): Likewise.
2459 (cp_parser_init_declarator): Remove access_checks parameter.
2460 Use new deferred access functions.
2461 (cp_parser_function_definition_from_specifiers_and_declarator):
2462 Likewise.
2463 (cp_parser_class_head): Remove deferring_access_checks_p and
2464 saved_access_checks parameters. Use new deferred access functions.
2465 (cp_parser_member_specification_opt): Don't call
2466 reset_type_access_control.
2467 * search.c (type_access_control): Remove.
2468 * semantics.c: Include "gt-cp-semantics.h".
2469 (deferred_type_access_control): Remove.
2470 (deferred_access_stack): New variable.
2471 (deferred_access_free_list): Likewise.
2472 (push_deferring_access_checks): New function.
2473 (resume_deferring_access_checks): Likewise.
2474 (stop_deferring_access_checks): Likewise.
2475 (pop_deferring_access_checks): Likewise.
2476 (get_deferred_access_checks): Likewise.
2477 (pop_to_parent_deferring_access_checks): Likewise.
2478 (perform_deferred_access_checks): New function, adapted from
2479 cp_parser_perform_deferred_access_checks.
2480 (perform_or_defer_access_check): New function, adapted from
2481 cp_parser_defer_access_check.
2482 (current_type_lookups): Remove.
2483 (deferred_type_access_control): Likewise.
2484 (decl_type_access_control): Likewise.
2485 (save_type_access_control): Likewise.
2486 (reset_type_access_control): Likewise.
2487 (begin_function_definition): Adjust.
2488 (begin_class_definiton): Likewise.
2489
f576dfc4
JM
24902003-01-13 Jason Merrill <jason@redhat.com>
2491
2492 PR c++/8748
2493 * class.c (build_base_path): Take the address before calling save_expr.
2494
2495 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
2496 all the ambiguous conversions are bad.
2497
2498 * class.c (maybe_warn_about_overly_private_class): Don't stop
2499 searching when we find a nonprivate method.
2500
2501 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
2502
8fa1ad0e
MM
25032003-01-12 Mark Mitchell <mark@codesourcery.com>
2504
2505 * cp-tree.h (get_arglist_len_in_bytes): Remove.
2506
2507 PR c++/9264
2508 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
2509 typeame types more robustly.
2510
15d2cb19
PE
25112003-01-11 Phil Edwards <pme@gcc.gnu.org>
2512
2513 * parser.c: Fix comment typos.
2514
a6f6052a
MM
25152003-01-10 Mark Mitchell <mark@codesourcery.com>
2516
99152b95 2517 PR c++/9099
a6f6052a
MM
2518 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
2519 an object_type which is not a class type.
2520
3466b292
GK
25212003-01-10 Geoffrey Keating <geoffk@apple.com>
2522
2523 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
2524 (cp_parser_late_parsing_default_args): Likewise.
2525
b2f29cd9
NN
25262003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
2527
2528 * cfns.gperf: ANSIfy function declarations.
2529 * cfns.h: Regenerate.
2530 * cp-tree.h: ANSIfy function declarations.
2531
2050a1bb
MM
25322003-01-10 Mark Mitchell <mark@codesourcery.com>
2533
2534 * cp-tree.h (reparse_absdcl_as_expr): Remove.
2535 (reparse_absdcl_as_casts): Likewise.
2536 (reparse_decl_as_expr): Likewise.
2537 (finish_decl_parsing): Likewise.
2538 * decl2.c (reparse_absdcl_as_expr): Remove.
2539 (reparse_absdcl_as_casts): Likewise.
2540 (repase_decl_as_expr): Likewise.
2541 (finish_decl_parsing): Likewise.
2542
2543 PR c++/9128
2544 PR c++/9153
2545 PR c++/9171
2546 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
2547 function.
2548 (cp_parser_nested_name_specifier_opt): Correct the
2549 check_dependency_p false.
2550 (cp_parser_postfix_expression): Fix formatting.
2551 (cp_parser_decl_specifier_seq): Avoid looking for constructor
2552 declarators when possible.
2553 (cp_parser_template_id): Avoid performing name-lookup when
2554 possible.
2555 (cp_parser_class_head): Do not count specializations when counting
2556 levels of templates.
2557 (cp_parser_constructor_declarator_p): Return immediately if
2558 there's no chance that the tokens form a constructor declarator.
2559 * rtti.c (throw_bad_typeid): Add comment. Do not return an
2560 expression with reference type.
2561 (get_tinfo_decl_dynamic): Do not return an expression with
2562 reference type.
2563 (build_typeid): Add comment. Do not return an expression with
2564 reference type.
2565 * typeck.c (build_class_member_access_expr): Improve handling of
2566 conditionals and comma-expressions as objects.
2567
45225759
NN
25682003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2569
d9b2742a
ZW
2570 * cfns.gperf: ANSIfy function declarations.
2571 * cfns.h: Regenerate.
2572 * cp-tree.h: ANSIfy function declarations.
2573 * parser.c: ANSIfy function declarations & definitions.
b2f29cd9 2574
45225759
NN
2575 * decl.c (bad_specifiers): Fix parameter order error I introduced.
2576
17211ab5
GK
25772003-01-09 Geoffrey Keating <geoffk@apple.com>
2578
2579 Merge from pch-branch:
2580
2581 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2582
2583 Merge to tag pch-merge-20030102:
40a4184c 2584
17211ab5
GK
2585 * semantics.c (finish_translation_unit): Don't call finish_file.
2586 * parser.c: Don't include ggc.h.
2587 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
2588 read first token here. Don't allow PCH files after the first
2589 token is read.
2590 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
2591 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
2592 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
2593 (cp_parser_late_parsing_for_member): Don't duplicate call to
2594 cp_lexer_set_source_position_from_token.
2595 (cp_parser_late_parsing_default_args): Likewise.
2596 (yyparse): Call finish_file after clearing the_parser.
2597
2598 2002-12-11 Geoffrey Keating <geoffk@apple.com>
2599
2600 * Make-lang.in: Remove $(GGC_H) from all dependencies.
2601 (CXX_TREE_H): Add $(GGC_H).
40a4184c 2602 * class.c: Don't include ggc.h.
17211ab5
GK
2603 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
2604 (method_name_cmp): Likewise.
2605 (resort_data): New variable.
2606 (resort_field_decl_cmp): New.
2607 (resort_method_name_cmp): New.
2608 (resort_sorted_fields): New.
2609 (resort_type_method_vec): New.
2610 (finish_struct_methods): Delete cast.
2611 (finish_struct_1): Delete cast.
2612 * cp-tree.h: Include ggc.h.
2613 (struct lang_type_class): Add reorder attribute to field `methods'.
2614 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
2615 (resort_sorted_fields): New prototype.
2616 (resort_type_method_vec): New prototype.
2617 * call.c: Don't include ggc.h.
2618 * decl.c: Likewise.
2619 * decl2.c: Likewise.
2620 * init.c: Likewise.
2621 * lex.c: Likewise.
2622 * method.c: Likewise.
2623 * optimize.c: Likewise.
2624 * parse.y: Likewise.
2625 * pt.c: Likewise.
2626 * repo.c: Likewise.
2627 * search.c: Likewise.
2628 * semantics.c: Likewise.
2629 * spew.c: Likewise.
2630 * tree.c: Likewise.
2631
2632 * lang-specs.h: Remove comment.
2633
2634 2002-12-03 Geoffrey Keating <geoffk@apple.com>
2635
2636 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
2637 (operator_name_info): Mark to be saved for PCH, specify size.
2638 (assignment_operator_name_info): Likewise.
2639
2640 2002-11-19 Geoffrey Keating <geoffk@apple.com>
2641
2642 * decl.c (anon_cnt): Mark to be saved for PCH.
2643
2644 2002-10-25 Geoffrey Keating <geoffk@apple.com>
2645
2646 * lex.c (init_reswords): Delete now-untrue comment.
2647 Allocate ridpointers using GGC.
2648
2649 2002-10-04 Geoffrey Keating <geoffk@apple.com>
2650
2651 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
2652
2653 * g++spec.c (lang_specific_driver): Don't include standard
2654 libraries in `added'.
2655
2656 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
2657
2658 * decl2.c (finish_file): Call c_common_write_pch.
2659 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
2660
2661 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
2662
2663 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
2664 files when using g++.
2665 * lang-specs.h: Handle compiling C++ header files.
2666
ca5dd8b7
JJ
26672003-01-09 Jakub Jelinek <jakub@redhat.com>
2668
2669 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2670
0f399e5f
KL
26712003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2672
2673 * pt.c (push_access_scope_real): Call push_to_top_level for
2674 function in namespace scope.
2675 (pop_access_scope): Call pop_from_top_level for function in
2676 namespace scope.
2677
c456a45a
JJ
26782003-01-09 Jakub Jelinek <jakub@redhat.com>
2679
2680 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2681
2c6ce97e
CC
26822003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
2683
2684 * Make-lang.in (c++.install-common, c++.install-man,
2685 c++.uninstall): Prepend $(DESTDIR) to destination paths in
2686 all (un)installation commands.
2687 (c++.install-common): Rewrite $(LN) commands to support
2688 DESTDIR with "ln" as well as with "ln -s".
2689
f74dbcec
JM
26902003-01-08 Jason Merrill <jason@redhat.com>
2691
2692 * parser.c (cp_parser_primary_expression): See through explicitly
2693 scoped ALIAS_DECLs, too.
2694
11f6b451
NN
26952003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
2696
1774f99d
NN
2697 * decl.c: Remove some #if 0 code.
2698
11f6b451
NN
2699 * decl.c: ANSIfy function declarations.
2700
8caf4c38
MM
27012003-01-07 Mark Mitchell <mark@codesourcery.com>
2702
2703 * parser.c (cp_parser_asm_definition): Correct handling of omitted
2704 operands.
2705
2b59fc25
KL
27062003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2707
2708 PR c++/9030
2709 * decl.c (make_typename_type): Check access only when tf_error.
2710 (make_unbound_class_template): Likewise.
2711 * pt.c (saved_access_scope): New variable.
2712 (push_access_scope_real): New function.
2713 (push_access_scope): Likewise.
2714 (pop_access_scope): Likewise.
2715 (tsubst_default_argument): Use them.
2716 (instantiate_template): Likewise.
2717 (regenerate_decl_from_template): Likewise.
2718 (instantiate_decl): Likewise.
2719 (get_mostly_instantiated_function_type): Likewise.
2720
3f7617e4
NN
27212003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
2722
2723 * tree.c: Delete bogus #if 0 code.
2724
c9372112
AS
27252003-01-07 Andreas Schwab <schwab@suse.de>
2726
2727 * class.c (layout_class_type): Don't use
2728 PCC_BITFIELD_TYPE_MATTERS if not defined.
2729
8218bd34
MM
27302003-01-06 Mark Mitchell <mark@codesourcery.com>
2731
c10cdb3d
MM
2732 PR c++/9165
2733 * decl2.c (build_cleanup): Mark the object as used.
2734
69f794a7
MM
2735 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2736 (hash_local_specialization): New function.
2737 (register_local_specialization): Revert 2003-01-05 change.
2738 (instantiate_decl): Use hash_local_specialization when creating
2739 the local_specializations table.
40a4184c 2740
4c4646b5
MM
2741 * decl2.c (mark_used): Do not synthesize thunks.
2742
63e5f567
MM
2743 * class.c (layout_class_type): Correct handling of unnamed
2744 bitfields wider than their types.
2745
8218bd34
MM
2746 PR c++/9189
2747 * parser.c (cp_parser): Remove default_arg_types. Update
2748 documentation for unparsed_functions_queues.
2749 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2750 parameter.
2751 (cp_parser_new): Don't set parser->default_arg_types.
2752 (cp_parser_function_definition): Adjust usage of
2753 unparsed_funtions_queues.
2754 (cp_parser_class_specifier): Don't mess with
2755 parser->default_arg_types. Handle default argument processing in
2756 a separate phase from function body processing.
2757 (cp_parser_template_declaration_after_export): Adjust usage of
2758 unparsed_functions_queues.
2759 (cp_parser_late_parsing_for_member): Do not handle default
2760 arguments.
2761
62b8a44e
NS
27622003-01-06 Nathan Sidwell <nathan@codesourcery.com>
2763
2764 PR c++/9109
2765 * parser.c (cp_parser_declarator_kind): New enum.
2766 (cp_parser_declarator): Adjust.
2767 (cp_parser_direct_declarator): Adjust. Allow for either named or
2768 abstract declarator. Prefer abstract, if possible. Allow
2769 parenthesized function name.
2770 (cp_parser_condition): Adjust cp_parser_declarator call.
2771 (cp_parser_explicit_instantiation): Likewise.
2772 (cp_parser_init_declarator): Likewise.
2773 (cp_parser_type_id): Likewise.
2774 (cp_parser_function_definition): Likewise.
2775 (cp_parser_member_declaration): Likewise.
2776 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2777 the tentative parsing.
2778 (cp_parser_exception_declaration): Likewise.
2779
ec194454
MM
27802003-01-05 Mark Mitchell <mark@codesourcery.com>
2781
2782 * parser.c (cp_parser_template_parameter): Adjust call to
2783 cp_parser_parameter_declaration.
2784 (cp_parser_parameter_declaration_list): Likewise.
2785 (cp_parser_parameter_declaration): Replace
2786 greater_than_is_operator_p with template_parm_p parameter. Do not
2787 cache tokens for template default arguments.
2788
2789 * pt.c (retrieve_local_specialization): Use htab_find, not
2790 htab_find_with_hash.
2791 (register_local_specialization): Use htab_find_slot, not
2792 htab_find_slot_with_hash.
2793 (instantiate_decl): Pass a hash function to htab_create.
40a4184c 2794
39b1af70
KG
27952003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2796
2797 * parser.c (cp_parser_binary_expression,
2798 cp_parser_multiplicative_expression,
2799 cp_parser_additive_expression, cp_parser_shift_expression,
2800 cp_parser_relational_expression, cp_parser_equality_expression,
2801 cp_parser_and_expression, cp_parser_exclusive_or_expression,
2802 cp_parser_inclusive_or_expression,
2803 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2804 cp_parser_binary_expression): Const-ify.
2805
1bb2cc34
MM
28062003-01-04 Mark Mitchell <mark@codesourcery.com>
2807
2808 * method.c (use_thunk): Disable access control while building the
2809 body of the thunk.
2810
3fd5abcf
NN
28112003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
2812
40a4184c 2813 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
3fd5abcf
NN
2814 front end.
2815
9aad8f83
MA
28162003-01-03 Matt Austern <austern@apple.com>
2817
2818 * cp-tree.h (struct lang_type_class): add field for key method
2819 (cp_global_trees): rename dynamic_classes to keyed_classes
2820 (key_method): add definition
2821 * class.c (finish_struct_1): compute class's key method, and add
2822 the class to keyed_classes list if there is no key method.
2823 * decl.c (finish_function): add class to keyed_classes list if we
2824 see a definition of the class's key method.
2825 * pt.c (instantiate_class_template): add template specialization
2826 of a dynamic class to keyed_classes list.
2827 * decl2.c (key_method): remove
2828 (finish_file): iterate only through keyed_classes list when
2829 deciding whether to emit vtables, remove class from its list after
2830 we do the emission.
40a4184c 2831
6cce57b0
JM
28322003-01-02 Jason Merrill <jason@redhat.com>
2833
4e8dca1c
JM
2834 * call.c (build_conditional_expr): Stabilize lvalues properly.
2835 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2836 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2837 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2838
2839 * call.c (convert_like_real): Call decl_constant_value for an
2840 IDENTITY_CONV even if there are no more conversions.
2841
2842 * cvt.c (build_up_reference): Don't push unnamed temps.
2843
2844 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2845
2846 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2847 for a backend struct.
2848
2849 * except.c (wrap_cleanups_r, build_throw): Make
2850 MUST_NOT_THROW_EXPRs void.
2851 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2852
2853 * init.c (build_vec_delete_1): Pre-evaluate the base address.
2854
2855 * init.c (get_temp_regvar): Simplify logic.
2856
2857 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2858 our replacement is a decl.
2859
6cce57b0
JM
2860 * decl.c (cp_make_fname_decl): Push the decls inside the
2861 outermost scope.
2862
31758337
NS
28632003-01-03 Nathan Sidwell <nathan@codesourcery.com>
2864
2865 PR c++/45, c++/3784
2866 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2867 the same too.
2868
24c0ef37
GS
28692003-01-03 Graham Stott <graham.stott@btinternet.com>
2870
2871 * parser.c (struct cp_parser): Add access_checks_lists field
2872 (cp_parser_simple_declaration): Use.
40a4184c 2873 (cp_parser_init_declarator): Likewise.
24c0ef37 2874
5e8a153a
MM
28752003-01-02 Mark Mitchell <mark@codesourcery.com>
2876
1092805d
MM
2877 * parser.c (cp_parser_declaration): Accept the __extension__
2878 keyword before the declaration.
2879
4971227d
MM
2880 PR c++/2843
2881 * parser.c (cp_parser_parameter_declaration): Allow attributes to
2882 appear after the declarator.
2883
5e8a153a
MM
2884 * call.c (build_new_method_call): Fix typo in message format
2885 string.
2886
3beb3abf
MM
28872003-01-02 Mark Mitchell <mark@codesourcery.com>
2888
f7b5ecd9
MM
2889 * parser.c (cp_lexer_next_token_is): Declare it inline.
2890 (cp_lexer_set_source_position_from_token): Likewise.
2891 (cp_lexer_debugging_p): Likewise.
2892 (cp_parser_parsing_tentatively): Likewise.
2893 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2894 to the cp_lexer_peek_token.
1092805d 2895
3beb3abf
MM
2896 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2897 expression.
2898
43c6a96a
SB
28992003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
2900
2901 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2902 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2903 cp/repo.c: Fix copyright years.
2904
c58b209a
NB
29052003-01-01 Neil Booth <neil@daikokuya.co.uk>
2906
2907 * lex.c: Remove superfluous include of cpplib.h.
2908 (CONSTRAINT): Define without conditions.
2909 (init_cp_pragma): Use c_register_pragma.
2910
7347c2c5
NB
29112002-12-31 Neil Booth <neil@daikokuya.co.uk>
2912
2913 * .cvsignore: Remove.
2914
f5adbb8d
SB
29152002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
2916
2917 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2918 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2919 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2920 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2921 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2922 copyright header.
2923 * lex.h: parse.y is dead, so don't mention it. Also replace the
2924 copyright header with the default GNU copyright header.
2925
f1aba0a5
MM
29262002-12-31 Mark Mitchell <mark@codesourcery.com>
2927
eea9800f
MM
2928 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2929 (lookup_name_namespace_only): Likewise.
2930 (begin_only_namespace_names): Likewise.
2931 (end_only_namespace_names): Likewise.
2932 * decl.c (only_namespace_names): Remove.
2933 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2934 (lookup_name_real): Do not check only_namespace_names.
2935 (lookup_name_namespace_only): Remove.
2936 (begin_only_namespace_names): Likewise.
2937 (end_only_namespace_names): Likewise.
2938 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2939 nested-name-specifiers more gracefully.
2940 (cp_parser_class_or_namespace_name): Avoid looking up namespace
2941 names when they cannot possibly appear.
2942 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2943 (cp_parser_elaborated_type_specifier): Likewise.
2944 (cp_parser_namespace_name): Only look for namespace names.
2945 (cp_parser_lookup_name): Add is_namespace parameter.
2946 (cp_parser_lookup_name_simple): Adjust call to
2947 cp_parser_lookup_name.
2948
f1aba0a5
MM
2949 * parser.c (cp_parser_dependent_type_p): Fix thinko.
2950
eea9800f
MM
29512002-12-31 Neil Booth <neil@daikokuya.co.uk>
2952
2953 * .cvsignore: Update.
2954
3cfabe60
NS
29552002-12-31 Nathan Sidwell <nathan@codesourcery.com>
2956
2957 * class.c (modify_vtable_entry): Remove unused variable.
2958 (get_vcall_index): Always expect a non-thunk.
2959 (update_vtable_entry_for_fn): Combine covariant adjustments, when
2960 overriding a thunk. Pass get_vcall_index a non-thunk.
2961
2962 * decl2.c (finish_file): Mark undefined inlines as extern.
2963
92bc1323
MM
29642002-12-31 Mark Mitchell <mark@codesourcery.com>
2965
2966 * cp-tree.def (RETURN_INIT): Remove.
2967 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2968 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2969 (note_level_for_for): Remove.
2970 (note_level_for_try): Likewise.
2971 (note_level_for_catch): Likewise.
2972 (finish_named_return_value): Likewise.
2973 (do_pushlevel): Change prototype.
2974 (pending_lang_change): Remove.
2975 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2976 sk_for.
2977 (note_level_for_for): Remove.
2978 (note_level_for_try): Likewise.
2979 (note_level_for_catch): Likewise.
2980 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2981 * parser.c (cp_parser_context_free_list): Make it "deletable".
2982 (cp_parser_template_argument): Remove misleading comment.
2983 * pt.c (tsubst_expr): Remove RETURN_INIT code.
2984 * semantics.c (genrtl_named_return_value): Remove.
2985 (do_pushlevel): Take a scope kind as an argument.
2986 (begin_if_stmt): Adjust.
2987 (begin_while_stmt): Likewise.
2988 (begin_for_stmt): Likewise.
2989 (finish_for_init_stmt): Likewise.
2990 (begin_switch_stmt): Likewise.
2991 (begin_handler): Likewise.
2992 (begin_compound_stmt): Likewise.
2993 (finish_named_return_value): Remove.
2994 (cp_expand_stmt): Remove RETURN_INIT case.
2995 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
43c6a96a 2996
abda8efe
MM
29972002-12-31 Mark Mitchell <mark@codesourcery.com>
2998
2999 PR c++/9112
3000 * parser.c (cp_parser_direct_declarator): Handle erroneous
3001 parenthesized declarators correctly.
3002
eddcae5a
GDR
30032002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3004
3005 * cp-tree.h (pending_lang_change): Declare.
3006
c838d82f
MM
30072002-12-30 Mark Mitchell <mark@codesourcery.com>
3008
e5976695
MM
3009 * parser.c (cp_parser_context_free_list): New variable.
3010 (cp_parser_context_new): Use it.
3011 (cp_parser_error): Check return code from
3012 cp_parser_simulate_error.
3013 (cp_parser_simulate_error): Return a value.
3014 (cp_parser_id_expression): Optimize common case.
3015 (cp_parser_class_name): Likewise.
3016 (cp_parser_class_specifier): Adjust call to
3017 cp_parser_late_parsing_default_args.
3018 (cp_parser_lookup_name): Optimize common case.
3019 (cp_parser_late_parsing_for_member): Adjust call to
3020 cp_parser_late_parsing_default_args.
3021 (cp_parser_late_parsing_default_args): Add scope parameter.
3022 (cp_parser_require): Avoid creating the error message unless it's
3023 needed.
3024 (cp_parser_parse_definitely): Place free'd contexts on the free
3025 list.
3026
c838d82f
MM
3027 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
3028
c73aecdf
DE
30292002-12-30 David Edelsohn <edelsohn@gnu.org>
3030
3031 * parser.c (cp_parser_parameter_declaration_clause): Treat system
3032 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
3033
b599b135
NN
30342002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
3035
43c6a96a 3036 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
b599b135
NN
3037 GCC, not GNU CC.
3038
946d5e45
MM
30392002-12-30 Mark Mitchell <mark@codesourcery.com>
3040
afd9b9dd
MM
3041 * parse.y: Remove.
3042 * spew.c: Likewise.
3043 * Make-lang.in (gt-cp-spew.h): Remove.
3044 * cp-tree.h (do_pending_lang_change): Remove.
3045 (do_identifier): Change prototype.
3046 (finish_id_expr): Remove.
3047 * decl.c (lookup_name_real): Remove yylex variable.
3048 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
3049 * lex.c (init_cpp_parse): Remove.
3050 (reduce_cmp): Likewise.
3051 (token_cmp): Likewise.
3052 (yychar): Likewise.
3053 (lastiddecl): Likewise.
3054 (token_count): Likewise.
3055 (reduce_count): Likewise.
3056 (yyhook): Likewise.
3057 (print_parse_statistics): Likewise.
3058 (do_pending_lang_change): Likewise.
3059 (do_identifier): Remove parsing parameter.
3060 * lex.h (lastiddecl): Remove.
3061 (looking_for_typename): Remove.
3062 (looking_for_template): Likewise.
3063 (pending_lang_change): Likewise.
3064 (yylex): Likewise.
3065 * semantics.c (finish_id_expr): Remove.
43c6a96a 3066
946d5e45
MM
3067 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
3068 thread" correctly.
3069
1c313945
NN
30702002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
3071
3072 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
3073 end, not the C front end.
3074
8e268f72
NS
30752002-12-30 Nathan Sidwell <nathan@codesourcery.com>
3076
3077 * cp-tree.h (THUNK_TARGET): New macro.
3078 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
3079 (finish_thunk): Remove offset parms.
3080 * class.c (find_final_overrider): Look through thunks.
3081 (get_vcall_index): Use THUNK_TARGET.
3082 (update_vtable_entry_for_fn): Look through thunks. Set covariant
3083 fixed offset here. Adjust finish_thunk call.
3084 (build_vtbl_initializer): Adjust finish_thunk calls.
3085 * mangle.c (mangle_call_offset): Remove superfluous if.
3086 (mangle_thunk): Adjust.
3087 * method.c (make_thunk): Adjust.
3088 (finish_thunk): Adjust.
3089 (thunk_adjust): Remove assert.
3090 (use_thunk): Use THUNK_TARGET
3091 * dump1.c (cp_dump_tree): Adjust thunk dumping.
3092
3093 PR c++/9054
3094 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
3095 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
3096
848eed92
GDR
30972002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3098
3099 Remove traditional C constructs 4/n.
3100 * decl2.c (grok_method_quals, warn_if_unknown_interface,
3101 grok_x_components, cp_build_parm_decl, build_artificial_parm,
3102 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
3103 delete_sanity, check_member_template, check_java_method,
3104 check_classfn, finish_static_data_member_decl, grokfield,
3105 grokbitfield, grokoptypename, grok_function_init,
3106 cplus_decl_attributes, constructor_name, defer_fn,
3107 build_anon_union_vars, finish_anon_union, coerce_new_type,
3108 coerce_delete_type, comdat_linkage, maybe_make_one_only,
3109 key_method, import_export_vtable, import_export_class,
3110 output_vtable_inherit, import_export_decl, import_export_tinfo,
3111 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
3112 set_guard, start_objects, finish_objects,
3113 start_static_storage_duration_function,
3114 finish_static_storage_duration_function, get_priority_info,
3115 start_static_initialization_or_destruction,
3116 finish_static_initialization_or_destruction,
3117 do_static_initialization, do_static_destruction,
3118 prune_vars_needing_no_initialization, write_out_vars,
3119 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
3120 add_using_namespace, merge_functions, ambiguous_decl,
3121 lookup_using_namespace, lookup_using_namespace,
3122 qualified_lookup_using_namespace, set_decl_namespace,
3123 decl_namespace, current_decl_namespace, push_decl_namespace,
3124 pop_decl_namespace, push_scope, pop_scope, add_function,
3125 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
3126 lookup_arg_dependent, do_namespace_alias,
3127 validate_nonmember_using_decl, do_nonmember_using_decl,
3128 do_toplevel_using_decl, do_local_using_decl,
3129 do_class_using_decl, do_using_directive, check_default_args,
3130 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
3131 * parser.c (cp_parser_class_head): Use booleanss.
3132 * decl.c (walk_globals, walk_vtables): Likewise.
3133 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
3134 walk_globals): Change return type from 'int' to 'bool'.
3135 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
3136 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
3137 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
3138 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
3139 qualifier_flags, tinfo_base_init, generic_initializer,
3140 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
3141 dfs_class_hint_unmark, class_hint_flags, class_initializer,
3142 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
3143 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
3144 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
3145 * repo.c (repo_compile_flags, repo_template_declared,
3146 repo_template_defined, repo_class_defined, repo_get_id,
3147 repo_template_used, repo_vtable_used, repo_inline_used,
3148 repo_tinfo_used, repo_template_instantiated, extract_string,
3149 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
3150 finish_repo): Likewise.
3151 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
3152 cxx_print_xnode): Likewise..
3153 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
3154 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3155 * cxxfilt.c (demangle_it, print_demangler_list, usage,
3156 standard_symbol_characters, hp_symbol_characters, main, fatal):
43c6a96a 3157 Likewise.
848eed92
GDR
3158 (strip_underscore): Change type from 'int' to 'bool'.
3159 (main): Use boolean constants.
3160
b746c5dc
GDR
31612002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3162
3163 Remove traditional C constructs 3/n.
3164 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
3165 build_up_reference, warn_ref_binding, convert_to_reference,
3166 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
3167 convert_to_void, convert, convert_force, build_type_conversion,
3168 build_expr_type_conversion, type_promotes_to,
3169 perform_qualification_conversions): Use C90 prototyping style.
3170 * decl2.c (grok_array_decl): Use boolean constant.
3171 (delete_sanity): Likewise.
3172 * typeck.c (build_unary_op): Likewise.
3173 * semantics.c (finish_switch_cond): Likewise.
3174 * parser.c (cp_parser_direct_new_declarator): Likewise.
3175 * init.c (build_new): Likewise.
3176
a723baf1
MM
31772002-12-27 Mark Mitchell <mark@codesourcery.com>
3178
3179 * Make-lang.in (po-generated): Remove parse.c.
3180 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
3181 ($(srcdir)/cp/parse.h): Remove target.
3182 ($(srcdir)/cp/parse.c): Likewise.
3183 (gt-cp-parse.h): Likewise.
3184 (gt-cp-parser.h): New target.
3185 (c++.distclean): Do not remove parse.output.
3186 (c++.maintainer-clean): Do not remove parse.c or parse.h.
3187 (cp/spew.o): Remove target.
3188 (cp/lex.o): Adjust dependencies.
3189 (cp/pt.o): Likewise.
3190 (cp/parse.o): Likewise.
3191 (cp/TAGS): Do not mention parse.c.
3192 (cp/parser.o): New target.
3193 * NEWS: Mention the new parser.
3194 * call.c (build_scoped_method_call): Simplify.
3195 (build_method_call): Likewise.
3196 (build_new_function_call): Adjust calls to add_function_candidate
3197 and add_template_candidate.
3198 (build_new_op): Improve handling of erroroneous operands.
3199 (convert_default_arg): Remove circular argument processing.
3200 (name_as_c_string): New function.
3201 (build_new_method_call): Use it.
3202 (perform_implicit_conversion): Use error_operand_p.
3203 * class.c (finish_struct_anon): Use constructor_name_p.
3204 (check_field_decls): Likewise.
3205 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
3206 (resolve_address_of_overloaded_function): Likewise.
3207 (instantiate_type): Tweak pointer-to-member handling.
3208 (get_primary_binfo): Remove incorrect assertion.
3209 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
3210 * cp-tree.h (DEFARG_TOKENS): New macro.
3211 (default_arg): New structure.
3212 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
3213 (lang_tree_node): Add default_arg.
3214 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
3215 (type_info_ref_type): New macro.
3216 (saved_scope): Make processing_explicit_instantiation a boolean.
3217 (check_access): New field.
3218 (unparsed_text): Remove.
3219 (language_function): Remove unparsed_inlines.
3220 (error_operand_p): New macro.
3221 (lang_decl): Adjust pending_inline_info.
3222 (DEFARG_POINTER): Remove.
3223 (tag_types): Add typenames.
3224 (lookup_ualified_name): Declare.
3225 (lookup_name_real): Likewise.
3226 (shadow_tag): Adjust prototype.
3227 (get_scope_of_declarator): Declare it.
3228 (process_next_inline): Remove it.
3229 (check_for_missing_semicolon): Likewise.
3230 (maybe_get_template_decl_from_type_decl): Declare it.
3231 (finish_label_stmt): Adjust prototype.
3232 (finish_non_static_data_meber): Declare it.
3233 (finish_pseudo_destructor_call_expr): Rename to ...
3234 (finish_pseudo_destructor_expr): ... this.
3235 (finish_compound_literal): Declare it.
3236 (begin_inline_definitions): Remove it.
3237 (init_spew): Remove.
3238 (peekyylex): Likewise.
3239 (arbitrate_lookup): Likewise.
3240 (frob_opname): Likewise.
3241 (maybe_snarf_defarg): Likewise.
3242 (add_defarg_fn): Likewise.
3243 (do_pending_defargs): Likewise.
3244 (done_pending_defargs): Likewise.
3245 (unprocessed_defarg_fn): Likewise.
3246 (replace_defarg): Likewise.
3247 (end_input): Likewise.
3248 (get_overloaded_fn): Likewise.
3249 * cvt.c (convert_to_reference): Improve error handling.
3250 * decl.c (lookup_name_real): Do not declare it static.
3251 (maybe_push_to_top_level): Set check_access.
3252 (identifier_type_value): Adjust call to lookup_name_real.
3253 (lookup_qualified_name): New method.
3254 (lookup_name_real): Remove special-case parsing code.
3255 (lookup_name-nonclass): Adjust call to lookup_name_real.
3256 (lookup_name_namespace_only): Likewise.
3257 (lookup_name): Likewise.
3258 (check_tag_decl): Return the type declared.
3259 (shadow_tag): Likewise.
3260 (register_dtor_fn): Tweak check_access.
3261 (grokfndecl): Use constructor_name_p.
3262 (get_scope_of_declarator): New function.
3263 (grokdeclarator): Obscure tweaks for slightly different declarator
3264 representations.
3265 (start_method): Return error_mark_node to indicate failure.
43c6a96a 3266 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
a723baf1
MM
3267 * decl2.c (constructor_name_full): Simplify.
3268 (constructor_name): Use it.
3269 (build_expr_from_tree): Adjust for changes to do new parser.
3270 (push_scope): Improve robustness.
3271 (validate_nonmember_using_decl): Process declarations, not names.
3272 (do_class_using_decl): Likewise.
3273 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
3274 here.
3275 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
3276 * expr.c (cxx_expand_expr): Handle BASELINKs.
3277 * init.c (member_init_ok_or_else): Issue more errors.
3278 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
3279 * lex.c: Do not include parse.h.
3280 (yypring): Do not declare.
3281 (yylval): Likewise.
3282 (make_reference_declarator): Remove error-generating code.
3283 (rid_to_yy): Remove.
3284 (cxx_init): Do not call init_spew.
3285 (yypring): Remove.
3286 (check_for_missing_semicolon): Remove.
3287 * lex.h (got_scope): Remove.
3288 (got_object): Remove.
3289 * method.c (hack_identifier): Use finish_non_static_data_member.
3290 (implicitly_declare_fn): Adjust use of constructor_name.
3291 * parser.c: New file.
3292 * pt.c (parse.h): Do not include it.
3293 (maybe_get_template_decl_from_template): Do not declare it.
3294 (finish_member_template_decl): Tweak.
3295 (begin_explicit_instantiation): Adjust for
3296 processing_explicit_instantiation being boolean.
3297 (end_explicit_instantiation): Likewise.
3298 (maybe_process_partial_specialization): Tighten specialization
3299 test.
3300 (retrieve_local_specialization): Adjust ue of hash table.
3301 (eq_local_specializations): New function.
3302 (register_local_specialization): Likewise.
3303 (push_template_decl_real): Remove unnecessary test.
3304 (maybe_get_template_decl_from_type_decl): Don't make it static.
3305 (for_each_template_parm_r): Handle TYPEOF_TYPE.
3306 (tsubst_copy): Use retrieive_local_specialization to handle
3307 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
3308 Handle COMPONENT_REFs with pseudo-destructor-expressions.
3309 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
3310 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
3311 (unify): Tweak handling of CONST_DECLs.
3312 (regenerate_decl_from_template): Use push_nested_class.
3313 (template_for_substitution): New funciton.
3314 (instantiate_decl): Use it. Register parameters as local
3315 specializations.
3316 * rtti.c (init_rtti_processing): Set type_info_ref_type.
3317 (build_typeid): Use it.
3318 (get_typeid): Likeise.
3319 * search.c (accessible_p): Use check_access, not
3320 flag_access_control.
3321 (adjust_result_of_qualified_name_lookup): Pay attention to the
3322 context_class.
3323 * semantics.c (finish_asm_stmt): Adjust error handling.
3324 (finish_label_stmt): Return the statement.
3325 (finish_non_static_data_member): New function.
3326 (finish_class_expr): Handle BASELINKs.
3327 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
3328 (finish_object_call_expr): Simplify handling during templates.
3329 (finish_pseudo_destructor_call_expr): Rename to ...
3330 (finish_pseudo_dtor_expr): ... this.
3331 (finish_compound_literal): New function.
3332 (begin_inline_definitions): Remove.
3333 (finish_sizeof): Remove special template handling.
3334 * spew.c: Do not include parse.h.
3335 * tree.c (get_overloaded_fn): Remove.
3336 * typeck.c (build_class_member_access_expr): Handle
3337 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
3338 (lookup_destructor): New function.
3339 (finish_class_member_access_expr): Use it.
3340 (convert_arguments): Simplify.
3341 (build_unary_op): Handle BASELINKs.
43c6a96a 3342
aac1406f
NS
33432002-12-26 Nathan Sidwell <nathan@codesourcery.com>
3344
eab5474f
NS
3345 PR c++/4803
3346 * decl2.c (mark_used): Defer inline functions.
3347 (finish_file): Merge deferred_fns loops. Check all used
3348 inline functions have a definition.
3349 * method.c (make_thunk): Thunks are not inline.
3350
aac1406f
NS
3351 PR c++/5116, c++/764
3352 * call.c (build_new_op): Make sure template class operands are
3353 instantiated.
3354
b9201622
NS
33552002-12-24 Nathan Sidwell <nathan@codesourcery.com>
3356
3e14cd30
NS
3357 PR C++/7964
3358 * cp-tree.h (resolve_scoped_fn_name): Prototype.
3359 * call.c (resolve_scoped_fn_name): New function. Deal with
3360 more template expansion. Broken out of ...
3361 * parse.y (parse_finish_call_expr): ... here. Call it.
3362 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
3363 resolve_scoped_fn_name and build_call_from_tree.
3364
b9201622
NS
3365 PR c++/9053
3366 * decl.c (duplicate_decls): Templates may be disambiguated by
3367 return type.
43c6a96a 3368
b9201622
NS
3369 PR c++/8702
3370 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
3371 conversion operators on failure.
3372
94be8403
GDR
33732002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3374
b746c5dc
GDR
3375 Remove traditional C constructs 2/n.
3376 * call.c (tourney, build_field_call, equal_functions, joust,
3377 compare_ics, build_over_call, build_java_interface_fn_ref,
3378 convert_like_real, op_error, build_object_call, resolve_args,
3379 build_vfield_ref, check_dtor_name, build_scoped_method_call,
3380 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
3381 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
3382 standard_conversion, reference_related_p,
3383 reference_compatible_p, convert_class_to_reference,
3384 direct_reference_binding, reference_binding,
3385 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
3386 add_template_conv_candidate, any_viable, any_strictly_viable,
3387 build_this, splice_viable, print_z_candidates,
3388 build_user_type_conversion, build_new_function_call,
3389 conditional_conversion, build_conditional_expr, build_new_op,
3390 build_op_delete_call, enforce_access, call_builtin_trap,
3391 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
3392 convert_default_arg, type_passed_as, convert_for_arg_passing,
3393 in_charge_arg_for_name, is_properly_derived_from,
3394 maybe_handle_implicit_object, maybe_handle_ref_bind,
3395 source_type, add_warning, can_convert, can_convert_arg,
3396 perform_implicit_conversion, can_convert_arg_bad,
3397 initialize_reference, add_conv_candidate,
3398 add_template_candidate_real, add_template_candidate): Ansify.
94be8403 3399
081cebb2
NS
34002002-12-22 Nathan Sidwell <nathan@codesourcery.com>
3401
3402 PR c++/8572
3403 * cp-tree.h (grokoptypename): Add SCOPE parameter.
3404 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
3405 if in a template scope.
3406 * parse.y (unoperator): Return the scope.
3407 (operator_name): Adjust grokoptypename call.
3408
4f09be91
KL
34092002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3410
3411 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
3412 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
3413 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
3414
4639c5c6
KH
34152002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3416
3417 * ChangeLog: Fix a typo.
3418 * class.c: Fix comment typos.
3419 * cp-tree.h: Likewise.
3420
0ca7178c
JM
34212002-12-18 Jason Merrill <jason@redhat.com>
3422
3423 Handle anonymous unions at the tree level.
3424 C++ ABI change: Mangle anonymous unions using the name of their
3425 first named field (by depth-first search). Should not cause
3426 binary compatibility problems, though, as the compiler previously
3427 didn't emit anything for affected unions.
3428 * cp-tree.def (ALIAS_DECL): New tree code.
3429 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
3430 first field, not the largest.
3431 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
3432 push the decl, and write it out at namespace scope.
3433 * decl.c (lookup_name_real): See through an ALIAS_DECL.
3434 (pushdecl): Add namespace bindings for ALIAS_DECLs.
3435 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
3436 of a decl which doesn't have one.
3437 * typeck.c (build_class_member_access_expr): Don't recurse if
3438 we already have the type we want.
3439
da9701a6
KL
34402002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3441
3442 PR c++/8099
3443 * friend.c (make_friend_class): Allow partial specialization
3444 when declaration is not a template friend.
3445
cab7a9a3
KL
34462002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3447
3448 PR c++/3663
3449 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
3450 TREE_PROTECTED to created decl nodes.
3451
50cb9059
MM
34522002-12-18 Mark Mitchell <mark@codesourcery.com>
3453
3454 * class.c (build_base_field): Do not set DECL_PACKED on the
3455 FIELD_DECL.
3456
e220f0a4
GDR
34572002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3458
3459 * cp-tree.h (struct tree_srcloc): Use location_t.
3460 (SOURCE_LOCUS): New.
3461 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
3462
efc7052d
JM
34632002-12-17 Jason Merrill <jason@redhat.com>
3464
3465 * decl.c (finish_function): Also complain about no return in
3466 templates.
43c6a96a 3467 * semantics.c (finish_return_stmt): Also call check_return_expr in
efc7052d
JM
3468 templates.
3469 * typeck.c (check_return_expr): In a template, just remember that we
3470 saw a return.
3471
9f175208
JM
34722002-12-16 Jason Merrill <jason@redhat.com>
3473
89ea02fb
JM
3474 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
3475 of the CALL_EXPR.
3476
9f175208
JM
3477 * semantics.c (do_pushlevel): Call pushlevel after adding the
3478 SCOPE_STMT.
3479 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
3480 * parse.y (function_body): Go back to using compstmt.
3481 * decl.c (pushdecl): Skip another level to get to the parms level.
3482
3483 * call.c (build_new_method_call): Use is_dummy_object to determine
3484 whether or not to evaluate the object parameter to a static member
3485 function.
3486
4977bab6
ZW
34872002-12-14 Jason Merrill <jason@redhat.com>
3488
3489 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
3490 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
3491 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
3492 don't bother with an AGGR_INIT_EXPR.
3493 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
3494 just generate a new decl normally. Take return slot parm.
3495 * cp-tree.h: Adjust prototype.
3496
75c525d7
GDR
34972002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
3498
3499 PR C++/8031
43c6a96a 3500 * cvt.c (convert_to_pointer_force): Don't try comparing against
75c525d7
GDR
3501 erronous type.
3502
8c6ae51f
GK
35032002-12-13 Geoffrey Keating <geoffk@apple.com>
3504
3505 * cp-tree.h: Have the multiple-include guards around
3506 the entire file.
3507
4977bab6
ZW
35082002-12-10 David Edelsohn <edelsohn@gnu.org>
3509
3510 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
3511 for SPEW_DEBUG.
3512 (snarf_method): Same.
3513 (snarf_defarg): Same.
3514
d23faea1
MM
35152002-12-10 Mark Mitchell <mark@codesourcery.com>
3516
3517 PR c++/8372
3518 * pt.c (tsubst_copy): Handle destructor names more correctly.
3519
3932057c 35202002-12-10 Matt Austern <austern@apple.com>
d23faea1 3521
3932057c 3522 * cp-tree.h: get rid of needs_virtual_reinit bit.
43c6a96a 3523
dcba9b0f
MM
35242002-12-09 Mark Mitchell <mark@codesourcery.com>
3525
43c6a96a 3526 * NEWS: Document removal of in-class initialization extension for
dcba9b0f
MM
3527 static data members of non-arithmetic, non-enumeration type.
3528 * decl.c (check_static_variable_definition): Do not allow that
3529 extension.
3530 * decl2.c (grokfield): Do not call digest_init when processing
3531 templates.
3532
42b99e03
KG
35332002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3534
3535 * error.c (dump_expr): Fix format specifier warning.
3536
6c73ad72
GK
35372002-12-04 Geoffrey Keating <geoffk@apple.com>
3538
3539 * class.c (finish_struct_1): Correct comment.
3540 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
3541
8c048a52
GDR
35422002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3543
3544 PR C++/8799
3545 * error.c (dump_expr): Don't ever try to dump a non-existent
43c6a96a 3546 expression.
8c048a52 3547
4977bab6
ZW
35482002-12-03 Nathan Sidwell <nathan@codesourcery.com>
3549
3550 Implement covariant returns.
3551 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
3552 (struct lang_decl_flags): Add this_thunk_p flag.
3553 Rename vcall_offset to virtual_offset.
3554 (struct lang_decl): Rename delta to fixed_offset.
3555 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
3556 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
3557 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
3558 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
3559 (make_thunk): Add this_adjusting arg.
3560 (finish_thunk): Declare.
3561 (mangle_thunk): Add this_adjusting arg.
3562 * class.c (get_vcall_index): Use base function for lookup.
3563 (update_vtable_entry_for_fn): Generate covariant thunk.
3564 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
3565 (build_vtbl_initializer): Use base function for lookup.
3566 Finish covariant thunk here. Adjust thunk generation.
3567 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
3568 Adjust thunk dumping.
3569 * mangle.c (mangle_call_offset): New function.
3570 (mangle_thunk): Adjust for covariant thunks.
3571 * method.c (make_thunk): Adjust. Do not set name here.
3572 (finish_thunk): New function. Set name here.
3573 (use_thunk): Generate covariant thunks too.
3574 (thunk_adjust): New function.
3575 * search.c (covariant_return_p): Remove. Fold into ...
3576 (check_final_overrider): ... here. Simplify.
3577 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
3578
c203334d
JM
35792002-12-03 Jason Merrill <jason@redhat.com>
3580
c246c65d
JM
3581 PR c++/8674
3582 * call.c (build_over_call): Check specifically for TARGET_EXPR
3583 when eliding.
3584
3585 PR c++/8461, c++/8625
3586 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
3587 (cp_convert_parm_for_inlining): Remove.
43c6a96a 3588 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
c246c65d
JM
3589 Remove.
3590 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
3591 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
3592
c203334d
JM
3593 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
3594 an ambiguous conversion.
3595
ee7ecb29
MM
35962002-12-03 Mark Mitchell <mark@codesourcery.com>
3597
3598 PR c++/8688
3599 * decl.c (reshape_init): Handle erroneous initializers.
3600
5089de93
MM
36012002-12-02 Mark Mitchell <mark@codesourcery.com>
3602
3603 PR c++/8720
3604 * spew.c (remove_last_token): Make sure that last_chunk is set
3605 correctly.
3606
3607 PR c++/8615
3608 * error.c (dump_expr): Handle character constants with
3609 TREE_OVERFLOW set.
43c6a96a 3610
218e0eb6
KL
36112002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3612
3613 DR 180
3614 * decl.c (grokdeclarator): Require class-key for all friend class.
3615 Output the correct type and context in the error message.
3616
a82d6da5
MM
36172002-12-01 Mark Mitchell <mark@codesourcery.com>
3618
94fc547c
MM
3619 PR c++/5919
3620 * pt.c (unify): Use variably_modified_type_p to test validity of
3621 template argument types.
43c6a96a 3622
a82d6da5
MM
3623 PR c++/8727
3624 * cp-tree.h (lang_type_class): Add typeinfo_var.
3625 (CLASSTYPE_TYPEINFO_VAR): New macro.
3626 * rtti.c (get_tinfo_decl): Use it.
3627
3628 PR c++/8663
3629 * init.c (expand_member_init): Always get the main variant of a
3630 base class.
3631
c9f8536c
MM
36322002-12-01 Mark Mitchell <mark@codesourcery.com>
3633
3634 PR c++/8332
3635 PR c++/8493
3636 * decl.c (cxx_init_decl_processing): Use size_type_node, not
3637 c_size_type_node.
3638 * decl2.c (coerce_new_type): Likewise.
3639 * except.c (do_allocate_exception): Likewise.
3640
4977bab6
ZW
36412002-11-30 Zack Weinberg <zack@codesourcery.com>
3642
3643 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
3644 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
3645 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
3646 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3647 typeck2.c: Include coretypes.h and tm.h.
3648 * Make-lang.in: Update dependencies.
3649
c17707f1
MM
36502002-11-30 Mark Mitchell <mark@codesourcery.com>
3651
328de7c2
MM
3652 PR c++/8227
3653 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
3654 (check_initializer): Validate the type of the initialized
3655 variable, even if the initializer is absent.
3656 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
43c6a96a 3657
c17707f1
MM
3658 PR c++/8214
3659 * typeck.c (convert_for_assignment): Do not use
3660 decl_constant_value on the operand.
3661
65f8b0fb
MM
3662 PR c++/8511
3663 * pt.c (instantiate_decl): Handle template friends defined outside
3664 of the class correctly.
3665
f6a83eb0
JB
36662002-11-29 Joe Buck <jbuck@synopsys.com>
3667
3668 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
3669 anonymous structs.
43c6a96a 3670
ff944b49
MM
36712002-11-29 Mark Mitchell <mark@codesourcery.com>
3672
3673 * class.c (walk_subobject_offsets): Recur on binfos as well as on
3674 types.
3675 (layout_nonempty_base_or_field): Pass it a binfo when processing a
3676 base class.
3677 (layout_empty_base): Likewise.
3678 (build_base_field): Likewise.
43c6a96a 3679
21b3d0ba
MM
36802002-11-27 Mark Mitchell <mark@codesourcery.com>
3681
3682 * class.c (build_base_field): Make sure we get the canonical base
3683 when descending through primary bases.
3684
a16f2357
GK
36852002-11-26 Geoffrey Keating <geoffk@apple.com>
3686
3687 * decl.c (check_initializer): Don't error on initialisation of
3688 a scalar with a brace-enclosed expression.
3689
688f6688
NS
36902002-11-26 Nathan Sidwell <nathan@codesourcery.com>
3691
3692 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3693 (template_parms_equal): Remove prototype.
3694 * typeck.c (buuld_indirect_ref): Reformat.
3695
4977bab6
ZW
36962002-11-25 Jason Merrill <jason@redhat.com>
3697
3698 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3699 and a DO_STMT.
3700
b82ddab4
MM
37012002-11-25 Mark Mitchell <mark@codesourcery.com>
3702
2003cd37
MM
3703 * tree.c (cp_build_qualified_type_real): Correct handling of
3704 array types.
3705 * class.c (walk_subobject_offsets): Fix thinko.
3706 (build_base_field): Record offsets of empty bases in primary
3707 virtual bases.
3708 (layout_class_type): Record offsets of empty bases in fields.
43c6a96a 3709
b82ddab4
MM
3710 * search.c (is_subobject_of_p_1): Fix thinko.
3711 (lookup_field_queue_p): Likewise.
3712
8a874cb4
MM
37132002-11-24 Mark Mitchell <mark@codesourcery.com>
3714
3715 * class.c (layout_class_type): Reuse tail padding when laying out
3716 virtual bases.
3717
05abed76
MM
37182002-11-22 Mark Mitchell <mark@codesourcery.com>
3719
3720 * rtti.c (qualifier_flags): Fix thinko.
3721
4977bab6
ZW
37222002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3723
3724 Remove traditional C constructs 1/n.
3725 * cp-tree.h (init_method, set_mangled_name_for_decl,
3726 build_opfncall, hack_identifier, make_thunk, use_thunk,
3727 synthesize_method, implicitly_declare_fn,
3728 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3729 maybe_clone_body): Remove use of PARAMS.
3730
3731 * method.c (do_build_assign_ref, do_build_copy_constructor,
3732 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3733 Likewise.
3734 (synthesize_method): Use 'bool' type and constants instead of
3735 'int'.
3736 (locate_copy): Likewise.
3737 (implicitly_declare_fn): Likewise.
3738
3739 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3740 Remove old-style declaration.
3741 (maybe_clone_body): Use 'bool' type and constants.
3742
1c83ea9f
GN
37432002-11-21 Glen Nakamura <glen@imodulo.com>
3744
3745 PR c++/8342
3746 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3747 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3748 of the branches of a COND_EXPR.
3749
ad2ae3b2
MM
37502002-11-19 Mark Mitchell <mark@codesourcery.com>
3751
3752 * pt.c (for_each_template_parm): Free allocated memory.
3753 * search.c (is_subobject_of_p_1): New function.
3754 (is_subobject_of_p): Avoid walking virtual bases multiple times.
3755
f3226a90
JT
37562002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
3757
3758 * g++spec.c (lang_specific_spec_functions): New.
3759
90024bdc
KH
37602002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3761
3762 * ChangeLog: Follow spelling conventions.
3763 * class.c: Likewise.
3764 * decl2.c: Likewise.
3765
fa7b533b
ZW
37662002-11-14 Zack Weinberg <zack@codesourcery.com>
3767
3768 * search.c (dfs_push_decls): Do not try to reorder elements
3769 3..n of method_vec if method_vec has only two elements.
3770 Reverse order of two tests to avoid accessing unallocated
3771 memory.
3772
95675950
MM
37732002-11-14 Mark Mitchell <mark@codesourcery.com>
3774
3775 * class.c (dfs_find_final_overrider): Adjust so that the most
3776 derived object is a binfo, rather than a class type.
3777 (find_final_overrider): Likewise.
3778 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3779 (add_vcall_offset): Likewise.
3780
5c74d5b0
KL
37812002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3782
3783 PR c++/8389
3784 * pt.c (instantiate_template): Push class scope for member
3785 functions.
3786 (get_mostly_instantiated_function_type): Likewise. Don't call
3787 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
3788 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3789 * mangle.c (write_encoding, write_unqualified_name): Adjust.
3790
4f2c9d7e
MM
37912002-11-07 Mark Mitchell <mark@codesourcery.com>
3792
e6a66567
MM
3793 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3794 vcall offfsets. Split out ...
3795 (add_vcall_offset): ... new function.
3796
4f2c9d7e
MM
3797 PR c++/8338
3798 * pt.c (for_each_template_parm): Add htab parameter.
3799 (process_partial_specialization): Adjust call.
3800 (push_template_decl_real): Likewise.
3801 (pair_fn_data): Add visited.
3802 (for_each_template_parm_r): Avoid walking duplicates more than
3803 once.
3804 (uses_template_parms): Adjust call to for_each_template_parm.
3805
f72ab53b
MM
38062002-11-07 Mark Mitchell <mark@codesourcery.com>
3807
3808 * class.c (add_implicitly_declared_members): Put implicitly
3809 declared functions at the end of TYPE_METHODs when -fabi-version
3810 is at least 2.
3811
0a288b9a
GK
38122002-11-05 Geoffrey Keating <geoffk@apple.com>
3813
3814 * decl2.c (finish_file): Correct spelling.
3815
548502d3
MM
38162002-11-03 Mark Mitchell <mark@codesourcery.com>
3817
3818 * call.c (build_special_member_call): Do not try to lookup VTTs by
3819 name.
3820 * class.c (vtbl_init_data): Add generate_vcall_entries.
3821 (get_vtable_decl): Do not look up virtual tables by name.
3822 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3823 (set_primary_base): Do not set CLASSTYPE_RTTI.
3824 (determine_primary_base): Likewise.
3825 (get_matching_virtual): Remove.
3826 (get_vcall_index): New function.
3827 (update_vtable_entry_for_fn): Do not try to use virtual thunks
3828 when they are not required. Assign vcall indices at this point.
3829 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3830 Do update dynamic_classes.
3831 (build_vtt): Do not add VTTs to the symbol table.
3832 (build_ctor_vtbl_group): Likewise.
3833 (build_vtbl_initializer): Simplify handling of vcall indices.
3834 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3835 for the most derived class.
3836 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3837 the vtable.
3838 * cp-tree.h (dynamic_classes): New macro.
3839 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
3840 (CLASSTYPE_RTTI): Remove.
3841 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3842 (CLASSTYPE_VCALL_INDICES): New macro.
3843 (CLASSTYPE_VTABLES): Likewise.
3844 (BV_USE_VCALL_INDEX_P): Remove.
3845 (build_vtable_path): Remove.
3846 * decl2.c (finish_vtable_vardecl): Remove.
3847 (key_method): Remove #if 0'd code.
3848 (finish_vtable_vardecl): Rename to ...
3849 (maybe_emit_vtables): ... this.
3850 (finish_file): Use it.
3851 * search.c (look_for_overrides_here): Update comment.
3852
04d57dd5
ZW
38532002-11-01 Zack Weinberg <zack@codesourcery.com>
3854
3855 PR c/7353 redux
3856 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3857
bab076f7
JM
38582002-10-30 Jason Merrill <jason@redhat.com>
3859
3860 PR c++/8186
3861 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3862 * call.c (convert_for_arg_passing): Set it.
3863 * except.c (stabilize_throw_expr): Recurse for such an arg.
3864
14b4829d
MM
38652002-10-31 Mark Mitchell <mark@codesourcery.com>
3866
3867 * cp-tree.h (lang_decl_flags): Remove init_priority.
3868 (lang_decl): Add delta.
3869 (GLOBAL_INIT_PRIORITY): Remove.
3870 (THUNK_DELTA): Revise definition.
3871 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3872 * dump.c (cp_dump_tree): Don't dump it.
3873
8c081e84
MM
38742002-10-30 Mark Mitchell <mark@codesourcery.com>
3875
3876 PR c++/8160
3877 * typeck2.c (process_init_constructor): Call complete_array_type.
3878
3879 PR c++/8149
3880 * decl.c (make_typename_type): Issue errors about invalid results.
04d57dd5 3881
7088fca9
KL
38822002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3883
3884 Core issue 287, PR c++/7639
3885 * cp-tree.h (lang_type_class): Add decl_list field.
3886 (CLASSTYPE_DECL_LIST): New macro.
3887 (maybe_add_class_template_decl_list): Add declaration.
3888 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3889 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3890 (maybe_add_class_template_decl_list): New function.
3891 (add_implicitly_declared_members): Use it.
3892 * decl.c (maybe_process_template_type_declaration): Likewise.
3893 (pushtag): Likewise.
3894 * friend.c (add_friend): Likewise.
3895 (make_friend_class): Likewise.
3896 * semantics.c (finish_member_declaration): Likewise.
3897 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3898 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3899 to process members and friends in the order of declaration.
3900
5633b37c
MM
39012002-10-29 Mark Mitchell <mark@codesourcery.com>
3902
3903 PR c++/8287
3904 * decl.c (finish_destructor_body): Create the label to jump to
3905 when returning from a destructor here.
3906 (finish_function_body): Rather than here.
3907
f65e1183
ZW
39082002-10-25 Zack Weinberg <zack@codesourcery.com>
3909
3910 PR c++/7266
3911 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3912 SCOPE_REF is not null before dereferencing it.
3913
bb5e8a7f
MM
39142002-10-25 Mark Mitchell <mark@codesourcery.com>
3915
e93ee644
MM
3916 * call.c (build_over_call): Use DECL_CONTEXT, not
3917 DECL_VIRTUAL_CONTEXT.
3918 * class.c (modify_vtable_entry): Don't mess with
3919 DECL_VIRTUAL_CONTEXT.
3920 (set_vindex): Remove.
3921 (set_primary_base): Remove vfuns_p parameter.
3922 (determine_primary_base): Likewise.
3923 (modify_all_vtables): Likewise.
3924 (layout_class_type): Likewise. Adjust calls to other functions
3925 accordingly.
3926 (finish_struct_1): Adjust calls to modified functions. Set
3927 DECL_VINDEX here.
3928 * cp-tree.h (lang_type_class): Remove vsize.
3929 (CLASSTYPE_VSIZE): Remove.
3930 (lang_decl): Remove thunks.
3931 (DECL_THUNKS): Adjust.
3932 (DECL_VIRTUAL_CONTEXT): Remove.
3933 (duplicate_decls): Don't copy it.
3934 * pt.c (build_template_decl): Don't set it.
3935 (tsubst_decl): Likewise.
3936 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
04d57dd5 3937
bb5e8a7f
MM
3938 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3939 (build_vtable_entry): Remove.
3940 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3941 (lang_decl): Add thunks.
3942 (DECL_THUNKS): New macro.
3943 * decl.c (duplicate_decls): Copy it.
3944 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3945 * semantics.c (emit_associated_thunks): Simplify.
f65e1183 3946
6eb35968
DE
39472002-10-24 David Edelsohn <edelsohn@gnu.org>
3948
3949 PR c++/7228
3950 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3951 lang_type structure exists before accessing field.
3952 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3953 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3954 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3955 * class.c (check_field_decls): Use new macros.
3956 * typeck2.c (process_init_constructor): Remove redundant check for
3957 existence of lang_type structure.
3958
0cee073d
MM
39592002-10-24 Mark Mitchell <mark@codesourcery.com>
3960
ba9a991f
MM
3961 * class.c (end_of_base): New method.
3962 (end_of_class): Use it. Check indirect virtual bases.
3963
0cee073d
MM
3964 * class.c (check_field_decls): Fix typo.
3965
e6f052b7
MM
39662002-10-23 Mark Mitchell <mark@codesourcery.com>
3967
6b607ffd
MM
3968 PR c++/8067
3969 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3970 related variables.
3971
e6f052b7
MM
3972 PR c++/7679
3973 * spew.c (next_token): Do not return an endless stream of
3974 END_OF_SAVED_INPUT tokens.
3975 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3976 the cached token stream.
3977 (snarf_defarg): Likewise.
3978
8bcefb43
ZW
39792002-10-23 Zack Weinberg <zack@codesourcery.com>
3980
3981 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3982 variably_modified_type_p.
3983 * cp-tree.h: Remove prototype of variably_modified_type_p.
3984 * tree.c (variably_modified_type_p): Remove; now implemented
3985 in language-independent code.
3986
ad4f9910
MM
39872002-10-22 Mark Mitchell <mark@codesourcery.com>
3988
3989 PR c++/6579
3990 * spew.c (snarf_parenthesized_expression): New function.
3991 (snarf_block): Use it.
3992
3961e8fe
RH
39932002-10-22 Richard Henderson <rth@redhat.com>
3994
3995 * method.c (use_thunk): Always compute vcall_value; assert that
3996 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
3997 for vcall thunks as well.
3998
5ec1192e
MM
39992002-10-21 Mark Mitchell <mark@codesourcery.com>
4000
7ba539c6
MM
4001 * class.c (empty_base_at_nonzero_offset_p): New function.
4002 (layout_nonempty_base_or_field): Do not check for conflicts when
4003 laying out a virtual base using the GCC 3.2 ABI.
4004 (build_base_field): Correct checking for presence of empty classes
90024bdc 4005 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7ba539c6 4006
e3ccdd50
MM
4007 * class.c (include_empty_classes): Use normalize_rli.
4008 (layout_class_type): Likewise.
4009
42328048
MM
4010 * decl.c (reshape_init): Tweak handling of character arrays.
4011
5ec1192e
MM
4012 PR c++/8218
4013 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
4014 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
4015 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
4016 (check_field_decls): Likewise.
4017 (layout_class_type): Likewise.
4018 (finish_struct_1): Initialize it.
4019 (walk_subobject_offsets): Use it to prune searches.
4020
eb0424da
MM
40212002-10-20 Mark Mitchell <mark@codesourcery.com>
4022
4023 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
4024 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
4025 TARGET_ASM_OUTPUT_MI_THUNK in comments.
8bcefb43 4026
4a7510cb
ZW
40272002-10-18 Zack Weinberg <zack@codesourcery.com>
4028
4029 * decl.c (start_decl): Point users of the old initialized-
4030 typedef extension at __typeof__.
4031
483ab821
MM
40322002-10-18 Mark Mitchell <mark@codesourcery.com>
4033
4034 * Make-lang.in (method.o): Depend on TARGET_H.
4035 * method.c (target.h): Include it.
4036 (use_thunk): Use target hooks. Use vcall thunks, if available.
4037
e4f4feba
MM
40382002-10-18 Mark Mitchell <mark@codesourcery.com>
4039
4040 * class.c (base_derived_from): Make sure return value is a bool.
4041
9368208b
MM
40422002-10-18 Mark Mitchell <mark@codesourcery.com>
4043
4044 * class.c (find_final_overrider_data_s): Remove overriding_fn and
4045 overriding_base.
4046 (dfs_base_derived_from): New function.
4047 (base_derived_from): Likewise.
4048 (dfs_find_final_overrider): Use base_derived_from.
4049 (find_final_overrider): Adjust.
4050
5275f2bf
JM
40512002-10-18 Jason Merrill <jason@redhat.com>
4052
4053 PR c++/8080
4054 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
4055 with condition decls in a template.
4056
8a188e24
NS
40572002-10-17 Nathan Sidwell <nathan@codesourcery.com>
4058
4059 * class.c (add_method): Compare template parms too.
4060
b216f69b
MM
40612002-10-17 Mark Mitchell <mark@codesourcery.com>
4062
982216be
MM
4063 PR c++/7584
4064 * class.c (handle_using_decl): Allow the declaration used to be
4065 from an ambiguous base.
4066
d768a589
MM
4067 * pt.c (convert_template_argument): Revert this change:
4068 2002-10-16 Mark Mitchell <mark@codesourcery.com>
4069 * pt.c (convert_template_argument): Do not fold non-type
4070 template rguments when inside a template.
4071
b216f69b
MM
4072 * init.c (expand_default_init): Handle brace-enclosed initializers
4073 correctly.
4074
2303a079
MM
40752002-10-16 Mark Mitchell <mark@codesourcery.com>
4076
d3133e68
MM
4077 * mangle.c (write_expression): Correct handling of enumeration
4078 constants.
4079 (write_template_arg): Likewise.
4080 * pt.c (convert_template_argument): Do not fold non-type template
4081 arguments when inside a template.
4082
2303a079
MM
4083 PR c++/7478
4084 * cvt.c (convert_to_reference): Allow references as the incoming
4085 type.
4086
451c0899
MM
40872002-10-16 Mark Mitchell <mark@codesourcery.com>
4088
4089 PR c++/7524
4090 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
4091 build_qualified_type.
4092
da6eec72
RH
40932002-10-15 Richard Henderson <rth@redhat.com>
4094
4095 * error.c (dump_expr): Use real_to_decimal directly, and with
4096 the new arguments.
4097
3fa3c4bd
MM
40982002-10-15 Mark Mitchell <mark@codesourcery.com>
4099
4100 * decl.c (reshape_init): Fix typo.
4101
4102 * cp-tree.h (operator_name_info_t): Add arity.
4103 * lex.c (init_operators): Initialize it.
4104 * mangle.c (write_conversion_operator_name): New function.
4105 (write_unqualified_name): Use it.
4106 (write_template_args): Accept template arguments as a TREE_LIST.
4107 (write_expression): Adjust handling of qualified names to match
4108 specification.
4109
1a55127d
JM
41102002-10-15 Jason Merrill <jason@redhat.com>
4111
4112 * call.c (call_builtin_trap): New fn.
4113 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
4114 (build_call): Don't set current_function_returns_abnormally outside
4115 a function.
4116
58731fd1
MM
41172002-10-14 Mark Mitchell <mark@codesourcery.com>
4118
4119 * class.c (check_field_decls): Remove empty_p parameter. Instead,
4120 clear CLASSTYPE_EMPTY_P.
4121 (build_base_field): Likewise.
4122 (build_base_fields): Likewise.
4123 (check_bases_and_members): Likewise.
4124 (create_vtbl_ptr): Likewise.
4125 (layout_class_type): Likewise. Ensure that empty classes have
4126 size zero when used as base classes in the 3.2 ABI.
4127 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
4128 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
4129 parameter.
4130 (is_empty_class): Correct definition when using post-3.2 ABI.
4131 * cp-tree.h (lang_type_class): Add empty_p.
4132 (CLASSTYPE_EMPTY_P): New macro.
4133
6742d92b
NS
41342002-10-12 Nathan Sidwell <nathan@codesourcery.com>
4135
4136 * init.c (build_delete): Do not apply save_expr for arrays.
4137 (build_vec_delete): Likewise.
4138
77631fa7
MM
41392002-10-14 Mark Mitchell <mark@codesourcery.com>
4140
4a7510cb 4141 * decl.c (layout_var_decl): Call layout_decl even for variables
7de85f7e
MM
4142 whose type is an array with unspecified bounds.
4143
77631fa7
MM
4144 PR c++/7176
4145 * lex.c (do_identifier): Add another option for the parsing
4146 parameter.
4147 * parse.y (do_id): Use it.
4148
2ee366b5
GDR
41492002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
4150
4151 PRs C++/6803, C++/7721 and C++/7803
4152 * decl.c (grokdeclarator): Gracefully handle template-name as
4153 decl-specifier.
4154
01c3fb15
JM
41552002-10-11 Jason Molenda <jmolenda@apple.com>
4156
4157 * init.c (build_field_list): Provide uses_unions_p with a default
4158 value.
4159
8e3df2de
MM
41602002-10-11 Mark Mitchell <mark@codesourcery.com>
4161
dac45b5c
MM
4162 PR c++/5661
4163 * cp-tree.h (variably_modified_type_p): New function.
4164 (grokdeclarator) Tighten check for variably modified types as
4165 fields.
4166 * pt.c (convert_template_argument): Do not allow variably modified
4167 types as template arguments.
4a7510cb 4168 * tree.c (variably_modified_type_p): New function.
dac45b5c 4169
8e3df2de
MM
4170 * NEWS: Document removal of "new X = ..." extension.
4171 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
4172 brace-enclosed initializers.
4173 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
4174 (initialize_local_var): Remove declaration.
4175 (expand_static_init): Likewise.
4176 * decl.c (next_initializable_field): New function.
4177 (reshape_init): Likewise.
4178 (check_initializer): Use them. Build dynamic initializer for
4179 aggregates here too.
4180 (initialize_local_var): Simplify, and incorporate cleanup
4181 insertion code as well.
4182 (destroy_local_var): Remove.
4183 (cp_finish_decl): Tidy.
4184 (expand_static_init): Fold checks for whether or not a variable
4185 needs initialization into this function. Simplify.
4186 * decl2.c (do_static_initialization): Simplify.
4187 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
4188 be done for us automatically.
4189 (expand_default_init): Handle brace-enclosed initializers
4190 correctly.
4191 (expand_aggr_init_1): Remove RTL-generation code.
4192 (build_vec_init): Remove "new X = ..." support.
4193 * parse.y (new_initializer): Likewise.
4194 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
4195 brace-enclosed initializer.
4196 (create_pseudo_type_info): Likewise.
4197 * typeck2.c (store_init_value): Don't try to handle digest_init
4198 being called more than once.
4199 (digest_init): Tidy handling of brace-enclosed initializers.
01c3fb15 4200
7bdfd72e
KG
42012002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4202
4203 * decl.c (typename_hash): Use htab_hash_pointer.
4204
e89fe41c
JW
42052002-10-10 Jim Wilson <wilson@redhat.com>
4206
4207 * decl.c (duplicate_decls): Don't call decl_attributes.
4208
95f79357
ZW
42092002-10-09 Zack Weinberg <zack@codesourcery.com>
4210
85cd7be8 4211 PR c/7353
95f79357
ZW
4212 * decl.c (start_decl): Unconditionally issue error for
4213 'typedef foo = bar'.
4214 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
4215 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
4216
10a38dba
KG
42172002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4218
4219 * decl2.c (prune_vtable_vardecl): Delete unused function.
4220
edebf865
MM
42212002-10-03 Mark Mitchell <mark@codesourcery.com>
4222
4223 PR c++/7754
4224 * decl2.c (finish_anon_union): Do not expand anonymous unions when
4225 procesing template functions.
4226 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4227 type. Call layout_decl.
4228 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4229
01f4137f
RH
42302002-10-07 Richard Henderson <rth@redhat.com>
4231
4232 * decl2.c, pt.c: Revert c++/7754 fix.
4233
eb55ce4b
KL
42342002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4235
4236 PR c++/7804
4237 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
4238
bd9bb3d2
MM
42392002-10-03 Mark Mitchell <mark@codesourcery.com>
4240
43c6a96a 4241 PR c++/7931
bd9bb3d2
MM
4242 * pt.c (for_each_template_parm_r): Handle BASELINKs.
4243
4244 PR c++/7754
4245 * decl2.c (finish_anon_union): Do not expand anonymous unions when
4246 procesing template functions.
4247 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
4248 type. Call layout_decl.
4249 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
4250
6397d80b
MM
42512002-10-03 Mark Mitchell <mark@codesourcery.com>
4252
4253 PR c++/8006
4254 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
4255 template parameters.
4256 (globals): Add entity and need_abi_warning.
4257 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
4258 CLASSTYPE_TEMPLATE_INFO.
4259 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
4260 TYPE_TI_TEMPLATE.
4261 (write_prefix): Handle typename types correctly.
4262 (write_template_prefix): Handle template template parameters
4263 correctly.
4264 (start_mangling): Add entity parameter.
4265 (finish_mangling): Warn about names whose mangling will change.
4266 (mangle_decl_string): Adjust.
4267 (mangle_type_string): Likewise.
4268 (mangle_special_for_type): Likewise.
4269 (mangle_ctor_vtbl_for_type): Likewise.
4270 (mangle_thunk): Likewise.
4271 (mangle_guard_variable): Likewise.
4272 (mangle_ref_init_variable): Likewise.
4273
2282d28d
MM
42742002-10-02 Mark Mitchell <mark@codesourcery.com>
4275
4276 PR c++/7188.
4277 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
4278 * cp-tree.h (emit_base_init): Rename to ....
4279 (emit_mem_initializers): ... this.
4280 (expand_member_init): Change prototype.
4281 * init.c (perform_member_init): Compute explicit, rather than
4282 requiring it as a parameter.
4283 (sort_member_init): Rename to ...
4284 (sort_mem_initializers): ... this. Process bases and data members
4285 together.
4286 (sort_base_init): Remove.
4287 (emit_base_init): Rename to ...
4288 (emit_mem_initializers): ... this.
4289 (expand_aggr_vbase_init_1): Remove.
4290 (construct_virtual_bases): Rename to ...
4291 (construct_virtual_base): ... this.
4292 (expand_member_init): Rework handling of base initializers.
4293 * method.c (do_build_copy_constructor): Use
4294 finish_mem_initializers.
4295 * parse.y (member_init): Adjust calls to expand_member_init.
4296 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
4297 (tsubst_initializer_list): Use expand_member_init.
4298 * semantics.c (finish_mem_intiailizers): Simplify.
69788039
MA
4299
43002002-10-02 Matt Austern <austern@apple.com>
4301 * decl.c (walk_vtables_r): Fixed typo that caused result to
4302 never get a nonzero value.
95f79357 4303
f963b5d9
RS
43042002-10-02 Roger Sayle <roger@eyesopen.com>
4305
4306 PR optimization/6627
4307 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
4308 from here, and move it to tree.h.
4309 * decl.c (cxx_init_decl_processing): If storing the vbit
4310 in function pointers, ensure that force_align_functions_log
4311 is atleast one.
4312
69788039
MA
43132002-10-02 Matt Austern <austern@apple.com>
4314
4315 * class.c (check_field_decls): Changed warning about const member
4316 variables so that it doesn't get issued for a class aggregate.
95f79357 4317
d881ff25
MM
43182002-10-01 Mark Mitchell <mark@codesourcery.com>
4319
4320 * decl.c (cp_finish_decl): Make sure array types are laid out,
4321 even if the array bounds are unknown.
4322
2e88ae22
SE
43232002-10-01 Steve Ellcey <sje@cup.hp.com>
4324
d881ff25 4325 * class.c (build_vtbl_initializer): Change build_c_cast
2e88ae22
SE
4326 to build1.
4327
b4c20e52
MM
43282002-10-01 Mark Mitchell <mark@codesourcery.com>
4329
d881ff25
MM
4330 * decl.c (cp_finish_decl): Make sure array types are laid out,
4331 even if the array bounds are unknown.
4332
b4c20e52
MM
4333 * decl.c (cp_finish_decl): Correct check for dynamic
4334 initialization of thread-local storage.
4335
5a9a1961
NS
43362002-09-30 Nathan Sidwell <nathan@codesourcery.com>
4337
4338 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
4339 overloaded.
4340
7befdb9f
SE
43412002-09-30 Steve Ellcey <sje@cup.hp.com>
4342
4343 * class.c (build_vtbl_initializer): Add cast.
4344 (add_vcall_offset_vtbl_entries_1):
4345 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
4346
17bbb839
MM
43472002-09-30 Mark Mitchell <mark@codesourcery.com>
4348
4349 * class.c (walk_subobject_offsets): Correct the calculation of
4350 offsets for virtual bases. Correct the counting of array
4351 elements.
4352 (layout_nonempty_base_or_field): Simplify. Correct the
4353 calculation of offsets to be propagated through the binfo
4354 hierarchy.
4355 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
4356 Add the FIELD_DECL to TYPE_FIELDS.
4357 (build_base_fields): Adjust accordingly.
4358 (layout_virtual_bases): Use build_base_field.
4359 (end_of_class): Return a tree, not an integer.
4360 (warn_about_ambiguous_direct_bases): Rename to ...
4361 (warn_about_ambiguous_bases): ... this.
4362 (include_empty_classes): New function.
4363 (layout_class_type): Create an alternative version of the type to
4364 be used when as a base class type. Do not call
4365 finish_record_layout until we are done laying out the class.
4366 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
4367 as_base.
4368 (CLASSTYPE_SIZE): Reimplement.
4369 (CLASSTYPE_SIZE_UNIT): Likewise.
4370 (CLASSTYPE_ALIGN): Likweise.
4371 (CLASSTYPE_USER_ALIGN): Likewise.
4372 (CLASSTYPE_AS_BASE): New macro.
4373 (DECL_INITIALIZED_P): Likewise.
4374 (extract_init): Remove prototype.
4375 (build_forced_zero_init): Rename to ...
4376 (build_zero_init): ... this.
4377 (force_store_init_value): Remove.
4378 * decl.c (obscure_complex_init): Remove.
4379 (duplicate_decls): Copy DECL_INITIALIZED_P.
4380 (check_initializer): Do not leave junk in DECL_INITIAL.
4381 (cp_finish_decl): Handle zero-initialization of entities with
4382 static storage duration.
4383 * expr.c (extract_init): Remove.
4384 * init.c (build_forced_zero_init): Remove.
4385 (build_zero_init): New function.
4386 (build_default_init): Use it.
4387 (build_field_list): Skip FIELD_DECLs for base subobjects.
4388 (push_base_cleanups): Likewise.
4389 * method.c (do_build_assign_ref): Likewise.
4390 (synthesize_exception_spec): Likewise.
4391 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
4392 (regenerate_decl_from_template): To not set DECL_INITIAL for a
4393 static data member whose initialization took place in its class.
4394 (instantiate_decl): Do not pass an initializer to cp_finish_decl
4395 in that situation.
4396 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
4397 (dfs_unuse_fields): Likewise.
4398 * tree.c (pod_type_p): Handle error_mark_node.
4399 (zero_init_p): Likewise.
95f79357 4400 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
17bbb839
MM
4401 subobjects.
4402 * typeck2.c (store_init_value): Remove #if 0'd code.
4403 (force_store_init_value): Remove.
4404 (process_init_constructor): Use build_zero_init.
95f79357 4405
03357c23
NS
44062002-09-29 Nathan Sidwell <nathan@codesourcery.com>
4407
4408 PR c++/7788
4409 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
4410
27631dae
KH
44112002-09-29 Kazu Hirata <kazu@cs.umass.edu>
4412
4413 * cp-tree.h: Fix comment typos.
4414 * decl.c: Likewise.
4415 * pt.c: Likewise.
4416
956d9305
MM
44172002-09-25 Mark Mitchell <mark@codesourcery.com>
4418
4419 * cp/class.c (contains_empty_class_p): New method.
4420 (walk_subobject_offsets): Correct computation of field offset.
4421 (layout_empty_base): Correct placement of emtpy base classes.
4422 (layout_class_type): Warn about ABI changes.
4423
2d3e278d
MM
44242002-09-23 Mark Mitchell <mark@codesourcery.com>
4425
4426 * cp/class.c (layout_virtual_bases): Do not round the size of the
4427 type to a multiple of the alignment before laying out virtual bases.
4428 (layout_class_type): Correct handling of bit-fields that are wider
4429 than their type inside unions. Round the size of the type to a
4430 even number of bytes when computing the size without virtual
4431 bases.
4432 * cp/cp-tree.h (abi_version_at_least): New macro.
95f79357 4433
838dfd8a
KH
44342002-09-21 Kazu Hirata <kazu@cs.umass.edu>
4435
4436 * ChangeLog: Follow spelling conventions.
4437 * ChangeLog.2: Likewise.
4438 * call.c: Likewise.
4439 * class.c: Likewise.
4440 * cp-tree.h: Likewise.
4441 * cvt.c: Likewise.
4442 * decl.c: Likewise.
4443 * decl2.c: Likewise.
4444 * except.c: Likewise.
4445 * friend.c: Likewise.
4446 * g++spec.c: Likewise.
4447 * init.c: Likewise.
4448 * lex.c: Likewise.
4449 * mangle.c: Likewise.
4450 * method.c: Likewise.
4451 * operators.def: Likewise.
4452 * optimize.c: Likewise.
4453 * pt.c: Likewise.
4454 * rtti.c: Likewise.
4455 * search.c: Likewise.
4456 * semantics.c: Likewise.
4457 * spew.c: Likewise.
4458 * tree.c: Likewise.
4459 * typeck.c: Likewise.
4460
9ced0328
DP
44612002-09-18 Devang Patel <dpatel@apple.com>
4462
4463 * cp/cp-tree.h: New prototype for walk_vtabls().
4464 * cp/decl.c (walk_vtables_r): New function.
4465 (struct cp_binding_level): Add new members, namespaces,
4466 names_size and vtables.
4467 (add_decl_to_level): Add decl in namespaces or vtables
4468 chain, if conditions match.
4469 (walk_vtables): New function.
4470 (walk_namespaces_r): Travers separate namespace chain
4471 for namespace decls.
4472 (wrapup_globals_for_namespace): Use names_size instead
4473 of list_length().
4474 * cp/decl2.c (finish_file): Use walk_vtables() instead of
4475 walk_globals() to walk vtable decls.
4476
dd29188b
NS
44772002-09-18 Nathan Sidwell <nathan@codesourcery.com>
4478
4479 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
4480 ICE with invalid pointers & references.
4481
f989ed67
ZW
44822002-09-17 Zack Weinberg <zack@codesourcery.com>
4483
4484 * Make-lang.in: Remove all references to the demangler.
4485 * cxxfilt.c: Moved to binutils.
4486
171d2f50
NS
44872002-09-16 Nathan Sidwell <nathan@codesourcery.com>
4488
3ec83083
NS
4489 PR c++/7718
4490 * pt.c (tsubst_decl): Remove assert.
4491
171d2f50
NS
4492 Remove DR 295 implementation.
4493 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
4494 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
4495 about ignoring volatile qualifiers.
4496
4497 * search.c (lookup_member): Correct documentation.
4498
36a5eadd
GK
44992002-09-16 Geoffrey Keating <geoffk@apple.com>
4500
4501 * cp-tree.h (union lang_tree_node): Add chain_next option.
4502
28c56d25
NS
45032002-09-16 Nathan Sidwell <nathan@codesourcery.com>
4504
7979434d
NS
4505 * parse.y (parse_finish_call_expr): Check lookup_member result.
4506
28c56d25
NS
4507 PR c++/7015
4508 * semantic.c (finish_asm_stmt): Fix operand/output_operands
4509 thinko.
4510 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
4511
3baab484
NS
45122002-09-15 Nathan Sidwell <nathan@codesourcery.com>
4513
4514 PR c++/7919
4515 * call.c (build_over_call): Convert this pointer for fns found by
4516 using decls.
4517
d30d6e7a
KH
45182002-09-15 Kazu Hirata <kazu@cs.umass.edu>
4519
4520 * ChangeLog: Follow spelling conventions.
4521 * ChangeLog.1: Likewise.
4522
c8460010
NS
45232002-09-14 Nathan Sidwell <nathan@codesourcery.com>
4524
4525 PR c++/7768
4526 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
4527
c6002625
KH
45282002-09-14 Kazu Hirata <kazu@cs.umass.edu>
4529
4530 * error.c: Fix comment formatting.
4531 * except.c: Likewise.
4532 * expr.c: Likewise.
4533 * friend.c: Likewise.
4534 * g++spec.c: Likewise.
4535 * init.c: Likewise.
4536 * lex.c: Likewise.
4537 * mangle.c: Likewise.
4538 * method.c: Likewise.
4539 * optimize.c: Likewise.
4540 * pt.c: Likewise.
4541 * rtti.c: Likewise.
4542 * search.c: Likewise.
4543 * semantics.c: Likewise.
4544 * spew.c: Likewise.
4545 * tree.c: Likewise.
4546 * typeck.c: Likewise.
4547 * typeck2.c: Likewise.
4548
46dd3884
GDR
45492002-09-13 Matt Austern <austern@apple.com>
4550
4a7510cb 4551 PR C++/7828
46dd3884
GDR
4552 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
4553 * cp/call.c: Change call-by-const-reference mechanism to use
4554 non_cast_lvalue_p when deciding whether the create a temporary.
4555 We need a temporary when passing, e.g. (long) x by const ref.
4556
712467a4
NS
45572002-09-13 Nathan Sidwell <nathan@codesourcery.com>
4558
4559 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
4560
a1c65f9f
KH
45612002-09-13 Kazu Hirata <kazu@cs.umass.edu>
4562
4563 * decl.c: Fix comment formatting.
4564 * decl2.c: Likewise.
4565
00a17e31
KH
45662002-09-12 Kazu Hirata <kazu@cs.umass.edu>
4567
4568 * call.c: Fix comment formatting.
4569 * class.c: Likewise.
4570 * cp-lang.c: Likewise.
4571 * cp-tree.h: Likewise.
4572 * cvt.c: Likewise.
4573
3fd9d606
ZW
45742002-09-11 Zack Weinberg <zack@codesourcery.com>
4575
4576 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
4577 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
4578 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
4579 minor adjustments (use version_string, eliminate yet another
4580 duplicate of xmalloc)
4581
2515a7ea
KG
45822002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4583
4584 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
4585
5aa3396c
JM
45862002-09-05 Jason Merrill <jason@redhat.com>
4587
4588 * typeck2.c (add_exception_specifier): Only pedwarn for an
4589 incomplete type.
4590 (require_complete_eh_spec_types): New fn.
4591 (cxx_incomplete_type_diagnostic): Also support pedwarning.
4592 * typeck.c (complete_type_or_diagnostic): Likewise.
4593 * call.c (build_call): Call require_complete_eh_spec_types.
4594 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
4595 on an incomplete type.
4596
23ccd1f3
JJ
45972002-09-04 Jakub Jelinek <jakub@redhat.com>
4598
4599 * decl.c (start_cleanup_fn): Clear interface_only before
4600 start_function, restore it afterwards.
4601
4977bab6
ZW
46022002-09-02 Nathan Sidwell <nathan@codesourcery.com>
4603
4604 * cp-tree.h (finish_builtin_type): Remove.
4605 * decl2.c (finish_builtin_type): Move to common code.
4606 * decl.c (build_ptrmemfunc_type): Adjust.
4607 * rtti.c (create_pseudo_type_info): Adjust.
4608 (create_tinfo_types): Adjust.
4609
d99f015c
JM
46102002-08-31 Jason Merrill <jason@redhat.com>
4611
4612 * cp-lang.c (cp_expr_size): Allow initialization from a
4613 CONSTRUCTOR.
4614
8a3c9180
RH
46152002-08-30 Richard Henderson <rth@redhat.com>
4616
c9989d09 4617 PR opt/7515
8a3c9180
RH
4618 * tree.c: Include target.h.
4619 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
4620 don't bind locally.
4621 * Makefile.in (tree.o): Update.
4622
eca7f13c
MM
46232002-08-27 Mark Mitchell <mark@codesourcery.com>
4624
4625 * class.c (layout_virtual_bases): Warn about bugs in G++ that
4626 result in incorrect object layouts.
4627 (layout_class_type): Likewise.
f989ed67 4628
13d3f0b6
MA
46292002-08-24 Matt Austern <austern@apple.com>
4630
4631 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
4632 are allowable.
4633 (real_lvalue_p): Update caller.
4634 (lvalue_p): Ditto.
4635 (non_cast_lvalue_or_else): New.
4636 * tree.h: Declare it.
f989ed67 4637 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
13d3f0b6 4638
5b770a96
MM
46392002-08-22 Mark Mitchell <mark@codesourcery.com>
4640
4641 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
4642 and COND_EXPR specially; fix error message output.
4643
d65b1d77
JM
46442002-08-22 Jason Merrill <jason@redhat.com>
4645
4646 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
4647 * semantics.c (nullify_returns_r): Likewise.
4648
8a5f4379
GDR
46492002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
4650
4651 Fix PR/7621
4652 * typeck.c (finish_class_member_access_expr): Diagnose cases where
4653 name lookup finds nothing.
4654
5d764395
JM
46552002-08-15 Jason Merrill <jason@redhat.com>
4656
4657 * semantics.c (finish_then_clause): Remove redundant assignment.
4658 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
4659 extra binding level outside the if/switch statement.
4660 (finish_while_cond, finish_for_cond): Rewrite complex condition
4661 into the loop body.
4662
c01b9ec8
AO
46632002-08-15 Alexandre Oliva <aoliva@redhat.com>
4664
4665 * parse.y (sizeof, alignof, typeof): New non-terminals to
4666 increment skip_evaluation. Replace terminals with them and
4667 decrement skip_evaluation at the end of rules using them.
4668 * decl2.c (mark_used): Don't assemble_external if
4669 skipping evaluation.
4670
e8fe46d4
GDR
46712002-08-15 Gabriel Dos Reis <gdr@nerim.net>
4672
4673 Fix PR/7504
4674 * parse.y (parse_finish_call_expr): Handle incomplete
4675 type used to name a scope.
4676
eac5ce6c
NS
46772002-08-15 Nathan Sidwell <nathan@codesourcery.com>
4678
4679 PR c++/7598
4680 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4681 regression caused by my 2002-08-08 patch.
4682
22eadedb
MM
46832002-08-13 Mark Mitchell <mark@codesourcery.com>
4684
4685 * decl.c (pushdecl_class_level): Honor requests to bind names to
4686 OVERLOADs.
4687
e65e6212
KG
46882002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4689
4690 * decl2.c (build_call_from_tree): Fix uninitialized variable.
4691 * parse.y (parse_finish_call_expr): Likewise.
4692 * repo.c (old_args, old_dir, old_main): Const-ify.
4693
3e72ec9a
GDR
46942002-08-11 Gabriel Dos Reis <gdr@nerim.net>
4695
d78e771d 4696 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
3e72ec9a
GDR
4697 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4698 * optimize.c (maybe_clone_body): Likewise.
4699 * pt.c (tsubst_enum): Likewise.
4700 (lookup_template_class): Likewise.
4701 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4702
f749a36b
NB
47032002-08-10 Neil Booth <neil@daikokuya.co.uk>
4704
4705 * lang-specs.h: Remove -ansi.
4706
3ebf5204
NS
47072002-08-10 Nathan Sidwell <nathan@codesourcery.com>
4708
4709 * tree.c (maybe_dummy_object): Replace // with /* */
4710
9e259dd1
MM
47112002-08-09 Mark Mitchell <mark@codesourcery.com>
4712
4713 * call.c (standard_conversion): Use build_ptrmem_type.
4714 * cp-tree.h (build_ptrmem_type): New function.
4715 (adjust_result_of_qualified_name_lookup): Likewise.
4716 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4717 static data members.
4718 (build_ptrmem_type): New function.
4719 (grokdeclarator): Do not use build_offset_type when encountering a
4720 qualified name.
4721 * parse.y (parse_finish_call_expr): Use
4722 adjust_result_of_qualified_name_lookup.
4723 * search.c (adjust_result_of_qualified_name_lookup): New function.
4724 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4725 accessing OFFSET_TYPEs directly.
f989ed67 4726
0e339752
MS
47272002-08-08 Mike Stump <mrs@apple.com>
4728
4729 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4730 (type_decays_to): Likewise.
4731 * class.c (find_final_overrider): Likewise.
4732 (maybe_note_name_used_in_class): Likewise.
4733 * decl.c (current_tmpl_spec_kind): Likewise.
4734 (add_binding): Likewise.
4735 (push_class_binding): Likewise.
4736 (duplicate_decls): Likewise.
4737 (layout_var_decl): Likewise.
4738 (grokfndecl): Likewise.
4739 (grokdeclarator): Likewise.
4740 (check_default_argument): Likewise.
4741 * decl2.c (handle_class_head): Likewise.
4742 * error.c (dump_template_decl): Likewise.
4743 * init.c (build_offset_ref): Likewise.
4744 * pt.c (check_specialization_scope): Likewise.
4745 (determine_specialization): Likewise.
4746 (check_explicit_specialization): Likewise.
4747 (maybe_check_template_type): Likewise.
4748 (process_partial_specialization): Likewise.
4749 (check_default_tmpl_args): Likewise.
4750 (push_template_decl_real): Likewise.
4751 (convert_template_argument): Likewise.
4752 (try_class_unification): Likewise.
4753 (get_bindings_real): Likewise.
4754 (do_decl_instantiation): Likewise.
4755 * semantics.c (begin_function_definition): Likewise.
4756 (finish_member_declaration): Likewise.
4757 (check_multiple_declarators): Likewise.
4758 * typeck.c (comp_array_types): Likewise.
4759 (comptypes): Likewise.
4760 (expr_sizeof): Likewise.
4761 (build_binary_op): Likewise.
4762 (dubious_conversion_warnings): Likewise.
4763 (check_return_expr): Likewise.
b6ce26ac 4764
a6f5b2d3
MM
47652002-08-08 Mark Mitchell <mark@codesourcery.com>
4766
4767 * typeck.c (build_class_member_access_expr): Do not return
4768 error_mark_node when no error has occurred.
b6ce26ac 4769
c93a26f5
NS
47702002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4771
4772 * typeck.c (build_component_addr): Remove.
4773 (build_unary_op): Just check it's not a bitfield, and then build
4774 an ADDR_EXPR.
4775
5bfc90de
NS
47762002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4777
4778 * class.c (convert_to_base): Correct check for error_mark_node.
4779 (create_vtable_ptr): Remove unused VFUNS_P parm.
4780
22aa533e
NS
47812002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4782
4783 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4784
50ad9642
MM
47852002-08-07 Mark Mitchell <mark@codesourcery.com>
4786
4787 Rework build_component_ref.
4788 * call.c (build_vfield_ref): Do not go through build_component_ref.
4789 (build_field_call): Use build_class_member_access_expr.
4790 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4791 (build_object_call): Likewise.
4792 * class.c (convert_to_base): New function.
4793 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4794 (instantiate_type): Handle BASELINKs.
4795 * cp-tree.def (BASELINK): New tree code.
4796 * cp-tree.h (BASELINK_P): Reimplement.
4797 (SET_BASELINK_P): Remove.
4798 (BASELINK_BINFO): Reimplement.
4799 (BASELINK_FUNCTIONS): Likewise.
4800 (BASELINK_ACCESS_BINFO): Likewise.
4801 (BASELINK_OPTYPE): Likewise.
4802 (convert_to_base): New function.
4803 (name_p): Likewise.
4804 (build_object_ref): Remove.
4805 (build_component_ref_1): Likewise.
4806 (build_component_ref): Likewise.
4807 (build_x_component_ref): Likewise.
4808 (build_class_member_access_expr): New function.
4809 (finish_class_member_access_expr): Likewise.
4810 (build_ptrmemfunc_access_expr): Likewise.
4811 * decl.c (grokdeclarator): Handle BASELINKs.
4812 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4813 finish_class_member_access_expr.
4814 (arg_assoc): Handle BASELINKs.
4815 (do_class_using_decl): Likewise.
4816 * error.c (dump_decl): Likewise.
4817 (dump_expr): Use build_ptrmemfunc_access_expr.
4818 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4819 destructors.
4820 (build_throw): Use BASELINK_FUNCTIONS.
4821 * init.c (perform_member_init): Use
4822 build_class_member_access_expr.
4823 (build_offset_ref): Handle BASELINKs. Use
4824 build_class_member_access_expr.
4825 * method.c (hack_identifier): Likewise.
4826 * parse.y (do_id): Use BASELINK, not TREE_LIST.
4827 (primary): Remove uses of build_object_ref.
4828 * pt.c (lookup_template_function): Handle BASELINKs.
4829 (resolve_overloaded_unification): Likewise.
4830 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4831 (lookup_field): Use BASELINK, not TREE_LIST.
4832 (lookup_fnfiels): Likewise.
4833 (setup_class_bindings): Likewise.
4834 * semantics.c (finish_object_call_expr): Do not use
4835 build_method_call when we already know what function is being
4836 called.
4837 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4838 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4839 TREE_CHAIN.
4840 (name_p): New function.
4841 * typeck.c (build_object_ref): Remove.
4842 (build_component_ref_1): Likewise.
4843 (build_x_component_ref): Likewise.
4844 (build_class_member_access_expr): New function.
4845 (finish_class_member_access_expr): Likewise.
4846 (build_ptrmemfunc_access_expr): Likewise.
4847 (get_member_function_from_ptrfunc): Use
4848 build_ptrmemfunc_access_expr.
4849 (build_binary_op): Likewise.
4850 (build_unary_op): Likewise.
4851 (build_ptrmemfunc): Likewise.
4852 (pfn_from_ptrmemfunc): Likewise.
4853 * typeck2.c (build_m_component_ref): Adjust comment.
b6ce26ac 4854
0b6f2917
NB
48552002-08-07 Neil Booth <neil@daikokuya.co.uk>
4856
4857 * Make-lang.in (CXX_C_OBJS): Update.
4858 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4859 * cp-tree.h (cxx_decode_option): Remove.
4860 * decl2.c (compare_options, lang_f_options, unsupported_options,
4861 cxx_decode_option): Remove.
4862
1e14c7f0
GDR
48632002-08-06 Gabriel Dos Reis <gdr@nerim.net>
4864
4865 * typeck.c (build_x_unary_op): Handle pointer-to-member.
4866
b3426eb9
GK
48672002-08-05 Geoffrey Keating <geoffk@redhat.com>
4868
4869 * class.c: Don't include obstack.h.
b6ce26ac 4870 (popclass):
b3426eb9
GK
4871 * decl2.c: Delete bogus comment.
4872 * error.c: Don't include obstack.h.
4873 * except.c: Likewise.
4874 (dump_type): Correct comment.
4875 * method.c: Don't include obstack.h.
4876 * tree.c: Likewise.
4877
201fbb7f
GDR
48782002-08-04 Gabriel Dos Reis <gdr@nerim.net>
4879
4880 Fix PR/2213
4881 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4882 expressions to pointer-to-data-member of pointer-to-member-functions.
4883
6d9f628e
GK
48842002-08-04 Geoffrey Keating <geoffk@redhat.com>
4885
4886 * cvt.c (ocp_convert): Delete obsolete code.
4887 * parse.y (permanent_obstack): Delete declaration.
4888 * pt.c (permanent_obstack): Delete declaration.
4889 * repo.c (permanent_obstack): Delete declaration.
4890 (open_repo_file): Use xmalloc instead of permanent_obstack.
4891 (init_repo): Use xstrdup instead of permanent_obstack.
4892
dd98e14f
NS
48932002-08-04 Nathan Sidwell <nathan@codesourcery.com>
4894
4895 * cp-tree.h (VF_DERIVED_VALUE): Remove.
4896 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4897
e6858a84
NS
48982002-08-03 Nathan Sidwell <nathan@codesourcery.com>
4899
4900 PR 7470.
4901 C++ ABI change - vfunc ordering.
4902 * class.c (add_virtual_function): Remove.
4903 (dfs_modify_all_vtables): Take list of all declared
4904 virtuals. Assign all that are not in primary base.
4905 (check_for_override): Adjust comments.
4906 (create_vtable_ptr): Take single list of virtuals. Build chain
4907 of declared virtuals here.
4908 (layout_class_type): Take single list of virtuals. Adjust.
4909 (finish_struct_1): Keep virtuals on single list. Adjust.
4910
55765de4
MM
49112002-08-02 Mark Mitchell <mark@codesourcery.com>
4912
4913 * init.c (build_member_call): Use build_new_method_call, not
4914 build_method_call.
4915
d0067571
KW
49162002-08-02 Krister Walfridsson <cato@df.lth.se>
4917
4918 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4919
4a34e0e8
MM
49202002-08-02 Mark Mitchell <mark@codesourcery.com>
4921
4922 * call.c (build_method_call): Issue a more helpful error message
4923 about ambiguous method names.
4924
41ab2ae2
NS
49252002-08-02 Nathan Sidwell <nathan@codesourcery.com>
4926
4927 * tree.c (build_shared_int_cst): Make cache file scope, and
4928 GTY it.
4929
367aa585
JM
49302002-08-02 Jason Merrill <jason@redhat.com>
4931
a77a9a18
JM
4932 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4933 (cp_expr_size): New fn.
4934 * call.c (build_over_call): Lose empty class hackery.
4935 (convert_arg_to_ellipsis): Promote non-POD warning to error.
4936 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4937
367aa585
JM
4938 * semantics.c (expand_body): Do tree optimization in the function
4939 context, too.
4940
4078b403
NB
49412002-08-01 Neil Booth <neil@daikokuya.co.uk>
4942
4943 * cp-tree.h: Move all warning and flag declarations to c-common.h.
4944 * decl.c: Move all warning and flag variables to c-common.c.
4945 * decl2.c: Move all warning and flag variables to c-common.c.
4946 * lex.c (flag_digraphs): Remove.
4947 (warn_traditional): Now in c-common.c.
4948
4ba126e4
MM
49492002-07-31 Mark Mitchell <mark@codesourcery.com>
4950
4951 * call.c (build_field_call): Do not look up the field by name.
4952 (build_method_call): Simplify.
4953 (struct z_candidate): Add access_path and conversion_path. Remove
4954 basetype_path.
4955 (convert_class_to_reference): Adjust use of
4956 add_function_candidate.
4957 (add_candidate): Add conversion_path argument.
4958 (add_function_candidate): Use it.
4959 (add_conv_dndidate): Likewise.
4960 (build_builtin_candidate): Likewise.
4961 (add_template_candidate_real): Add conversion_path argument.
4962 (add_template_conv_candidate): Likewise.
4963 (add_template_candidate): Likewise.
4964 (build_user_type_conversion_1): Use it.
4965 (build_new_function_call): Remove name lookup code. Adjust use of
4966 add_template_candidate and add_function_candidate.
4967 (build_new_op): Likewise.
4968 (convert_like_real): Use build_special_member_call.
4969 (build_over_call): Use cand->conversion_path.
4970 (build_special_member_call): New method.
4971 (build_new_method_call): Remove name lookup code.
4972 * cp-tree.def (OFFSET_REF): Update documentation.
4973 (TEMPLATE_ID_EXPR): Likewise.
4974 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4975 (BASELINK_OPTYPE): Likewise.
4976 (build_new_method_call): Adjust prototype.
4977 (build_special_member_call): New method.
4978 (build_baselink): New method.
4979 (build_offset_ref_call_from_tree): Likewise.
4980 (build_call_from_tree): Likewise.
4981 (finish_qualified_call_expr): Remove.
4982 (finish_call_expr): Adjust prototype.
4983 (build_x_function_call): Remove.
4984 * cvt.c (ocp_convert): Use build_special_member_call.
4985 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4986 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4987 CALL_EXPR.
4988 (build_offset_ref_call_from_tree): New function.
4989 (build_call_from_tree): Likewise.
4990 * init.c (expand_cleanup): Use build_special_member_call.
4991 (expand_default_init): Likewise.
4992 (build_member_call): Use finish_call_expr.
4993 (build_new_1): Use build_special_member_call.
4994 (push_base_cleanups): Likewise.
4995 * method.c (do_build_assign_ref): Likewise.
4996 * parse.y (template_id): Do not pass a COMPONENT_REF to
4997 lookup_template_function.
4998 (primary): Use parse_finish_call_epxr, not finish_call_expr.
4999 (parse_finish_call_expr): New function.
5000 * pt.c (lookup_template_function): Add assertions.
5001 * search.c (lookup_base): Allow T to be a binfo.
5002 (build_baselink): New function.
5003 (lookup_member): Use it.
5004 * semantics.c (finish_call_expr): Do not do name lookup.
5005 (finish_object_call_expr): Remove #if 0'd code.
5006 (finish_qualified_call_expr): Remove.
5007 * typeck.c (build_x_function_call): Remove.
5008 (build_static_case): Use build_special_member_call.
5009 * typeck2.c (build_functional_cast): Likewise.
b6ce26ac 5010
60b8aa94
FS
50112002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5012
5013 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
5014
8a4a7242
GDR
50152002-07-30 Gabriel Dos Reis <gdr@nerim.net>
5016
5017 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
5018
03fc215c
NS
50192002-07-30 Nathan Sidwell <nathan@codesourcery.com>
5020
5021 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
5022 documentation.
5023
3f16a8f3
AM
50242002-07-29 Alan Modra <amodra@bigpond.net.au>
5025
5026 * cp-tree.h: Comment typo fix.
5027
c03d566f
RE
50282002-07-29 Richard Earnshaw <rearnsha@arm.com>
5029
5030 * spew.c (space_for_token): Allocate zeroed memory for a new token
5031 chunk.
5032
c2ef6d34
RS
50332002-07-27 Roger Sayle <roger@eyesopen.com>
5034
5035 * decl.c (builtin_function_1): No need to explicitly mark
5036 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
5037
a3926fe1
RS
50382002-07-27 Roger Sayle <roger@eyesopen.com>
5039
5040 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
5041
8e51619a
JM
50422002-07-26 Jason Merrill <jason@redhat.com>
5043
5044 * call.c (build_over_call): Likewise.
5045 (cp_convert_parm_for_inlining): New fn.
f989ed67
ZW
5046 (convert_for_arg_passing): New fn.
5047 (convert_default_arg, build_over_call): Use it.
8e51619a
JM
5048 (type_passed_as): New fn.
5049 * pt.c (tsubst_decl): Use it.
5050 * decl2.c (cp_build_parm_decl): New fn.
5051 (build_artificial_parm): Use it.
5052 (start_static_storage_duration_function): Likewise.
5053 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
5054 (grokparms): Don't mess with DECL_ARG_TYPE.
5055 * typeck.c (convert_arguments): Use convert_for_arg_passing.
5056 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5057 Define.
5058 * cp-tree.h: Declare new fns.
b6ce26ac 5059
c372b0fa
NB
50602002-07-26 Neil Booth <neil@daikokuya.co.uk>
5061
5062 * cp-tree.h (flag_operator_names): Remove.
5063 * decl2.c (flag_operator_names): Remove.
5064 (lang_f_options): Remove operator-names.
5065 * lex.c (D_OPNAME): Remove.
5066 (reswords): Remove operator names.
5067 (rid_to_yy): Remove operator names.
5068 (init_reswords): No need to handle D_OPNAME.
5069 * spew.c (read_process_identifier): There are no operator
5070 names.
5071
558ee214
JM
50722002-07-26 Jason Merrill <jason@redhat.com>
5073
5074 * dump.c (cp_dump_tree): Call c_dump_tree.
5075 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5076
81a1552d
NB
50772002-07-25 Neil Booth <neil@daikokuya.co.uk>
5078
5079 * error.c (print_whitespace): Remove.
5080 * g++spec.c (LIBUNWIND): Move.
5081 * mangle.c (mangled_position, write_signed_number): Remove.
5082
cad2c6b6
NB
50832002-07-25 Neil Booth <neil@daikokuya.co.uk>
5084
5085 * decl2.c (cxx_decode_option): Similarly.
5086
ea793912
GDR
50872002-07-25 Gabriel Dos Reis <gdr@nerim.net>
5088
5089 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
5090 (cxx_sizeof_or_alignof_type): Take a third argument.
5091 (cxx_sizeof): Adjust definition.
5092 (cxx_alignof): Likewise.
5093 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
5094 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
5095 complaining.
5096 (c_sizeof_nowarn): Remove definition.
5097 (build_unary_op): Use cxx_sizeof_nowarn.
5098
3cfab7ec
GK
50992002-07-24 Geoffrey Keating <geoffk@redhat.com>
5100
5101 * tree.c (cp_build_qualified_type_real): When copying
5102 pointer-to-method types, unshare the record that holds
5103 the cached pointer-to-member-function type.
5104
c0667597
NB
51052002-07-23 Neil Booth <neil@daikokuya.co.uk>
5106
5107 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
5108
fa72b064
GDR
51092002-07-23 Gabriel Dos Reis <gdr@nerim.net>
5110
5111 Fix PR/7363:
5112 * typeck.c (cxx_sizeof_or_alignof_type): New function.
5113 (c_sizeof): Remove definition.
5114 (expr_sizeof): Use cxx_sizeof.
5115 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
5116 * decl.c (finish_destructor_body): Use cxx_sizeof.
5117 * semantics.c (finish_alignof): Likewise.
5118 (finish_alignof): Use cxx_alignof.
5119 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
5120 (cxx_sizeof_or_alignof_type): Declare.
5121 (my_friendly_assert): Move to ../c-common.h.
5122
4fa31c2a
NB
51232002-07-23 Neil Booth <neil@daikokuya.co.uk>
5124
5125 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
5126
0e902d98
KL
51272002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5128
5129 PR c++/7347, c++/7348
5130 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
5131 * decl.c (make_typename_type): Use it.
5132 (make_unbound_class_template): Likewise.
5133 (lookup_name_real): Don't call type_access_control if scope is
5134 template parameter dependent.
5135 * parse.y (template_arg): Call make_unbound_class_template with
5136 tf_parsing set.
5137 (nest_name_specifier): Call make_typename_type with tf_parsing set.
5138 (typename_sub0): Likewise.
5139 (typename_sub1): Likewise.
5140 (instantiate_decl): Push class scope.
5141 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
5142 for both static variable and member function template.
5143 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
5144 and arguments.
5145 * search.c (type_access_control): Do type access for TEMPLATE_DECL
5146 too.
5147
b886c620
RS
51482002-07-20 Roger Sayle <roger@eyesopen.com>
5149
5150 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
5151 test by using positive_option. Make whitespace consistent.
5152
7a561142
GDR
51532002-07-20 Gabriel Dos Reis <gdr@nerim.net>
5154
fa72b064 5155 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7a561142
GDR
5156 members with 'locus'. Adjust use throughout.
5157 (struct feed): Likewise.
5158 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
5159 Adjust use.
5160 (snarf_defarg): Use error(), not error_with_file_and_line().
5161
059ba716
CD
51622002-07-19 Chris Demetriou <cgd@broadcom.com>
5163
5164 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
5165 cpp_options is included.
5166
d955f6ea
KL
51672002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5168
5169 PR c++/2862, c++/2863
5170 * pt.c (determine_specialization): Compare the length of
5171 TYPE_ARG_TYPES. Tidy.
5172
d03d18e8
KL
51732002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5174
5175 PR c++/3797
5176 * decl.c (duplicate_decls): Don't propagate inlining parameters from
b6ce26ac 5177 olddecl to newdecl when newdecl is a specialization of the
d03d18e8
KL
5178 instantiation olddecl.
5179
ba59df78
KL
51802002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5181
5182 PR c++/4802, c++/5387
5183 * decl.c (make_typename_type): Use enforce_access.
5184
58f05188
SS
51852002-07-17 Scott Snyder <snyder@fnal.gov>
5186
5187 PR c++/7320
5188 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
5189
04ec0065
MM
51902002-07-12 Mark Mitchell <mark@codesourcery.com>
5191
5192 * class.c (add_method): Correct handling of conversion operators.
5193
f0ab6bf2
MM
51942002-07-11 Mark Mitchell <mark@codesourcery.com>
5195
5196 PR c++/7224
5197 * class.c (add_method): Simplify.
5198
34902e16
JM
51992002-07-11 Jason Merrill <jason@redhat.com>
5200
5201 PR c++/7279
5202 * tree.c (cp_copy_res_decl_for_inlining): Also copy
5203 TREE_ADDRESSABLE.
5204
6e04241f
GS
52052002-07-10 Graham Stott <graham.stott@btinternet.com>
5206
5207 * pt.c (template_parm_this_level_p, push_template_decl_real):
b6ce26ac 5208 Pass depth as int pointer.
6e04241f 5209
8ac9d31f
TJ
52102002-07-11 Tim Josling <tej@melbpc.org.au>
5211
b6ce26ac 5212 Remove front end hard coding from gengtype.c.
8ac9d31f
TJ
5213
5214 * config-lang.in (gtfiles): Add files needed for this front end.
5215
15c7fb9c
MM
52162002-07-10 Mark Mitchell <mark@codesourcery.com>
5217
5218 * cp-tree.h (unqualified_name_lookup_error): Declare it.
5219 (begin_function_definition): Adjust prototype.
5220 * lex.c (unqualified_name_lookup_error): New function, split out
5221 from ...
5222 (do_identifier): ... here.
5223 * parse.y (parse_begin_function_definition): New function.
5224 (fn.def1): Use it.
5225 * semantics.c (begin_function_definition): Accept decl-specifiers
5226 and attributes as separate parameters.
5227
abf92e26
JM
52282002-07-10 Jason Merrill <jason@redhat.com>
5229
5230 PR c++/6255
5231 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
5232 modifying the old one.
5233
8ba658ee
MM
52342002-07-09 Mark Mitchell <mark@codesourcery.com>
5235
5236 * cp-tree.h (constructor_name_p): Declare it.
5237 (check_template_template_default_arg): Likewise.
5238 * class.c (handle_using_decl): Use constructor_name_p.
5239 * decl.c (grokdeclarator): Likewise.
5240 * decl2.c (constructor_name_p): Define it.
5241 * init.c (build_member_call): Use constructor_name_p.
5242 * parse.y (template_parm): Use check_template_template_default_arg.
5243 * pt.c (check_explicit_specialization): Use constructor_name_p.
5244 * semantics.c (check_template_template_default_arg): New function.
b6ce26ac 5245
d5372501
KL
52462002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5247
5248 * pt.c (can_complete_type_without_circularity): Add static to
5249 function definition.
5250
594bb0e7
MM
52512002-07-08 Mark Mitchell <mark@codesourcery.com>
5252
5253 * cp-tree.h (have_extern_spec): Declare it
5254 * decl.c (have_extern_spec): Define it.
5255 (start_decl): Eliminate use of used_extern_spec.
5256 (start_function): Likewise.
5257 * parse.y (have_extern_spec): Remove declaration.
5258 (used_extern_spec): Likewise.
5259 (frob_specs): Eliminate use of used_extern_spec.
5260 (.hush_warning): Likewise.
5261
eb8845be
MM
52622002-07-07 Mark Mitchell <mark@codesourcery.com>
5263
5264 * Make-lang.in (cp/parse.o): Depend on decl.h.
5265 * cp-tree.h (do_decl_instantiation): Change prototype.
5266 * parse.y: Include decl.h.
5267 (parse_decl_instantiation): New function.
5268 (explicit_instantiation): Use it.
5269 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
5270 and DECLSPECS.
b6ce26ac 5271
78abea27
RS
52722002-07-07 Roger Sayle <roger@eyesopen.com>
5273
5274 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
5275 constructor and destructor tests when passed a TEMPLATE_DECL.
5276
98c07d7b
JM
52772002-07-05 Jason Merrill <jason@redhat.com>
5278
212e17fd
JM
5279 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
5280 pointers.
5281
98c07d7b
JM
5282 PR optimization/7145
5283 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
5284
c6f553d1
NS
52852002-07-05 Nathan Sidwell <nathan@codesourcery.com>
5286
5287 Repair damage on weak-impared targets caused by my previous patch.
5288 * cp-tree.h (import_export_tinfo): Add parameter.
5289 * decl2.c (import_export_tinfo): Add parameter, post adjust
5290 DECL_COMDAT.
5291 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
5292 import_export_tinfo.
5293
b2153b98
KL
52942002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5295
5296 PR c++/6944
5297 * init.c (build_aggr_init): Remove qualifiers of init before calling
5298 build_vec_init.
5299 (build_vec_init): Flatten multi-dimensional array during cleanup.
5300 (build_vec_delete_1): Abort if the type of each element is array.
5301
492ff760
GS
53022002-07-03 Graham Stott <graham.stott@btinternet.com>
5303
5304 * pt.c (instantiate_class_template): Fix typo.
5305
04c4491d
KL
53062002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5307
06728f70
KL
5308 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
5309 by CVS conflict in my last patch.
04c4491d 5310
17f29637
KL
53112002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5312
5313 PR c++/6716
5314 * pt.c (can_complete_type_without_circularity): New function.
5315 (instantiate_class_template): Use it.
06728f70
KL
5316 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
5317 message due to incomplete fields.
17f29637 5318
5d69ba1f
MM
53192002-07-01 Mark Mitchell <mark@codesourcery.com>
5320
5321 PR c++/7112
5322 * mangle.c (write_expression): Add mangling for sizeof when
5323 applied to a type.
5324 * operators.def: Remove stale comment.
5325
d689a8f1
NS
53262002-06-30 Nathan Sidwell <nathan@codesourcery.com>
5327
5328 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
5329 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
5330 (tinfo_decl_type): Replace with ...
5331 (type_info_ptr_type): ... this.
5332 (import_export_tinfo): Declare.
5333 (tinfo_decl_p): Rename to ...
5334 (unemitted_tinfo_decl_p): ... this.
5335 * decl2.c (import_export_decl): Break out tinfo handling into ...
5336 (import_export_tinfo): ... here. New function.
5337 (finish_file): Adjust.
5338 * rtti.c (TINFO_REAL_NAME): New macro.
5339 (init_rtti_processing): Create the tinfo types.
5340 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
5341 (get_tinfo_decl): Adjust.
5342 (get_tinfo_ptr): New function.
5343 (get_type_id): Use it.
5344 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
5345 (ptr_initializer): Use get_tinfo_ptr.
5346 (ptm_initializer): Likewise.
5347 (synthesize_tinfo_var): Break into ...
5348 (get_pseudo_ti_init): ... this. Just create the initializer.
5349 (get_pseudo_ti_desc): .. and this.
5350 (create_real_tinfo_var): Remove.
5351 (create_pseudo_type_info): Don't create the vtable decl here.
5352 (get_vmi_pseudo_type_info): Remove.
5353 (create_tinfo_types): Adjust.
5354 (tinfo_decl_p): Rename to ...
5355 (unemitted_tinfo_decl_p): ... here. Adjust.
5356 (emit_tinfo_decl): Adjust. Create the initializer.
5357
5ce49b4b
MM
53582002-06-27 Mark Mitchell <mark@codesourcery.com>
5359
5360 PR c++/6695
5361 * pt.c (tsubst_friend_class): Substitute into the context of the
5362 friend before using it.
5363
88e5899c
MM
53642002-06-26 Mark Mitchell <mark@codesourcery.com>
5365
5366 * cp-tree.h (xref_tag): Change prototype.
5367 (handle_class_head): Likewise.
5368 (build_x_component_ref): Likewise.
5369 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
5370 (xref_tag): Take attributes as a separate parameter.
5371 (xref_tag_from_type): Adjust call to xref_tag.
5372 * decl2.c (build_expr_from_tree): Adjust call to
5373 build_x_component_ref.
5374 (handle_class_head): Take attributes as a separate parameter.
5375 * parse.y (parse_xref_tag): New function.
5376 (parse_handle_class_head): Likewise.
5377 (primary): Use parse_xref_tag.
5378 (class_head_decl): Use parse_handle_class_head.
5379 (class_head_defn): Likewise.
5380 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
5381 (build_dynamic_cast_1): Likewise.
5382 (create_pseudo_type_info): Likewise.
5383 (emit_support_tinfos): Likewise.
5384 * typeck.c (build_object_ref): Adjust call to
5385 build_x_component_ref.
5386 (build_x_component_ref): Remove protect parameter.
b6ce26ac 5387
da15dae6
MM
53882002-06-25 Mark Mitchell <mark@codesourcery.com>
5389
5390 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
5391 * class.c (handle_using_decl): Likewise.
5392 (instantiate_type): Likewise.
5393 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
5394 (xref_basetypes): Change prototype.
5395 (begin_mem_initializers): New function.
5396 (get_overloaded_fn): Likewise.
5397 * decl.c (xref_basetypes): Simplify.
5398 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
5399 * init.c (build_offset_ref): Likewise.
5400 * parse.y (base_init): Use begin_mem_initializers().
5401 (structsp): Adjust call to xref_basetypes.
5402 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
5403 (instantiate_class_template): Adjust call to xref_basetypes.
5404 * semantics.c (begin_mem_initializers): New function.
5405 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
5406 (really_overlaoded_fn): Likewise.
5407 (get_overloaded_fn): New function.'
5408 (get_first_fn): USe BASELINK_FUNCTIONS.
b6ce26ac 5409
5f261ba9
MM
54102002-06-24 Mark Mitchell <mark@codesourcery.com>
5411
5412 * cp-tree.h (SCALAR_TYPE_P): New macro.
5413 (check_for_out_of_scope_variable): New function.
5414 (at_class_scope_p): Likewise.
5415 (finish_fname): Likewise.
5416 * class.c (finish_struct): Use at_function_scope_p.
5417 * decl.c (check_for_out_of_scope_variable): New function, split
5418 out from do_identifier.
5419 (finish_enum): Use at_function_scope_p.
5420 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
5421 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
5422 (primary): Use at_function_scope_p.
5423 * search.c (at_class_scope_p): New function.
5424 * semantics.c (finish_fname): Likewise.
5425 (check_multiple_declarators): Use at_function_scope_p.
b6ce26ac 5426
80b1331c
MM
54272002-06-23 Mark Mitchell <mark@codesourcery.com>
5428
5429 * parse.y (parse_scoped_id): New function.
5430 (primary): Use it.
5431 * cp-tree.h (do_scoped_id): Adjust declaration.
5432 * lex.c (do_scoped_id): Remove call to yylex.
5433 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
5434 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
5435 expanding it inline.
b6ce26ac 5436
08c7ae5a
MT
54372002-06-23 Matt Thomas <matt@3am-software.com>
5438
5439 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
5440 "#if VMS_TARGET".
5441
eb6b51b9
KG
54422002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5443
5444 * mangle.c (integer_type_codes): Const-ify.
5445
aa8dea09
RH
54462002-06-20 Richard Henderson <rth@redhat.com>
5447
5448 PR c++/6747
f989ed67
ZW
5449 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
5450 Call put_var_into_stack.
aa8dea09 5451
62c71f4b
KG
54522002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5453
5454 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
5455 array size calculation.
5456
aa16c0fa
KL
54572002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5458
5459 PR c++/6892
5460 * pt.c (tsubst_expr): Handle FILE_STMT.
5461
342cea95
KL
54622002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5463
5464 PR c++/6723
5465 * pt.c (lookup_template_class): Don't build complete argument of
5466 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
5467 argument.
5468
84d901be
AD
54692002-06-19 Akim Demaille <akim@epita.fr>
5470
5471 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
5472 decl.h's TYPENAME.
5473 * spew.c, lex.c: Adjust.
5474 * parse.y (explicit_instantiation): Add empty action to override
5475 the default $$ = $1 where it introduces a type clash.
5476
83b14b88
JM
54772002-06-14 Jason Merrill <jason@redhat.com>
5478
18ba380b
JM
5479 * semantics.c (begin_for_stmt): Push the 'for' scope before
5480 adding the FOR_STMT.
5481
83b14b88
JM
5482 C++ ABI changes.
5483 * class.c (build_base_field): Set DECL_PACKED.
5484 (layout_class_type): Don't use tail padding of PODs.
5485 * mangle.c (write_unqualified_name): Fix template conversion op
5486 mangling.
5487
fd852454
RH
54882002-06-16 Richard Henderson <rth@redhat.com>
5489
5490 PR opt/6793
5491 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
5492 after template instantiation.
5493
750491fc
RH
54942002-06-16 Richard Henderson <rth@redhat.com>
5495
5496 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
5497
f7d3c5f0
GDR
54982002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
5499
5500 * cp-tree.h (compiler_error): Remove declaration.
5501 * lex.c (compiler_error): Remove definition.
5502
893a047c
SE
55032002-06-14 Steve Ellcey <sje@cup.hp.com>
5504
5505 * g++spec.c (LIBUNWIND): New.
5506 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
5507
a6f5e048
RH
55082002-06-13 Jessica Han <jessica@cup.hp.com>
5509
5510 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
5511 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
5512 (build_vbase_offset_vtbl_entries): Likewise.
5513 * rtti.c (build_headof): Likewise.
5514 (get_tinfo_decl_dynamic): Likewise.
5515 (create_pseudo_type_info): Likewise.
5516
e4dadd2a
SS
55172002-06-12 Stan Shebs <shebs@apple.com>
5518
5519 * mpw-config.in: Remove file, no longer used.
5520 * mpw-make.sed: Ditto.
5521
09e77dee
ZW
55222002-06-07 Zack Weinberg <zack@codesourcery.com>
5523
5524 * decl2.c: Update call to cpp_handle_option.
5525
4bafaa6f
L
55262002-06-07 H.J. Lu (hjl@gnu.org)
5527
5528 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
5529
3cb8660c
GDR
55302002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5531
5532 * error.c (cp_error_at): Fix typo.
5533
47b69537
GDR
55342002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
5535
5536 * error.c (cp_diagnostic_starter): Adjust call.
5537 (maybe_print_instantiation_context): Change prototype to take a
5538 'diagnostic_info *'.
5539 (print_instantiation_full_context): Likewise.
5540 (print_instantiation_partial_context): Likewise.
5541 (cp_diagnostic_starter): Likewise.
5542 (cp_diagnostic_finalizer): Likewise.
5543 (cp_print_error_function): Likewise.
5544 (cp_printer): Take a secondary parameter as a 'text_info *'.
5545 Remove output_state savings. Adjust calls.
5546
e2500fed
GK
55472002-06-03 Geoffrey Keating <geoffk@redhat.com>
5548
5549 * pt.c (inline_parm_levels): Mark for GC.
5550
5551 * mangle.c (start_mangling): Allocate G.substitutions here...
5552 (init_mangle): ... rather than here.
5553 (finish_mangling): Clear the varray pointer when done with it.
84d901be
AD
5554 * spew.c (yylexstring): Don't use VARRAY_FREE.
5555 * search.c (bfs_walk): Don't use VARRAY_FREE.
e2500fed
GK
5556 * decl2.c (pending_statics): Use gengtype to mark.
5557 (deferred_fns): Likewise.
5558 (ssdf_decls): Likewise.
5559 (init_decl2): Delete.
5560 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
5561 (cxx_init_decl_processing): Don't call init_decl2.
5562 (cxx_pop_function_context): Don't use VARRAY_FREE.
5563 * cp-tree.h (struct saved_scope): No need for special marking
5564 of varrays.
5565 (struct language_function): Likewise.
5566 (local_classes): Use gengtype to mark.
5567 (init_decl2): Delete prototype.
5568 * class.c (init_class_processing): Don't use
5569 ggc_add_tree_varray_root.
5570 (build_vtbl_initializer): Don't use VARRAY_FREE.
5571
5572 * decl.c (typename_compare): Don't use same_type_p.
5573
5574 * decl.c: Include hashtab.h instead of hash.h.
5575 (typename_hash): Update to use htab_h.
5576 (typename_compare): Likewise.
5577 (typename_htab): Use gengtype to mark.
5578 (build_typename_type): Update to use htab_h.
5579 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
5580
5581 * Make-lang.in (gt-cp-tree.h): New rule.
5582 (cp/tree.o): Depend on gt-cp-tree.h.
5583 * config-lang.in (gtfiles): Add cp/tree.c.
5584 * tree.c: Include gt-cp-tree.h.
5585 (list_hash_table): Use gengtype to mark.
5586 (init_tree): Use gengtype to mark trees.
5587
5588 * Make-lang.in (cp/decl.o): Add debug.h dependency.
5589 * call.c (struct z_candidate): Use gengtype.
5590 (USER_CONV_CAND): Use WRAPPER_ZC.
5591 (convert_class_to_reference): Use build_zc_wrapper.
5592 (build_type_conversion_1): Likewise.
5593 (build_over_call): Use WRAPPER_ZC.
5594 (add_warning): Use build_zc_wrapper.
5595 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
5596 * cp-tree.h (struct lang_identifier): Use gengtype.
5597 (struct template_parm_index_s): Likewise.
5598 (struct ptrmem_cst): Likewise.
5599 (struct tree_binding): Likewise.
5600 (struct tree_overload): Likewise.
5601 (struct tree_srcloc): Likewise.
5602 (struct tree_wrapper): Likewise. Also modify to have a pointer
5603 to struct z_candidate rather than void.
5604 (enum cp_tree_node_structure_enum): New.
5605 (union lang_tree_node): New.
5606 (cxx_mark_tree): Delete prototype.
5607 (cp_tree_node_structure): New prototype.
5608 (build_ptr_wrapper): Delete prototype.
5609 (build_int_wrapper): Delete prototype.
5610 (build_zc_wrapper): New prototype.
5611 * decl.c: Include debug.h
5612 (cxx_mark_tree): Delete.
5613 (cp_tree_node_structure): New.
5614 * tree.c (build_ptr_wrapper): Delete.
5615 (build_int_wrapper): Delete.
5616 (build_zc_wrapper): New.
5617
5618 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
5619 Correct typo. Patch from k_fukui@highway.ne.jp.
5620
5621 * semantics.c (current_stmt_tree): Update for change to
5622 struct language_function.
5623 (finish_mem_initializers): Likewise.
5624 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
5625 * cp-tree.h (struct language_function): Rename from
5626 cp_language_function. Change all uses.
5627 (cp_function_chain): Don't need to cast.
5628
5629 * class.c (duplicate_tag_error): Reset discriminator.
5630 (check_bases_and_members): Update for data structure changes.
5631 * cp-tree.h (struct lang_id2): Use gengtype.
5632 (flagged_type_tree): Likewise.
5633 (SET_LANG_ID): Use GGC on struct lang_id2.
5634 (struct cp_language_function): Use gengtype. Remove field
5635 'x_vcalls_possible_p'.
5636 (current_vcalls_possible_p): Delete.
5637 (struct lang_type_header): New.
5638 (struct lang_type_class): Rename from struct lang_type. Include
5639 struct lang_type_header.
5640 (struct lang_type_ptrmem): New.
5641 (struct lang_type): New.
5642 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
5643 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
5644 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
5645 (struct lang_decl_flags): Use gengtype. Add discriminators.
5646 (struct lang_decl): Use gengtype. Add and use discriminators.
5647 Update the macros that reference moved fields.
5648 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
5649 (SET_DECL_THUNK_P): Set discriminator too.
5650 (clear_inline_text_obstack): Delete prototype.
5651 (finish_inline_definitions): Delete prototype.
5652 (mark_pending_inlines): Delete prototype.
5653 (lang_check_failed): New prototype.
5654 * decl.c (struct named_label_use_list): Use gengtype.
5655 (struct named_label_list): Likewise.
5656 (mark_binding_level): Delete.
5657 (mark_named_label_lists): Delete.
5658 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
5659 (cxx_init_decl_processing): Use generated marker routine.
5660 (begin_destructor_body): Delete dead set to
5661 current_vcalls_possible_p.
5662 (mark_lang_function): Delete.
5663 (mark_cp_function_context): Delete.
5664 (lang_mark_tree): Use generated marker routines.
5665 * decl2.c (start_objects): Set discriminator when setting
5666 GLOBAL_INIT_PRIORITY.
5667 * lex.c (retrofit_lang_decl): Set discriminators.
5668 (copy_lang_type): Update for changes to lang_type structure.
5669 (cp_make_lang_type): Set discriminator.
5670 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
5671 * search.c: Include ggc.h.
5672 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5673 (finish_inline_definitions): Delete.
5674 * spew.c (struct token): Use gengtype.
5675 (struct token_chunk): New.
5676 (struct unparsed_text): Use gengtype. Store tokens in chunks.
5677 (struct feed): Use gengtype.
5678 (feed_obstack): Delete.
5679 (feed): Mark as GC root.
5680 (pending_inlines): Mark as GC root.
5681 (pending_inlines_tail): Likewise.
5682 (processing_these_inlines): Likewise.
5683 (token_obstack): Make static.
5684 (first_token): Likewise.
d30d6e7a 5685 (init_spew): Don't initialize deleted things; use gengtype for roots.
e2500fed
GK
5686 (clear_inline_text_obstack): Delete.
5687 (feed_input): Use GC for struct feed. Update for changes to
5688 struct unparsed_text.
5689 (mark_pending_inlines): Delete.
5690 (next_token): Rename from add_token. Change all callers. Update
5691 for changes to struct unparsed_text.
5692 (space_for_token): New.
5693 (remove_last_token): New.
5694 (alloc_unparsed_text): New.
5695 (snarf_block): Take an unparsed_text. Update for changes to struct
5696 unparsed_text.
5697 (snarf_method): Update for changes to struct unparsed_text.
5698 (snarf_defarg): Update for changes to struct unparsed_text.
5699 * tree.c (lang_check_failed): New.
5700
5701 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5702 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5703 (cp/spew.o): Add dependency on gt-<filename>.h.
5704 (cp/decl2.o): Add dependency on gt-<filename>.h.
5705 (cp/call.o): Add dependency on gt-<filename>.h.
5706 (cp/pt.o): Add dependency on gt-<filename>.h.
5707 (cp/repo.o): Add dependency on gt-<filename>.h.
5708 (cp/parse.o): Add dependency on gt-<filename>.h.
5709 * call.c: Use gengtype for roots.
5710 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5711 decl2.c parse.y pt.c repo.c spew.c.
5712 * cp-tree.h: Use gengtype for roots.
5713 (struct saved_scope): Use GGC, gengtype.
5714 (cp_parse_init): Delete prototype.
5715 (init_pt): Delete prototype.
5716 * decl.c: Use gengtype for roots.
5717 (mark_saved_scope): Delete.
5718 (cxx_init_decl_processing): Don't call deleted initilisation
5719 routines.
5720 (signed_size_zero_node): Delete, unused.
5721 * decl.h: Use gengtype for roots.
5722 * decl2.c: Use gengtype for roots.
5723 * lex.h: Use gengtype for roots.
5724 * parse.y: Use gengtype for roots.
5725 (cp_parse_init): Delete.
5726 * pt.c: Use gengtype for roots.
5727 (init_pt): Delete.
5728 * repo.c: Use gengtype for roots.
5729 * spew.c: Use gengtype for roots.
5730
5731 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
5732 (cp/decl.o): Add dependency on gtype-cp.h.
5733 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5734 Include gtype-cp.h. Allow for filename changes.
5735
5736 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5737 (cp/decl.o): Add cp/gt-decl.h dependency.
5738 * config-lang.in (gtfiles): New.
5739 * tree.h: Rename struct binding_level to struct cp_binding_level.
5740 * decl.c: Rename struct binding_level to struct cp_binding_level.
5741 Include cp/gt-decl.h.
5742 (struct cp_binding_level): Use gengtype.
5743 (make_binding_level): Use GGC on struct cp_binding_level.
5744 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5745 (cxx_init_decl_processing): Mark free_binding_level as
5746 deletable.
5747
5748 * decl.c (mark_cp_function_context): Update calling sequence.
5749
5750 * decl.c (start_function): Don't free 'struct
5751 cp_language_function'.
5752 (pop_cp_function_context): Likewise.
5753 (save_function_data): Allocate it using GC.
5754 * semantics.c (genrtl_start_function): Don't free 'struct
5755 cp_language_function'.
5756
8b968bd1
MW
57572002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
5758
5759 * lang-specs.h: Use cpp_debug_options.
5760
11ad4784
ZW
57612002-05-28 Zack Weinberg <zack@codesourcery.com>
5762
5763 * mangle.c, tree.c: Include real.h.
5764 * Make-lang.in: Update dependency lists.
5765
81a75f0f
NB
57662002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
5767
5768 * lex.c: Don't include c-lex.h.
5769 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5770
a97d1398
NB
57712002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
5772
5773 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5774
6f001fdf
RH
57752002-05-22 Richard Henderson <rth@redhat.com>
5776
5777 * decl.c (obscure_complex_init): Check for VAR_DECL
5778 before using DECL_THREAD_LOCAL.
5779
7a1f3f5f
RH
57802002-05-22 Richard Henderson <rth@redhat.com>
5781
5782 * decl.c (check_tag_decl): Handle RID_THREAD.
5783 (obscure_complex_init): Reject run-time init of tls.
5784 (grokvardecl, grokdeclarator): Handle RID_THREAD.
5785 * lex.c (reswords): Add __thread.
5786 (rid_to_yy): Map RID_THREAD to SCSPEC.
5787
e5f3b786
NB
57882002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
5789
5790 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5791 * cp-tree.h (cxx_post_options): Kill.
5792 * cp-lex.c (cxx_post_options): Kill.
5793
3d78f2e9
RH
57942002-05-21 Richard Henderson <rth@redhat.com>
5795
5796 * lex.c (rid_to_yy): Add RID_THREAD.
5797
c8a3d889
AO
57982002-05-21 Alexandre Oliva <aoliva@redhat.com>
5799
5800 * init.c (build_vec_init): Test for trivial copy-assignment when
5801 copy-assigning arrays.
5802
500abaa8
AJ
58032002-05-20 Andreas Jaeger <aj@suse.de>
5804
5805 * init.c (build_default_init): Remove unused variable.
5806
ecc42c14
AO
58072002-05-20 Alexandre Oliva <aoliva@redhat.com>
5808
5809 * call.c (any_strictly_viable): New.
5810 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5811
4e664ef1
KL
58122002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5813
5814 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5815
07782718
KL
58162002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5817
5818 PR c++/186, DR 259
5819 * pt.c (do_decl_instantiation): Don't complain explicit
5820 instantiation after explicit specialization.
5821 (do_type_instantiation): Likewise.
5822
23b4deba
AO
58232002-05-19 Alexandre Oliva <aoliva@redhat.com>
5824
5825 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5826 renamed from...
5827 (complete_type_or_else): ... this. Redefined as macro.
5828 (cxx_incomplete_type_diagnostic): Declare.
5829 (cxx_incomplete_type_error): Define as macro.
5830 * init.c (build_delete): Warn about incomplete types other than
5831 void, and use the built-in operator delete for them.
5832 * typeck.c (complete_type_or_diagnostic): Renamed from
5833 complete_type_or_else. Added warn_only argument, passed to...
5834 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
5835 warnings or errors depending on new warn_only argument. Renamed
5836 from...
5837 (cxx_incomplete_type_error): ... this. New implementation in
5838 terms of cxx_incomplete_type_diagnostic.
5839
b41d214e
JM
58402002-05-18 Jason Merrill <jason@redhat.com>
5841
98c07d7b 5842 PR c++/6611
b41d214e
JM
5843 * decl2.c (import_export_decl): If we clear
5844 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5845
e2005c8d
KL
58462002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5847
5848 PR c++/6620
5849 * pt.c (verify_class_unification): Don't check if PARM is template
5850 parameter dependent. Simplify.
5851 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5852 parameter dependent expression.
5853
ff48be5c
JM
58542002-05-14 Jason Merrill <jason@redhat.com>
5855
5856 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5857 Do set DECL_COMDAT.
5858 (synthesize_tinfo_var): Take the public decl.
5859 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
5860 (emit_tinfo_decl): Adjust. Call import_export_decl.
5861 * decl2.c (import_export_decl): Simplify tinfo decl handling.
5862
94e6e4c4
AO
58632002-05-14 Alexandre Oliva <aoliva@redhat.com>
5864
5865 * cp-tree.h (struct lang_type): Added non_zero_init.
0fe1cd70 5866 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
94e6e4c4
AO
5867 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5868 * class.c (check_field_decls): Test non_zero_init.
5869 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5870 zero-to-NULL conversions.
5871 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5872 type that needs zero-initialization without zeros.
5873 (check_initializer_decl): Compute zero-initializer for types
5874 that require a non-trivial one.
5875 * init.c (build_forced_zero_init): New function.
5876 (build_default_init): Use it.
5877 * tree.c (zero_init_p): New function.
5878 * typeck2.c (force_store_init_value): New function.
5879 (process_init_constructor): Create non-trivial zero-initializers
5880 for array members and class fields.
5881
e5f5feea
NB
58822002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
5883
5884 * lang-specs.h: Remove redundant -lang-c++.
5885
f63ab951
JM
58862002-05-13 Jason Merrill <jason@redhat.com>
5887
5888 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5889 (fixed_type_or_null): See through reference vars.
5890 (build_base_path): Vtable contents are constant.
5891 * typeck.c (get_member_function_from_ptrfunc): Likewise.
5892
0d08ea48
JM
58932002-05-12 Jason Merrill <jason@redhat.com>
5894
5895 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5896 structs are safe.
5897
3df89291
NB
58982002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
5899
5900 * cp-tree.h (flag_ansi): Remove.
5901 * decl2.c (flag_ansi): Remove.
5902 (cxx_decode_option): Set flag_iso and flag_undef.
5903
c87978aa
JM
59042002-05-09 Jason Merrill <jason@redhat.com>
5905
5906 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5907 Use subtraction rather than a bitmask to get the index.
5908 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5909
5910 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5911
a5a49440
NB
59122002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
5913
5914 * Make-lang.in (decl2.o): Update.
5915 * cp-tree.h (warn_multichar): Remove.
5916 * decl2.c: Include c-common.h.
5917 (warn_multichar): Remove.
5918
609688f3
JM
59192002-05-03 Jason Merrill <jason@redhat.com>
5920
0abc082a
JM
5921 * tree.c (build_cplus_array_type): Only const and volatile get
5922 special handling.
5923
609688f3
JM
5924 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5925
8b16faa2
MM
59262002-04-30 Mark Mitchell <mark@codesourcery.com>
5927
394ab947 5928 ABI change, returning simple classes from functions.
8b16faa2
MM
5929 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5930 TYPE_HAS_TRIVIAL_INIT_REF is false or
5931 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5932
ac905924
JM
59332002-04-30 Jason Merrill <jason@redhat.com>
5934
2cb008af 5935 PR debug/6436
ac905924
JM
5936 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5937 anonymous class with a typedef if there are attributes.
5938
e6e81f1c 59392002-04-29 Paul Eggert <eggert@twinsun.com>
b819d9e0 5940
e6e81f1c 5941 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
b819d9e0 5942
3a73bffb
JJ
59432002-04-29 Jakub Jelinek <jakub@redhat.com>
5944
5945 PR c++/6477
5946 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5947 non-NULL first.
5948
33dd07ee
MM
59492002-04-29 Mark Mitchell <mark@codesourcery.com>
5950
5951 PR c++/6492
5952 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5953 enter that scope before name lookup.
5954
5955 PR c++/6486
5956 * method.c (do_build_copy_constructor): Avoid building
5957 cv-qualified reference types.
500abaa8 5958
4bd7c270
NS
59592002-04-29 Nathan Sidwell <nathan@codesourcery.com>
5960
5961 PR c++/5719
500abaa8 5962 * decl.c (grok_op_properties): Assignment ops don't have to return
4bd7c270
NS
5963 by value. operator% should.
5964
45806a3f
FS
59652002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5966
5967 PR c/6343
5968 * decl.c (duplicate_decls): Call merge_weak.
5969
94a50397
RH
59702002-04-26 Richard Henderson <rth@redhat.com>
5971
5972 * parse.y (malloced_yyss, malloced_yyvs): New.
5973 (yyoverflow): Re-add. Set them.
5974 (free_parser_stacks): New.
5975
7d793e9b
MM
59762002-04-26 Mark Mitchell <mark@codesourcery.com>
5977
5978 PR c++/6497
5979 * method.c (do_build_assign_ref): Pass a derivation to
5980 build_method_call when calling base class assignment operators.
5981
bde3c0c0
RH
59822002-04-26 Richard Henderson <rth@redhat.com>
5983
5984 * parse.y (yyoverflow): Revert.
5985
b84a3874
RH
59862002-04-26 Richard Henderson <rth@redhat.com>
5987
5988 PR c/3581
5989 * parse.y (string): Remove. Update all uses to use STRING
5990 instead, and not call combine_strings.
5991 * rtti.c (tinfo_name): Use fix_string_type.
5992 * semantics.c (finish_asm_stmt): Don't call combine_strings.
5993 * spew.c (yylexstring): New.
5994 (read_token): Use it.
5995
6052bef0
RH
59962002-04-25 Richard Henderson <rth@redhat.com>
5997
5998 PR c/2161
5999 * parse.y (yyoverflow): New.
6000
8d1f0f67
JM
60012002-04-25 Jason Merrill <jason@redhat.com>
6002
6003 PR c++/5607
6004 * search.c (check_final_overrider): No longer static.
6005 * class.c (update_vtable_entry_for_fn): Call it.
6006 * cp-tree.h: Adjust.
6007
ff45c01e
NB
60082002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
6009
6010 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
6011 * cp-tree.h (cxx_set_yydebug): Die.
6012 * lex.c (YYDEBUG): Get from c-lex.h.
6013 (cxx_set_yydebug): Remove.
6014 * parse.y: Include c-lex.h.
6015 (YYDEBUG): Get from c-lex.h.
6016
a62d375f
MM
60172002-04-24 Mark Mitchell <mark@codesourcery.com>
6018
6019 PR c++/6438.
6020 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
6021 void.
6022
349ae713
NB
60232002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
6024
6025 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
6026 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
6027 Redefine.
6028 * cp-tree.h (cp_attribute_table): Rename.
6029 * decl.c (lang_attribute_table): Remove declaration.
6030 (cxx_init_decl_processing): Don't set it.
6031 * tree.c (cp_attribute_table): Rename.
6032
b602511f
JM
60332002-04-24 Jason Merrill <jason@redhat.com>
6034
985723ce
JM
6035 PR c++/6331
6036 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
6037 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
a49cfba8
JM
6038 The pedwarn for array assignment is now unconditional.
6039 * tree.c (build_cplus_array_type_1): Still process simple array types
6040 normally in templates.
985723ce 6041
b602511f
JM
6042 PR c++/6395
6043 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
6044 stuff for comdats.
6045
29cece2e
JJ
60462002-04-23 Jakub Jelinek <jakub@redhat.com>
6047
6048 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
6049 node with attributes.
6050
515387dc
DB
60512002-2-23 David O'Brien <obrien@FreeBSD.org>
6052
6053 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
6054 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
6055
77adef84
MM
60562002-04-23 Mark Mitchell <mark@codesourcery.com>
6057
6058 PR c++/6256:
6059 * pt.c (tsubst_friend_class): Handle templates with explicit
6060 nested names.
6061
6062 PR c++/6331:
6063 * typeck.c (merge_types): Remember the cv-qualification of pointer
6064 types when merging them.
6065
b03e38e1
NB
60662002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
6067
6068 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
6069 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
6070 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
6071 cxx_mark_function_context): New.
6072 * decl.c (push_cp_function_context, pop_cp_function_context,
6073 mark_cp_function_context): Rename for consistency.
6074 (cxx_init_decl_processing): Don't set old hooks.
6075
ab393bf1
NB
60762002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
6077
6078 * call.c (convert_type_from_ellipsis): Rename, update.
6079 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
6080 * cp-tree.h (convert_type_from_ellipsis): Rename.
6081 * decl.c (cxx_init_decl_processing): Don't set hook.
6082
7a228918
NB
60832002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
6084
6085 * call.c (build_new_method_call): Update.
6086 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
6087 * cp-tree.h (cxx_incomplete_type_error): New.
6088 * decl.c (grokdeclarator, grokparms): Update.
6089 * decl2.c (check_classfn): Update.
6090 * pt.c (tsubst): Update.
6091 * typeck.c (complete_type_or_else, expr_sizeof,
6092 decay_conversion): Update.
6093 * typeck2.c (incomplete_type_error): Rename.
6094 (add_exception_specifier): Update.
6095
8152c320
JM
60962002-04-18 Jason Merrill <jason@redhat.com>
6097
6098 PR c++/5658
6099 * search.c (setup_class_bindings): A class template qualifies as a
6100 type binding.
6101
32121b96
JJ
61022002-04-17 Jakub Jelinek <jakub@redhat.com>
6103
6104 PR c++/6316
6105 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
6106 before expanding.
6107
b2123dc0
MM
61082002-04-16 Mark Mitchell <mark@codesourcery.com>
6109
6110 * init.c (begin_init_stmts): Remove commented out code.
6111 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
6112 * semantics.c (begin_gobal_stmt_expr): Adjust call to
6113 expand_start_stmt_expr.
500abaa8 6114
0f268005
MM
61152002-04-15 Mark Mitchell <mark@codesourcery.com>
6116
6117 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
6118 dso_handle itself, to __cxa_atexit.
6119
bd6bec6b
GDR
61202002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6121
6122 * error.c (cxx_print_error_function): Adjust call to macros.
6123
0f490a2b
JJ
61242002-04-14 Jakub Jelinek <jakub@redhat.com>
6125
6126 * class.c (layout_virtual_bases): Do all dsize computation on trees.
6127
85b7def6
JM
61282002-04-14 Jason Merrill <jason@redhat.com>
6129
6130 * typeck.c (get_member_function_from_ptrfunc): Don't do
6131 gratuitious division and multiplication on
6132 ptrmemfunc_vbit_in_delta targets.
6133
0481bc21
MM
61342002-04-12 Mark Mitchell <mark@codesourcery.com>
6135
6136 PR c++/5373.
6137 * semantics.c (finish_expr_stmt): Remember the type of the
6138 expression before any conversions are performed.
6139
9928a3d5
MM
61402002-04-12 Mark Mitchell <mark@codesourcery.com>
6141
6142 PR c++/5189.
6143 * call.c (add_template_candidate_real): Do not treat member
6144 templates as copy constructors.
6145
c740732f
MM
61462002-04-12 Mark Mitchell <mark@codesourcery.com>
6147
6148 * decl.c (duplicate_decls): Do not copy the RTL for a variable
6149 declaration if the old variable had an incomplete type and the new
6150 variable does not.
6151 (complete_vars): Do not call layout_decl for completed variables.
6152
4782bd5b
RS
61532002-04-12 Richard Sandiford <rsandifo@redhat.com>
6154
6155 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
6156 with an explicit one.
6157 (follow_tag_typedef): New.
6158 (lookup_tag): Use it to extract the tag of an explicit typedef.
6159 (xref_tag): Likewise.
6160
2f4d058f
AH
61612002-04-11 Andrew Haley <aph@redhat.com>
6162
6163 * typeck.c (type_after_usual_arithmetic_conversions):
6164 If two types have the same variant, return immediately.
500abaa8 6165 When two floating-point operands are the same precision:
2f4d058f
AH
6166 convert to float if one of the operands is float;
6167 if neither operand is one of the standard types, return the type
6168 of the first operand.
500abaa8 6169
ba3307c0
NS
61702002-04-10 Nathan Sidwell <nathan@codesourcery.com>
6171
6172 PR c++/5507
6173 * decl.c (make_typename_type): Remove implicit typenameness.
6174
cd6af0c1
JM
61752002-04-09 Jason Merrill <jason@redhat.com>
6176
edf5cd1d
JM
6177 PR optimization/6189
6178 * semantics.c (genrtl_start_function): Don't free
6179 DECL_SAVED_FUNCTION_DATA for inline functions.
6180
cd6af0c1
JM
6181 * init.c (build_member_call): For now, don't convert to
6182 intermediate base if it would cause an error.
6183
224e6091
PC
61842002-04-08 Paolo Carlini <pcarlini@unitus.it>
6185
6186 * parse.y (namespace_qualifier, maybe_identifier,
6187 begin_explicit_instantiation, end_explicit_instantiation,
6188 apparent_template_type, .finish_template_type,
6189 do_id, maybe_init, defarg_again, component_decl_1):
6190 Add ending ';', in accordance with POSIX.
6191
0154eaa8
MM
61922002-04-06 Mark Mitchell <mark@codesourcery.com>
6193
6194 PR c++/5571
6195 * class.c (layout_class_type): Remember incomplete static
6196 variables.
6197 (finish_struct_1): Call complete_vars, not
6198 hack_incomplete_structures.
6199 * cp-tree.h (hack_incomplete_structures): Rename to ...
6200 (complete_vars): ... this.
6201 (struct saved_scope): Remove incomplete.
6202 (namespace_scope_incomplete): Remove.
6203 * decl.c (struct binding_level): Remove incomplete.
6204 (incomplete_vars): New variable.
6205 (mark_binding_level): Don't mark incomplete.
6206 (print_binding_level): Don't print it.
6207 (mark_saved_scope): Don't mark incomplete.
6208 (pushdecl): Use maybe_register_incopmlete_var.
6209 (cxx_init_decl_processing): Register incomplete_vars for GC.
6210 (start_decl_1): Clarify error message.
6211 (hack_incomplete_vars): Remove.
6212 (maybe_register_incomplete_var): New function.
6213 (complete_vars): Likewise.
6214
f62ea157
JM
62152002-04-06 Jason Merrill <jason@redhat.com>
6216
03da5286
JM
6217 PR c++/4934
6218 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
6219 set before checking it.
6220
a29e1034
JM
6221 PR c++/525
6222 * init.c (build_member_call): Use build_scoped_ref.
6223 (resolve_offset_ref): Likewise.
6224 * call.c (build_scoped_method_call): Likewise.
500abaa8 6225 * tree.c (maybe_dummy_object): Kludge around current_class_type being
a29e1034
JM
6226 wrong.
6227 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
6228 * cp-tree.h: Adjust.
500abaa8 6229
a29e1034
JM
6230 * init.c (push_base_cleanups): Just use build_scoped_method_call.
6231
f62ea157 6232 PR c++/6179
500abaa8 6233 * method.c (implicitly_declare_fn): Pass unqualified type to
f62ea157
JM
6234 synthesize_exception_spec.
6235
78ef5b89
NB
62362002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
6237
6238 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6239 * cvt.c: Update comment.
6240 * init.c (expand_cleanup_for_base): Update.
6241 * semantics.c (finish_parenthesized_expr): Update.
6242 * typeck.c (cp_truthvalue_conversion): Update.
6243
dffa4176
JM
62442002-04-04 Jason Merrill <jason@redhat.com>
6245
659e5a7a
JM
6246 * semantics.c (finish_eh_cleanup): New fn.
6247 * cp-tree.h: Add prototype.
500abaa8 6248 * init.c (perform_member_init, expand_cleanup_for_base): Use
659e5a7a
JM
6249 finish_eh_cleanup.
6250 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
6251 * cp-tree.h: Remove references.
6252 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
6253 * dump.c (cp_dump_tree): Likewise.
6254 * pt.c (tsubst_expr): Likewise.
6255 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
6256 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
6257 * tree.c (cp_statement_code_p): Likewise.
6258
6259 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
6260
6261 PR c++/5636
6262 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
6263 cleanup for nrv.
6264
dffa4176
JM
6265 PR c++/5104
6266 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
6267 specifiers.
6268 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
6269
ef4f94ac
RH
62702002-04-03 Richard Henderson <rth@redhat.com>
6271
6272 * cp-lang.c (cxx_warn_unused_global_decl): New.
6273 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
6274
599bba86
NB
62752002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
6276
6277 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
6278 * tree.c (init_tree): Don't set hook.
6279
cba2004a
RS
62802002-04-03 Roger Sayle <roger@eyesopen.com>
6281
6282 PR c++/5998:
6283 * decl.c (duplicate_decls): Don't mess with assembler names when
6284 redeclaring builtin functions as static.
6285
dffd7eb6
NB
62862002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
6287
6288 * call.c (build_addr_func): Update.
6289 * class.c (resolve_address_of_overloaded_function): Update.
6290 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
6291 * cp-tree.h (cxx_mark_addressable): New.
6292 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
6293 * decl2.c (build_cleanup): Update.
6294 * except.c (build_throw): Update.
6295 * init.c (resolve_offset_ref): Update.
6296 * pt.c (convert_nontype_argument): Update.
6297 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
6298 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
6299 unary_complex_lvalue): Update.
6300 (mark_addressable): Rename.
6301
04a9d080
RS
63022002-04-01 Roger Sayle <roger@eyesopen.com>
6303
6304 PR c++/5998:
6305 * decl.c (duplicate_decls): Overwrite the RTL when (and only
6306 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
6307 but follow the SET_DECL_RTL idiom used elsewhere in the function.
6308
ceef8ce4
NB
63092002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
6310
6311 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6312 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6313 * decl.c (grokdeclarator): Update.
6314 * mangle.c (write_integer_cst): Update.
6315 * typeck.c (build_binary_op): Update.
6316
48a7a235
NB
63172002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
6318
6319 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
6320 * lex.c (cxx_init): Don't set hook.
6321
7cb32822
NB
63222002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
6323
6324 * Make-lang.in (error.o): Update.
6325 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6326 * cp-tree.h (struct diagnostic_context): Predeclare.
6327 (cxx_print_error_function): New.
6328 * error.c: Include langhooks-def.h.
6329 (lang_print_error_function): Rename. Update.
6330 (init_error): Don't set hook.
6331
b0c48229
NB
63322002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
6333
6334 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
6335 Redefine.
6336 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
6337 * decl.c (finish_enum): Similarly.
6338 * error.c (dump_type): Similarly.
6339 * lex.c (cxx_init): Similarly.
6340 * mangle.c (write_builtin_type): Similarly.
6341 * typeck.c (comptypes): Similarly.
6342
d52e4867
RS
63432002-03-28 Roger Sayle <roger@eyesopen.com>
6344
6345 PR c++/5998:
6346 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
6347 in the g++ front-end.
6348 (duplicate_decl): Allow redefinition of anticipated built-ins.
6349 Fix inlining problem by over-writing the old DECL_RTL.
6350 (lookup_namespace_name): Fail to find an identifier in the
6351 specified namespace if its still anticipated.
6352 (builtin_function_1): New function split out from builtin_function
6353 to create a builtin in the current namespace with given context.
6354 (builtin_function): Call builtin_function_1 to define the
6355 appropriate builtins in both the std and global namespaces.
6356 (select_decl): Don't test for anticipated decls here.
6357 (unqualified_namespace_lookup): Instead ignore them whilst
6358 searching through scopes and namespaces.
6359 * decl2.c (do_nonmember_using_decl): If a using declaration
6360 specifies an anticipated built-in function, mark it as no longer
6361 anticipated in that scope.
6362 (ambiguous_decl): Avoid resolving to an anticipated decl.
6363 * lex.c (do_scoped_id): Fail to find an identifier in the global
6364 namespace if its still anticipated.
6365
f1e639b1
NB
63662002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
6367
6368 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
6369 * cp-tree.h (cp_make_lang_type): Rename.
6370 * lex.c (cp_make_lang_type): Rename.
6371 (make_aggr_type): Update.
6372 * tree.c (init_tree): Don't set make_lang_type_fn.
6373
c7f4981a
JJ
63742002-03-29 Jakub Jelinek <jakub@redhat.com>
6375
6376 PR c++/6073
6377 * class.c (finish_struct_1): Update static field's DECL_MODE even
6378 if its type is a variant of t.
6379
7ffb4fd2
NB
63802002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
6381
6382 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
6383 * cp-tree.h (cxx_insert_default_attributes): New.
6384 * decl.c (insert_default_attributes): Rename.
6385
cd4e8331
MM
63862002-03-27 Mark Mitchell <mark@codesourcery.com>
6387
6388 PR c++/4884
6389 * call.c (build_op_delete_call): Allow for the fact the placement
6390 may be a COMPOUND_EXPR.
500abaa8 6391
c9d892a8
NB
63922002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
6393
6394 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6395 * cp-tree.h (init_cplus_expand): Remove.
6396 (cxx_expand_expr): New.
6397 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
6398 fix prototype.
6399 (init_cplus_expand): Remove.
6400 * lex.c (cxx_init): Don't call init_cplus_expand.
6401
46ff5047
MM
64022002-03-26 Mark Mitchell <mark@codesourcery.com>
6403
6404 PR c++/4884.
6405 * init.c (build_new_1): Allow for the fact the result of
6406 build_function_call may be a COMPOUND_EXPR.
6407
6d4c57a0
NS
64082002-03-26 Nathan Sidwell <nathan@codesourcery.com>
6409
6410 PR c++/5682
6411 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
6412 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6413 (dfs_skip_nonprimary_vbases_markedp): Remove.
6414 * search.c (get_shared_vbase_if_not_primary): Remove.
6415 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
6416 (dfs_skip_nonprimary_vbases_markedp): Remove.
6417 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
6418 (dfs_marked_real_bases_queue_p): Likewise.
6419
4f0ade92
NB
64202002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
6421
6422 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6423 * cp-tree.h (cxx_mark_tree): New.
6424 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
6425
c88770e9
NB
64262002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
6427
6428 * cp-tree.h (cxx_maybe_build_cleanup): New.
6429 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
6430 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
6431 * tree.c (build_target_expr): Update.
7b3e5198 6432 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
c88770e9 6433
aaf93206
NB
64342002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
6435
6436 * decl2.c (cxx_decode_option): Handle -E.
6437 * lang-specs.h (default_compilers): Preprocess with cc1plus.
6438 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
6439
e756a7da
JJ
64402002-03-23 Jakub Jelinek <jakub@redhat.com>
6441
6442 PR c++/6037
6443 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
6444
ea9264e9
GDR
64452002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6446
6447 * error.c (dump_type): Be careful about implicit typenames.
6448
acb044ee
GDR
64492002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
6450
6451 PR C++/3656
6452 * semantics.c (finish_base_specifier): Handle erronous base
500abaa8 6453 classes.
acb044ee 6454
b216cd4a
ZW
64552002-03-22 Zack Weinberg <zack@codesourcery.com>
6456
6457 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
6458 REAL_IS_NOT_DOUBLE.
6459
9181f8db
JK
64602002-03-22 Jeff Knaggs <jknaggs@redhat.com>
6461
cd6af0c1
JM
6462 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
6463 an index into the vtable_entry array regardless of
9181f8db
JK
6464 TARGET_PTRMEMFUNC_VBIT_LOCATION.
6465
e019cf95
AH
64662002-03-21 Aldy Hernandez <aldyh@redhat.com>
6467
84d901be 6468 * tree.c (cp_cannot_inline_tree_fn): Same.
e019cf95 6469
43577e6b
NB
64702002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
6471
6472 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6473 insert_block, getdecls, global_bindings_p): New.
6474
8c152bad
NS
64752002-03-20 Nathan Sidwell <nathan@codesourcery.com>
6476
6477 PR c++/4361
6478 * mangle.c (struct globals) Add internal_mangling_p member.
6479 (write_template_param): Do internal mangling, if needed.
6480 (mangle_conv_op_name_for_type): Request internal mangling.
6481
e3fe84e5
JM
64822002-03-20 Jason Merrill <jason@redhat.com>
6483
6484 PR c++/2136
6485 * init.c (build_delete): Check access for a member op delete here.
6486 * decl2.c (delete_sanity): Not here.
6487
ea122333
JM
64882002-03-19 Jason Merrill <jason@redhat.com>
6489
6490 PR c++/5118
6491 * class.c (get_vfield_name): Use the constructor_name.
6492
7afff7cf
NB
64932002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
6494
6495 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6496 * cp-tree.h (lang_printable_name): Rename.
6497 * error.c (lang_decl_name): Use new hook.
6498 * lex.c (cxx_init): Remove old hook.
6499 * pt.c (tsubst_decl): Use new hook.
6500 * tree.c (lang_printable_name): Rename.
6501
ff77ac85
EB
65022002-03-18 Eric Botcazou <ebotcazou@multimania.com>
6503
6504 PR c++/3882
6505 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
6506 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
6507 only after recording the declaration.
6508
ffd696af
JM
65092002-03-18 Jason Merrill <jason@redhat.com>
6510
097955f2
JM
6511 PR c++/2039
6512 * init.c (resolve_offset_ref): Hand off to build_component_ref.
6513
b663bcf3
JM
6514 PR c++/4222, c++/5995
6515 * call.c (build_over_call): Fix empty class logic.
6516
0f4237c2
JM
6517 PR c++/3870
6518 * cp-tree.h (struct saved_scope): Add last_parms field.
6519 * decl.c (maybe_push_to_top_level): Save last_function_parms.
6520 (pop_from_top_level): Restore it.
6521
001ad76c
JM
6522 PR c++/4377
6523 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
6524 NON_LVALUE_EXPRs.
6525
6526 PR c++/4003
ed2fa432
JM
6527 * pt.c (tsubst_friend_function): Use decl_namespace_context.
6528
ffd696af
JM
6529 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
6530 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
6531 type with a nontrivial destructor.
6532
f2606a97
JM
65332002-03-17 Jason Merrill <jason@redhat.com>
6534
6535 PR c++/4460
6536 * class.c (build_base_path): Virtual base layout is fixed in
6537 in-charge [cd]tors.
6538
52dabb6c
NB
65392002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
6540
6541 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6542 * parse.y (yyparse): Remove macro.
6543
beb9c8a2
JM
65442002-03-17 Jason Merrill <jason@redhat.com>
6545
6546 PR c++/5757
6547 * init.c (build_new_1): Pass the right pointer to op delete.
6548
5dd236e2
NS
65492002-03-16 Nathan Sidwell <nathan@codesourcery.com>
6550
6551 PR c++/4361
6552 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
6553 conversion operators go.
6554 (struct lang_decl_flags): Add template_conv_p and unused
6555 bitfields.
6556 (DECL_TEMPLATE_CONV_FN_P): New macro.
6557 * call.c (build_user_type_conversion_1): Don't check second type
6558 conversion of overload set first.
6559 * class.c (add_method): Make sure templated conversion operators
6560 all end up on slot 2.
6561 * lex.c (do_identifier): A conversion operator token might be
6562 satisfied by a templated conversion operator.
5dd236e2
NS
6563 * pt.c (check_explicit_specialization): Use
6564 CLASSTYPE_FIRST_CONVERSION_SLOT.
6565 (template_parm_this_level_p): New function.
6566 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8c152bad 6567 * search.c (lookup_fnfields_1): Template conversions will be on
5dd236e2
NS
6568 the first slot.
6569 * typeck.c (build_component_ref): Preserve the type of an
6570 conversion operator name on the overload type.
6571 (build_x_function_call): Retrieve the conversion operator name.
6572
0ba20759
RH
65732002-03-15 Richard Henderson <rth@redhat.com>
6574
6575 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
6576
6e4ae815
MM
65772002-03-15 Mark Mitchell <mark@codesourcery.com>
6578
6579 * cp-tree.h (CLEANUP_DECL): Remove.
6580 (CLEANUP_EXPR): Likewise.
6581 * decl.c (destroy_local_var): Simplify.
6582 (maybe_build_cleanup): Tidy.
6583 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
6584 * semantics.c (cp_expand_stmt): Likewise.
6585 * cp/tree.c (cp_statement_code_p): Likewise.
6586
5cc90635
JM
65872002-03-15 Jason Merrill <jason@redhat.com>
6588
6da794e8
JM
6589 PR c++/5857
6590 * decl.c (duplicate_decls): Use merge_types instead of common_type.
6591 * typeck.c (common_type): Just hand off to
6592 type_after_usual_arithmetic_conversions and
6593 composite_pointer_type.
6594 (merge_types): New fn.
6595 (commonparms): Use it instead of common_type.
6596 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
6597 (composite_pointer_type): Also handle attributes.
6598 * cp-tree.h: Declare merge_types.
6599
5cc90635
JM
6600 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
6601 variables.
6602 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
6603
ecb0eece
RH
66042002-03-14 Richard Henderson <rth@redhat.com>
6605
6606 * decl.c: Include c-pragma.h.
6607 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
6608 * Make-lang.in: Update dependencies.
6609
d3f129b3
JJ
66102002-03-14 Jakub Jelinek <jakub@redhat.com>
6611
f6562b37 6612 PR c++/5908
d3f129b3
JJ
6613 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
6614 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
6615
049e6879
RS
66162002-03-12 Richard Sandiford <rsandifo@redhat.com>
6617
6618 * mangle.c (write_builtin_type): Handle 128-bit integers even if
6619 they are not a standard integer type.
6620
872c9284
RS
66212002-03-12 Richard Sandiford <rsandifo@redhat.com>
6622
6623 * cp-tree.h (init_init_processing): Remove declaration.
6624 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
6625 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
6626
2f9834e8
KG
66272002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6628
6629 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
6630 Define.
6631 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
6632 tree_code_length.
6633 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
6634 cplus_tree_code_name): Delete.
6635 (cxx_init): Don't call add_c_tree_codes, instead set
6636 lang_unsafe_for_reeval. Don't try to copy into the various
6637 tree_code arrays.
6638
df867456
NS
66392002-03-12 Nathan Sidwell <nathan@codesourcery.com>
6640
6641 PR c++/5659
6642 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
6643 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
6644 definitions.
6645
ab04e34b
NS
66462002-03-11 Nathan Sidwell <nathan@codesourcery.com>
6647
6648 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
6649 DR209 is now not a defect.
6650 * cp-tree.h (skip_type_access_control): Remove.
6651 * decl.c (grokdeclarator): Do type access control for friend
6652 declarations.
6653 * semantics.c (decl_type_access_control): Don't reset
6654 current_type_lookups.
6655 (save_type_access_control): Always save the lookups.
6656 (skip_type_access_control): Remove.
6657 (finish_class_definition): Don't change type_lookups.
6658
999cc24c
NS
66592002-03-11 Nathan Sidwell <nathan@codesourcery.com>
6660
6661 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
6662 It is incorrect.
6663 * typeck.c (build_static_cast): Compare non-qualified types
6664 with pointer to member conversions.
6665
61eece67
DN
66662002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
6667 Daniel Berlin <dan@dberlin.org>
6668
6669 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
6670 (cxx_get_alias_set): Use it.
6671
644d28d4
KG
66722002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6673
6674 * cp-tree.h (stabilize_expr): Prototype.
6675
7e326356
CR
66762002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
6677
6678 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6679 conditional return void.
6680
24965e7a
NB
66812002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
6682
6683 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6684 * cp-tree.h (cxx_unsave): New.
6685 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6686 (init_tree): Update.
6687
ca7558fc
KG
66882002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6689
6690 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6691 explicit sizeof/sizeof.
6692 * decl2.c (cxx_decode_option): Likewise.
6693 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6694
fd87b7a7
NS
66952002-03-02 Nathan Sidwell <nathan@codesourcery.com>
6696
6697 PR c++/775
6698 * decl.c (lookup_tag): Only reject enum/class mismatch, not
6699 class/union mismatch.
6700 * parse.y (check_class_key): New function.
6701 (structsp): Call it.
6702
bfba94bd
MM
67032002-03-01 Michael Matz <matz@suse.de>
6704
6705 * typeck.c (cp_pointer_int_sum): Complete inner type which is
6706 used later by size_in_bytes().
6707
fdc9bf29
PE
67082002-03-01 Phil Edwards <pme@gcc.gnu.org>
6709
6710 * cp-tree.h: Require __GNUC__ to be #defined.
6711 (build_init): Add missing prototype.
6712
6f30f1f1
JM
67132002-03-01 Jason Merrill <jason@redhat.com>
6714
6715 * except.c: Don't include decl.h or obstack.h. Do include
6716 tree-inline.h.
6717 (build_throw): Destroy temporaries from the thrown
500abaa8 6718 expression before calling __cxa_throw. Construct a thrown
6f30f1f1
JM
6719 temporary directly into the exception object.
6720 (stabilize_throw_expr): New function.
6721 (wrap_cleanups_r): New function.
6722 * tree.c (stabilize_expr): New function.
6723 * init.c (build_init): New function.
6724 * Make-lang.in (cp/except.o): Adjust .h deps.
6725
46cfb101
JM
67262002-02-28 Jason Merrill <jason@redhat.com>
6727
07f521fc
JM
6728 * search.c (lookup_base_r): Don't clear is_non_public just because
6729 we found a friendly scope.
6730
46cfb101
JM
6731 * decl.c (finish_function): Only warn about missing return
6732 statement with -Wreturn-type.
6733
63e1b1c4
NB
67342002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
6735
6736 * class.c (build_clone): Update.
6737 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6738 * cp-tree.h (cxx_dup_lang_specific_decl): New.
6739 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6740 (copy_decl): Update.
6741 * method.c (make_thunk): Update.
6742
f458d1d5
ZW
67432002-02-27 Zack Weinberg <zack@codesourcery.com>
6744
6745 * decl2.c: Delete traditional-mode-related code copied from
6746 the C front end but not used, or used only to permit the
6747 compiler to link.
6748
500abaa8 67492002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3387d36e
CR
6750
6751 PR c++/4093
6752 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6753 to void.
6754
25c8b645
JJ
67552002-02-22 Jakub Jelinek <jakub@redhat.com>
6756
6757 PR other/5746
6758 * semantics.c (finish_switch_cond): Don't call get_unwidened
6759 if error_mark_node.
6760
4f2b0fb2
NS
67612002-02-22 Nathan Sidwell <nathan@codesourcery.com>
6762
6763 PR c++/2645, DR 295
6764 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6765 tf_keep_type_decl.
6766 (make_typename_type): Use tsubst_flags_t.
6767 * decl.c (make_typename_type): Adjust. Return non-artificial
6768 TYPE_DECLs, if required.
6769 (grokdeclarator): Simplify CVR qualification handling. Allow bad
6770 qualifiers on typedef types.
6771 * decl2.c (handle_class_head): Adjust make_typename_type call.
6772 * parse.y (nested_name_specifier): Likewise.
6773 (typename_sub0): Likewise.
6774 (typename_sub1): Likewise.
6775 * pt.c (convert_template_argument): Adjust make_typename_type
6776 return value.
6777 (tsubst): Adjust cp_build_qualified_type_real calls.
1a55127d 6778 (check_cv_quals_for_unify): Cope with allowing bad qualifications
4f2b0fb2
NS
6779 on template type parms.
6780 (instantiate_decl): Recheck substitutions to give warnings on bad
6781 qualifications.
6782 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6783
8fc2ba41
AH
67842002-02-21 Aldy Hernandez <aldyh@redhat.com>
6785
84d901be 6786 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8fc2ba41 6787
84d901be
AD
6788 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6789 unless DECL_ALWAYS_INLINE.
8fc2ba41 6790
7552da58
JJ
67912002-02-20 Jakub Jelinek <jakub@redhat.com>
6792
6793 * typeck.c (cp_pointer_int_sum): Renamed from
6794 pointer_int_sum, call pointer_int_sum.
6795
00fae85d
JJ
67962002-02-20 Jakub Jelinek <jakub@redhat.com>
6797
6798 * decl.c (duplicate_decls): Return 0 if issued error about
6799 redeclaration.
6800
6ea868b7
JM
68012002-02-19 Jason Merrill <jason@redhat.com>
6802
500abaa8 6803 ABI change: Mangle `void (A::*)() const' as
6ea868b7
JM
6804 M1AKFvvE, not MK1AFvvE.
6805 * mangle.c (write_function_type): Write cv-quals for member
6806 function type here.
6807 (write_pointer_to_member_type): Not here.
6808
c02f5e29
JM
68092002-02-18 Jason Merrill <jason@redhat.com>
6810
6811 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6812 (do_decl_instantiation): Likewise.
6813
624a5800
CR
68142002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
6815
6816 PR c++/5685
6817 * decl.c (duplicate_decls): Make warning unconditional
6818 if duplicate default argument declarations are present.
6819
f6f8ada3
JJ
68202002-02-17 Jakub Jelinek <jakub@redhat.com>
6821
6822 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6823 shortening.
6824
8d6e459d
NS
68252002-02-15 Nathan Sidwell <nathan@codesourcery.com>
6826
6827 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6828 remove incorrect comment. Move #if 0'd code to common path. Use
6829 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6830
ca4feb54
JM
68312002-02-13 Jason Merrill <jason@redhat.com>
6832
57d5032b
JM
6833 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6834 (finish_function): Don't warn if current_function_returns_null.
6835
bb26522d
JM
6836 * typeck2.c (digest_init): Do handle values of vector type.
6837
ca4feb54
JM
6838 * typeck2.c (digest_init, process_init_constructor): Treat vectors
6839 like arrays.
6840
e6b9638b
JM
68412002-02-11 Jason Merrill <jason@redhat.com>
6842
6843 * parse.y (reserved_declspecs): Don't handle attributes.
6844 (reserved_typespecquals): Handle them here.
6845 * Make-lang.in (parse.c): Adjust expected conflicts.
6846
1cf537c5
JJ
68472002-02-08 Jakub Jelinek <jakub@redhat.com>
6848
6849 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6850 instead of compstmt.
6851 (compstmt_or_stmtexpr): Renamed from compstmt.
6852 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6853
c2ea3a40
NS
68542002-02-07 Nathan Sidwell <nathan@codesourcery.com>
6855
6856 Rename instantiate_type_flags to tsubst_flags_t & expand use.
6857 * cp-tree.h (instantiate_type_flags): Rename to ...
6858 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6859 add tf_warning flag.
6860 (instantiate_type): Adjust prototype.
6861 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6862 do_type_instantiation, cp_build_qualified_type_real): Likewise.
6863 cp_build_qualified_type: Adjust.
6864 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6865 tf_*.
6866 * call.c (standard_conversion): Rename itf_* to tf_*.
6867 (reference_binding): Likewise.
6868 (convert_like_real): Likewise.
6869 * cvt.c (cp_convert_to_pointer): Likewise.
6870 (convert_to_reference): Likewise.
6871 * decl.c (lookup_namespace_name): Use tf_* flags.
6872 (make_typename_type): Likewise.
6873 (grokdeclarator): Likewise.
6874 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6875 (coerce_template_template_parms, convert_template_argument,
6876 coerce_template_parms, maybe_get_template_decl_from_type_decl,
6877 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
500abaa8
AJ
6878 instantiate_class_template, tsubst_template_arg_vector,
6879 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
c2ea3a40 6880 tsubst_decl, tsubst_arg_types, tsubst_function_type,
500abaa8 6881 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
c2ea3a40 6882 instantiate_template, fn_type_unification,
500abaa8
AJ
6883 resolve_overloaded_unification, verify_class_unification,
6884 unify, get_bindings_real, do_type_instantiation,
6885 regenerate_decl_from_template, instantiate_decl,
c2ea3a40
NS
6886 tsubst_initializer_list, tsubst_enum,
6887 get_mostly_instantiated_function_type,
6888 invalid_nontype_parm_type_p): Likewise.
6889 * tree.c (cp_build_qualified_type_real): Likewise.
6890 * typeck.c (build_binary_op): Rename itf_* to tf_*.
6891 (build_ptrmemfunc): Likewise.
6892 (convert_for_assignment): Likewise.
6893
d5614afb
NS
68942002-02-07 Nathan Sidwell <nathan@codesourcery.com>
6895
6896 PR c++/109
6897 * decl.c (grokdeclarator): Allow friend declarations from
8d6e459d 6898 dependent types.
d5614afb
NS
6899 * decl2.c (handle_class_head): Don't push into template parm contexts.
6900 * pt.c (push_template_decl_real): Template parm contexts are never
6901 being defined.
6902
1af6141b
AO
69032002-02-05 Alexandre Oliva <aoliva@redhat.com>
6904
6905 * class.c: Include target.h.
6906 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6907 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6908 bit-field layout.
6909 * Make-lang.in: Adjust deps.
6910
d8a6f584
JM
69112002-02-05 Jason Merrill <jason@redhat.com>
6912
6913 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6914
6f9fdf4d
JJ
69152002-02-04 Jakub Jelinek <jakub@redhat.com>
6916
6917 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6918 (finish_switch_cond): Set SWITCH_TYPE.
6919
14691f8d
RH
69202002-02-04 Richard Henderson <rth@redhat.com>
6921
6922 * method.c (use_thunk): Always initialize the block tree. Reindent.
6923 * semantics.c (expand_body): Emit thunks after function, not before.
6924
e89a6075
JM
69252002-02-04 Jason Merrill <jason@redhat.com>
6926
6927 * decl.c (start_function): Call cplus_decl_attributes immediately
6928 after grokdeclarator.
6929
6930 * decl.c (start_function): Combine DECL_RESULT handling code.
6931
9780c24f
JM
69322002-02-03 Jason Merrill <jason@redhat.com>
6933
6934 * xref.c: Remove.
6935 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6936 (cp/xref.o): Remove dependencies.
6937 * class.c (finish_struct_1, check_methods): Don't call xref fns.
6938 (finish_struct_1): Likewise.
6939 * friend.c (make_friend_class): Likewise.
6940 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6941 * spew.c (read_process_identifier): Likewise.
6942
65f36ac8
JM
69432002-02-01 Jason Merrill <jason@redhat.com>
6944
efe49da0 6945 PR c++/4872
500abaa8 6946 * decl.c (finish_function): Warn about a non-void function with
efe49da0
JM
6947 no return statement and no abnormal exit.
6948 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6949 (current_function_returns_abnormally): New macro.
6950 * call.c (build_call): Set it.
6951
f2d9afec
JM
6952 * typeck.c (build_component_ref): Always complain about offsetof
6953 constructs on non-PODs. Only make it an error for members of
6954 virtual bases.
6955
65f36ac8
JM
6956 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6957 (dump_function_decl): Always dump parms.
6958
6959 * decl2.c (finish_static_data_member_decl): Complain about a local
6960 class with a static data member.
6961
6962 PR c++/4286
6963 * search.c (lookup_field_1): Don't xref a static data member
6964 just because we looked it up.
6965
98884b26
JM
69662002-01-31 Jason Merrill <jason@redhat.com>
6967
b88c0704
JM
6968 * Make-lang.in (parse.c): Handle .output file.
6969
a588fe25
JM
6970 PR c++/3395
6971 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6972 not TREE_TYPE.
6973 * semantics.c (finish_class_definition): Adjust.
6974
98884b26
JM
6975 Allow attributes in parms and casts.
6976 * parse.y (named_parm): Don't strip attrs.
6977 (declmods): Remove 'attributes' production.
6978 (nonempty_cv_qualifiers): Accept attributes.
6979 (ATTRIBUTE): Give precedence.
6980 * decl.c (groktypename): Handle attributes.
6981 (grokparms): Likewise.
6982
ffdeea47
JJ
69832002-01-29 Jakub Jelinek <jakub@redhat.com>
6984
6985 * decl2.c (cxx_decode_option): Pass 0 as last argument to
6986 cpp_handle_option.
6987 * lang-specs.h: Use cpp_unique_options instead of cpp_options
6988 when used together with cc1_options.
6989
b8b98c66
NS
69902002-01-29 Nathan Sidwell <nathan@codesourcery.com>
6991
6992 PR c++/5132
6993 * typeck2.c (digest_init): Make sure non-array core type is
6994 instantiated.
6995 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6996 constructor, rather than build a new one.
6997 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6998 PURPOSE of constructor elts.
6999
7437519c
ZW
70002002-01-23 Zack Weinberg <zack@codesourcery.com>
7001
7002 * Make-lang.in (parse.c): Adjust expected number of
7003 shift-reduce conflicts.
7004 (decl.o): Depend on diagnostic.h.
7005 * decl.c: Include diagnostic.h.
7006 (grokdeclarator): Check for null pointer.
7007 (finish_function): Don't abort when
7008 current_binding_level->parm_flag != 1, if errors have
7009 occurred; throw away the statement tree and extra binding
7010 levels, and continue.
7011 * lex.c (note_list_got_semicolon): Check for null pointer.
7012 * method.c (hack_identifier): Just return error_mark_node if
7013 value is error_mark_node.
7014 * parse.y (primary: TYPEID(type_id)): No need to use
7015 TYPE_MAIN_VARIANT here.
7016 (handler_seq): Accept an empty list of catch clauses and
7017 generate a fake handler block to avoid later crashes.
7018 (ansi_raise_identifier): Accept the error token too.
7019 * semantics.c (begin_class_definition,
7020 finish_class_definition): Check for error_mark_node.
7021
c588e52b
ZW
70222002-01-23 Zack Weinberg <zack@codesourcery.com>
7023
7024 * typeck2.c (friendly_abort): Delete definition.
7025 * cp-tree.h (friendly_abort): Don't prototype.
7026 (my_friendly_assert): Use fancy_abort.
7027
d55ecaa4
CR
70282002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
7029
7030 * cp-tree.h (my_friendly_abort): Remove.
7031
0a01c261
JJ
70322002-01-23 Jakub Jelinek <jakub@redhat.com>
7033
7034 * spew.c (pending_inlines, pending_inlines_tail,
7035 processing_these_inlines): Make static.
7036 (mark_pending_inlines): Remove static.
7037 (begin_parsing_inclass_inline): If in function, save pi
7038 for GC to cp_function_chain->unparsed_inlines instead.
7039 (process_next_inline): Likewise.
7040 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
7041 (mark_pending_inlines): Add prototype.
7042 * decl.c (spew_debug): Remove unused extern.
7043 (mark_lang_function): Call mark_pending_inlines.
7044
a98facb0
CR
70452002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
7046
c588e52b
ZW
7047 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
7048 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
7049 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
a98facb0
CR
7050 Change my_fancy_abort() to abort().
7051
f893c16e
JM
70522002-01-23 Jason Merrill <jason@redhat.com>
7053
608afcc5
JM
7054 PR c++/5453
7055 * class.c (fixed_type_or_null): Fix thinko.
7056
f893c16e
JM
7057 PR c++/3331
7058 * init.c (resolve_offset_ref): Use build_indirect_ref.
6bc34b14 7059
b2115575
JM
7060 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
7061
f893c16e
JM
70622002-01-22 Jason Merrill <jason@redhat.com>
7063
b5856475
JM
7064 * parse.y (function_body): Suppress the block for the outermost
7065 curly braces.
7066 * decl.c (pushdecl): Don't try to skip it.
7067 (begin_function_body): Keep the block we create, not the next one.
7068 * init.c (emit_base_init): Don't mess with keep_next_level.
7069
6bc34b14
JM
7070 * class.c (build_base_path): Tweak formatting.
7071
3807621a
NS
70722002-01-19 Nathan Sidwell <nathan@codesourcery.com>
7073
7074 Fix regression introduced with patch for c++/775
7075 * parse.y (class_head_defn): Check for template specializations
7076 with a different class-key.
7077
cdd2559c
JM
70782002-01-17 Jason Merrill <jason@redhat.com>
7079
7080 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
7081 (begin_function_body): Call them and keep_next_level.
7082 * init.c (emit_base_init): Call keep_next_level.
7083 * semantics.c (setup_vtbl_ptr): Lose.
7084 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
7085 (vtbls_set_up_p): Lose.
7086 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
7087 * method.c (do_build_copy_constructor): Likewise.
7088 (synthesize_method): Call finish_mem_initializers.
7089 * parse.y (nodecls): Likewise.
ad6b1795
JM
7090
7091 * error.c (dump_type_suffix): Print the exception specs before
7092 recursing.
7093 (dump_function_decl): Here, too.
7094
7095 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
7096
195a5def
IR
70972002-01-10 Ira Ruben <ira@apple.com>
7098
6bc34b14 7099 PR c++/907
195a5def
IR
7100 * decl.c (start_method): Handle attrlist.
7101
f21ee879
JJ
71022002-01-10 Jakub Jelinek <jakub@redhat.com>
7103
7104 * decl2.c (max_tinst_depth): Increase default limit to 500.
7105
71062002-01-10 Graham Stott <grahams@redhat.com>
8fabd4e2
GS
7107
7108 * spew.c (YYCHAR): Uppercase macro parameter and add
7109 parenthesis.
7110 (YYCODE): Likewise.
7111 (NAME): Uppercase macro parameter.
7112
c3af729a
GS
71132002-01-09 Graham Stott <grahams@redhat.com>
7114
6bc34b14 7115 * decl.h (grokdeclarator): Wrap long line.
5d8b4235 7116
c3af729a
GS
7117 * semantics.c (FINISH_COND): Uppercase macro paramaters and
7118 add parenthesis.
7119
91800747
GS
71202002-01-08 Graham Stott <grahams@redhat.com>
7121
7122 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
7123 (PALLOC): Uppercase macro parameter and whitespace.
7124 (SALLOC): Uppercase macro parameter.
7125 (SFREE): Uppercase macros parameter, add parenthese and
7126 whitespace.
7127 (STREQL): Uppercase macro parameter and whitespace.
7128 (STRNEQ): Likewise.
7129 (STRLSS): Likewise.
7130 (STRLEQ): Likewise.
7131 (STRGTR): Likewise.
7132 (STRGEQ): Likewise.
7133
7134 * call.c (convert_like): Add parenthesis and wrap.
7135 (convert_like_with_context): Likewise.
7136 (ICS_RANK): Whitespace.
7137 (NEED_TEMPORARY_P): Remove parenthesis.
7138
7139 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
7140 whitespace.
7141 (VTT_MARKED_BINFO_P): Likewise.
7142
7143 * decl.c (BINDING_LEVEL): Add parenthesis.
7144 (DEF_OPERATOR): Likewise.
7145
91800747
GS
7146 * mangle.c (MANGLE_TRACE): Add parenthesis.
7147 (MANGLE_TRACE_TREE): Likewise.
7148 (write_signed_number): Likewise.
7149 (write_unsigned_number): Likewise.
7150
7151 * pt.c (ccat): Uppercase macro parameter.
7152 (cat): Likewise
7153
7154 * search.c (SET_BINFO_ACCESS): Add parenthesis.
7155
15eb1e43
JM
71562002-01-07 Jason Merrill <jason@redhat.com>
7157
7158 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
7159 to pedwarn.
7160
6bc34b14 7161 PR c++/3536
15eb1e43
JM
7162 * method.c (make_thunk): If !flag_weak, give the thunk the
7163 function's linkage.
7164 (use_thunk): Here, too.
7165
b34c06e3
GS
71662002-01-07 Graham Stott <grahams@redhat.com>
7167
6bc34b14
JM
7168 * error.c: Update copyright date.
7169 (print_scope_operator): Add parenthesis.
7170 (print_left_paren): Likewise.
7171 (print_right_paren): Likewise.
7172 (print_left_bracket): Likewise.
7173 (print_right_bracket): Likewise.
7174 (print_template_argument_list_start): Likewise.
7175 (print_template_argument_list_end): Likewise.
7176 (print_non_consecutive_character): Likewise.
7177 (print_tree_identifier): Likewise.
7178 (print_identifier): Likewise.
7179 (NEXT_CODE): Uppercase macro parameter.
7180 (ident_fndecl): Delete unused.
7181 (GLOBAL_THING): Likewise.
b34c06e3 7182
98e40e83
GS
71832002-01-06 Graham Stott <grahams@redhat.com>
7184
7185 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
7186 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
7187 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
7188 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
7189 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
7190 (C_IS_RESERVED_WORD): Uppercase macro parameter.
7191 (C_RID_YYCODE) Likewise.
7192 (ptrmem_cst): Use rtx.
7193 (LOCAL_BINDING_P): Add whitespace.
7194 (INHERITED_VALUE_BINDING_P): Likewise.
7195 (BINDING_SCOPE): Wrap long line.
7196 (BINDING_HAS_LEVEL_P): Remove parenthesis.
7197 (BINDING_VALUE): Wrap long line.
7198 (BINDING_TYPE): Whitespace.
7199 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
7200 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
c588e52b 7201 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
98e40e83
GS
7202 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
7203 (same_type_p): Uppercase macro parameters.
7204 (same_type_ignoring_top_level_qualifiers_p): Likewise.
7205 (OVL_FUNCTION): Wrap long line.
7206 (OVL_CHAIN): Whitespace.
b34c06e3 7207 (OVL_CURRENT): Add parenthesis and whitespace.
98e40e83
GS
7208 (OVL_NEXT): Whitespace.
7209 (OVL_USED): Likewise.
7210 (IDENTIFIER_TYPE_VALUE): Likewise.
7211 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
7212 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
7213 (LANG_ID_FIELD): Whitespace.
7214 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
7215 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
7216 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
7217 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
7218 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
7219 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
7220 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
7221 (IDENTIFIER_VIRTUAL_P): Likewise.
7222 (IDENTIFIER_OPNAME_P): Likewise.
7223 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
7224 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
7225 (C_SET_EXP_ORIGINAL_CODE): Likewise.
7226 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
7227 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7228 (IS_AGGR_TYPE): Uppercase macro parameter.
7229 (CLASS_TYPE_P): Likewise.
7230 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
7231 (IS_AGGR_TYPE_2): Whitespace.
7232 (TAGGED_TYPE_P): Uppercase macro parameter.
7233 (TYPE_BUILT_IN): Whitespace.
7234 (TYPE_FOR_JAVA): Likewise.
7235 (FUNCTION_ARG_CHAIN): Remove parenthesis.
7236 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
7237 (FUNCTION_FIRST_USER_PARAM): Likewise.
7238 (PROMOTES_TO_AGGR_TYPE): Whitespace.
7239 (DERIVED_FROM_P): Add parenthesis and wrap.
7240 (UNIQUELY_DERIVED_FROM_P): Likewise.
7241 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
7242 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
7243 (CLASSTYPE_USE_TEMPLATE): Whitespace.
7244 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
7245 (TYPE_GETS_DELETE): Add parenthesis.
7246 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
7247 (TYPE_HAS_ASSIGN_REF): Likewise,
7248 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
7249 (TYPE_HAS_INIT_REF): Likewise.
7250 (TYPE_HAS_CONST_INIT_REF): Likewise.
7251 (TYPE_BEING_DEFINED): Likewise.
7252 (TYPE_LANG_SPECIFIC): Likewise.
7253 (CLASSTYPE_RTTI): Likewise.
7254 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
7255 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
7256 (TYPE_OVERLOADS_ARROW): Likewise.
7257 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
7258 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
7259 (CLASSTYPE_METHOD_VEC): Likewise.
7260 (CLASSTYPE_MARKED_N): Likewise.
7261 (CLASSTYPE_MARKED): Likewise.
7262 (CLASSTYPE_MARKED2): Likewise.
7263 (CLASSTYPE_MARKED3): Likewise.
7264 (CLASSTYPE_MARKED4): Likewise.
7265 (CLASSTYPE_MARKED5): Likewise.
7266 (CLASSTYPE_MARKED6): Likewise.
7267 (SET_CLASSTYPE_MARKED): Whitespace.
7268 (CLEAR_CLASSTYPE_MARKED): Likewise.
7269 (SET_CLASSTYPE_MARKED2): Likewise.
7270 (CLEAR_CLASSTYPE_MARKED2): Likewise.
7271 (SET_CLASSTYPE_MARKED3): Likewise.
7272 (CLEAR_CLASSTYPE_MARKED3): Likewise.
7273 (SET_CLASSTYPE_MARKED4): Likewise.
7274 (CLEAR_CLASSTYPE_MARKED4): Likewise.
7275 (SET_CLASSTYPE_MARKED5): Likewise.
7276 (CLEAR_CLASSTYPE_MARKED5): Likewise.
7277 (SET_CLASSTYPE_MARKED6): Likewise.
7278 (CLEAR_CLASSTYPE_MARKED6): Likewise.
7279 (CLASSTYPE_TAGS): Likewise.
7280 (CLASSTYPE_VSIZE): Likewise.
7281 (CLASSTYPE_VBASECLASSES): Likewise.
7282 (CANONICAL_BINFO): Add parenthesis.
7283 (CLASSTYPE_SIZE(NODE): Likewise.
7284 (CLASSTYPE_SIZE_UNIT): Likewise.
7285 (CLASSTYPE_ALIGN(NODE): Likewise.
7286 (CLASSTYPE_USER_ALIGN): Likewise.
7287 (TYPE_JAVA_INTERFACE): Likewise.
7288 (CLASSTYPE_PURE_VIRTUALS): Likewise.
7289 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
7290 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
7291 (CLASSTYPE_HAS_MUTABLE): Likewise.
7292 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
7293 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
7294 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
7295 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
7296 (CLASSTYPE_INTERFACE_ONLY): Likewise.
7297 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7298 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7299 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7300 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7301 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7302 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
7303 (BINFO_UNSHARED_MARKED): Whitespace.
7304 (BINFO_MARKED): Whitespace and wrap.
7305 (SET_BINFO_MARKED): Likewise.
7306 (CLEAR_BINFO_MARKED): Likewise.
7307 (BINFO_VTABLE_PATH_MARKED): Likewise.
7308 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
7309 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
7310 (BINFO_SUBVTT_INDEX): Remove parenthesis.
7311 (BINFO_VPTR_INDEX): Likewise.
7312 (BINFO_PRIMARY_BASE_OF): Likewise,
7313 (CLASSTYPE_VFIELDS): Whitespace.
7314 (VF_DERIVED_VALUE): Wrap long line.
7315 (NAMESPACE_LEVEL): Whitespace.
6bc34b14
JM
7316 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
7317 (DEFARG_POINTER): Whitespace.
7318 (DECL_NEEDED_P): Remove parenthesis.
7319 (DECL_LANGUAGE): Whitespace.
7320 (SET_DECL_LANGUAGE): Add parenthesis.
7321 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
7322 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
7323 (DECL_IN_AGGR_P): Whitespace.
7324 (DECL_FRIEND_P): Likewise.
7325 (DECL_BEFRIENDING_CLASSES): Likewise.
7326 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
7327 (DECL_NONCONVERTING_P): Whitespace.
7328 (DECL_PURE_VIRTUAL_P): Likewise.
7329 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
7330 (DECL_PENDING_INLINE_INFO): Whitespace.
7331 (DECL_SORTED_FIELDS): Likewise.
7332 (DECL_DEFERRED_FN): Likewise.
7333 (DECL_TEMPLATE_INFO): Likewise.
7334 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
7335 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
7336 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
7337 (TMPL_ARGS_LEVEL): Likewise.
7338 (SET_TMPL_ARGS_LEVEL): Likewise.
7339 (INNERMOST_TEMPLATE_PARMS): Whitespace.
7340 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
7341 (INTEGRAL_CODE_P(CODE): Add parenthesis.
7342 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
7343 (TYPE_HAS_CONSTRUCTOR): Whitespace.
7344 (TREE_HAS_CONSTRUCTOR): Likewise.
7345 (TYPE_HAS_DESTRUCTOR): Likewise.
7346 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
7347 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
7348 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
7349 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
7350 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
7351 (TYPE_PTRMEMFUNC_P): Likewise.
7352 (TYPE_PTRMEMFUNC_FLAG): Likewise.
7353 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
7354 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
7355 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
7356 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7357 (DECL_ACCESS): Whitespace.
7358 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
7359 (DECL_GLOBAL_DTOR_P): Likewise.
7360 (GLOBAL_INIT_PRIORITY): Likewise.
98e40e83 7361 (DECL_TEMPLATE_PARMS): Likewise.
6bc34b14
JM
7362 (DECL_TEMPLATE_RESULT): Likewise.
7363 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
7364 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
7365 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
7366 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7367 (PRIMARY_TEMPLATE_P): Add parenthesis.
7368 (DECL_USE_TEMPLATE): Whitespace.
7369 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7370 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
7371 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7372 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
7373 (CALL_DECLARATOR_PARMS): Remove parenthesis.
7374 (CALL_DECLARATOR_QUALS): Likewise.
7375 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
7376 (TEMP_NAME_P): Wrap.
7377 (VFIELD_NAME_P): Likewise.
7378 (B_SET): Uppercase macro parameters and add parenthesis.
7379 (B_CLR): Likewise.
7380 (B_TST): Likewise.
7381 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
7382 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
7383 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
7384 (same_or_base_type_p): Likewise.
7385 (cp_deprecated): Likewise.
98e40e83 7386
c28abdf0
RH
73872002-01-05 Richard Henderson <rth@redhat.com>
7388
15eb1e43 7389 * semantics.c (expand_body): Revert last change.
c28abdf0 7390
f11ee281
JM
73912002-01-04 Jason Merrill <jason@redhat.com>
7392
195a5def 7393 PR c++/4122
f11ee281
JM
7394 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
7395 lost primary.
7396
7397 * class.c (build_vtbl_initializer): Check for a lost primary
7398 before calculating the vtable entry to throw away.
7399
a4200657
JM
74002002-01-02 Jason Merrill <jason@redhat.com>
7401
7402 * semantics.c (expand_body): Call outlining_inline_function when
7403 emitting an inline function out of line.
7404
40e593d7
NS
74052002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7406
7407 PR c++/5116, c++/764 reversion
7408 * call.c (build_new_op): Revert the instantiations. They are
7409 incorrect.
c588e52b 7410
323728aa
NS
74112002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7412
7413 PR c++/5089
7414 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
7415
46c895ac
NS
74162002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7417
7418 PR c++/3716
7419 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
7420 (tsubst, case POINTER_TYPE): Handle pmfs here.
7421 (tsubst, case OFFSET_TYPE): Check it is not an offset to
7422 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
7423
833aa4c4
NS
74242002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7425
7426 PR c++/35
7427 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
7428 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
7429 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
7430 PARM_DECL.
7431 (tsubst_template_parms): Break up loop statements.
7432 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
7433 parm PARM_DECLs don't get promoted.
7434
18976b21
NS
74352002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7436
7437 PR c++/5123
7438 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
7439 (build_x_function_call): Cope with a COMPONENT_REF containing a
7440 TEMPLATE_ID_EXPR.
7441
303d1c55
NS
74422002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7443
7444 PR c++/5213
7445 * pt.c (convert_template_argument): Be more careful determining
7446 when RECORD_TYPE templates are or are not templates.
7447
d46a33b3
NS
74482002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7449
7450 PR c++/775
7451 * cp-tree.h (handle_class_head): Adjust prototype.
7452 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
7453 parameters. Use for all class heads.
7454 * parse.y (named_class_head_sans_basetype, named_class_head,
7455 named_complex_class_head_sans_basetype,
7456 named_class_head_sans_basetype_defn,
7457 unnamed_class_head): Remove.
7458 (class_head, class_head_apparent_template): Recognize class heads
7459 (class_head_decl, class_head_defn): New reductions. Process class
7460 heads.
7461 (structsp): Adjust class definition and class declaration
7462 reductions.
7463 (maybe_base_class_list): Give diagnostic on empty list.
7464
4542128e
NS
74652002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7466
7467 PR c++/4379
7468 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
7469 single non-static member.
7470 (unary_complex_lvalue): If it cannot be a pointer to member, don't
7471 make it so. Check it is not pointer to reference.
7472
903c6234
NS
74732002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7474
7475 PR c++/5132
7476 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
7477 are processing a template decl.
7478
477558bf
NS
74792002-01-02 Nathan Sidwell <nathan@codesourcery.com>
7480
7481 PR c++/5116, c++/764
7482 * call.c (build_new_op): Make sure template class operands are
7483 instantiated. Simplify arglist construction.
7484
41f5d4b1
NS
74852001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7486
7487 * call.c (build_user_type_conversion_1): Use my_friendly_assert
7488 rather than if ... abort.
7489 * cvt.c (convert_to_reference): Likewise.
7490 * semantics.c (setup_vtbl_ptr): Likewise.
7491 * pt.c (lookup_template_class): Comment typo.
c588e52b 7492
f3368a90
NS
74932001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7494
7495 PR c++/5125
7496 * pt.c (push_template_decl_real): Make sure DECL has
7497 DECL_LANG_SPECIFIC.
7498
03c9c274
NS
74992001-12-29 Nathan Sidwell <nathan@codesourcery.com>
7500
7501 PR c++/335
7502 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
7503 for non-reference fields.
7504 * typeck.c (require_complete_type): Use resolve_offset_ref).
7505
7d8e8369
NS
75062001-12-26 Nathan Sidwell <nathan@codesourcery.com>
7507
7508 PR c++/196
03c9c274 7509 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
7d8e8369 7510
a56ca899
NS
75112001-12-24 Nathan Sidwell <nathan@codesourcery.com>
7512
7513 PR c++/160
7514 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
7515 up. Don't stabilize_references when initializing a reference.
7516
0b5826ac
KG
75172001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7518
7519 * decl2.c (lang_f_options): Const-ify.
7520
38be19f6
JM
75212001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
7522
7523 * config-lang.in (diff_excludes): Remove.
7524
2e4cf9dc
NS
75252001-12-19 Nathan Sidwell <nathan@codesourcery.com>
7526
7527 PR c++/90
7528 * typeck.c (build_function_call_real): Use original function
7529 expression for errors.
7530
00e4119c
JM
75312001-12-18 Jason Merrill <jason@redhat.com>
7532
195a5def 7533 PR c++/3242
00e4119c
JM
7534 * class.c (add_method): Do compare 'this' quals when trying to match a
7535 used function. Don't defer to another used function.
7536
3ad97789
NS
75372001-12-18 Nathan Sidwell <nathan@codesourcery.com>
7538
7539 * pt.c (instantiate_clone): Remove, fold into ...
7540 (instantiate_template): ... here. Simplify by removing mutual
7541 recursion.
7542 * typeck2.c (build_m_component_ref): Don't cv qualify the function
7543 pointed to by a pointer to function.
7544 * class.c (delete_duplicate_fields_1): Typo.
7545
f21add07
JM
75462001-12-18 Jason Merrill <jason@redhat.com>
7547
7548 C++ ABI change: destroy value arguments in caller.
7549 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
7550 create an extra binding level for the parameters.
7551 * decl.c (store_parm_decls): Don't do parameter cleanups.
7552
ea50ad82
NS
75532001-12-18 Nathan Sidwell <nathan@codesourcery.com>
7554
7555 * call.c (build_new_method_call): Use '%#V'.
7556 * error.c (cv_to_string): Use V parameter to determine padding.
7557
3855d0d1
JM
75582001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
7559
7560 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
7561 spellings in messages.
7562
33bd39a2
ZW
75632001-12-17 Zack Weinberg <zack@codesourcery.com>
7564
7565 * cp-tree.h: Delete #defines for cp_error, cp_warning,
7566 cp_pedwarn, and cp_compiler_error.
7567 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
7568 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
7569 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7570 typeck2.c: Change calls to the above macros to use their
7571 language-independent equivalents: error, warning, pedwarn, and
7572 internal_error respectively.
7573
317c26c3
NB
75742001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
7575
7576 * decl2.c (finish_file): Remove back_end_hook.
7577
aba649ba
JM
75782001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
7579
7580 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
7581 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
7582 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
7583
1737c953
JM
75842001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
7585
7586 * lang-options.h: Use American spelling in messages.
7587
4a90862e
JM
75882001-12-13 Jason Merrill <jason@redhat.com>
7589
ade3dc07
JM
7590 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
7591
7592 Use cleanups to run base and member destructors.
7593 * init.c (push_base_cleanups): New function, split out from...
7594 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
7595 * decl.c (finish_destructor_body): Move vbase destruction code to
7596 push_base_cleanups.
7597 (begin_function_body, finish_function_body): New fns.
7598 (finish_function): Move [cd]tor handling and call_poplevel to
7599 finish_function_body.
7600 (pushdecl): Skip the new level.
7601 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
7602 (setup_vtbl_ptr): Call push_base_cleanups.
7603 * method.c (synthesize_method): Call {begin,end}_function_body.
7604 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
7605 * cp-tree.h: Declare new fns.
7606 * parse.y (function_body, .begin_function_body): New nonterminals.
7607 (fndef, pending_inline, function_try_block): Use function_body.
7608 (ctor_initializer_opt, function_try_block): No longer has a value.
7609 (base_init): Remove .set_base_init token.
7610 (.set_base_init, compstmt_or_error): Remove.
7611 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
7612
4a90862e
JM
7613 * optimize.c (maybe_clone_body): Fix parameter updating.
7614
a0de9d20
JM
76152001-12-12 Jason Merrill <jason@redhat.com>
7616
7617 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
7618 * semantics.c (genrtl_start_function): Don't pass
7619 parms_have_cleanups or push an extra binding level.
7620 (genrtl_finish_function): Lose cleanup_label cruft.
7621
7622 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
7623 (ctor_label): Remove.
7624 * semantics.c (finish_return_stmt): Lose ctor_label support.
7625 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
33bd39a2 7626 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
a0de9d20
JM
7627 dtor_label.
7628
7629 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
7630 check for [cd]tors.
7631 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
7632
7633 * decl.c (finish_function): Check VMS_TARGET, not VMS.
7634
7635 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
7636 (end_cleanup_fn): And poplevel.
7637
7638 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
7639 if we're in a template.
7640
dc5c569a
JJ
76412001-12-12 Jakub Jelinek <jakub@redhat.com>
7642
7643 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
7644 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
7645 THIS_NAME_P): Delete.
7646 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
7647 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
7648 with internal naming scheme.
7649 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
7650
ad1a6d45
NS
76512001-12-12 Nathan Sidwell <nathan@codesourcery.com>
7652
7653 * decl.c (grokdeclarator): Deprecated implicit typename use.
7654
270d8c65
NS
76552001-12-11 Nathan Sidwell <nathan@codesourcery.com>
7656
7657 PR g++/51
7658 * parse.y (frob_specs): Indicate it is a language linkage which
7659 contained the extern.
7660 * decl.c (grokdeclarator): Allow extern language linkage with
7661 other specifiers.
7662
9aaceb4b
NS
76632001-12-10 Nathan Sidwell <nathan@codesourcery.com>
7664
7665 PR g++/72
7666 * decl.c (add_binding): Don't reject duplicate typedefs involving
7667 template parameters.
7668
a23c9413
NB
76692001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
7670
7671 * parse.y, semantics.c: Similarly.
7672
9aaceb4b 76732001-12-09 Nathan Sidwell <nathan@codesourcery.com>
271e6f02
NS
7674
7675 PR g++/87
7676 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7677 (copy_args_p): Rename to ...
7678 (copy_fn_p): ... here.
7679 (grok_special_member_properties): New function.
7680 (grok_op_properties): Lose VIRTUALP parameter.
7681 (copy_assignment_arg_p): Remove.
7682 * call.c (build_over_call): Use copy_fn_p.
7683 * decl.c (grokfndecl): Reformat. Adjust call to
7684 grok_op_properties.
7685 (copy_args_p): Rename to ...
7686 (copy_fn_p): ... here. Reject template functions. Check for pass
7687 by value.
7688 (grok_special_member_properties): Remember special functions.
7689 (grok_ctor_properties): Don't remember them here, just check.
7690 (grok_op_properties): Likewise.
7691 (start_method): Call grok_special_member_properties.
7692 * decl2.c (grokfield): Likewise.
7693 (copy_assignment_arg_p): Remove.
7694 (grok_function_init): Don't remember abstract assignment here.
7695 * pt.c (instantiate_class_template): Call
7696 grok_special_member_properties.
7697 (tsubst_decl): Adjust grok_op_properties call.
7698
bdd8737f
AH
76992001-12-08 Aldy Hernandez <aldyh@redhat.com>
7700
33bd39a2
ZW
7701 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7702 RID_TYPES_COMPATIBLE_P.
bdd8737f 7703
46af705a
JDA
77042001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
7705
7706 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7707 call to build_aggr_init.
7708 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7709
cb97d97d
NB
77102001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
7711
7712 * parse.y: Replace uses of the string non-terminal with STRING.
7713 Don't perform string concatentaion here.
7714 (string): Remove non-terminal.
7715 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7716
742a37d5
JM
77172001-12-05 Jason Merrill <jason@redhat.com>
7718
7719 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7720 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7721 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7722 * pt.c (push_tinst_level): No longer static.
7723 * cp-tree.h: Declare them.
7724
7725 * init.c (resolve_offset_ref): Don't check access for the base
7726 conversion to access a FIELD_DECL.
7727
7728 * cp-tree.h (TYPE_REFFN_P): New macro.
7729 * decl.c (bad_specifiers): Check it, too.
7730
7731 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7732 on the __*_type_info type if we haven't seen a definition.
7733
26f943fd
NB
77342001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
7735
7736 * decl.c: Include c-common.h.
7737 (shadow_warning): Move to c-common.c.
7738
d2a6f3c0 77392001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
37a08a29
RK
7740
7741 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7742
9471d3e2
NS
77432001-12-04 Nathan Sidwell <nathan@codesourcery.com>
7744
7745 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7746
713ccd0c
NS
77472001-12-04 Nathan Sidwell <nathan@codesourcery.com>
7748
7749 PR g++/164
7750 * init.c (sort_base_init): Allow binfos to be directly specified.
7751 * method.c (do_build_copy_constructor): Explicitly convert to the
7752 base instance.
7753 (do_build_assign_ref): Likewise.
7754
591382c4
HPN
77552001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
7756
7757 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7758 declaration and initialization.
7759
c725bd79
NB
77602001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
7761
7762 * typeck2.c: Remove leading capital from diagnostic messages, as
7763 per GNU coding standards.
7764
a5d7c4a3
MK
77652001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
7766
7767 PR c++/3394
9fe038e8
HPN
7768 * decl.c (xref_basetypes): Handle attributes between
7769 'class' and name.
a5d7c4a3 7770
f1880e13
NS
77712001-12-03 Nathan Sidwell <nathan@codesourcery.com>
7772
7773 PR g++/3381
7774 * parse.y (named_complex_class_head_sans_basetype): Add new
7775 reduction.
7776 * Make-lang.in (parse.c): Adjust expected conflict count.
7777
ff668506
JM
77782001-12-03 Jason Merrill <jason@redhat.com>
7779
7780 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7781 immediate binfos for our virtual bases.
7782
1f978f5f
NB
77832001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
7784
7785 * call.c (build_java_interface_fn_ref): Similarly.
7786 * except.c (is_admissible_throw_operand): Similarly.
7787 * init.c (build_java_class_ref): Similarly.
7788 * xref.c (open_xref_file): Similarly.
7789
357351e5
NB
77902001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
7791
7792 * class.c (finish_struct): Remove trailing periods from messages.
7793 * decl.c (check_tag_decl): Similarly.
7794 * lex.c (cxx_set_yydebug): Similarly.
7795 * typeck2.c (friendly_abort): Similarly.
7796
998979e6
MM
77972001-11-29 Mark Mitchell <mark@codesourcery.com>
7798
7799 PR c++/3048
7800 * cp-tree.h (ovl_member): Remove.
33bd39a2 7801 * decl2.c (merge_functions): Handle extern "C" functions
998979e6
MM
7802 specially.
7803 * tree.c (ovl_member): Remove.
7804
7d5b8b11
MM
78052001-11-29 Mark Mitchell <mark@codesourcery.com>
7806
7807 PR c++/4842
7808 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7809 FUNCTION_DECL, as input.
7810 (mark_overriders): Remove.
7811 (warn_hidden): Rework for the new ABI.
7812
b67db529
MM
78132001-11-29 Mark Mitchell <mark@codesourcery.com>
7814
7815 PR c++/3471
7816 * call.c (convert_like_real): Do not build additional temporaries
7817 for rvalues of class type.
7818
2db1ab2d
NS
78192001-11-28 Nathan Sidwell <nathan@codesourcery.com>
7820
7821 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7822 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7823 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7824 (DERIVED_FROM_P): Likewise.
7825 (enum base_access): Renumber, add ba_quiet bit mask.
7826 (get_binfo): Remove.
7827 (get_base_distance): Remove.
7828 (binfo_value): Remove.
7829 (ACCESSIBLY_DERIVED_FROM_P): Remove.
7830 * call.c (standard_conversion): Use lookup_base.
7831 * class.c (strictly_overrides): Likewise.
7832 (layout_virtual_bases): Likewise.
7833 (warn_about_ambiguous_direct_bases): Likewise.
7834 (is_base_of_enclosing_class): Likewise.
7835 (add_vcall_offset_vtbl_entries_1): Likewise.
7836 * cvt.c (build_up_reference): Adjust comment.
7837 * init.c (build_member_call): Reformat.
7838 * search.c (get_binfo): Remove.
7839 (get_base_distance_recursive): Remove.
7840 (get_base_distance): Remove.
7841 (lookup_base_r): Tweak.
7842 (lookup_base): Add ba_quiet control. Complete the types here.
7843 (covariant_return_p): Use lookup_base.
7844 * tree.c (binfo_value): Remove.
7845 (maybe_dummy_object): Use lookup_base.
7846 * typeck.c (build_static_cast): Use lookup_base.
7847 (get_delta_difference): Likewise.
7848 * typeck2.c (binfo_or_else): Use lookup_base.
7849 (build_scoped_ref): Add back error_mark_check.
7850 (build_m_component_ref): Use lookup_base.
7851
d3945f0a
JM
78522001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
7853
7854 * Make-lang.in (c++.generated-manpages): New dummy target.
7855
d2a6f3c0 78562001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
ac79cd5a
RK
7857
7858 * Make-lang.in (cp-lang.o): Depends on c-common.h.
7859 * cp-lang.c (c-common.h): Include.
7860 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7861 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7862 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7863
4d6baafa
NB
78642001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
7865
7866 * decl2.c (c_language): Move to c-common.c.
7867 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7868 functions.
7869 (cxx_init): Update.
7870
5b0c5896
JM
78712001-11-26 Jason Merrill <jason@redhat.com>
7872
7873 * call.c (joust): Remove COND_EXPR hack.
7874
4bdd26e6
AH
78752001-11-25 Aldy Hernandez <aldyh@redhat.com>
7876
195a5def 7877 * search.c (lookup_base_r): Declare bk in variable declaration
4bdd26e6 7878 space.
33bd39a2 7879
338d90b8
NS
78802001-11-25 Nathan Sidwell <nathan@codesourcery.com>
7881
7882 PR g++/3145
7883 * class.c (build_vbase_pointer): Remove.
7884 (build_vbase_path): Remove.
7885 (build_base_path): New function.
7886 * cp-tree.h (base_access, base_kind): New enumerations.
7887 (build_base_path): Declare.
7888 (convert_pointer_to_real): Remove.
7889 (convert_pointer_to): Remove.
7890 (lookup_base): Declare.
7891 (convert_pointer_to_vbase): Remove.
7892 * call.c (build_scoped_method_call): Use lookup_base &
7893 build_base_path instead of convert_pointer_to_real,
7894 get_base_distance & get_binfo.
7895 (build_over_call): Likewise.
7896 * cvt.c (cp_convert_to_pointer): Likewise.
7897 (convert_to_pointer_force): Likewise.
7898 (build_up_reference): Likewise.
7899 (convert_pointer_to_real): Remove.
7900 (convert_pointer_to): Remove.
7901 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7902 instead of convert_pointer_to_vbase & build_vbase_path.
7903 (emit_base_init): Use build_base_path instead of
7904 convert_pointer_to_real.
7905 (expand_virtual_init): Lose unrequired conversions.
7906 (resolve_offset_ref): Use lookup_base and build_base_path
7907 instead of convert_pointer_to.
7908 * rtti.c (build_dynamic_cast_1): Use lookup_base &
7909 build_base_path instead of get_base_distance & build_vbase_path.
7910 * search.c (get_vbase_1): Remove.
7911 (get_vbase): Remove.
7912 (convert_pointer_to_vbase): Remove.
07f521fc 7913 (lookup_base_r): New function.
338d90b8
NS
7914 (lookup_base): New function.
7915 * typeck.c (require_complete_type): Use lookup_base &
7916 build_base_path instead of convert_pointer_to.
7917 (build_component_ref): Likewise.
7918 (build_x_function_call): Likewise.
7919 (get_member_function_from_ptrfunc): Likewise.
7920 (build_component_addr): Likewise.
7921 * typeck2.c (build_scoped_ref): Likewise.
7922
89d684bb
BM
79232001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7924
7925 * cp-tree.h (CP_TYPE_QUALS): Removed.
7926 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
33bd39a2 7927 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
89d684bb 7928 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
33bd39a2 7929 * dump.c (cp_dump_tree): Use void* dump_info argument to match
89d684bb
BM
7930 lang-hooks prototype.
7931 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7932 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7933 CP_TYPE_QUALS changed to cp_type_quals.
7934 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7935 (CXX_C_OBJS): Remove c-dump.o.
7936
12eb9f93 79372001-11-21 Mark Mitchell <mark@codesourcery.com>
2d2e8123
MM
7938
7939 PR c++/3637
12eb9f93
MM
7940 * pt.c (lookup_template_class): Ensure that all specializations
7941 are registered on the list corresponding to the most general
7942 template.
7943
79442001-11-20 Mark Mitchell <mark@codesourcery.com>
7945
2d2e8123 7946 * call.c (non_reference): Add documentation.
33bd39a2 7947 (convert_class_to_reference): Do not strip reference types
2d2e8123
MM
7948 from conversion operators.
7949 (maybe_handle_ref_bind): Simplify.
7950 (compare_ics): Correct handling of references.
7951
78a40378
MM
79522001-11-19 John Wilkinson <johnw@research.att.com>
7953
7954 * dump.c (dump_op): New function.
7955 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
7956 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7957 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
33bd39a2 7958
78a40378
MM
79592001-11-19 Mark Mitchell <mark@codesourcery.com>
7960
7961 PR4629
7962 * semantics.c (finish_sizeof): Make sure that expression created
7963 while processing a template do not have a type.
7964 (finish_alignof): Likewise.
7965 * typeck.c (c_sizeof): Likewise.
7966 (expr_sizeof): Likewise.
7967
22703ccc
NB
79682001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
7969
7970 * lex.c (cxx_finish): Call c_common_finish.
7971 (finish_parse): Remove.
7972
b3faacfd
KL
79732001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7974
7975 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7976 when displaying error message about missing array bounds.
7977
873ff987
KL
79782001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7979
7980 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7981 CONST_CAST_EXPR.
7982 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7983
08f3a861
NB
79842001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
7985
7986 * cp-tree.h (print_class_statistics): Restore.
7987
8a2b77e7
JM
79882001-11-15 Jason Merrill <jason@redhat.com>
7989
3b1a4132
JM
7990 * method.c (use_thunk): Don't emit debugging information for thunks.
7991
8a2b77e7
JM
7992 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7993 * decl.c (make_typename_type): Handle getting a class template.
7994 * search.c (lookup_field_r): A class template is good enough for
7995 want_type.
7996
7997 * call.c (convert_like_real): Only use cp_convert for the bad part.
7998 (standard_conversion): Also allow bad int->enum.
7999 * typeck.c (ptr_reasonably_similar): Also allow functions to
8000 interconvert. Pointers to same-size integers are reasonably
8001 similar.
8002
8003 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
8004 give it void type.
8005
36a68fe7
NS
80062001-11-15 Nathan Sidwell <nathan@codesourcery.com>
8007
8008 PR g++/3154
8009 * init.c (sort_base_init): Remove unreachable code.
8010 (expand_member_init): Adjust comment to reflect reality. Simplify
8011 and remove unreachable code.
8012
f5e99456
NB
80132001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
8014
8015 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
8016 (cxx_init): Update prototype.
8017 * decl.c (init_decl_processing): Rename. Move null node init
8018 to its creation time.
8019 * lex.c (cxx_init_options): Update.
8020 (cxx_init): Combine with old init_parse; also call
8021 cxx_init_decl_processing.
8022
fe5b6c1c
RS
80232001-11-14 Richard Sandiford <rsandifo@redhat.com>
8024
8a2b77e7
JM
8025 * decl.c (check_initializer): Try to complete the type of an
8026 array element before checking whether it's complete. Don't
8027 complain about arrays with complete element types but an
8028 unknown size.
8029 (cp_finish_decl): Build the hierarchical constructor before
8030 calling maybe_deduce_size_from_array_init.
fe5b6c1c 8031
77bd67cb
JM
80322001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
8033
8034 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
8035
b02922a4
NS
80362001-11-13 Nathan Sidwell <nathan@codesourcery.com>
8037
8038 PR g++/4206
8039 * parse.y (already_scoped_stmt): Remove.
8040 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
8041
abfc1ef6
L
80422001-11-12 H.J. Lu <hjl@gnu.org>
8043
195a5def 8044 * cvt.c (ocp_convert): Don't warn the address of a weak
abfc1ef6
L
8045 function is always `true'.
8046
5d69f816
NB
80472001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8048
8049 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
8050 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
8051 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
8052 * cp-tree.h (print_class_statistics): Remove.
8053 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
8054 cxx_print_identifier, cxx_set_yydebug): New.
8055 * lex.c (set_yydebug): Rename c_set_yydebug.
8056 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
8057 lang_print_xnode): Rename.
8058 * tree.c (print_lang_statistics): Rename.
8059
4fdc14ca
KG
80602001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8061
8062 * class.c (dump_array): Fix format specifier warning.
8063
3ac88239
NB
80642001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8065
8066 * cp-lang.c (LANG_HOOKS_NAME): Override.
8067 (struct lang_hooks): Constify.
8068 * lex.c (cxx_init_options): Update.
8069 (lang_identify): Remove.
33bd39a2 8070 * parse.y (language_string): Remove.
3ac88239 8071
b21d216c
AF
80722001-11-08 Andreas Franck <afranck@gmx.de>
8073
8074 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
8075 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
8076 suggested by autoconf.
8077 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
8078 (c++.install-common): Use the transformed target alias names.
8079
d23c55c2
NB
80802001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8081
8082 * Make-lang.in: Update.
8083 * cp-lang.c: Include langhooks-def.h.
8084
2a2b1d56
KL
80852001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8086
8087 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
8088
76648a8b
KG
80892001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8090
8091 * lex.c (copy_lang_type): Add static prototype.
8092
fccef71e
KL
80932001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8094
8095 * pt.c (unify): Handle SCOPE_REF.
8096
19989812
JJ
80972001-11-01 Jakub Jelinek <jakub@redhat.com>
8098
8099 * tree.c (cp_copy_res_decl_for_inlining): Adjust
8100 DECL_ABSTRACT_ORIGIN for the return variable.
8101
5b7874aa
ZW
81022001-10-31 Zack Weinberg <zack@codesourcery.com>
8103
8104 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8105
306ef644
JM
81062001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
8107
8108 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
8109 semantics.c, spew.c: Fix spelling errors.
8110
76543000
KL
81112001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8112
8113 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
8114
37207ee7
ZW
81152001-10-25 Zack Weinberg <zack@codesourcery.com>
8116
8117 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
8118 pop_everything.
8119
d2a6f3c0 81202001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8ac61af7
RK
8121
8122 * cp-lang.c (cxx_get_alias_set): New function.
8123 Point LANG_HOOKS_GET_ALIAS_SET to it.
8124
f1e09fa2 81252001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
b8c6534b
KL
8126
8127 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
8128 * cp-tree.h (make_unbound_class_template): Prototype new function.
8129 * decl.c (make_unbound_class_template): New function.
8130 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
8131 * error.c (dump_type): Likewise.
8132 * mangle.c (write_type): Likewise.
8133 * parse.y (template_parm): Likewise.
8134 (template_argument): Use make_unbound_class_template.
8135 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
8136 (tsubst): Likewise.
8137 (tsubst_copy): Likewise.
8138 (unify): Likewise.
8139 * tree.c (walk_tree): Likewise.
8140 * typeck.c (comptypes): Likewise.
8141
0df6c2c7
KG
81422001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8143
8144 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
8145 extra calls into fewer ones.
8146
97055d5c
AO
81472001-10-18 Alexandre Oliva <aoliva@redhat.com>
8148
8149 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
8150 Warn when merging inline with attribute noinline.
8151 (start_decl, start_function): Warn if inline and attribute
8152 noinline appear in the same declaration.
8153
b5823a44
L
81542001-10-16 H.J. Lu <hjl@gnu.org>
8155
8156 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
8157 for tree checking disabled.
8158
dc8ad298
HPN
81592001-10-16 Hans-Peter Nilsson <hp@axis.com>
8160
8161 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
8162 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
8163
d9f818d9
RS
81642001-10-15 Richard Sandiford <rsandifo@redhat.com>
8165
8166 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
8167 (unify): Only handle MINUS_EXPR specially if the above flag is set
8168 and the subtracted constant is 1. Clear the flag on recursive calls.
8169 Set it when unifying the maximum value in an INTEGER_TYPE's range.
8170
e1be26f4
RS
81712001-10-15 Richard Sandiford <rsandifo@redhat.com>
8172
8173 * decl.c (bad_specifiers): Don't allow exception specifications
8174 on any typedefs.
8175
a5da89c6
NB
81762001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
8177
8178 * cp/lex.c (init_cp_pragma): Similarly.
8179
4f96ff63
KL
81802001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8181
8182 * pt.c (lookup_template_class): Build complete template arguments
8183 for BOUND_TEMPLATE_TEMPLATE_PARM.
8184
11e74ea6
KL
81852001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8186
8187 * cp-tree.h (TYPE_BINFO): Update comment.
8188 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
8189 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
8190 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
8191 (copy_type): Prototype new function.
8192 * lex.c (copy_lang_decl): Gather tree node statistics.
8193 (copy_lang_type): New function.
8194 (copy_type): Likewise.
8195 (cp_make_lang_type): Create lang_type for
8196 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
8197 and BOUND_TEMPLATE_TEMPLATE_PARM.
8198 * pt.c (tsubst): Use copy_type instead of copy_node.
8199 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
8200
f5d47abd
KL
82012001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8202
8203 * pt.c (determine_specialization): Ignore functions without
8204 DECL_TEMPLATE_INFO.
8205
e60505a5
NS
82062001-10-12 Nathan Sidwell <nathan@codesourcery.com>
8207
8208 PR g++/4476
8209 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
8210
6f32162a
JM
82112001-10-11 Jason Merrill <jason_merrill@redhat.com>
8212
8213 * typeck2.c (store_init_value): Don't re-digest a bracketed
8214 initializer.
8215
8216 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
8217 ANON_AGGR_TYPE_P.
8218
4a8d0c9c
RH
82192001-10-11 Richard Henderson <rth@redhat.com>
8220
8221 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
8222 of an asm statement.
8223 (build_vtbl_ref_1): Split out from build_vtbl_ref.
8224 (build_vfn_ref): Use it to handle vtable descriptors before
8225 calling build_vtable_entry_ref.
8226 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
8227
84b72302
RH
82282001-10-10 Richard Henderson <rth@redhat.com>
8229
37207ee7 8230 * parse.y (asm_operand): Allow named operands.
84b72302 8231 * semantics.c (finish_asm_stmt): Tweek for changed location
4639c5c6 8232 of the operand constraint.
84b72302 8233
48c8b0be 82342001-10-09 Jason Merrill <jason_merrill@redhat.com>
72a08131
JM
8235
8236 * call.c (standard_conversion): Add bad conversion between
8237 integers and pointers.
8238 (convert_like_real): Don't use convert_for_initialization for bad
8239 conversions; complain here and use cp_convert.
8240 (build_over_call): Don't handle bad conversions specially.
8241 (perform_implicit_conversion): Allow bad conversions.
8242 (can_convert_arg_bad): New fn.
8243 * cp-tree.h: Declare it.
8244 * typeck.c (convert_for_assignment): Use it.
8245 (ptr_reasonably_similar): Any target type is similar to void.
8246
19551f29
AO
82472001-10-08 Alexandre Oliva <aoliva@redhat.com>
8248
8249 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
8250 (cp/cp-lang.o): New rule.
8251 * cp-tree.h: Declare hooks.
8252 * tree.c: Make hooks non-static.
8253 (init_tree): Don't initialize hooks here.
8254 * lex.c: Likewise. Move definition of lang_hooks to...
8255 * cp-lang.c: ... new file.
8256
31ed8fea
RH
82572001-10-08 Richard Henderson <rth@redhat.com>
8258
8259 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
8260 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
8261
8b60264b
KG
82622001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8263
8264 * class.c (build_vtable_entry_ref): Const-ify.
8265 * decl.c (predefined_identifier,
37207ee7 8266 initialize_predefined_identifiers): Likewise.
8b60264b
KG
8267 * init.c (build_new_1): Likewise.
8268 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
8269 Likewise.
8270
bc4c7159
AO
82712001-10-05 Alexandre Oliva <aoliva@redhat.com>
8272
8273 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
8274 (INSNS_PER_STMT): Likewise.
8275 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
8276 (copy_body, initialize_inlined_parameters): Likewise.
8277 (declare_return_variable, inlinable_function_p): Likewise.
8278 (expand_call_inline, expand_calls_inline): Likewise.
8279 (optimize_inline_calls, clone_body): Likewise.
8280 * tree.c (walk_tree): Moved to ../tree-inline.c.
8281 (walk_tree_without_duplicates): Likewise.
8282 (copy_tree_r, remap_save_expr): Likewise.
8283
25af8512
AO
82842001-10-04 Alexandre Oliva <aoliva@redhat.com>
8285
8286 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
8287 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
8288 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
8289 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
8290 (flag_inline_trees): Moved declaration to ../tree-inline.h.
8291 (walk_tree): Moved declaration to ../tree-inline.h.
8292 (walk_tree_without_duplicates, copy_tree_r): Likewise.
8293 (remap_save_expr): Likewise.
8294 * decl.c: Include tree-inline.h.
8295 (lang_mark_tree): Don't mark inlined_fns.
8296 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
8297 * optimize.c: Include tree-inline.h.
8298 (optimize_inline_calls): Move declaration to ../tree.h, as
8299 non-static.
8300 (remap_decl): Use language-independent constructs and hooks.
8301 (remap_block, copy_body_r, declare_return_variable): Likewise.
8302 (inlinable_function_p): Likewise. Don't test for
8303 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
8304 no longer language-specific.
8305 (optimize_inline_calls): Likewise. Make it non-static. Moved
8306 call of dump_function to...
8307 (optimize_function): Here...
8308 (clone_body): New function, extracted from...
8309 (maybe_clone_body): ... here. Build decl_map locally and pass
8310 it on to clone_body.
8311 * pt.c, semantics.c: Include tree-inline.h.
8312 * tree.c: Likewise.
8313 (cp_walk_subtrees): New language-specific hook for tree inlining.
8314 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
8315 cp_is_overload_p, cp_auto_var_in_fn_p,
8316 cp_copy_res_decl_for_inlining): Likewise.
8317 (walk_tree): Move language-specific constructs into...
8318 (cp_walk_subtrees): this new function.
8319 (copy_tree_r): Use language-independent constructs and hooks.
8320 (init_tree): Initialize tree inlining hooks.
8321 (remap_save_expr): Adjust prototype so that the declaration
8322 does not require the definition of splay_tree.
8323
6a4af81f
JDA
83242001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
8325
8326 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
8327 to build the declaration instead of the declaration itself.
8328
0caee1c6
JM
83292001-10-02 Jason Merrill <jason_merrill@redhat.com>
8330
48c8b0be
JM
8331 * decl2.c (cxx_decode_option): Add 'else'.
8332
0caee1c6
JM
8333 * spew.c (end_input): No longer static.
8334 * cp-tree.h: Declare it.
8335 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
8336
80a497e4
JM
83372001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
8338
8339 * call.c (build_over_call), typeck.c (build_function_call_real):
8340 Pass type attributes to check_function_format rather than name or
8341 assembler name. Don't require there to be a name or assembler
8342 name to check formats.
8343
6431177a
JM
83442001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
8345
8346 * decl.c (init_decl_processing): Don't call
8347 init_function_format_info. Initialize lang_attribute_table
8348 earlier.
8349 (builtin_function): Call decl_attributes.
8350 (insert_default_attributes): New.
8351
55b3d665
JM
83522001-10-01 Jason Merrill <jason_merrill@redhat.com>
8353
8354 * decl.c (grokdeclarator): Copy array typedef handling from C
8355 frontend.
8356
8357 * decl.c (grokdeclarator): Copy too-large array handling from C
8358 frontend.
8359
9f57ca19
AO
83602001-09-29 Alexandre Oliva <aoliva@redhat.com>
8361
8362 * config-lang.in (target_libs): Added target-gperf, so that we
8363 don't try to build it if C++ is disabled.
8364
749ced52
ZW
83652001-09-23 Zack Weinberg <zack@codesourcery.com>
8366
8367 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
8368 (cp/errfn.o): Delete rule.
8369 (cp/error.o): Depend on flags.h.
8370 * errfn.c: Delete file.
8371 * cp-tree.h: Declare warn_deprecated. Remove definitions of
8372 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
8373 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
8374 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
8375 internal_error respectively. Make cp_deprecated into a macro.
8376 Don't define cp_printer typedef or declare cp_printers.
8377 * error.c: Include flags.h.
8378 Delete: struct tree_formatting_info, print_function_argument_list,
8379 print_declaration, print_expression, print_function_declaration,
8380 print_function_parameter, print_type_id, print_cv_qualifier_seq,
8381 print_type_specifier_seq, print_simple_type_specifier,
8382 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
8383 print_parameter_declaration_clause, print_exception_specification,
8384 print_nested_name_specifier, and definition of cp_printers.
8385 (locate_error): New function.
8386 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
8387 rewritten in terms of locate_error and diagnostic.c.
8388 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
8389 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
8390 (init_error): Adjust to match.
8391
d2a6f3c0 83922001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
bb9f8221
RK
8393
8394 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
8395
67231816
RH
83962001-09-21 Richard Henderson <rth@redhat.com>
8397
8398 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
8399 (build_vtbl_initializer): Likewise.
8400 (build_vfn_ref): New.
8401 * cp-tree.h: Declare it.
8402 * call.c (build_over_call): Use it.
8403 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
8404 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
8405
d2a6f3c0 84062001-09-21 J"orn Rennecke <amylaar@redhat.com>
c9574c9f
R
8407
8408 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
8409
91d231cb
JM
84102001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
8411
8412 Table-driven attributes.
8413 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
8414 * decl2.c (cplus_decl_attributes): Only take one attributes
8415 parameter.
8416 * cp-tree.c (cplus_decl_attributes): Update prototype.
8417 * class.c (finish_struct), decl.c (start_decl, start_function),
8418 decl2.c (grokfield), friend.c (do_friend), parse.y
8419 (parse_bitfield): Update calls to cplus_decl_attributes.
8420 * decl.c (grokdeclarator): Take a pointer to a single ordinary
8421 attribute list.
8422 * decl.h (grokdeclarator): Update prototype.
8423 * decl2.c (grokfield): Take a single ordinary attribute list.
8424 * friend.c (do_friend): Likewise.
8425 * decl.c (shadow_tag, groktypename, start_decl,
8426 start_handler_parms, grokdeclarator, grokparms, start_function,
8427 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
8428 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
8429 (process_template_parm, do_decl_instantiation): Pass single
8430 ordinary attribute lists around.
8431 * decl.c (grokdeclarator): Correct handling of nested attributes.
8432 Revert the patch
8433 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
8434 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8435 not the left.
8436 .
8437 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
8438 (cp_attribute_table): Declare.
8439 * decl.c (valid_lang_attribute): Don't define.
8440 (lang_attribute_table): Define.
8441 (init_decl_processing): Initialize lang_attribute_table instead of
8442 valid_lang_attribute.
8443 * tree.c (cp_valid_lang_attribute): Remove.
8444 (handle_java_interface_attribute, handle_com_interface_attribute,
8445 handle_init_priority_attribute): New functions.
8446 (cp_attribute_table): New array.
8447 * decl2.c (import_export_class): Don't use
8448 targetm.valid_type_attribute.
8449
a1bda5f1
GDR
84502001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8451
e6b9638b
JM
8452 * Make-lang.in (cp/error.o): Depend on real.h
8453 * error.c: #include "real.h"
a1bda5f1 8454
cb6edbcb
KG
84552001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8456
8457 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
8458 xmalloc/strcpy/strcat.
8459
83182544
KG
84602001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8461
8462 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
8463 Const-ification.
8464 * pt.c (tsubst_decl): Likewise.
8465
40008eda
KG
84662001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8467
8468 * decl2.c (lang_f_options): Const-ification.
8469 * lex.c (cplus_tree_code_name): Likewise.
8470 * spew.c (yyerror): Likewise.
8471
39e78d8b
NS
84722001-09-06 Nathan Sidwell <nathan@codesourcery.com>
8473
8474 PR c++/3986
8475 * class.c (force_canonical_binfo_r): Check & move an indirect
8476 primary base first.
8477 (force_canonical_binfo): Check that it's not already
8478 canonical.
8479 (mark_primary_virtual_base): Remove BINFO parameter.
8480 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
8481
6d0a3f67
NS
84822001-09-06 Nathan Sidwell <nathan@codesourcery.com>
8483
8484 Remove TYPE_NONCOPIED_PARTS.
8485 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
8486 CLASSTYPE_PURE_VIRTUALS.
8487 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
8488 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
72a08131 8489 (layout_class_type): Don't call fixup_inline_methods here ...
6d0a3f67
NS
8490 (finish_struct_1): ... call it here.
8491
4f8e1232
MM
84922001-09-04 Mark Mitchell <mark@codesourcery.com>
8493
8494 * decl.c (duplicate_decls): Remove code deadling with
8495 DECL_SAVED_INSNS.
8496 * decl2.c (finish_file): Likewise.
8497 * pt.c (instantiate_decl): Likewise.
8498 * semantics.c (expand_body): Don't defer local functions if
8499 they wouldn't be deferred for some other reason. Don't
8500 generate RTL for functions that will not be emitted.
8501 (genrtl_start_function): Remove code deadling with
8502 DECL_SAVED_INSNS.
8503 (genrtl_finish_function): Likewise.
8504
da86f08f
NS
85052001-09-04 Nathan Sidwell <nathan@codesourcery.com>
8506
8507 PR c++/4203
8508 * call.c (build_over_call): Do not optimize any empty base
8509 construction.
8510
38066e83
KL
85112001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8512
8513 * error.c (dump_template_decl): Output template parameters
8514 together with their specifiers.
8515 Output `class' prefix for template template parameter.
8516 (dump_decl): Fix formatting.
8517
598e9ba5 85182001-08-30 Kurt Garloff <garloff@suse.de>
749ced52 8519
598e9ba5
KG
8520 * optimize.c (inlinable_function_p): Allow only smaller single
8521 functions. Halve inline limit after reaching recursive limit.
749ced52 8522
f232e4a5
JR
85232001-08-30 Joern Rennecke <amylaar@redhat.com>
8524 Jason Merrill <jason_merrill@redhat.com>
8525
8526 * class.c (build_vtable_entry_ref): Subtract in char*, not
8527 ptrdiff_t.
8528
0213a355
JM
85292001-08-23 Jason Merrill <jason_merrill@redhat.com>
8530
8531 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
8532 (build_cplus_array_type): Use cp_build_qualified_type, not
8533 TYPE_MAIN_VARIANT, to get an unqualified version.
8534
8535 * decl2.c (grok_alignof): Lose.
8536 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
8537 * typeck.c (c_alignof): Lose.
8538 * semantics.c (finish_sizeof, finish_alignof): New.
8539 * parse.y: Use them.
8540 * cp-tree.h: Declare them.
8541
fd10dd09
JM
85422001-08-22 Jason Merrill <jason_merrill@redhat.com>
8543
8544 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
8545 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
8546 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
8547
baeb4732
JJ
85482001-08-19 Jakub Jelinek <jakub@redhat.com>
8549
8550 * typeck2.c (add_exception_specifier): Only require complete type if
8551 not in processing template declaration.
8552
1c0cc57e
KG
85532001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8554
8555 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
8556 GNU_xref_start_scope and GNU_xref_end_scope.
8557
8558 * tree.c (TYPE_HASH): Moved to ../tree.h.
8559
9a52d09b
MM
85602001-08-16 Mark Mitchell <mark@codesourcery.com>
8561
8562 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
8563 on COMPOUND_EXPRs.
8564
b5d1cbd2
RH
85652001-08-14 Richard Henderson <rth@redhat.com>
8566
8567 * class.c, cp-tree.h (build_vfn_ref): Remove.
8568 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
8569
63d6f87a
MM
85702001-08-13 Mark Mitchell <mark@codesourcery.com>
8571
8572 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
8573 empty class assignment as having side-effects to avoid
8574 spurious warnings.
8575
e78d8e51
ZW
85762001-08-13 Zack Weinberg <zackw@panix.com>
8577
8578 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
8579 * except.c: Include libfuncs.h.
8580
a60af04a
GDR
85812001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8582
8583 * decl.c (grokdeclarator): Clarify diagnostic message.
8584
3605b283
KL
85852001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8586
8587 * decl2.c (do_nonmember_using_decl): Replace using directive
8588 with using declaration in the error message.
8589
4d5f3fbd
KL
85902001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8591
8592 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
8593 criterion to avoid rebuilding expression tree instead of
8594 processing_template_decl.
8595
07b2f2fd
JM
85962001-08-07 Jason Merrill <jason_merrill@redhat.com>
8597
8598 Support named return value optimization for inlines, too.
8599 * decl.c (finish_function): Nullify returns here.
8600 * semantics.c (genrtl_start_function): Not here.
8601 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
8602 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
8603 Also nullify the CLEANUP_STMT for the nrv.
8604 * cp-tree.h: Declare it.
8605 * optimize.c (declare_return_variable): Replace the nrv with the
8606 return variable.
8607 * typeck.c (check_return_expr): Be more flexible on alignment check.
8608 Ignore cv-quals when checking for a matching type.
8609
2cc07db4
RH
86102001-08-09 Richard Henderson <rth@redhat.com>
8611
8612 * decl2.c (finish_objects): Use target hooks instead of
8613 assemble_constructor and assemble_destructor.
8614
0ca179b2
JDA
86152001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
8616
8617 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
8618
0830ae44
NS
86192001-08-07 Nathan Sidwell <nathan@codesourcery.com>
8620
8621 PR c++/3820
8622 Stop using TYPE_NONCOPIED_PARTS.
8623 * call.c (build_over_call): Be careful when copy constructing
8624 or assigning to an empty class.
8625 * class.c (check_bases_and_members): It has a
8626 COMPLEX_ASSIGN_REF if it has a vptr.
8627 (layout_class_type): Don't add empty class padding to
8628 TYPE_NONCOPIED_PARTS.
8629 (finish_struct_1): Don't add the VFIELD either.
8630 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
8631 initialization.
8632
59a13e0f
JM
86332001-08-07 Jason Merrill <jason_merrill@redhat.com>
8634
8635 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
8636
47907859
RH
86372001-08-06 Richard Henderson <rth@redhat.com>
8638
8639 * decl2.c (finish_objects): Pass a symbol_ref and priority to
8640 assemble_{constructor,destructor}. Remove priority handling.
8641
eac69b8a
GDR
86422001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
8643
8644 Don't allow template-id in using-declaration.
8645 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
8646 (do_class_using_decl): Likewise.
8647
ef6e958a
NB
86482001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8649
8650 * cp/spew.c (read_token): No need to pop buffers.
8651
dff94ad7
SS
86522001-08-02 Stan Shebs <shebs@apple.com>
8653
8654 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
8655 (fnaddr_from_vtable_entry): Remove decl.
8656 * method.c (use_thunk): Update comment.
8657
026c3f13
AC
86582001-08-01 Andrew Cagney <ac131313@redhat.com>
8659
8660 * repo.c (get_base_filename): Change return value to const char
8661 pointer.
8662
1dbb6023
NS
86632001-08-02 Nathan Sidwell <nathan@codesourcery.com>
8664
8665 Kill -fhonor-std.
8666 * NEWS: Document.
8667 * cp-tree.h (flag_honor_std): Remove.
8668 (CPTI_FAKE_STD): Remove.
8669 (std_node): Remove comment about it being NULL.
8670 (fake_std_node): Remove.
8671 * decl.c (in_fake_std): Remove.
8672 (walk_namespaces_r): Remove fake_std_node check.
8673 (push_namespace): Remove in_fake_std code.
8674 (pop_namespace): Likewise.
8675 (lookup_name_real): Remove fake_std_node check.
8676 (init_decl_processing): Always create std_node. Always add
8677 std:: things there.
8678 (builtin_function): Always put non '_' fns in std.
8679 * decl2.c (flag_honor_std): Remove.
8680 (lang_f_options): Remove honor-std.
8681 (unsupported_options): Add honor-std.
8682 (set_decl_namespace): Remove fake_std_node check.
8683 (validate_nonmember_using_decl): Likewise.
8684 (do_using_directive): Likewise.
8685 (handle_class_head): Likewise.
8686 * dump.c (cp_dump_tree): Likewise.
8687 * except.c (init_exception_processing): Adjust.
8688 * init.c (build_member_call): Remove fake_std_node check.
8689 (build_offset_ref): Likewise.
8690 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8691 * rtti.c (init_rtti_processing): Adjust.
8692
6ad7895a
APB
86932001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
8694
8695 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8696 operand while calling cp_tree_equal.
8697
befe7c61
NS
86982001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8699
8700 The 3.0 ABI no longer has vbase pointer fields.
8701 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8702 FORMAT_VBASE_NAME): Remove.
8703 * method.c (do_build_copy_constructor): Adjust.
8704 (do_build_assign_ref): Adjust.
8705 * search.c (lookup_field_r): Adjust.
8706 * typeck.c (build_component_ref): Adjust.
8707
8708 The 3.0 ABI always has a vtable pointer at the start of every
8709 polymorphic class.
8710 * rtti.c (build_headof_sub): Remove.
8711 (build_headof): Adjust.
8712 (get_tinfo_decl_dynamic): No need to check flag_rtti
8713 here. Adjust.
8714 (create_real_tinfo_var): Explain why we need a hidden name.
8715
20dde49d
NS
87162001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8717
8718 PR c++/3631
8719 * class.c (update_vtable_entry_for_fn): The fixed adjustment
8720 of a virtual thunk should be from declaring base.
8721
b7ad2f8b
NS
87222001-07-31 Nathan Sidwell <nathan@codesourcery.com>
8723
8724 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8725 the shared virtual base, so preserving inheritance graph order.
8726
57cb6d52
AJ
87272001-07-30 Andreas Jaeger <aj@suse.de>
8728
749ced52 8729 * decl2.c: Remove unused var global_temp_name_counter.
57cb6d52 8730
594280a3
RH
87312001-07-28 Richard Henderson <rth@redhat.com>
8732
8733 * method.c (pending_inlines): Remove.
8734
0ab142b0
NS
87352001-07-27 Nathan Sidwell <nathan@codesourcery.com>
8736
8737 * class.c (mark_primary_virtual_base): Don't adjust base
8738 offsets here.
8739 (dfs_unshared_virtual_bases): Adjust them here.
8740 (mark_primary_bases): Explain why we adjust at the end.
8741
d60d223b
NS
87422001-07-27 Nathan Sidwell <nathan@codesourcery.com>
8743
8744 * class.c (finish_struct_1): When copying the primary base's
8745 VFIELD, make sure we find it is at offset zero.
8746
db3ef87b
KL
87472001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8748
8749 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8750 tsubst_expr for default template arguments.
8751
312b7c9d
NS
87522001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8753
d60d223b 8754 PR c++/3621
312b7c9d 8755 * spew.c (yylex): Only copy the token's lineno, if it is
838dfd8a 8756 nonzero.
312b7c9d 8757
648c2206
NS
87582001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8759
8760 PR c++/3624
8761 * call.c (resolve_args): Simplify, call
8762 convert_from_reference.
8763 (build_new_op): Resolve and convert from reference ARG1
8764 earlier. Adjust ARG2 & ARG3 resolve and conversion.
8765
969fd501
NS
87662001-07-26 Nathan Sidwell <nathan@codesourcery.com>
8767
8768 * decl.c (last_function_parm_tags): Remove.
8769 (current_function_parm_tags): Remove.
8770 (init_decl_processing): Adjust.
8771 (start_function): Adjust.
8772 (store_parm_decls): Adjust.
8773
8774 PR c++/3152
8775 * decl.c (grokdeclarator): Detect when a function typedef is
8776 declaring a function, and create last_function_parms correctly.
8777
08ac397c 87782001-07-25 Jason Merrill <jason_merrill@redhat.com>
749ced52 8779
08ac397c
JM
8780 * call.c (joust): Only prefer a non-builtin candidate to a builtin
8781 one if they have the same signature.
8782
8783 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
8784 it rather than toplevel_bindings_p. Give it a mangled name if static.
8785 (convert_to_reference): Adjust.
8786 * decl2.c (get_temp_name): Lose.
8787 * mangle.c (mangle_ref_init_variable): New fn.
8788 (mangle_guard_variable): Strip the ref-init header.
8789 * cp-tree.h: Adjust.
8790 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8791 initializer.
8792 (grok_reference_init): Always use DECL_INITIAL.
8793
40260429
NS
87942001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8795
8796 PR c++/3416
8797 * call.c (build_conditional_expr): Recheck args after
8798 conversions.
8799 * cp-tree.h (build_conditional_expr): Move to correct file.
8800 * typeck.c (decay_conversion): Diagnose any unknown types
8801 reaching here.
8802 (build_binary_op): Don't do initial decay or default
8803 conversions on overloaded functions.
8804 (build_static_cast): Don't do a decay conversion here.
8805
ab085207
NS
88062001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8807
8808 PR c++/3543
8809 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8810 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8811
0abe00c5
NS
88122001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8813
8814 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8815 (create_vtbl_ptr): ... here.
8816
90b1ca2f
NS
88172001-07-25 Nathan Sidwell <nathan@codesourcery.com>
8818
8819 * class.c (build_vbase_offset_vbtl_entries): Look for
8820 non-primary base of which we are a sub vtable.
8821
cfe5dc31
PE
88222001-07-24 Phil Edwards <pme@sources.redhat.com>
8823
8824 * semantics.c (finish_this_expr): Remove unused code.
8825
7f54a851
NS
88262001-07-24 Nathan Sidwell <nathan@codesourcery.com>
8827
8828 Simplify rtti, now we've only one ABI.
8829 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8830 CPTI_TINFO_VAR_ID.
8831 (tinfo_decl_id, tinfo_var_id): Remove.
8832 (get_typeid_1): Remove.
8833 * rtti.c
8834 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8835 (typeid_ok_p): New function.
8836 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8837 (get_tinfo_decl): Remove old abi documentation.
8838 (tinfo_from_decl): Remove.
8839 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8840 (get_typeid_1): Remove.
8841 (get_base_offset): Remove.
8842 (synthesize_tinfo_var): Absorb get_base_offset.
8843 (create_real_tinfo_var): Don't use tinfo_decl_id.
8844
18fee3ee
GS
88452001-07-23 Graham Stott <grahams@redhat.com>
8846
d30d6e7a 8847 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
18fee3ee
GS
8848 variable has_two_argument_delete_p.
8849
c4372ef4
NS
88502001-07-21 Nathan Sidwell <nathan@codesourcery.com>
8851
8852 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8853 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8854 (CPTI_INDEX_IDENTIFIER): Remove.
8855 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8856 (delta2_identifier): Remove.
8857 (index_identifier): Remove.
8858 (pfn_or_delta2_identifier): Remove.
8859 (flag_vtable_thunks): Remove.
8860 (VTABLE_DELTA2_NAME): Remove.
8861 (VTABLE_INDEX_NAME): Remove.
8862 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8863 (vfunc_ptr_type_node): Adjust.
8864 (VTABLE_NAME_PREFIX): Adjust.
8865 (build_vfn_ref): Lose first parameter.
8866 (fixup_all_virtual_upcast_offsets): Remove.
8867 * decl.c (initialize_predefined_identifiers): Remove
8868 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8869 (init_decl_processing): Remove no-vtable-thunk code.
8870 * decl2.c (flag_vtable_thunks): Remove.
8871 (mark_vtable_entries): Remove no-vtable-thunk code.
8872 * error.c (dump_decl): Remove no-vtable-thunk code.
8873 (dump_expr): Adjust ptr to member function code.
8874 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8875 code.
8876 * rtti.c (build_headof): Remove no-vtable-thunk code.
8877 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8878 * search.c (get_base_distance): Remove expand_upcast_fixups case.
8879 (virtual_context) Remove.
8880 (expand_upcast_fixups): Remove.
8881 (fixup_virtual_upcast_offsets): Remove.
8882 (fixup_all_virtual_upcast_offsets): Remove.
8883 * typeck.c (get_member_function_from_ptrfunc): Remove
8884 no-vtable-thunk code.
8885 * call.c (build_over_call): Adjust call to build_vfn_ref.
8886 * class.c (build_vfn_ref): Lose first parameter. Remove
8887 no-vtable-thunk code.
8888 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8889 (build_vtable_entry): Remove no-vtable-thunk code.
8890
3461fba7
NS
88912001-07-20 Nathan Sidwell <nathan@codesourcery.com>
8892
8893 Remove old-abi remnants. Remove comments about old abi
838dfd8a 8894 behavior. Remove references to 'new-abi' in comments.
3461fba7
NS
8895 * cp-tree.h: Adjust comments.
8896 (vbase_offsets_in_vtable_p): Delete.
8897 (vcall_offsets_in_vtable_p): Delete.
8898 (vptrs_present_everywhere_p): Delete.
8899 (all_overridden_vfuns_in_vtables_p): Delete.
8900 (merge_primary_and_secondary_vtables_p): Delete.
8901 (TYPE_CONTAINS_VPTR_P): Adjust.
8902 (VTT_NAME_PREFIX): Remove.
8903 (CTOR_VTBL_NAME_PREFIX): Remove.
8904 (init_vbase_pointers): Remove.
8905 * class.c: Adjust coments.
8906 (build_vbase_pointer_fields): Delete.
8907 (build_vbase_pointer): Remove old-abi code.
8908 (build_secondary_vtable): Likewise.
8909 (modify_all_vtables): Likewise.
8910 (create_vtable_ptr): Likewise.
8911 (layout_class_type): Likewise.
8912 (finish_struct_1): Likewise.
8913 (finish_vtbls): Likewise.
8914 (dfs_finish_vtbls): Delete.
8915 (build_vbase_offset_vtbl_entries): Remove old-abi code.
8916 * cvt.c: Adjust comments.
8917 * decl.c: Adjust comments.
8918 * decl2.c: Adjust comments.
8919 * init.c: Adjust comments.
8920 (construct_virtual_bases): Remove old-abi code.
8921 * lang-specs.h: Remove -fno-new-abi.
8922 * mangle.c: Adjust comments.
8923 * rtti.c: Adjust comments.
8924 (get_base_offset): Remove old-abi-code.
8925 * search.c: Adjust comments.
8926 (dfs_init_vbase_pointers): Remove.
8927 (dfs_vtable_path_unmark): Remove.
8928 (init_vbase_pointers): Remove.
8929 * semantics.c: Adjust comments.
8930 (emit_associated_thunks): Remove old-abi code.
8931 * typeck.c: Adjust comments.
8932
1c432a87
DB
89332001-07-20 Daniel Berlin <dan@cgsoftware.com>
8934
8935 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8936 params.h.
8937
b7076960
MM
89382001-07-19 Mark Mitchell <mark@codesourcery.com>
8939
8940 * class.c (finish_struct_anon): Forbid nested classes.
8941
2b85879e
NB
89422001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
8943
8944 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8945 * optimize.c: Include debug.h.
8946 (maybe_clone_body): Use debug hook.
8947 * semantics.c: Include debug.h.
8948 (expand_body): Use debug hook.
8949
c60e94a7
NB
89502001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
8951
8952 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8953
dbc957f1
MM
89542001-07-18 Mark Mitchell <mark@codesourcery.com>
8955
8956 * class.c (type_requires_array_cookie): New function.
8957 (check_methods): Don't try to figure out whether the type needs a
8958 cookie here.
8959 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8960 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8961 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8962 * pt.c (instantiate_class_template): Don't set
8963 TYPE_VEC_DELETE_TAKES_SIZE.
8964 * NEWS: Document ABI changes from GCC 3.0.
57cb6d52 8965
7ba0b0f7 89662001-07-18 Xavier Delacour <xavier@fmaudio.net>,
749ced52 8967 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
7ba0b0f7
XD
8968
8969 * NEWS (Changes in GCC 3.0): Fix typo.
8970
59387d2e
JM
89712001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
8972
8973 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8974 which attributes are to be attached, and a flags argument. Update
8975 call to decl_attributes.
8976 (grokfield): Update call to decl_attributes.
8977 * class.c (finish_struct): Update call to cplus_decl_attributes.
8978 * cp-tree.h (cplus_decl_attributes): Update prototype.
8979 * decl.c (start_decl, grokdeclarator, start_function): Update
8980 calls to decl_attributes and cplus_decl_attributes.
8981 * friend.c (do_friend): Update call to cplus_decl_attributes.
8982 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8983
7ed47c04
MM
89842001-07-12 Mark Mitchell <mark@codesourcery.com>
8985
8986 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8987 for `register' variables with an asm-specification.
8988
40b18c0a
MM
89892001-07-11 Mark Mitchell <mark@codesourcery.com>
8990
8991 * semantics.c (finish_asm_stmt): Mark the output operands
8992 to an asm addressable, if necessary.
8993
517c3b80
BE
89942001-07-11 Ben Elliston <bje@redhat.com>
8995
219670f1
BE
8996 * Revert this change -- there is a subtle bug.
8997
517c3b80
BE
8998 PR c++/80
8999 * decl.c (finish_enum): New "attributes" argument; pass it to
9000 cplus_decl_attributes. Use a narrower type if the enum is packed.
9001 * cp-tree.h (finish_enum): Adjust prototype.
9002 * parse.y (enum_head): New non-terminal.
9003 (structsp): Use it. Enums now may be preceded or followed by
9004 optional attributes -- pass their chained tree to finish_enum().
9005 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
9006
2ba9c47e
MM
90072001-07-10 Mark Mitchell <mark@codesourcery.com>
9008
9009 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
9010 variables.
9011
35241192
JM
90122001-07-10 Jason Merrill <jason_merrill@redhat.com>
9013
9014 * semantics.c (cp_expand_stmt): Fix for null
9015 current_function_return_value.
9016
07167a18
JM
90172001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
9018
9019 * call.c (build_op_delete_call): Initialize fn.
9020 (convert_like_real): Delete conditional.
9021 (joust): Initialize *w and *l.
9022 * class.c: Add prototype for binfo_ctor_vtable.
9023 (get_primary_binfo): Initialize result.
9024 * init.c (build_java_class_ref): Initialize name.
ae818d3b 9025
35241192
JM
90262001-07-09 Erik Rozendaal <dlr@acm.org>
9027
ae818d3b
ER
9028 * typeck.c (unary_complex_lvalue): Do not duplicate the
9029 argument to modify, pre-, or post-increment when used as an
9030 lvalue and when the argument has side-effects.
9031
12a68f1f
JM
90322001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
9033
9034 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9035 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
9036 cplus_decl_attributes even if attrs is NULL.
9037 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
9038
f7a4cec0
JM
90392001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
9040
9041 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
9042 calls to decl_attributes.
9043
c80106a4
IR
90442001-07-06 Ira Ruben <ira@apple.com>
9045
ae818d3b 9046 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
c80106a4
IR
9047 be DECL_TEMPLATE_RESULT.
9048
dac65501
KL
90492001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9050
9051 * cp-tree.h (copy_template_template_parm): Rename to ...
9052 (bind_template_template_parm): ... here.
9053 * tree.c (copy_template_template_parm): Rename to ...
9054 (bind_template_template_parm): ... here. Remove the case when
9055 NEWARGS is NULL_TREE.
9056 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
9057 BOUND_TEMPLATE_TEMPLATE_PARM.
9058 * pt.c (lookup_template_class): Adjust.
9059
01f9e964
JM
90602001-07-05 Jason Merrill <jason_merrill@redhat.com>
9061
9062 * cvt.c (convert_lvalue): New fn.
9063 * cp-tree.h: Declare it.
9064 * method.c (do_build_assign_ref): Use it.
9065 (do_build_copy_constructor): Convert parm to base types
9066 before calling base constructors.
9067
9068 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
9069 DECL_USER_ALIGN. Check flag_elide_constructors instead of
9070 optimize.
9071 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
9072
6be77748
NS
90732001-07-02 Nathan Sidwell <nathan@codesourcery.com>
9074
9075 * optimize.c (optimize_inline_calls): New function, broken out
9076 of ...
9077 (optimize_function): ... here. Call it. Don't inline if it is
9078 a thunk.
9079 (dump_function): Print name of dump flag causing this dump.
9080 * semantics.c (expand_body): Move thunk inline check to
9081 optimize_function.
9082
8d8e52be
JM
90832001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
9084
9085 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
9086 (comptypes): Use target.comp_type_attributes.
9087
5a0db193
NS
90882001-06-29 Nathan Sidwell <nathan@codesourcery.com>
9089
9090 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
9091
46f018e1
GDR
90922001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9093
9094 * error.c (lang_print_error_function): Add a `diagnostic_context *'
9095 parameter. Tweak.
9096
501990bb
NB
90972001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9098
9099 * decl2.c (import_export_class): Update.
9100
f68fc4db
GDR
91012001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
9102
9103 * error.c (init_error): Adjust settings.
9104
9596ddd6
GDR
91052001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
9106
9107 * error.c (init_error): Adjust settings.
9108
c93586fa
RS
91092001-06-19 Richard Sandiford <rsandifo@redhat.com>
9110
9111 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
9112 return pointers to data members by reference rather than by value.
9113
0d97bf4c
JM
91142001-06-18 Jason Merrill <jason_merrill@redhat.com>
9115
9116 Implement the Named Return Value optimization.
9117 * cp-tree.h (struct cp_language_function): Add x_return_value.
9118 (current_function_return_value): Now a macro.
9119 * decl.c: Don't define it.
9120 (define_label, finish_case_label): Don't clear it.
9121 (init_decl_processing): Don't register it with GC.
9122 * semantics.c (genrtl_finish_function): Don't check it for
9123 no_return_label. Copy the RTL from the return value to
9124 current_function_return_value and walk, calling...
9125 (nullify_returns_r): ...this new fn.
9126 * typeck.c (check_return_expr): Set current_function_return_value.
9127
13de7ec4
JM
91282001-06-15 Jason Merrill <jason_merrill@redhat.com>
9129
9130 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
9131 sharing a ctor vtable with. Merge code for cases 1 and 2.
9132 (binfo_ctor_vtable): New fn.
9133 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
9134
3ea099f1
JM
91352001-06-14 Jason Merrill <jason_merrill@redhat.com>
9136
9137 * class.c (dfs_find_final_overrider): Fix logic.
9138
9139 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
9140 virtual thunk instead of non-virtual.
9141 (get_matching_virtual): Uncomment.
9142
9143 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
9144 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
9145 PARM, not ARG.
9146
87326ba8
NS
91472001-06-14 Nathan Sidwell <nathan@codesourcery.com>
9148
9149 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
9150 we've not emerged from the hierarchy of RTTI_BINFO on reaching
9151 a non-virtual base.
9152
e065a36e
MM
91532001-06-13 Mark Mitchell <mark@codesourcery.com>
9154
9155 * NEWS: Update release number.
9156
623fe76a
NS
91572001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9158
9159 PR c++/3130, c++/3131, c++/3132
9160 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
9161 * class.c (force_canonical_binfo_r): Move
9162 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
9163 virtual bases unless they're primary and what they're primary
9164 too has been moved.
9165 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
9166 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
9167 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
9168 derived binfo.
9169 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
9170 (layout_nonempty_base_or_field): Add most derived type
9171 parameter. Adjust.
9172 (layout_empty_base): Likewise.
9173 (build_base_field): Likewise.
9174 (build_base_fields): Likewise.
9175 (propagate_binfo_offsets): Add most derived type
9176 parameter. Skip non canonical virtual bases too.
9177 (dfs_set_offset_for_unshared_vbases): Don't skip primary
9178 bases. Do skip canonical bases.
9179 (layout_virtual_bases): Adjust.
9180 (layout_class_type): Adjust.
9181 (dfs_get_primary_binfo): Build list of virtual primary base
9182 candidates.
9183 (get_primary_binfo): Check that the shared virtual primary
9184 base candidate was found first.
9185 (accumulate_vtbl_inits): Don't do anything for non-vptr
9186 containing binfos. For case 1 primary virtual bases, keep
9187 checking that we've not emerged from the hierarchy of RTTI_BINFO.
9188
7bdcf888
NS
91892001-06-12 Nathan Sidwell <nathan@codesourcery.com>
9190
9191 PR c++/3089
9192 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
9193 hierarchy looking for primary bases for a ctor
9194 vtable. Recursively call oneself, if we meet our primary via
9195 this route and haven't met it yet via inheritance graph order.
9196
25b5b465
MM
91972001-06-11 Mark Mitchell <mark@codesourcery.com>
9198
9199 * lang-options.h: Emit documentation for -fno-honor-std, not
9200 -fhonor-std.
9201
eb2d0614
AO
92022001-06-10 Alexandre Oliva <aoliva@redhat.com>
9203
9204 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
9205 Don't clobber delta.
9206 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
9207
2a2b2d43
GDR
92082001-06-10 Mark Mitchell <mark@codesourcery.com>
9209 Gabriel Dos Reis <gdr@codesourcery.com>
9210
9211 * Make-lang.in (cp/call.o): Depend on diagnostic.h
9212 (cp/typeck.o): Depend on diagnostic.h
9213 (cp/typeck2.o): Depend on diagnostic.h
07167a18 9214 (cp/repo.o): Depend on dignostic.h
2a2b2d43
GDR
9215 * typeck.c: #include diagnostic.h
9216 (convert_for_initialization): Remove extern declaration for
9217 warningcount and errorcount.
9218
9219 * call.c: #include diagnostic.h
9220 (convert_like_real): Remove extern declaration for warnincount and
07167a18 9221 errorcount.
2a2b2d43
GDR
9222
9223 * repo.c: #include diagnostic.h
9224 * typeck2.c: #include diagnostic.h
9225
06d5e633
NS
92262001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9227
9228 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
9229 in previous change.
9230
9ac1bd2e
NS
92312001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9232
9233 PR c++/2929
9234 * friend.c (do_friend): Use push_decl_namespace for classes at
9235 namespace scope.
9236
85a9a0a2
NS
92372001-06-08 Nathan Sidwell <nathan@codesourcery.com>
9238 Jason Merrill <jason_merrill@redhat.com>
9239
9240 PR c++/3061
9241 * class.c (build_secondary_vtable): Use assert, rather than an error
9242 message.
9243 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
9244 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
9245 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
9246 Don't set BINFO_VTABLE for a primary virtual base.
9247
daa8df65
MM
92482001-06-07 Mark Mitchell <mark@codesourcery.com>
9249
9250 * decl.c (duplicate_decls): Update source position information
9251 when a template function is defined.
9252
37344b9b
PE
92532001-06-07 Phil Edwards <pme@sources.redhat.com>
9254
9255 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
9256
fcebb2dd
NS
92572001-06-07 Nathan Sidwell <nathan@codesourcery.com>
9258
9259 PR c++/2914
9260 * decl.c (pushtag): Don't push into a complete type's scope.
9261
d0cd8b44
JM
92622001-06-06 Jason Merrill <jason_merrill@redhat.com>
9263
9264 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
9265 (struct lang_decl_flags): Lose generate_with_vtable_p.
9266 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
9267 * class.c (copy_virtuals): Adjust.
9268 * decl2.c (mark_vtable_entries): Adjust.
9269 * method.c (make_thunk, build_vtable_entry): Adjust.
9270 * class.c (update_vtable_entry_for_fn): Only look as far as the
9271 first defining class.
07167a18 9272 (build_vtbl_initializer): Put nothing in the slot for a function only
d0cd8b44 9273 defined in a lost primary virtual base.
07167a18 9274 (add_vcall_offset_vtbl_entries_1): Use the same code for
d0cd8b44
JM
9275 the lost primary case and the normal case.
9276 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
9277 (get_vfield_offset, get_derived_offset): Lose.
9278 (dfs_find_final_overrider): Use look_for_overrides_here.
9279 (get_matching_virtual): New fn.
9280 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
9281 not BV_VCALL_INDEX.
9282 * search.c (look_for_overrides_here): Split out from...
9283 (look_for_overrides_r): Here.
9284
9285 * class.c (find_final_overrider): Return error_mark_node on error.
9286
9287 * decl2.c (key_method): #if 0 accidental change.
9288
acf97e0b
JDA
92892001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
9290
9291 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
9292 (build_over_call): Likewise.
9293 * decl.c (grokparms): Likewise.
9294 * pt.c (tsubst_decl): Likewise.
9295 * typeck.c (convert_arguments): Likewise.
9296
7e9abee9
MM
92972001-06-05 Mark Mitchell <mark@codesourcery.com>
9298
47ee8904
MM
9299 * semantics.c (begin_class_definition): Robustify.
9300
7e9abee9
MM
9301 * pt.c (instantiate_decl): Tell the repository code about the
9302 clones, not the cloned functions.
9303 * repo.c (repo_template_used): Explicitly instantiate the cloned
9304 function, not the clones.
9305
bea09693
NS
93062001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9307
9308 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
9309 ICS_BAD_FLAG on created conversion.
9310 (compare_ics): Break out rank.
9311
8f7550ca
NS
93122001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9313
9314 * decl.c (xref_tag): Remove extraneous %s on dependent name
9315 lookup warning.
9316
442e01b6
NS
93172001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9318
9319 * class.c (layout_vtable_decl): Fix off by one error on
9320 build_index_type.
9321 (build_vtt): Likewise.
9322 (build_ctor_vtbl_group): Likewise.
9323
b7442fb5
NS
93242001-06-05 Nathan Sidwell <nathan@codesourcery.com>
9325
9326 * class.c (maybe_indent_hierarchy): New function.
9327 (dump_class_hierarchy_r): Add flags. Dump extra binfo
9328 information, if enabled. Use maybe_indent_hierarchy. Adjust
9329 output format.
9330 (dump_class_hierarchy): Adjust prototype. Adjust output format.
9331 (dump_array, dump_vtable, dump_vtt): New functions.
9332 (finish_struct_1): Adjust hierarchy dumping.
9333 (initialize_vtable): Call dump_vtable.
9334 (build_vtt): Call dump_vtt.
9335 (build_ctor_vtbl_group): Call dump_vtable.
9336 * decl2.c (flag_dump_class_layout): Remove.
9337 (cxx_decode_option): Remove dump translation unit
9338 and dump class hierarchy check. Call dump_switch_p.
9339 (finish_file): Adjust dumping.
9340 (dump.c): Only dump base classes if not TDF_SLIM.
9341 Only dump namespace members if not TDF_SLIM.
9342 * optimize.c (dump_function): New function.
9343 (optimize_function): Call dump_function.
9344 * semantics.c (expand_body): Use dump_enabled_p.
9345
e5410b32
NS
93462001-06-01 Nathan Sidwell <nathan@codesourcery.com>
9347
9348 PR g++/2936
9349 Part missed from first commit
9350 * decl2.c (finish_anon_union): Copy context.
9351
e97c9488
NS
93522001-05-30 Nathan Sidwell <nathan@codesourcery.com>
9353
9354 PR g++/2936
e97c9488
NS
9355 * optimize.c (remap_decl): Remap anonymous aggregate members too.
9356
87d9ac49
NS
93572001-05-26 Nathan Sidwell <nathan@codesourcery.com>
9358
9359 PR g++/2823
9360 * semantics.c (expand_body): Don't optimize thunks.
9361
88657302
RH
93622001-05-25 Sam TH <sam@uchicago.edu>
9363
9364 * cp-tree.h lex.h: Fix header include guards.
9365
93662001-05-25 Mark Mitchell <mark@codesourcery.com>
10841285
MM
9367
9368 * decl.c (init_decl_processing): Tweak.
9369
0b1161fc
MM
93702001-05-24 Mark Mitchell <mark@codesourcery.com>
9371
9372 * decl.c (duplicate_decls): Tidy.
9373 (init_decl_processing): Always set flag_no_builtin.
9374
6f56d925
NS
93752001-05-24 Nathan Sidwell <nathan@codesourcery.com>
9376
9377 PR c++/2184
9378 * decl2.c (do_local_using_decl): Push the decls, even in a
9379 template.
9380
39e0656d
MM
93812001-05-22 Mark Mitchell <mark@codesourcery.com>
9382
9383 * optimize.c (initialize_inlined_parameters): Don't set
9384 TREE_READONLY for a VAR_DECL taking the place of an inlined
9385 PARM_DECL.
9386
0401d499
JM
93872001-05-22 Jason Merrill <jason_merrill@redhat.com>
9388
9389 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
9390 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
9391 attribute.
9392
14fc3426
JM
93932001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
9394
9395 * parse.y: Refer to compound literals as such, not as
9396 constructor-expressions.
9397
3f41ffd8
MM
93982001-05-21 Mark Mitchell <mark@codesourcery.com>
9399
9400 * call.c (build_op_delete_call): Ignore exception-specifications
9401 when looking for matching delete operators.
9402 * init.c (build_new_1): Compute whether or not the allocation
9403 function used is a placement allocation function or not, and
9404 communicate this information to build_op_delete_call.
9405
1a6025b4
JM
94062001-05-21 Jason Merrill <jason_merrill@redhat.com>
9407
90ecce3e
JM
9408 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
9409 (build_vtbl_ref): Adjust.
9410 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
9411 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
9412 Re-add vtable-gc.
9413 (unsupported_options): Correspondingly.
9414
9415 * decl2.c (maybe_make_one_only): Check flag_weak, not
9416 supports_one_only().
9417
1a6025b4
JM
9418 * cp-tree.def (START_CATCH_STMT): Lose.
9419 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
9420 * tree.c (cp_statement_code_p): Don't case it.
9421 * semantics.c (cp_expand_stmt): Likewise.
9422 * cp-tree.h (START_CATCH_TYPE): Lose.
9423 (HANDLER_TYPE): New.
9424 * except.c (expand_start_catch_block): Don't start any blocks.
9425 Return the type.
9426 (expand_end_catch_block): Don't end any blocks.
9427 * parse.y (handler): Don't pass anything from finish_handler_parms
9428 to finish_handler.
9429 * pt.c (tsubst_expr): Likewise.
9430 * semantics.c (begin_handler): Call note_level_for_catch here.
9431 (finish_handler_parms): Don't return anything.
9432 (genrtl_catch_block, begin_catch_block): Lose.
9433 (genrtl_handler): Call expand_start_catch here.
9434
94352001-05-18 Jason Merrill <jason_merrill@redhat.com>
9436
9437 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
9438 (get_vtable_decl, build_vtt): Not here.
9439
d30a825a
NS
94402001-05-20 Nathan Sidwell <nathan@codesourcery.com>
9441
9442 PR c++/2781
9443 * optimize.c (update_cloned_parm): Copy addressability and other
9444 flags.
9445
3b82c249
KL
94462001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9447
9448 * pt.c (determine_specialization): Ignore artificial functions.
9449
2a967f3d
NB
94502001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
9451
9452 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
9453 (C_RID_CODE): Remove.
9454 * lex.c (cxx_init_options): Call set_identifier_size. Update.
9455 (init_parse): Don't do it here.
9456
f99df08e
DN
94572001-05-18 Diego Novillo <dnovillo@redhat.com>
9458
9459 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
9460 function declaration to avoid stripping the symbol's attributes.
9461
2b0cbc5d
NS
94622001-05-18 Nathan Sidwell <nathan@codesourcery.com>
9463
9464 * decl.c (pushdecl): Adjust error string.
9465 (xref_tag): Adjust friend class injection warning. Remove the
9466 inherited name from the class shadowed scope.
9467
e6855a2d
MM
94682001-05-17 Mark Mitchell <mark@codesourcery.com>
9469
9470 * except.c (cp_protect_cleanup_actions): New function.
07167a18 9471 (init_exception_processing): Don't set protect_cleanup_actions
e6855a2d
MM
9472 here. Do set lang_protect_cleanup_actions.
9473
cc469ee9
NS
94742001-05-16 Nathan Sidwell <nathan@codesourcery.com>
9475
9476 * spew.c (read_token): Call yyerror on all unexpected tokens.
9477
3f0a9b35
NS
94782001-05-16 Nathan Sidwell <nathan@codesourcery.com>
9479
9480 * init.c (member_init_ok_or_else): Take a tree rather than
9481 string for name.
9482 (expand_member_init): Adjust.
9483
8d0cb60d
NC
94842001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
9485
9486 * decl.c (duplicate_decls): Suppress warning about duplicate
749ced52 9487 decls if the first decl is a friend.
8d0cb60d 9488
1f730ff7
ZW
94892001-05-12 Zack Weinberg <zackw@stanford.edu>
9490
9491 * except.c (choose_personality_routine): Export. Add
9492 explanatory comment. Take an enum languages, not a boolean.
9493 (initialize_handler_parm): Adjust to match.
9494 * cp-tree.h: Prototype choose_personality_routine.
9495 * lex.c (handle_pragma_java_exceptions): New function.
9496 (init_cp_pragma): Register #pragma GCC java_exceptions.
9497
90e0c410
NB
94982001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9499
9500 * method.c (build_mangled_C99_name): Remove unused prototype.
9501
cb7fdde2
AO
95022001-05-12 Alexandre Oliva <aoliva@redhat.com>
9503
9504 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
9505 * typeck.c (get_member_function_from_ptrfunc,
9506 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
9507 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
18ae7f63
AO
9508
9509 Reverted Geoff Keating's 2001-05-03's patch.
9510
401deb20
IR
95112001-05-11 Ira Ruben <ira@apple.com>
9512
9513 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
9514
8e93d446
NB
95152001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
9516
9517 * cp-tree.h (finish_label_expr, lookup_label): Delete.
9518 * parse.y: Update for '&&'; don't issue warning here.
9519 * semantics.c (finish_label_expr): Delete.
9520
5cdba4ff
MM
95212001-05-07 Mark Mitchell <mark@codesourcery.com>
9522
9523 * splay-tree.h (splay_tree_max): New function.
9524 (splay_tree_min): Likewise.
9525
8e9eff6b
GK
95262001-05-03 Geoffrey Keating <geoffk@redhat.com>
9527
9528 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
9529 (pfn_vflag_identifier): Define.
9530 Update comment about layout of pointer functions.
9531 (build_ptrmemfunc1): Update prototype.
9532 (expand_ptrmemfunc_cst): Update prototype.
9533 * decl.c (initialize_predefined_identifiers): Initialize
9534 pfn_vflag_identifier.
9535 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
9536 an extra field to the type.
07167a18 9537 * expr.c (cplus_expand_constant): Pass 'flag' between
8e9eff6b
GK
9538 expand_ptrmemfunc_cst and build_ptrmemfunc1.
9539 * typeck.c (get_member_function_from_ptrfunc): When
9540 FUNCTION_BOUNDARY < 16, look at additional field to determine
9541 if a pointer-to-member is a real pointer or a vtable offset.
9542 (build_ptrmemfunc1): Add new parameter to contain extra field.
9543 (build_ptrmemfunc): Pass the extra field around.
9544 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
9545 (pfn_from_ptrmemfunc): Ignore the extra field.
9546
acc72c37
MM
95472001-05-03 Mark Mitchell <mark@codesourcery.com>
9548
9549 * cp-tree.h (flag_inline_trees): Update documentation.
9550 * decl.c (init_decl_processing): Adjust handling of
9551 flag_inline_functions and flag_inline_trees to support -O3.
9552 (grokfndecl): Set DECL_INLINE on all functions if that's what
9553 the user requested.
9554 (save_function_data): Clear DECL_INLINE in
9555 current_function_cannot_inline is non-NULL.
9556 * decl2.c (flag_inline_trees): Update documentation.
9557
5158d7ee
NS
95582001-05-03 Nathan Sidwell <nathan@codesourcery.com>
9559
9560 * dump.c (cp_dump_tree, USING_STMT case): New case.
9561 * tree.c (cp_statement_code_p): Add USING_STMT.
9562 * decl2.c (do_using_directive): Add the using directive statement.
9563
9564 * tree.c (walk_tree): Reformat an if block.
9565
80f5bb34
MM
95662001-05-02 Mark Mitchell <mark@codesourcery.com>
9567
9568 * decl.c (compute_array_index_type): Don't try to do anything with
9569 the indices when processing a template.
9570
3e411c3f
KG
95712001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9572
9573 * call.c: NULL_PTR -> NULL.
9574 * class.c: Likewise.
9575 * cvt.c: Likewise.
9576 * decl.c: Likewise.
9577 * decl2.c: Likewise.
9578 * except.c: Likewise.
9579 * init.c: Likewise.
9580 * rtti.c: Likewise.
9581 * search.c: Likewise.
9582 * tree.c: Likewise.
9583 * typeck.c: Likewise.
9584 * typeck2.c: Likewise.
9585
46188dca
MM
95862001-05-02 Mark Mitchell <mark@codesourcery.com>
9587
9588 * decl2.c (do_using_directive): Revert previous patch.
9589
9da99f7d
NS
95902001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9591
9592 * cp-tree.def (USING_STMT): New statement node.
9593 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
9594 * decl2.c (do_using_directive): Add USING_STMT to statement
9595 tree. Don't emit errors when processing template decl.
9596 * pt.c (tsubst_expr, USING_STMT case): New case.
9597 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
9598
4b48a93e
NS
95992001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9600
9601 * call.c (build_new_op): Convert args from reference here.
9602 (build_conditional_expr): Don't convert here.
9603
1bcea8d7
NS
96042001-05-01 Nathan Sidwell <nathan@codesourcery.com>
9605
9606 * spew.c (last_token_id): New static variable.
9607 (read_token): Set it here.
9608 (yyerror): Use it here.
9609
d72040f5
RH
96102001-04-30 Richard Henderson <rth@redhat.com>
9611
749ced52 9612 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
d72040f5
RH
9613 * decl.c: Likewise.
9614
c3aac512
MM
96152001-04-30 Mark Mitchell <mark@codesourcery.com>
9616
9617 * gxxint.texi: Remove.
9618 * Make-lang.in: Remove all traces of gxxint.texi.
9619
d2a6f3c0 96202001-04-30 Mark P Mitchell <mark@codesourcery.com>
5fd893d5
MM
9621
9622 * decl2.c (start_static_initialization_or_destruction): Correct
9623 logic to handle the -fno-use-cxa-atexit case.
9624
d60e5448
MM
96252001-04-30 Mark Mitchell <mark@codesourcery.com>
9626
9627 * optimize.c (update_cloned_parm): New function.
9628 (maybe_clone_body): Use it. Update the `this' parameter too.
9629
7200764f
JM
96302001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
9631
9632 * decl2.c (unsupported_options): Add new-abi.
9633 * lang-options.h: Remove no longer supported options.
9634
2d46ec83
NS
96352001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9636
9637 * except.c (can_convert_eh): Don't check template parms,
9638 typename types etc.
9639
02a1a68c
NS
96402001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9641
9642 * optimize.c (maybe_clone_body): Copy parameter names and locations.
9643
5f6eeeb3
NS
96442001-04-27 Nathan Sidwell <nathan@codesourcery.com>
9645
9646 * cp-tree.h (adjust_clone_args): Prototype new function.
9647 * class.c (adjust_clone_args): New function.
9648 * decl.c (start_function): Call it for in charge ctors.
9649
1b28d441
MM
96502001-04-26 Mark Mitchell <mark@codesourcery.com>
9651
9652 * method.c (use_thunk): Make sure that thunks really are emitted
9653 when requested.
9654
0576ec13
NS
96552001-04-26 Nathan Sidwell <nathan@codesourcery.com>
9656
9657 * mangle.c (write_chars): New macro.
9658 (hwint_to_ascii): New function
9659 (write_number): Use it.
9660 (write_integer_cst): Deal with really big numbers.
9661
b96ada87
MM
96622001-04-25 Mark Mitchell <mark@codesourcery.com>
9663
9664 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
9665 the clone.
9666
6bda7a5e
NS
96672001-04-25 Nathan Sidwell <nathan@codesourcery.com>
9668
9669 * decl.c (grokdeclarator): Set context of namespace scope
9670 TYPE_DECLS.
9671
11fe225a
ZW
96722001-04-24 Zack Weinberg <zackw@stanford.edu>
9673
9674 * cp/optimize.c: Include hashtab.h.
9675 (struct inline_data): Add tree_pruner.
9676 (expand_call_inline, expand_calls_inline): Use it when calling
9677 walk_tree.
9678 (optimize_function): Initialize and free tree_pruner.
9679
0ba8a114
NS
96802001-04-24 Nathan Sidwell <nathan@codesourcery.com>
9681
9682 Lazy __FUNCTION__ generation.
9683 * cp-tree.def (FUNCTION_NAME): Remove.
9684 * cp-tree.h (function_name_declared_p): Remove.
9685 (cp_fname_init): Prototype.
9686 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9687 don't call declare_function_name. Call start_fname_decls.
9688 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9689 clobber the line number.
9690 (cp_fname_init): New function.
9691 (start_function): Call start_fname_decls.
9692 (finish_function): Call finish_fname_decls.
9693 * lex.c (reswords): Add slots for __FUNCTION__ et al.
9694 (rid_to_yy): Add mappings for __FUNCTION__ et al.
9695 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9696 * parse.y (VAR_FUNC_NAME): New token.
9697 (primary): Add VAR_FUNC_NAME.
9698 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9699 generation.
9700 (tsubst, FUNCTION_NAME case): Remove.
9701 (tsubst_copy, FUNCTION_NAME case): Remove.
9702 (tsubst_expr, DECL_STMT case): Be careful with a
9703 DECL_PRETTY_FUNCTION_P.
9704 (instantiate_decl): Remove function_name_declared_p.
9705 * semantics.c (begin_compound_statement): Don't call
9706 declare_function_name here.
9707 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9708 (finish_translation_unit): Call finish_fname_decls.
9709 (expand_body): Remove function_name_declared_p.
9710 * typeck2.c (digest_init): Allow any ERROR_MARK.
9711
dfbb4f34
NS
97122001-04-24 Nathan Sidwell <nathan@codesourcery.com>
9713
9714 * pt.c (tsubst_decl): Use VOID_TYPE_P.
9715 * semantics.c: Fix some typos.
9716
e2584c52
PE
97172001-04-23 Phil Edwards <pme@sources.redhat.com>
9718
9719 * cp/decl2.c (flag_honor_std): Always initialize to 1.
9720
d4c3ec27
KG
97212001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9722
9723 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9724
2ac8a0f9
JM
97252001-04-23 Jason Merrill <jason_merrill@redhat.com>
9726
9727 * except.c (build_throw): Wrap the initialization of the exception
9728 object in a MUST_NOT_THROW_EXPR.
9729 (do_free_exception): #if 0.
9730
968b956a
MM
97312001-04-20 Mark Mitchell <mark@codesourcery.com>
9732
9733 * cp-tree.h (finish_enum): Change prototype.
9734 * decl.c (finish_enum): Reorganize.
9735 * parse.y (structsp): Adjust calls to finish_enum.
11fe225a 9736
aa1826e2
NS
97372001-04-20 Nathan Sidwell <nathan@codesourcery.com>
9738
9739 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9740 't' case.
9741
06d9f09f
NS
97422001-04-20 Nathan Sidwell <nathan@codesourcery.com>
9743
9744 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9745 (layout_empty_base): Return at end flag.
9746 (build_base_field): Likewise.
9747 (build_base_fields): Likewise.
9748 (layout_virtual_bases): Don't add 1 to eoc value.
9749 (end_of_class): Use full size for empty bases.
9750 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9751 empty bases. Don't add 1 to eoc value. Only add trailing padding
9752 if we're an empty class with no empty bases.
9753 (dump_class_hierarchy): Dump size and alignment.
9754
351a0f00
JJ
97552001-04-20 Jakub Jelinek <jakub@redhat.com>
9756
9757 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9758 ICS_BAD_FLAG.
9759
881cae05
JJ
97602001-04-20 Jakub Jelinek <jakub@redhat.com>
9761
9762 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9763 is found, look first if name does not match the structure name.
9764
5d2ed28c
MM
97652001-04-19 Mark Mitchell <mark@codesourcery.com>
9766
9767 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9768 set.
9769 (SET_DECL_LANGUAGE): New macro.
9770 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9771 (pushdecl): Likewise.
9772 (build_library_fn_1): Likewise.
9773 (build_cp_library_fn): Likewise.
9774 (grokfndecl): Likewise.
9775 (grokvardecl): Mark `extern "C"' variables as having C linkage.
9776 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9777 * lex.c (retrofit_lang_decl): Likewise.
9778 * mangle.c (mangle_decl_string): Don't mangle the names of
9779 variables declared with C language linkage.
9780 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11fe225a 9781
41251458
JDA
97822001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
9783
9784 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9785 flag_access_control from uninitialized storage.
9786
1b4a93f7
MM
97872001-04-15 Mark Mitchell <mark@codesourcery.com>
9788
24272dc0
MM
9789 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9790 * mangle.c (write_pointer_to_member_type): Fix mangling of
9791 pointers to cv-qualified member function types.
9792
1b4a93f7
MM
9793 * init.c (build_delete): Create a SAVE_EXPR for the address if
9794 we're going to use it more than once.
9795
530ec96d
MM
97962001-04-13 Mark Mitchell <mark@codesourcery.com>
9797
9798 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9799 (expand_ptremfunc_cst): Change prototype.
9800 (delta2_from_ptrmemfunc): Remove.
9801 * expr.c (cplus_expand_constant): Adjust call to
9802 expand_ptrmemfunc_cst.
9803 * typeck.c (build_ptrmemfunc1): Simplify.
9804 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9805 results in a constant.
9806 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9807 (delta2_from_ptrmemfunc): Remove.
9808 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11fe225a 9809
ee8fc32b
JM
98102001-04-12 Jason Merrill <jason_merrill@redhat.com>
9811
9812 * cp-tree.h (decl_namespace_list): New macro.
9813 (struct saved_scope): Add decl_ns_list.
9814 * decl.c (mark_saved_scope): Mark it.
9815 * decl2.c: Lose static decl_namespace_list.
9816 (init_decl2): Don't save it.
9817
48857160
KG
98182001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9819
9820 * cp-tree.h (warn_return_type, yylex): Delete redundant
9821 declarations.
11fe225a 9822
48857160
KG
9823 * decl.c (current_class_depth, global_namespace): Likewise.
9824
9825 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9826
9827 * repo.c (flag_use_repository): Likewise.
9828
845e14ed
KG
98292001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9830
9831 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9832 set_block, pushdecl, getdecls, gettags, init_decl_processing,
9833 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9834 lvalue_or_else, print_lang_statistics, comp_target_types,
9835 unsigned_type, signed_type, signed_or_unsigned_type,
9836 build_function_call, mark_addressable, incomplete_type_error):
9837 Delete redundant declarations.
9838
1951a1b6
JM
98392001-04-11 Jason Merrill <jason_merrill@redhat.com>
9840
9841 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9842 (TYPE_ANONYMOUS_P): New macro.
9843 (TAGGED_TYPE_P): New macro.
9844 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9845 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9846 * tree.c (no_linkage_helper): Likewise.
9847 * semantics.c (begin_class_definition): Likewise.
9848 * pt.c (convert_template_argument): Likewise.
9849 * lex.c (check_for_missing_semicolon): Likewise.
9850
0fb3018c
NS
98512001-04-12 Nathan Sidwell <nathan@codesourcery.com>
9852
9853 * class.c (dfs_unshared_virtual_bases): New function.
9854 (mark_primary_bases): Call it.
9855 (check_bases): Ignore virtual bases when determining
9856 nearly-emptiness.
9857
bbb53468
NS
98582001-04-12 Nathan Sidwell <nathan@codesourcery.com>
9859
9860 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9861
9b7949d5
MM
98622001-04-11 Mark Mitchell <mark@codesourcery.com>
9863
9864 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9865 cloned function to the clone.
9866
d6684bc8
KG
98672001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9868
9869 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9870
9871 * semantics.c: Include expr.h.
9872
a2095778
NS
98732001-04-11 Nathan Sidwell <nathan@codesourcery.com>
9874
9875 * method.c (implicitly_declare_fn): Commonize code for copy ctor
9876 and assignment op. Set TREE_USED for parameter.
9877
78b45a24
MM
98782001-04-10 Mark Mitchell <mark@codesourcery.com>
9879
9880 * class.c (find_final_overrider_data): Add `candidates'.
9881 (dfs_find_final_overrider): Don't issue error messages
9882 prematurely.
9883 (find_final_overrider): Issue error messages here.
9884 (build_base_field): Don't warn about amgibuous direct bases here.
9885 (warn_about_ambiguous_direct_bases): New function.
9886 (layout_class_type): Use it.
9887
0450d74d
RH
98882001-04-10 Richard Henderson <rth@redhat.com>
9889
9890 * typeck.c (build_array_ref): Push the array reference inside
9891 COMPOUND_EXPR and COND_EXPR.
9892
79065db2
MM
98932001-04-05 Mark Mitchell <mark@codesourcery.com>
9894
9895 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9896 * decl.c (duplicate_decls): Adjust accordingly.
9897 (maybe_commonize_var): Likewise.
9898 (grokfndecl): Likewise.
9899 (start_function): Likewise.
9900 (start_method): Likewise.
9901 * decl2.c (key_method): Likewise.
9902 (import_export_decl): Likewise.
9903 * method.c (implicitly_declare_fn): Likewise.
9904 * optimize.c (maybe_clone_body): Likewise.
11fe225a 9905
fdecbf8a
BK
99062001-04-05 Benjamin Kosnik <bkoz@redhat.com>
9907
b03eced6 9908 * lang-specs.h: Add __DEPRECATED.
fdecbf8a 9909
d2a6f3c0 99102001-04-05 J"orn Rennecke <amylaar@redhat.com>
0b4c1646
R
9911
9912 * search.c (get_dynamic_cast_base_type): When building a new
9913 constant, set its type to ssizetype.
9914
e59d6709
JJ
99152001-04-04 Jakub Jelinek <jakub@redhat.com>
9916
9917 * optimize.c (expand_call_inline): Only add newly inlined statements
9918 into inlined_stmts.
9919
0c918ce5
MM
99202001-04-03 Mark Mitchell <mark@codesourcery.com>
9921
9922 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9923 (OPERATOR_FORMAT): Likewise.
9924 (OPERATOR_TYPENAME_FORMAT): Likewise.
9925 * operators.def: Remove old name-mangling information.
9926 * decl.c (grok_op_properties): Adjust accordingly.
9927 * lex.c (init_operators): Likewise.
9928 * rtti.c (get_tinfo_decl): Issue error messages about types that
9929 have variable size.
9930
92788413
MM
99312001-04-03 Mark Mitchell <mark@codesourcery.com>
9932
11fe225a 9933 * decl2.c (import_export_decl): Don't call import_export_class
92788413
MM
9934 when processing an inline member function.
9935 * semantics.c (expand_body): Call import_export_decl before
9936 emitting inline functions.
9937
52a11cbf
RH
99382001-03-28 Richard Henderson <rth@redhat.com>
9939
9940 IA-64 ABI Exception Handling:
9941 * cp-tree.def (EH_SPEC_BLOCK): New.
9942 (MUST_NOT_THROW_EXPR): New.
9943 * cp-tree.h: Update changed function declarations.
9944 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9945 (CPTI_CALL_UNEXPECTED): New.
9946 (struct cp_language_function): Rename x_eh_spec_try_block
9947 to x_eh_spec_block.
9948 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11fe225a 9949 * decl.c (current_binding_level): If no current function
52a11cbf
RH
9950 bindings, revert to scope_chain.
9951 (initialize_predefined_identifiers): Remove __cp_push_exception.
9952 (store_parm_decls): Use begin_eh_spec_block.
9953 (finish_function): Use finish_eh_spec_block.
9954 (mark_lang_function): Update for name changes.
9955 * decl2.c (finish_file): No mark_all_runtime_matches.
9956 * dump.c (cp_dump_tree): Handle new tree codes.
9957 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9958 * except.c (catch_language_init, catch_language): Remove.
9959 (init_exception_processing): Don't set language code.
9960 Initialize call_unexpected_node, protect_cleanup_actions,
9961 eh_personality_libfunc, lang_eh_runtime_type.
9962 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9963 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9964 (prepare_eh_type): Split out type canonicalizations ...
9965 (build_eh_type_type): ... from here.
9966 (build_eh_type_type_ref): Remove.
9967 (mark_all_runtime_matches): Remove.
9968 (build_exc_ptr): New.
9969 (do_begin_catch, do_end_catch): New.
9970 (do_pop_exception): Remove.
9971 (build_terminate_handler): Remove.
9972 (choose_personality_routine): Split out language choice from ...
9973 (initialize_handler_parm): ... here.
9974 Use MUST_NOT_THROW_EXPR.
9975 (expand_start_catch_block): Use do_begin_catch. Simplify Java
9976 exception object handling.
9977 (expand_start_eh_spec, expand_end_eh_spec): Remove.
9978 (expand_exception_blocks, alloc_eh_object): Remove.
9979 (begin_eh_spec_block, finish_eh_spec_block): New.
9980 (do_allocate_exception, do_free_exception): New.
9981 (expand_throw): Merge into ...
9982 (build_throw): ... here. Update for abi.
9983 * expr.c (cplus_expand_expr): No expand_internal_throw.
9984 Handle MUST_NOT_THROW_EXPR.
9985 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9986 * semantics.c (*) Update for except.h name changes.
9987 (genrtl_try_block): No protect_with_terminate.
9988 (genrtl_eh_spec_block): New.
9989 (genrtl_handler): Don't emit the goto here.
9990 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9991 (genrtl_finish_function): Don't expand_exception_blocks.
9992 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9993
826840d9
RH
99942001-03-28 Richard Henderson <rth@redhat.com>
9995
9996 * decl.c (struct named_label_list): Rename eh_region to
9997 in_try_scope, add in_catch_scope.
9998 (struct binding_level): Rename eh_region to is_try_scope,
9999 add is_catch_scope.
10000 (note_level_for_try): Rename from note_level_for_eh.
10001 (note_level_for_catch): New.
10002 (poplevel): Copy both is_try_scope and is_catch_scope to
10003 the named_label_list struct.
10004 (check_previous_goto_1): Don't check for catch block via
10005 DECL_ARTIFICIAL; use in_try_scope instead.
10006 (check_goto): Likewise.
10007 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
10008 * except.c (expand_start_catch_block): Call note_level_for_catch.
10009 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
10010
531073e7
RH
100112001-03-27 Richard Henderson <rth@redhat.com>
10012
10013 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
10014 exceptions_via_longjmp.
10015
8653a2c3
PE
100162001-03-27 Phil Edwards <pme@sources.redhat.com>
10017
10018 * pt.c (check_default_tmpl_args): Make error messages clearer.
10019
100202001-03-26 Phil Edwards <pme@sources.redhat.com>
10021
10022 * error.c: Also undefine 'A' macro used for cp_printers definition.
10023
911e6107
KG
100242001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10025
10026 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10027
005a5cb0
MY
100282001-03-26 Mike Yang <yang@research.att.com>
10029 Mark Mitchell <mark@codesourcery.com>
10030
10031 * dump.c (dump_access): New function.
10032 (cp_dump_tree): Use it. Dump basetype information for class
10033 types.
10034
b850de4f
MM
100352001-03-26 Mark Mitchell <mark@codesourcery.com>
10036
10037 * Makefile.in (optimize.o): Depend on params.h.
10038 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
10039 (init_decl_processing): Set flag_no_inline when doing
10040 inlining-on-trees.
10041 * optimize.c: Include params.h.
10042 (struct inline_data): Improve documentation of FNS. Add
10043 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
10044 (INSNS_PER_STMT): New macro.
10045 (remap_block): Use CLONING_P.
10046 (inlinable_function_p): Don't inline big functions.
10047 (expand_call_inline): Keep track of how much inlining we've done.
10048 (optimize_function): Set FIRST_INLINED_FN.
10049 (maybe_clone_body): Set CLONING_P.
10050 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
10051 tree nodes.
10052 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
10053 rest_of_compilation. Clear DECL_RTL for local variables
10054 afterwards.
10055 (clear_decl_rtl): New function.
11fe225a 10056
788bf0e3
NS
100572001-03-26 Nathan Sidwell <nathan@codesourcery.com>
10058
10059 Implement DR 209
10060 * cp-tree.h (skip_type_access_control,
10061 reset_type_access_control): Prototype.
10062 * decl.c (grokdeclarator): Access of friends is not checked.
10063 * parse.y (component_decl_list): Reset type access control.
10064 * semantics.c (decl_type_access_control): Clear
10065 current_type_lookups.
10066 (save_type_access_control): Don't save if not deferring.
10067 (skip_type_access_control, reset_type_access_control): New
10068 functions.
10069 (begin_class_definition): Do type access control for basetypes.
10070 Start deferred access control.
10071 (finish_class_definition): Resume immediate access control if
10072 this is a local class.
10073
730e1556
KG
100742001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10075
10076 * class.c (add_method): Use memcpy/memmove, not bcopy.
10077
10078 * decl.c (duplicate_decls): Likewise.
10079
f1a0345c
JJ
100802001-03-23 Jakub Jelinek <jakub@redhat.com>
10081
10082 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
10083 not `_'.
10084
8e4ce833
JJ
100852001-03-23 Jakub Jelinek <jakub@redhat.com>
10086
10087 * decl.c (local_names): Define.
10088 (push_local_name): New.
10089 (grok_reference_init): Return init if initializing static reference
10090 variable with non-constant instead of emitting it.
10091 Move expand_static_init call to cp_finish_decl.
10092 (layout_var_decl): Call push_local_name.
10093 (maybe_commonize_var): Allow inlining functions even if they have
10094 static local variables, use comdat_linkage for them if flag_weak.
10095 (check_initializer): Call obscure_complex_init if
838dfd8a 10096 grok_reference_init returned nonzero.
8e4ce833
JJ
10097 (save_function_data): Clear x_local_names.
10098 (pop_cp_function_context): Free x_local_names.
10099 (mark_inlined_fns): Remove.
10100 (mark_lang_function): Mark x_local_names.
10101 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
10102 Mark inlined_fns as tree, remove call to mark_inlined_fns.
10103 * class.c (alter_access): Ensure DECL_ACCESS is never set if
10104 DECL_DISCRIMINATOR_P.
10105 * cp-tree.h (cp_language_function): Add x_local_names.
10106 (lang_decl_flags): Add discriminator into u2.
10107 (lang_decl_inlined_fns): Remove.
10108 (lang_decl): inlined_fns is now a TREE_VEC.
10109 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
10110 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
10111 TREE_VEC, not a custom structure.
10112 (optimize_function): Likewise.
10113 * mangle.c (discriminator_for_local_entity): Discriminate among
10114 VAR_DECL local entities.
10115 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
10116 is not valid.
10117
60c87482
BM
101182001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
10119
10120 Add support for Java interface method calls.
10121 * cp-tree.h (struct lang_type): Add java_interface flag.
10122 (TYPE_JAVA_INTERFACE): New macro.
10123 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
10124 by setting TYPE_JAVA_INTERFACE.
10125 * call.c (java_iface_lookup_fn): New static.
11fe225a 10126 (build_over_call): If calling a method declared in a
60c87482
BM
10127 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
10128 expression which resolves the function address.
10129 (build_java_interface_fn_ref): New function.
10130
94c7f30b
RH
101312001-03-22 Richard Henderson <rth@redhat.com>
10132
10133 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
10134 * except.c: Don't include it.
10135
fd8b7a0e 101362001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
826840d9 10137 based on an idea from Joe Buck <jbuck@synopsys.com>
fd8b7a0e
GP
10138
10139 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
10140 New nonterminals.
10141 (data_def, component_decl): Add reductions to bad_decl.
10142
a1c2b86d
JJ
101432001-03-22 Jakub Jelinek <jakub@redhat.com>
10144
10145 * method.c (do_build_assign_ref): Don't use build_modify_expr for
10146 anonymous aggregates, since they don't have assignment operator
10147 method.
10148 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
10149 assignment operators for anonymous structure fields.
10150
46ccf50a
JM
101512001-03-21 Jason Merrill <jason@redhat.com>
10152
10153 * pt.c (instantiate_decl): Abort if we see a member constant
10154 instantiation that doesn't already have its initializer.
10155 Downgrade explicit instantiation without definition to pedwarn.
10156
10157 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
10158 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
10159 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
10160
10161 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
10162 (pending_vtables): Remove.
10163 * decl2.c (pending_vtables): Remove.
10164 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
10165 CLASSTYPE_VTABLE_NEEDS_WRITING.
10166 (import_export_class): Likewise.
10167 (init_decl2): Don't mark pending_vtables.
10168 * lex.c (handle_pragma_vtable): Just sorry.
10169 * pt.c (instantiate_class_template): Don't mess with
10170 CLASSTYPE_VTABLE_NEEDS_WRITING.
10171 (mark_class_instantiated): Likewise.
10172 * ptree.c (print_lang_type): Don't print it.
10173 * semantics.c (begin_class_definition): Don't set it.
10174
10175 * pt.c (template_tail): Replace with last_pending_template.
10176 (maybe_templates, maybe_template_tail): Remove.
10177 (add_pending_template): Adjust.
10178 (instantiate_pending_templates): Adjust.
10179
10180 * cp-tree.h (struct saved_scope): Remove lang_stack field.
10181 (current_lang_stack): Remove.
10182 * decl.c (maybe_push_to_top_level): Don't initialize it.
10183 (duplicate_decls): Use current_lang_depth.
10184 (xref_basetypes): Likewise.
10185 * class.c (current_lang_depth): New fn.
10186 (push_lang_context): Use more varray functionality.
10187 (pop_lang_context): Likewise.
64d9c3fe
JM
10188
10189 * error.c (GLOBAL_THING): Always use '__'.
10190
1c06710a
MM
101912001-03-21 Mark Mitchell <mark@codesourcery.com>
10192
71cb9286
MM
10193 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
10194
1c06710a
MM
10195 * mangle.c (mangle_decl_string): Mangle the names of overloaded
10196 operators, even when they have `extern "C"' linkage.
10197
92643fea
MM
101982001-03-19 Mark Mitchell <mark@codesourcery.com>
10199
10200 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
10201 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10202 where it's not necessary.
10203 (add_method): Remove optimization involving comparison of
10204 DECL_ASSEMBLER_NAME.
10205 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
10206 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10207 where it's not necessary.
10208 (check_methods): Likewise.
10209 (build_clone): Likewise.
10210 (built_vtt): Likewise.
10211 * cp-tree.h (DECL_NEEDED_P): Likewise.
10212 * decl.c (pushtag): Likewise.
10213 (duplicate_decls): Likewise.
10214 (pushdecl): Likewise.
10215 (builtin_function): Likewise.
10216 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
10217 (build_cp_library_fn): Likewise.
10218 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
10219 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10220 where it's not necessary.
10221 (make_rtl_for_nonlocal_decl): Likewise.
10222 (cp_finish_decl): Likewise.
10223 (grokfndecl): Likewise.
10224 (grokvardecl): Likewise.
10225 (grokdeclarator): Likewise.
10226 (start_function): Likewise.
10227 (cp_missing_return_ok_p): Likewise.
10228 * decl2.c (grokclassfn): Likewise.
10229 (check_classfn): Likewise.
10230 (finish_static_data_member_decl): Likewise.
10231 (grokfield): Likewise.
10232 * error.c (GLOBAL_IORD_P): Remove.
10233 (dump_global_iord): Improve output.
10234 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
10235 * except.c (nothrow_libfn_p): Summarily reject any function not in
10236 namespace-scope.
10237 * init.c (build_java_class_ref): Don't explicitly set
10238 DECL_ASSEMBLER_NAME after calling mangle_decl.
10239 * mangle.c (mangle_decl_string): Handle extern "C" functions.
10240 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
10241 * method.c (set_mangled_name_for_decl): Don't explicitly set
10242 DECL_ASSEMBLER_NAME after calling mangle_decl.
10243 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
10244 IDENTIFIER_GLOBAL_VALUE for the thunk.
10245 * pt.c (set_mangled_name_for_template_decl): Remove.
10246 (check_explicit_specialization): Don't use it.
10247 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
10248 (tsubst_friend_function): Likewise.
10249 (tsubst_decl): Likewise.
10250 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
10251 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
10252 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
10253 where it's not necessary.
10254 (tinfo_base_init): Likewise.
10255 (create_real_tinfo_var): Likewise.
10256 * search.c (looup_field_1): Likewise.
10257 * semantics.c (finish_named_return_value): Likewise.
10258 * tree.c (init_tree): Set lang_set_decl_assembler_name.
11fe225a 10259
d064d75a
GDR
102602001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
10261
10262 Correct semantics restrictions checking in throw-expression.
10263 * except.c (is_admissible_throw_operand): New function.
10264 (build_throw): Use it.
10265
a3eab619
MM
102662001-03-14 Mark Mitchell <mark@codesourcery.com>
10267
10268 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
10269 and its ilk.
10270
19e7881c
MM
102712001-03-14 Mark Mitchell <mark@codesourcery.com>
10272
10273 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10274 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
10275 * decl.c (duplicate_decls): Likewise.
10276 (builtin_function): Likewise.
10277 (build_library_fn): Likewise.
10278 (build_cp_library_fn): Likewise.
10279 (check_initializer): Likewise.
10280 (cp_finish_decl): Likewise.
10281 * decl2.c (grokfield): Likewise.
10282 (grok_function_init): Remove #if 0'd code.
10283 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10284 * friend.c (do_friend): Likewise.
10285 * init.c (get_temp_regvar): Likewise.
10286 * method.c (make_thunk): Likewise.
10287 * pt.c (tsubst_friend_function): Likewise.
10288 (tsubst_decl): Likewise.
10289 (regenerate_decl_from_template): Likewise.
10290 * semantics.c (genrtl_named_return_value): Likewise.
10291 (expand_body): Likewise.
10292 (genrtl_finish_function): Likewise.
10293 * tree.c (cp_tree_equal): Likewise.
11fe225a 10294
78fe06c2
NS
102952001-03-12 Nathan Sidwell <nathan@codesourcery.com>
10296
10297 * call.c (convert_like_real): Add extra semantics to INNER
10298 parameter. Don't convert to temporary if a user conversion
10299 gives us an lvalue that we're about to bind to a reference.
10300 Set INNER to indicate pending reference binding on recursive
10301 calls.
10302
b3e68a79
NB
103032001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
10304
10305 * cp/lex.c: Delete duplicate pending_lang_change.
10306
103072001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
10308
10309 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
10310 Similarly.
10311 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
10312 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
10313
11642c3a
ZW
103142001-03-09 Zack Weinberg <zackw@stanford.edu>
10315
10316 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
10317
bb6852eb 103182001-03-08 Stan Shebs <shebs@apple.com>
f7687817
SS
10319
10320 * cp-tree.h (set_identifier_local_value): Remove unused decl.
10321
cc937581
ZW
103222001-03-06 Zack Weinberg <zackw@stanford.edu>
10323
10324 * spew.c: Remove references to CPP_OSTRING.
10325
d1188d91
AH
103262001-03-06 Andrew Haley <aph@redhat.com>
10327
10328 * typeck.c (convert_arguments): Check that we have an fndecl.
10329
4eaf1d5b
AH
103302001-03-05 Andrew Haley <aph@redhat.com>
10331
10332 * typeck.c (convert_arguments): Don't do ellipsis conversion for
10333 __built_in_constant_p.
10334
7eeb553c
NS
103352001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10336
10337 * typeck.c (build_static_cast): Allow enum to enum conversions
10338 as per DR 128.
10339
d282fcb2
NS
103402001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10341
10342 * class.c (check_field_decls): Pointers to member do not a
10343 non-pod struct make, as per DR 148.
10344
f86fdf68
NS
103452001-03-02 Nathan Sidwell <nathan@codesourcery.com>
10346
10347 * call.c (joust): cp_pedwarn when using gnu extension concerning
10348 worst conversion sequences.
10349
d6edb99e
ZW
103502001-03-01 Zack Weinberg <zackw@stanford.edu>
10351
10352 * decl.c: Replace all uses of 'boolean' with 'bool'.
10353
f7143427
ZW
103542001-03-01 Zack Weinberg <zackw@stanford.edu>
10355
10356 * lang-specs.h: Add zero initializer for cpp_spec field to
10357 all array elements that need one. Don't put an #ifdef inside
10358 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
10359 use it.
10360
fbfe8c9e
NS
103612001-03-01 Nathan Sidwell <nathan@codesourcery.com>
10362
10363 Implement using decls inside template functions.
10364 * decl2.c (validate_nonmember_using_decl): Don't special case
10365 fake_std_node in the global namespace. Don't reject early when
10366 processing a template.
10367 (do_local_using_decl): Add to statement tree. Don't do further
10368 processing when building a template.
10369 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
10370
4d24a889
NS
103712001-03-01 Nathan Sidwell <nathan@codesourcery.com>
10372
10373 * decl2.c (do_nonmember_using_decl): Don't complain if we find
10374 same function. Do complain about ambiguating extern "C"
10375 declarations.
10376
e5844e6d
NS
103772001-02-28 Nathan Sidwell <nathan@codesourcery.com>
10378
10379 Remove floating point and complex type template constant parms.
10380 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
10381 COMPLEX_TYPE extensions.
10382 (invalid_nontype_parm_type_p): Likewise.
10383
788f238c
JO
103842001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
10385
10386 * except.c (call_eh_info): Revert "match_function"'s type.
10387
73ea87d7
NS
103882001-02-27 Nathan Sidwell <nathan@codesourcery.com>
10389
10390 Fix ctor vtable vcall offsets.
10391 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
10392 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
10393 (get_matching_base): Remove.
10394 (get_original_base): New function.
11fe225a 10395 (build_vtbl_initializer): Initialize vid.rtti_binfo.
73ea87d7
NS
10396 Use a virtual thunk for a ctor vtable with an index
10397 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
10398 primary base within a constructor vtable. Only set
10399 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
10400 when primary base has been lost.
10401 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
10402
fe730161
JO
104032001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
10404
10405 * call.c (joust): Ensure more_specialized()'s argument length
10406 parameter has correct value for constructors.
10407
e5dd4aad
NS
104082001-02-26 Nathan Sidwell <nathan@codesourcery.com>
10409
10410 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11fe225a 10411
e5dd4aad
NS
10412 * decl.c (mark_inlined_fns): Prototype.
10413
25200ab2
MM
104142001-02-22 Mark Mitchell <mark@codesourcery.com>
10415
10416 * spew.c (yylex): Correct handling of friends.
10417
f58c04ac
MM
104182001-02-22 Mark Mitchell <mark@codesourcery.com>
10419
10420 * mangle.c (write_encoding): Pass write_function_type the
10421 FUNCTION_DECL for the function being encoded.
10422 (write_function_type): Pass it along to write_bare_function_type.
10423 (write_bare_function_type): Pass it along to write_method_parms.
10424 (write_method_parms): Don't mangle the compiler-generated
10425 parameters to a constructor or destructor.
10426
9c96f3f8
AJ
104272001-02-22 Andreas Jaeger <aj@suse.de>
10428
10429 * optimize.c: Include toplev.h for
10430 note_deferral_of_defined_inline_function prototype.
10431
b3bae5e2
JJ
104322001-02-22 Jakub Jelinek <jakub@redhat.com>
10433
10434 * cp-tree.h (struct lang_decl_inlined_fns): New.
10435 (struct lang_decls): Add inlined_fns.
10436 (DECL_INLINED_FNS): New macro.
10437 * optimize.c (struct inline_data): Add inlined_fns.
10438 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
10439 (inlinable_function_p): Likewise, fix typo in comment,
10440 function is not inlinable if it already inlined function currently
10441 being optimized.
306ef644 10442 (expand_call_inline): Add fn to inlined_fns if necessary.
b3bae5e2
JJ
10443 (optimize_function): Initialize inlined_fns.
10444 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
10445 * decl.c (mark_inlined_fns): New function.
10446 (lang_mark_tree): Call it.
10447
5daf7c0a
JM
104482001-02-21 Jason Merrill <jason@redhat.com>
10449
10450 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
10451 (DECL_UNINLINABLE): Move to middle-end.
10452
10453 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
10454 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
10455 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
10456 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
10457 parms and outer BLOCK. note_deferral_of_defined_inline_function.
10458
10459 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
10460 second parm of op=.
10461
2c0fc02d
MM
104622001-02-19 Mark Mitchell <mark@codesourcery.com>
10463
10464 * decl2.c (set_decl_namespace): Allow explicit instantiations in
10465 any namespace.
10466
612164eb
KL
104672001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10468
10469 * optimize.c (expand_call_inline): Don't walk subtrees of type
10470 nodes.
10471
69a59a49
MM
104722001-02-18 Mark Mitchell <mark@codesourcery.com>
10473
10474 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
10475 for a destructor.
10476
e0fff4b3
JM
104772001-02-18 Jason Merrill <jason@redhat.com>
10478
10479 Do put the VTT parameter in DECL_ARGUMENTS.
10480 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
10481 (current_vtt_parm): New macro.
10482 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
10483 (DECL_HAS_VTT_PARM_P): New macro.
10484 (DECL_VTT_PARM): Remove.
10485 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
10486 * decl.c (duplicate_decls): Only copy the operator code if
10487 appropriate.
10488 (start_function): Set current_vtt_parm.
10489 (lang_mark_tree): Don't mark vtt_parm.
9c96f3f8 10490 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
e0fff4b3
JM
10491 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
10492 * class.c (build_clone): Maybe remove the VTT parm.
10493 * optimize.c (maybe_clone_body): Set up the VTT parm.
10494 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
10495 * call.c (build_over_call): Just allow the VTT arg.
10496 * method.c (make_thunk): Don't set DECL_VTT_PARM.
10497 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
10498 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
10499 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
10500 * error.c (dump_function_decl): Likewise.
10501 * call.c (build_user_type_conversion_1, convert_like_real): Abort
10502 if we try to call a constructor with in-charge or VTT parms.
10503 * method.c (skip_artificial_parms_for): New fn.
10504 * call.c (add_function_candidate, build_over_call): Call it.
10505 * call.c (build_new_method_call): Use current_vtt_parm.
10506 * init.c (expand_virtual_init): Likewise.
10507 * class.c (same_signature_p): No longer static.
10508 * cp-tree.h: Declare it.
10509 * search.c (look_for_overrides_r): Use it.
10510
c750255c
MM
105112001-02-17 Mark Mitchell <mark@codesourcery.com>
10512
8fa33dfa
MM
10513 * cp-tree.h (new_abi_rtti_p): Remove.
10514 (name_mangling_version): Likewise.
10515 (flag_do_squangling): Likewise.
10516 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
10517 * decl.c (grokfndecl): Likewise.
10518 * decl2.c (name_mangling_version): Remove.
10519 (flag_do_squangling): Likewise.
10520 (lang_f_options): Remove `squangle'.
10521 (unsupported_options): Add `squangle'.
10522 (cxx_decode_option): Issue a warning about uses of
10523 -fname-mangling-version.
10524 (finish_file): Remove old ABI support.
10525 * pt.c (check_explicit_specialization): Likewise.
10526 (tsubst_decl): Likewise.
10527 * rtti.c (init_rtti_processing): Likewise.
10528 (build_headof): Likewise.
10529 (get_tinfo_decl_dynamic): Likewise.
10530 (tinfo_from_decl): Likewise.
10531 (build_dynamic_cast_1): Likewise.
10532 (synthesize_tinfo_var): Likewise.
12fa82db
MM
10533 * init.c (build_new): Allow enumeration types for the array-bounds
10534 in a direct-new-declarator.
10535
10536 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
10537
c750255c
MM
10538 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
10539 TREE_PROTECTED from the template being specialized.
10540
a714e5c5
JM
105412001-02-17 Jason Merrill <jason@redhat.com>
10542
10543 * decl2.c (build_artificial_parm): Set TREE_READONLY.
10544
9c96f3f8 10545 * decl.c (bad_specifiers): Allow throw specs on things with
a714e5c5
JM
10546 pointer-to-function or -member-function type.
10547 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
10548 a pmf.
10549
8084b91e
MM
105502001-02-17 Mark Mitchell <mark@codesourcery.com>
10551
10552 * call.c (check_dtor_name): Handle template names correctly.
10553
48f22ed2
JM
105542001-02-16 Jason Merrill <jason@redhat.com>
10555
10556 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
10557 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
10558 * optimize.c (maybe_clone_body): Don't substitute it.
10559 * call.c (build_new_method_call): Check in_chrg instead.
10560 * init.c (expand_virtual_init): Likewise.
10561
e8186ecf
GDR
105622001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
10563
10564 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
10565 class-type introduces at least a type-name.
10566
2c1be322
JJ
105672001-02-16 Jakub Jelinek <jakub@redhat.com>
10568
10569 * call.c (convert_like_real): Create a temporary for non-lvalue.
10570
aab8454a
JO
105712001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
10572
10573 * cp-tree.h: Fix typos in comments.
10574
a901fa64
JM
105752001-02-16 Jason Merrill <jason@redhat.com>
10576
10577 * optimize.c (remap_block): If we're compiling a clone, pass the
10578 new block to insert_block.
10579
8853373c
MM
105802001-02-16 Mark Mitchell <mark@codesourcery.com>
10581
10582 * semantics.c (finish_asm_stmt): Robustify.
10583
b60ecc04
MM
105842001-02-15 Mark Mitchell <mark@codesourcery.com>
10585
10586 * pt.c (push_template_decl_real): Don't remangle the name of a
10587 class template.
10588
e658449e
JM
105892001-02-15 Jim Meyering <meyering@lucent.com>
10590
fd48c9b5
DD
10591 * Make-lang.in (c++.install-common): Depend on installdirs.
10592 (c++.install-info): Likewise.
10593 (c++.install-man): Likewise.
e658449e 10594
f1a3f197
MM
105952001-02-15 Mark Mitchell <mark@codesourcery.com>
10596
10597 * typeck2.c (build_m_component_ref): Robustify.
10598
8826b15b
AO
105992001-02-15 Alexandre Oliva <aoliva@redhat.com>
10600
10601 * friend.c (do_friend): Don't take the nested [template] class
10602 into account when deciding whether to warn about the friend
10603 function not referring to a template function.
10604
7161c1a5
JJ
106052001-02-14 Jakub Jelinek <jakub@redhat.com>
10606
10607 * typeck.c (build_unary_op): Clarify error message.
10608
4806765e
AH
106092001-02-08 Aldy Hernandez <aldyh@redhat.com>
10610
a901fa64
JM
10611 * parse.y (component_constructor_declarator): allow optional
10612 parentheses around constructor class name.
4806765e 10613
bfc8e1e2
NS
106142001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10615
10616 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
10617 section.
10618 * init.c (emit_base_init): Remove incorrect comment about
10619 virtual bases.
10620 * method.c (make_thunk): Fix comment alignment.
10621
394fd776
NS
106222001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10623
10624 Kill remnants of this is variable.
10625 * cp-tree.h (flag_this_is_variable): Remove.
10626 * decl2.c (flag_this_is_variable): Remove.
10627 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
10628 (build_vbase_path): The path is non-static, even in a cdtor.
10629 (resolves_to_fixed_type_p): Add additional return value.
10630 * search.c (init_vbase_pointers): Adjust.
10631 * tree.c (lvalue_p_1): Adjust.
10632 * typeck.c (mark_addressable): Adjust.
10633
d0ab7624
NS
106342001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10635
10636 * pt.c (unify): Don't check cv quals of array types.
10637
7773899b
NS
106382001-02-14 Nathan Sidwell <nathan@codesourcery.com>
10639
10640 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
10641 check whether we already have the type.
10642
52682a1b
MM
106432001-02-13 Mark Mitchell <mark@codesourcery.com>
10644
10645 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
10646 * call.c (build_op_delete_call): Simplify to remove duplicate
10647 code.
10648 * class.c (clone_function_decl): Don't build the deleting variant
10649 of a non-virtual destructor.
10650 * decl.c (finish_destructor_body): Don't call delete if this is a
10651 non-virtual destructor.
10652 * init.c (build_delete): Explicitly call `operator delete' when
10653 deleting an object with a non-virtual destructor.
9c96f3f8 10654
3b6bd115
JM
106552001-02-13 Jason Merrill <jason@redhat.com>
10656
10657 * lang-specs.h: Add more __EXCEPTIONS.
10658
45abaea8
NS
106592001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10660
10661 * typeck2.c (process_init_constructor): Check
10662 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
10663
996065b4
NS
106642001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10665
10666 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
10667 Remove spurious information in comment. Allow further
10668 adjustments of REFERENCE_TYPE args.
10669
82c18d5c
NS
106702001-02-12 Nathan Sidwell <nathan@codesourcery.com>
10671
10672 * errfn.c (cp_deprecated): Tweak diagnostic text.
10673 * parse.y (new_initializer): Deprecate initializer lists
10674 extension.
10675
1f84ec23
MM
106762001-02-12 Mark Mitchell <mark@codesourcery.com>
10677
10678 Remove old ABI support.
10679
8c310e3f
MM
106802001-02-11 Mark Mitchell <mark@codesourcery.com>
10681
b1012f1b
MM
10682 * decl2.c (flag_vtable_thunks): Always set it to 1.
10683 (flag_new_abi): Likewise.
10684 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9c96f3f8 10685
8c310e3f
MM
10686 * Makefile.in (g++spec.o): Fix typo.
10687
3b635dfc
JM
106882001-02-09 Jason Merrill <jason@redhat.com>
10689
10690 * lang-specs.h: Restore definition of __EXCEPTIONS.
10691
bd0d5d4a
JM
106922001-02-08 Jason Merrill <jason@redhat.com>
10693
10694 * search.c (shared_member_p): New function.
10695 (lookup_field_r): Use it.
10696 * cp-tree.h (SHARED_MEMBER_P): Remove.
10697
10698 * method.c (process_overload_item): Handle template-dependent array
10699 bounds.
10700 * pt.c (type_unification_real): If we end up with undeduced nontype
10701 parms, try again.
10702
10703 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10704 types.
10705
10706 * typeck2.c (friendly_abort): Don't say anything if we have
10707 earlier errors or sorries.
10708
9c96f3f8 10709 * decl.c (check_tag_decl): Notice attempts to redefine bool and
bd0d5d4a
JM
10710 wchar_t. Ignore if in_system_header.
10711
10712 * decl.c (maybe_push_cleanup_level): New fn...
10713 (start_decl_1): ...split out from here.
10714 * cvt.c (build_up_reference): Use it.
10715 * cp-tree.h: Declare it.
10716
a9374841
MM
107172001-02-07 Mark Mitchell <mark@codesourcery.com>
10718
9c96f3f8 10719 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
a9374841
MM
10720 spec.
10721
a87b4257
NS
107222001-02-06 Nathan Sidwell <nathan@codesourcery.com>
10723
10724 * pt.c (lookup_template_class): Make sure it's a primary
10725 template or template_template_parm when called from the parser.
10726 (instantiate_template_class): Add assertion.
10727
518fed76
AO
107282001-02-05 Alexandre Oliva <aoliva@redhat.com>
10729
10730 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10731 from error_mark_node.
10732
9965d119
NS
107332001-02-05 Nathan Sidwell <nathan@codesourcery.com>
10734
10735 Fix specification and implementation bugs in V3 ABI
10736 construction vtables.
10737 * cp-tree.h (flag_dump_class_layout): New flag.
10738 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10739 (BINFO_LOST_PRIMARY_P): New flag.
10740 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10741 (BINFO_PRIMARY_MARKED_P): Rename to ...
10742 (BINFO_PRIMARY_P): ... here.
10743 (binfo_via_virtual): New prototype.
10744 * decl2.c (flag_dump_class_layout): New flag.
10745 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10746 use `=' as a file name separator.
10747 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10748 bases.
10749 (build_vtbl_address): If this is a virtual primary base, then
10750 get the vtbl of what it is ultimately primary for.
10751 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10752 for BINFO_PRIMARY_P.
10753 (dfs_skip_nonprimary_vbases_markedp): Likewise.
10754 (get_shared_vbase_if_not_primary): Likewise.
10755 (dfs_get_pure_virtuals): Likewise.
10756 (expand_upcast_fixups): Likewise.
10757 (fixup_virtual_upcast_offsets): Likewise.
10758 (dfs_find_vbase_instance): Likewise.
10759 (find_vbase_instance): Likewise.
10760 (binfo_from_vbase): Adjust comment to reflect reality.
10761 (binfo_via_virtual): New function.
10762 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10763 for binfo walking during VTT construction.
10764 (dfs_mark_primary_bases): Remove.
10765 (force_canonical_binfo_r): New function.
10766 (force_canonical_binfo): New function.
10767 (mark_primary_virtual_base): New function.
10768 (mark_primary_bases): Walk in inheritance graph order, use
10769 mark_primary_virtual_base.
10770 (determine_primary_base): Use some more intermediate variables.
10771 (dfs_find_final_overrider): Don't check for overriding along a
10772 virtual path.
10773 (dfs_modify_vtables): Walk into primary virtual bases too.
10774 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10775 (build_base_fields): Likewise.
10776 (dfs_set_offset_for_unshared_vbases): Likewise.
10777 (layout_virtual_bases): Likewise.
10778 (end_of_class): Likewise.
10779 (finish_struct_1): Call dump_class_hierarchy, if requested.
10780 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10781 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10782 (dump_class_hierarchy): Add file parameter. Append to file, if
10783 required.
10784 (finish_vtbls): Adjust accumulate_vtbl_inits call.
10785 Use canonical base for virtual bases.
10786 (build_vtt): Add more comments. Adjust build_vtt_inits call.
10787 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10788 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10789 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10790 virtual VTTs.
10791 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10792 from DATA. We want virtual primary bases and all bases via virtual.
10793 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10794 virtual base when not a construction vtable.
10795 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10796 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10797 Use canonical bases when processing virtual bases.
10798 (accumulate_vtbl_inits): We're interested in any base via a
10799 virtual path.
10800 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10801 within a construction vtable, determine what is being overridden.
10802 (build_vtbl_initializer): Add more comments
10803 (add_vcall_offset_vtbl_entries_1): Adjust comment.
10804 (build_rtti_vtbl_entries): Check if the base has lost its
10805 primary.
10806
39d6f2e8
MM
108072001-02-05 Mark Mitchell <mark@codesourcery.com>
10808
10809 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10810
d2a6f3c0 108112001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
400500c4
RK
10812
10813 * decl.c (pushdecl): Call abort instead of fatal.
10814 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10815 * init.c (build_new_1): Likewise.
10816 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10817 * decl.c (build_typename_type): hash_table_init now returns void.
10818 decl.c (init_decl_processing): Make an error non-fatal.
10819
97458258
MM
108202001-02-04 Mark Mitchell <mark@codesourcery.com>
10821
10822 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10823 Document.
10824 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10825 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10826 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10827 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10828 * decl.c (maybe_commonize_var): Use the new name-mangling where
10829 appropriate.
10830 * decl2.c (comdat_linkage): Enhance comments. Make all
10831 compiler-generated things static, if COMDAT is not available.
10832 (get_tinfo_decl): Do not make typeinfo objects that belong in the
10833 library COMDAT.
10834 (tinfo_base_init): Use the correct mangled name for typeinfo
10835 strings, and push them into the global scope.
10836 (typeinfo_in_lib_p): New function.
10837 (synthesize_tinfo_var): Use it.
10838 (create_real_tinfo_var): Likewise.
9c96f3f8 10839
55de1b66
JJ
108402001-02-03 Jakub Jelinek <jakub@redhat.com>
10841
10842 * decl.c (push_class_binding): Use context_for_name_lookup instead
10843 of CP_DECL_CONTEXT.
10844 * search.c (context_for_name_lookup): Remove static. Check for NULL
10845 context in the loop.
10846 * cp-tree.h (context_for_name_lookup): Add prototype.
10847
e92730aa
JJ
108482001-02-02 Jakub Jelinek <jakub@redhat.com>
10849
10850 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10851 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10852 Remove.
10853 * call.c (convert_class_to_reference, build_user_type_conversion_1,
10854 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10855
049f6ec9
MM
108562001-02-02 Mark Mitchell <mark@codesourcery.com>
10857
10858 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10859 of macros used when compiling g++spec.c.
10860 * g++spec.c (lang_specific_driver): Link with the shared
10861 libgcc by default.
10862
718b8ea5
JM
108632001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
10864
10865 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10866 make_reference_declarator, make_call_declarator), method.c
10867 (implicitly_declare_fn), parse.y (namespace_using_decl,
10868 notype_unqualified_id, expr_or_declarator, new_type_id,
10869 after_type_declarator, direct_after_type_declarator,
10870 notype_declarator, complex_notype_declarator,
10871 complex_direct_notype_declarator, qualified_id,
10872 notype_qualified_id, overqualified_id, direct_new_declarator,
10873 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10874 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10875 instead of build_parse_node.
10876
f2d1f0ba
KG
108772001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10878
10879 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10880 (minus_one_node): Moved to top level gcc directory. Renamed
10881 to integer_minus_one_node.
10882
10883 * init.c (init_init_processing): Don't set minus_one_node.
10884 (build_vec_init): Use integer_minus_one_node.
10885
10886 * rtti.c (get_tinfo_decl_dynamic): Likewise.
10887
6001735e
JJ
108882001-01-28 Jakub Jelinek <jakub@redhat.com>
10889
10890 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10891 identical and they would be replaced with constant, remove
10892 MODIFY_EXPR from the tree.
10893
c913b6f1
KG
108942001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10895
10896 * Make-lang.in: Remove all dependencies on defaults.h.
10897 * call.c: Don't include defaults.h.
10898 * decl.c: Likewise.
10899 * decl2.c: Likewise.
10900 * except.c: Likewise.
10901 * pt.c: Likewise.
10902 * rtti.c: Likewise.
10903 * tree.c: Likewise.
10904 * typeck.c: Likewise.
10905
324ffb8c
JJ
109062001-01-25 Jakub Jelinek <jakub@redhat.com>
10907
10908 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10909 operators even in "C" linkage.
10910 * method.c (set_mangled_name_for_decl): Likewise.
10911 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10912 overloaded operators in "C" linkage.
10913
4b2811e9
NS
109142001-01-24 Nathan Sidwell <nathan@codesourcery.com>
10915
10916 * pt.c (tsubst_decl): Remove IN_DECL parameter.
10917 (tsubst_arg_types): Check parameter is not void.
10918 (tsubst): Adjust tsubst_decl call.
10919
d8caf48e
NS
109202001-01-24 Nathan Sidwell <nathan@codesourcery.com>
10921
10922 * call.c (add_builtin_candidate): Quote std properly, from
10923 previous change.
10924
08511114
KL
109252001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
10926
10927 * pt.c (check_explicit_specialization): Clone constructors and
10928 destructors.
10929
92ecdfb7
NS
109302001-01-23 Nathan Sidwell <nathan@codesourcery.com>
10931
10932 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10933 indicates anything special about template depth. Make sure we
10934 only count the user visible template classes.
10935
4cff6abe
NS
109362001-01-23 Nathan Sidwell <nathan@codesourcery.com>
10937
10938 * call.c (build_conv): Typo in comment.
10939 (add_builtin_candidate): Add more explanation.
10940 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10941 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10942 when we have enumeral types.
10943 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10944 candidates for relops and eqops.
10945 (joust): Simplify control flow. Allow a non-template user
10946 function to hide a builtin.
10947
62e4a758
NS
109482001-01-22 Nathan Sidwell <nathan@codesourcery.com>
10949
10950 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10951 (more_specialized): Add deduction parameter.
10952 * call.c (joust): Adjust more_specialized call.
10953 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10954 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10955 (get_bindings_order): Remove.
10956 (get_bindings_real): Add DEDUCE parameter.
10957 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10958 REFERENCE_TYPE jig for DEDUCE_ORDER.
10959 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10960 maybe_adjust_types_for_deduction.
10961 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10962 directly.
10963 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10964 (check_cv_quals_for_unify): Use new unify qualifier flags.
10965 (unify): Clear new unify qualifier flags.
10966 (get_bindings_real): Add DEDUCE parameter.
10967 (get_bindings): Adjust call to get_bindings_real.
10968 (get_bindings_overload): Likewise.
10969 (most_specialized_instantiation): Adjust call to
10970 more_specialized.
10971
2a2a9e5a
JM
109722001-01-19 Jason Merrill <jason@redhat.com>
10973
10974 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10975
10976 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10977 -fnew-abi.
10978
60696c53
JM
109792001-01-19 Ute Pelkmann <scope.muc@t-online.de>
10980
10981 * decl2.c (arg_assoc_class): Fix double iteration logic.
10982
109832001-01-19 Jason Merrill <jason@redhat.com>
10984
10985 * init.c (build_delete): Always call convert_force to strip cv-quals.
10986
10987 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10988 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10989 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10990
1e00f18c
NS
109912001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10992
10993 * search.c (get_vbase_1): Count only virtual bases.
10994
e13bced2
NS
109952001-01-19 Nathan Sidwell <nathan@codesourcery.com>
10996
10997 * class.c (duplicate_tag_error): Robustify flag clearing.
10998
f9c244b8
NS
109992001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11000
11001 * cp-tree.h (lookup_template_class): Add complain parm.
11002 * decl.c (lookup_namespace_name): Adjust call to
11003 lookup_template_class.
11004 (make_typename_type): Likewise.
11005 * semantics.c (finish_template_type): Likewise.
11006 * pt.c (lookup_template_class): Add complain parm. Adjust.
11007 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
11008 (tsubst): Likewise.
11009
08c2df0f
NS
110102001-01-19 Nathan Sidwell <nathan@codesourcery.com>
11011
11012 * pt.c (copy_default_args_to_explicit_spec): Preserve
11013 object's CV quals. Reorganize.
11014
f5ceeec8
NS
110152001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11016
11017 * typeck.c (build_modify_expr): Say `initialization' for
11018 INIT_EXPRs.
11019 * init.c (build_default_init): Convert to enumeral type, if
11020 needed.
11021
a1cfa434
JJ
110222001-01-18 Jakub Jelinek <jakub@redhat.com>
11023
11024 * parse.y (nomods_initdcl0): Properly set things up for
11025 initdcl0_innards.
11026
028d1f20
NS
110272001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11028
11029 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
11030 (type_unification_real): Set it.
11031 (unify): Use it.
11032
9f724b6a
NS
110332001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11034
11035 * decl.c (finish_destructor_body): Convert to vbase pointer here.
11036
522d6614
NS
110372001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11038
11039 * semantics.c (begin_class_definition): Check we're not inside a
11040 template parm list.
11041
7f805b8f
NS
110422001-01-18 Nathan Sidwell <nathan@codesourcery.com>
11043
11044 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
11045 BASELINK_P.
11046
dc3799c1
KL
110472001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11048
11049 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
11050 * call.c (build_over_call): Add comment.
11051
bb37c4a5
DB
110522001-01-16 Daniel Berlin <dberlin@redhat.com>
11053
826840d9
RH
11054 * cvt.c (ocp_convert): Handle vector type conversion
11055 * typeck2.c (digest_init): Handle vector type initializations
9c96f3f8 11056
a26e7fb5
PE
110572001-01-16 Phil Edwards <pme@sources.redhat.com>
11058
11059 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
11060 was given.
11061
11b810f1
NS
110622001-01-15 Nathan Sidwell <nathan@codesourcery.com>
11063
11064 * pt.c (check_nontype_parm): Rename to ...
11065 (invalid_nontype_parm_type_p): ... here.
11066 (process_template_parm): Adjust.
11067 (convert_template_argument): Adjust.
11068
db3f4e4e
NS
110692001-01-15 Nathan Sidwell <nathan@codesourcery.com>
11070
11071 * pt.c (check_nontype_parm): New function.
11072 (process_template_parm): Use it.
11073 (convert_template_argument): Use it.
11074 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
11075 member.
11076
ea4f1fce
JO
110772001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
11078
11079 * tree.c: Add defaults.h
11080 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
11081 * Make-lang.in (cp/tree.o): Add defaults.h.
11082
1312c143
JM
110832001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11084
11085 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
11086
4bc1997b
JM
110872001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11088
11089 * g++.1: Change to be ".so man1/gcc.1".
11090
23de1fbf
JM
110912001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
11092
11093 * Make-lang.in (c++.info, c++.install-info): Build and install g++
11094 internals info.
11095 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
11096 ($(srcdir)/cp/g++int.info): New target.
11097 * gxxint.texi: Add info directory entry. Use @@ in email address.
11098 * .cvsignore: Update.
11099
0949f723
NS
111002001-01-12 Nathan Sidwell <nathan@codesourcery.com>
11101
11102 * typeck.c (build_c_cast): Do template processing earlier.
11103 Always pedwarn on array casts.
11104
a8641661
NS
111052001-01-12 Nathan Sidwell <nathan@codesourcery.com>
11106
11107 * friend.c (make_friend_class): Make sure a templated class is
11108 actually a template.
11109
844511c8
NS
111102001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11111
11112 * decl2.c (get_guard): Set linkage from guarded decl.
11113
96a1e32d
NS
111142001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11115
11116 * call.c (convert_default_arg): Check for unprocessed
11117 DEFAULT_ARG.
11118 * cp-tree.h (replace_defarg): Move to spew.c.
11119 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
11120 spew.c, which is where they really are.
11121 (done_pending_defargs): Declare.
11122 (unprocessed_defarg_fn): Declare.
11123 * decl.c (replace_defarg): Move to spew.c
11124 * parse.y (structsp): Call done_pending_defargs.
11125 * spew.c (defarg_fns): Rearrange list structure.
11126 (defarg_fnsdone): New static variable.
11127 (defarg_depfns): New static variable.
11128 (init_spew): Adjust.
11129 (add_defarg_fn): Store the type in TREE_TYPE.
11130 (do_pending_defargs): Detect and deal with ordering constraints
11131 and circularity.
11132 (done_pending_defargs): New function.
11133 (unprocessed_defarg_fn): New function.
11134 (replace_defarg): Moved from decl.c. Robustify. Don't save
11135 if circularity detected.
11136
34e225a3
NS
111372001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11138
11139 * pt.c (unify): Check array has a domain, before checking
11140 whether it is variable sized.
11141
98979fe0
NS
111422001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11143
11144 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
11145 parameters with pointers to arrays of unknown bound.
11146
b37bf5bd
NS
111472001-01-11 Nathan Sidwell <nathan@codesourcery.com>
11148
11149 * parse.y (template_parm_header, template_spec_header): New
11150 reductions. Split out from ...
11151 (template_header): ... here. Use them.
11152 (template_template_parm): Use template_parm_header.
11153 * semantics.c (finish_template_template_parm): Add assert.
11154
6c418184
MM
111552001-01-10 Mark Mitchell <mark@codesourcery.com>
11156
792508b5
MM
11157 * mangle.c (write_builtin_type): Fix thinko.
11158
8afa707f
MM
11159 * pt.c (copy_default_args_to_explicit_spec_1): New function.
11160 (copy_default_args_to_explicit_spec): Likewise.
11161 (check_explicit_specialization): Use it.
11162
6c418184
MM
11163 * class.c (finish_struct_1): Remove last argument in call to
11164 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11165 * decl.c (builtin_function): Likewise.
11166 (build_cp_library_fn): Likewise.
11167 (check_initializer): Likewise.
11168 (make_rtl_for_nonlocal_decl): Likewise.
11169 (cp_finish_decl): Likewise.
11170 (start_function): Likewise.
11171 * decl2.c (finish_anon_union): Likewise.
11172 * friend.c (do_friend): Likewise.
11173 * init.c (build_java_class_ref): Likewise.
11174 * method.c (make_thunk): Likewise.
11175 * pt.c (tsubst_friend_function): Likewise.
11176 * semantics.c (expand_body): Likewise.
11177
31d95fc6
MM
111782001-01-10 Mark Mitchell <mark@codesourcery.com>
11179
11180 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
11181 looking at DECL_CLONED_FUNCTION for non-functions.
11182
31bb3027
NS
111832001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11184
11185 * error.c (dump_template_parameter): Use parm to determine how
11186 to print default value.
11187
fd3f43e7
NS
111882001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11189
11190 * class.c (duplicate_tag_error): Clear more flags.
11191
042b4c4e
NS
111922001-01-10 Nathan Sidwell <nathan@codesourcery.com>
11193
11194 * call.c (build_new_method_call): Use binfo_for_vbase.
11195
a7537031
JM
111962001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
11197
11198 * cp-tree.h (flag_cond_mismatch): Don't declare.
11199 * decl2.c (flag_cond_mismatch): Don't define.
11200 (lang_f_options): Remove cond-mismatch.
11201 (unsupported_options): Add cond-mismatch.
11202
186c0fbe
NS
112032001-01-09 Nathan Sidwell <nathan@codesourcery.com>
11204
11205 * class.c (handle_using_decl): Reject using of constructor name
11206 of sourcing class. Allow injecting of a method with same name as
11207 nested class. Fixup error messages.
11208
28ec8d6b
JM
112092001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
11210
11211 * decl2.c (lang_decode_option): Handle -Wformat=2.
11212
3febd123
NS
112132001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11214
11215 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
11216 initialized_in_class.
11217 (DECL_DEFINED_IN_CLASS_P): Rename to ...
11218 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
11219 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
11220 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
11221 * pt.c (check_default_tmpl_args): Adjust for
11222 DECL_INITIALIZED_IN_CLASS_P.
11223 (instantiate_class_template): Likewise.
11224 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9c96f3f8 11225
3febd123
NS
11226 * class.c (finish_struct): Constify saved_filename.
11227
1f0d71c5
NS
112282001-01-08 Nathan Sidwell <nathan@codesourcery.com>
11229
11230 * class.c (duplicate_tag_error): Adjust diagnostic.
11231 (finish_struct): Locally set location to start of struct.
11232 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
11233
5bf15e84 112342001-01-08 Nathan Sidwell <nathan@codesourcery.com>
76191fdd
NS
11235
11236 * decl.c (struct binding_level): Adjust class_shadowed comments
11237 to reflect reality.
aba649ba 11238 (push_class_level_binding): Adjust comments to reflect reality.
76191fdd
NS
11239 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
11240 Don't set TREE_VALUE on the class_shadowed list.
11241
23d4e4cc 112422001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9c96f3f8
AJ
11243
11244 * decl2.c (acceptable_java_type): Allow references too.
23d4e4cc
APB
11245 * init.c (build_java_class_ref): When using the new ABI, search
11246 `class$' and have it mangled with `mangle_decl.'
11247 * mangle.c (write_java_integer_type_codes): New function.
11248 (write_builtin_type): Detect and mangle Java integer and real
11249 types.
9c96f3f8 11250
0c58da3e
MM
112512001-01-07 Mark Mitchell <mark@codesourcery.com>
11252
11253 * decl2.c (grokfield): Don't accept `asm' specifiers for
11254 non-static data members.
11255
45b8ddb4
KG
112562001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11257
11258 * expr.c (cplus_expand_expr): Don't reset `target'.
11259
96302433
NB
112602001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
11261
826840d9 11262 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
96302433 11263
220bce48
NS
112642001-01-05 Nathan Sidwell <nathan@codesourcery.com>
11265
11266 * parse.y (template_datadef): Check for error_mark_node.
11267
bfa2cb33
NS
112682001-01-05 Nathan Sidwell <nathan@codesourcery.com>
11269
11270 * cp-tree.def (DEFAULT_ARG): Make `x' class.
11271
eaa7c03f
JM
112722001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
11273
11274 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
11275 (record_builtin_type): Make non-static.
11276 (flag_short_double): Don't declare.
11277 (init_decl_processing): Remove the creation of many tree nodes now
11278 in c_common_nodes_and_builtins.
11279 (build_void_list_node): New function.
11280 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
11281 * cp-tree.h (flag_short_wchar): Don't declare.
11282
3af4c257
MM
112832001-01-04 Mark Mitchell <mark@codesourcery.com>
11284
11285 * call.c (build_conv): Don't use build1 for USER_CONV.
11286 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
11287
03dc0325
JM
112882001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
11289
11290 * lex.c (lang_init): Call c_common_lang_init.
11291
3c505507
NS
112922001-01-03 Nathan Sidwell <nathan@codesourcery.com>
11293
11294 * search.c (lookup_fnfields_here): Remove.
11295 (look_for_overrides_r): Use lookup_fnfields_1.
11296 Ignore functions from using declarations.
11297
03378143
NS
112982001-01-03 Nathan Sidwell <nathan@codesourcery.com>
11299
11300 Implement exceptions specifiers for implicit member functions.
11301 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
11302 * method.c (synthesize_exception_spec): New function.
11303 (locate_dtor, locate_ctor, locate_copy): New functions.
11304 (implicitly_declare_fn): Generate the exception spec too.
11305 * search.c (check_final_overrider): Check artificial functions
11306 too.
9c96f3f8 11307 * typeck2.c (merge_exception_specifiers): New function.
03378143 11308
f30efcb7
JM
113092001-01-03 Jason Merrill <jason@redhat.com>
11310
11311 * init.c (build_default_init): New fn.
11312 (perform_member_init): Split out from here.
11313 (build_new_1): Use it. Simplify initialization logic.
11314 (build_vec_init): Take an array, rather than a pointer and maxindex.
11315 Speed up simple initializations. Don't clean up if we're assigning.
11316 * cp-tree.h: Adjust.
11317 * decl2.c (do_static_initialization): Remove TREE_VEC case.
11318 * parse.y (new_initializer): Return void_zero_node for ().
11319 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
11320 * typeck2.c (digest_init): Only complain about user-written
11321 CONSTRUCTORs.
11322
a412bf75
MS
113232000-12-22 Mike Stump <mrs@wrs.com>
11324
11325 * decl2.c: (max_tinst_depth): Increase to 50.
11326
4890c2f4
MM
113272001-01-02 Mark Mitchell <mark@codesourcery.com>
11328
11329 * class.c (invalidate_class_lookup_cache): Zero the
11330 previous_class_values.
11331 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
11332 TREE_INT_CST_HIGH.
11333 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
11334 * decl.c (free_bindings): New variable.
11335 (push_binding): Don't create a new binding if we have one on the
11336 free list.
11337 (pop_binding): Put old bindings on the free list.
11338 (init_decl_processing): Use size_int, not build_int_2.
11339 Register free_bindings as a GC root.
11340 (cp_make_fname_decl): Use size_int, not build_int_2.
11341 (push_inline_template_parms_recursive): Likewise.
11342 (end_template_parm_list): Likewise.
688f6688 11343 (for_each_template_parm): Do not use walk_tree_without_duplicates.
4890c2f4
MM
11344 (tsubst_template_parms): Use size_int, not build_int_2.
11345 (tsubst): Likewise.
11346 * rtti.c (get_vmi_pseudo_type_info): Likewise.
9c96f3f8 11347
4f78b9a8
RH
113482001-01-02 Richard Henderson <rth@redhat.com>
11349
11350 * parse.y (asm): Set ASM_INPUT_P.
11351
3c8c2a0a
JM
113522001-01-02 Jason Merrill <jason@redhat.com>
11353
96d6c610
JM
11354 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
11355 for v3 ABI.
11356
11357 * typeck.c (cp_truthvalue_conversion): New fn.
11358 * cvt.c (ocp_convert): Use it.
11359
11360 * cp-tree.h: Lose c-common.c decls.
11361
11362 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
11363 * cvt.c (convert_to_void): Use type_unknown_p.
11364
9c96f3f8 11365 * typeck.c (strip_all_pointer_quals): Also strip quals from
3c8c2a0a
JM
11366 pointer-to-member types.
11367
11368 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
11369 parse.y as C.
11370
11371 * call.c (build_new_method_call): Do evaluate the object parameter
11372 when accessing a static member.
11373 * typeck.c (build_component_ref): Likewise.
11374
d363e7bf
AJ
113752001-01-02 Andreas Jaeger <aj@suse.de>
11376
11377 * decl.c (cp_missing_noreturn_ok_p): New.
11378 (init_decl_processing): Set lang_missing_noreturn_ok_p.
11379
77f5250d
JJ
113802000-12-29 Jakub Jelinek <jakub@redhat.com>
11381
11382 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
11383
31a714f6
MM
113842000-12-29 Mark Mitchell <mark@codesourcery.com>
11385
11386 * class.c (pushclass): Remove #if 0'd code.
11387 * cp-tree.h (overload_template_name): Remove.
11388 * decl.c (store_bindings): Simplify.
11389 (pop_from_top_level): Likewise.
11390 * pt.c (overload_template_name): Remove.
d363e7bf 11391 (instantiate_decl): Don't call push_to_top_level if it's not
31a714f6
MM
11392 needed.
11393
414ea4aa
MM
113942000-12-28 Mark Mitchell <mark@codesourcery.com>
11395
11396 * pt.c (register_local_specialization): Don't return a value.
11397 (lookup_template_class): Use move-to-front heuristic when looking
11398 up template instantiations.
11399 (instantiate_decl): Only push_to_top_level when we're actually
11400 going to instantiate the template.
11401
6f18f7e9
HPN
114022000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
11403
11404 * search.c (binfo_for_vtable): Return least derived class, not
11405 most. Handle secondary vtables.
11406
e5214479
JM
114072000-12-22 Jason Merrill <jason@redhat.com>
11408
3c8c2a0a
JM
11409 * pt.c (more_specialized): Don't optimize len==0.
11410 (fn_type_unification): If we're adding the return type, increase len.
11411
ebb1abc3
JM
11412 * typeck.c (build_binary_op): Fix pmf comparison logic.
11413
c939ca5f
JM
11414 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
11415 DECL_STATIC_FUNCTION_P.
11416
e6fe680d
JM
11417 * semantics.c (genrtl_finish_function): Don't try to jump to
11418 return_label unless it exists.
11419
e5214479
JM
11420 In partial ordering for a call, ignore parms for which we don't have
11421 a real argument.
11422 * call.c (joust): Pass len to more_specialized.
11423 (add_template_candidate_real): Strip 'this', pass len.
11424 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
11425 (get_bindings_order): New fn. Pass len down.
11426 (get_bindings_real): Strip 'this', pass len.
11427 (fn_type_unification): Likewise.
11428 (type_unification_real): Succeed after checking 'len' args.
11429 (most_specialized_instantiation): Lose explicit_args parm.
d363e7bf 11430 * class.c (resolve_address_of_overloaded_function): Strip 'this',
e5214479
JM
11431 pass len.
11432
114332000-12-21 Jason Merrill <jason@redhat.com>
477f6664
JM
11434
11435 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
11436 DECL_TEMPLATE_RESULT.
11437
11438 * search.c (lookup_field_r): Call lookup_fnfields_1, not
11439 lookup_fnfields_here.
11440
11441 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
11442
11443 * call.c (build_object_call): Also allow conversions that return
11444 reference to pointer to function.
11445 (add_conv_candidate): Handle totype being ref to ptr to fn.
11446 (build_field_call): Also allow members of type reference to function.
11447 Lose support for calling pointer to METHOD_TYPE fields.
11448
11449 * error.c (dump_expr): Handle *_CAST_EXPR.
11450
11451 * typeck2.c (build_scoped_ref): Always convert to the naming class.
11452
11453 * tree.c (break_out_cleanups): Lose.
11454 * cp-tree.h: Remove prototype.
11455 * typeck.c (build_component_ref): Don't break_out_cleanups.
11456 (build_compound_expr): Likewise.
11457 * semantics.c (finish_expr_stmt): Likewise.
11458
3e4d04a1
RH
114592000-12-20 Richard Henderson <rth@redhat.com>
11460
11461 * cp-tree.h: Update declarations.
11462 * decl.c (finish_case_label): Return the new stmt node.
11463 * semantics.c (finish_goto_stmt): Likewise.
11464 (finish_expr_stmt, finish_return_stmt): Likewise.
11465 (finish_break_stmt, finish_continue_stmt): Likewise.
11466 (finish_asm_stmt): Likewise.
11467 * parse.y (already_scoped_stmt): Set STMT_LINENO.
11468 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
11469 (simple_if, simple_stmt): Return the new stmt node.
11470 (save_lineno): New.
11471
20d380b1
JM
114722000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
11473
11474 * cp-tree.h: Don't declare warn_long_long.
11475
221c7a7f
KL
114762000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11477
11478 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
11479 IS_AGGR_TYPE.
11480
b429fdf0
KL
114812000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11482
11483 * pt.c (unify): Handle when both ARG and PARM are
11484 BOUND_TEMPLATE_TEMPLATE_PARM.
11485
c2beae77
KL
114862000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11487
11488 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
11489 DECL_TEMPLATE_PARM_P.
11490
c3e899c1
JM
114912000-12-15 Jason Merrill <jason@redhat.com>
11492
96790071
JM
11493 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
11494
8d42565b
JM
11495 * init.c (build_new_1): Don't strip quals from type.
11496
fab09a24
JM
11497 * decl.c (pushdecl): Don't check for linkage on a non-decl.
11498
c3e899c1
JM
11499 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
11500
11501 * call.c (build_new_function_call): Lose space before paren in
11502 error message.
11503 (build_new_method_call): Likewise.
11504
11505 * typeck2.c (build_m_component_ref): Propagate quals from datum.
11506
edac124d
KL
115072000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11508
11509 * pt.c (check_explicit_specialization): Propagate default
11510 function arguments to explicit specializations.
11511
31750649 115122000-12-13 DJ Delorie <dj@redhat.com>
8d3b081e
DD
11513
11514 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
11515 and <? operators.
11516
5e818b93
JM
115172000-12-08 Jason Merrill <jason@redhat.com>
11518
11519 * error.c (dump_function_name): Don't let the user see __comp_ctor.
11520
11521 Clean up copy-initialization in overloading code.
11522 * call.c (build_user_type_conversion_1): Die if we are asked to
11523 convert to the same or a base type.
11524 (implicit_conversion): Avoid doing so. Lose reference binding code.
11525 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
11526 direct-initialization. Also do direct-init part of copy-init.
11527 (build_user_type_conversion): Don't provide context to convert_like.
11528 * cvt.c (ocp_convert): build_user_type_conversion will now provide
11529 the constructor call for copy-init.
11530
11531 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
11532 instantiation of a member template.
11533 (do_decl_instantiation): Not here.
11534
38da6039
NS
115352000-12-07 Nathan Sidwell <nathan@codesourcery.com>
11536
11537 * class.c (check_field_decls): Don't special case anonymous
11538 fields in error messages.
c9407e4c 11539 (note_name_declared_in_class): Use %D on diagnostic.
d363e7bf 11540
38da6039
NS
11541 * tree.c (pod_type_p): Use strip_array_types.
11542 (cp_valid_lang_attribute): Likewise.
11543 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
11544 multiple evaluations.
d363e7bf 11545 (cp_has_mutable_p): Use strip_array_types.
38da6039 11546
a11d04b5
NS
115472000-12-07 Nathan Sidwell <nathan@codesourcery.com>
11548
11549 * cp-tree.h (sufficient_parms_p): Declare new function.
11550 * call.c (sufficient_parms_p): New function, broken out of ...
11551 (add_function_candidate): ... here. Use it.
11552 (add_conv_candidate): Use it.
11553 * decl.c (grok_ctor_properties): Use it.
11554
5eec2847
JJ
115552000-12-07 Jakub Jelinek <jakub@redhat.com>
11556
11557 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
11558
c907e684
JM
115592000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
11560
11561 * decl2.c (lang_decode_option): Handle -Wformat-security.
11562
74601d7c
KL
115632000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11564
11565 * pt.c (verify_class_unification): New function.
11566 (get_class_bindings): Use it.
11567 (try_class_unification): Tidy.
11568 (unify): Handle when argument of a template-id is not
11569 template parameter dependent.
11570 (template_args_equal): Handle when TREE_CODE's do not match.
11571
8954e858
AO
115722000-12-06 Alexandre Oliva <aoliva@redhat.com>
11573
11574 * lang-specs.h (c++): When invoking the stand-alone preprocessor
11575 for -save-temps, pass all relevant -Defines to it, and then don't
11576 pass them to cc1plus.
11577
3dc9aec6
WC
115782000-12-05 Will Cohen <wcohen@redhat.com>
11579
11580 * decl.c (finish_case_label): Cleared
11581 more_cleanups_ok in surrounding function scopes.
11582 (define_label): Likewise.
11583
cbb40945
NS
115842000-12-05 Nathan Sidwell <nathan@codesourcery.com>
11585
11586 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
11587 (get_matching_virtual): Remove.
11588 (look_for_overrides): Declare new function.
11589 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
11590 DECL_VINDEX here.
11591 * class.c (check_for_override): Move base class iteration code
11592 to look_for_overrides.
11593 * search.c (next_baselink): Remove.
11594 (get_virtuals_named_this): Remove.
11595 (get_virtual_destructor): Remove.
11596 (tree_has_any_destructors_p): Remove.
11597 (struct gvnt_info): Remove.
11598 (check_final_overrider): Remove `virtual' from error messages.
11599 (get_matching_virtuals): Remove. Move functionality to ...
11600 (look_for_overrides): ... here, and ...
11601 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
11602 to be overriding.
11603
61402b80
NS
116042000-12-05 Nathan Sidwell <nathan@codesourcery.com>
11605
11606 * typeck.c (get_delta_difference): If via a virtual base,
11607 return zero.
11608 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
11609 adjustment.
11610
39abc9a6
RH
116112000-12-04 Richard Henderson <rth@redhat.com>
11612
11613 * error.c (dump_tree): Use output_add_string not OB_PUTS.
11614
c00996a3
JM
116152000-12-04 Jason Merrill <jason@redhat.com>
11616
11617 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
d363e7bf 11618 (write_builtin_type): Pass intSI_type_node and the like through
c00996a3
JM
11619 type_for_mode.
11620 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
11621 Pass intSI_type_node and the like through type_for_mode.
11622 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
11623 * pt.c (tsubst, unify): Likewise.
11624 * tree.c (walk_tree): Likewise.
11625 * error.c (dump_type): Likewise.
11626 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
d363e7bf 11627
c00996a3
JM
11628 * Make-lang.in: Tweak top comment for emacs.
11629 (cp/TAGS): Restore.
11630
11631 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
11632
c00996a3
JM
11633 * class.c (clone_function_decl): Robustify.
11634
116352000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
11636
11637 * decl.c (store_bindings): Only search in the non modified
11638 old_bindings for duplicates.
11639
00bb3dad
NS
116402000-12-04 Nathan Sidwell <nathan@codesourcery.com>
11641
11642 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
11643 TYPE_POLYMORPHIC_P.
d363e7bf 11644
00bb3dad
NS
11645 * typeck.c (build_static_cast): Remove unused variable.
11646
dc957d14
KL
116472000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11648
11649 * pt.c: Fix typo in comment.
11650
4d808927
JM
116512000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
11652
11653 * decl2.c (warn_format): Remove definition.
11654 (lang_decode_option): Handle -Wformat-nonliteral,
11655 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
11656
5fd8e536
JM
116572000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
11658
11659 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
11660 (init_decl_processing): Don't create string_type_node,
11661 const_string_type_node, wint_type_node, intmax_type_node,
11662 uintmax_type_node, default_function_type, ptrdiff_type_node and
11663 unsigned_ptrdiff_type_node. Adjust position of call to
11664 c_common_nodes_and_builtins.
11665 (identifier_global_value): New function.
11666
13f9714b
NS
116672000-12-01 Nathan Sidwell <nathan@codesourcery.com>
11668
11669 * call.c (standard_conversion): Reject pointer to member
11670 conversions from ambiguous, inaccessible or virtual bases.
11671 * typeck.c (build_static_cast): Don't check pointers to members
11672 specially.
11673
31b1b957
NS
116742000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11675
11676 * method.c (do_build_copy_constructor): Preserve cv
11677 qualifications when accessing source object members.
11678 (do_build_assign_ref): Likewise. Remove separate diagnostics for
11679 unnamed fields.
11680
717e3f73
NS
116812000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11682
11683 * method.c (do_build_assign_ref): Construct appropriately
11684 CV-qualified base reference. Don't allow const casts in base
11685 conversion.
11686
2c92b94d
NS
116872000-11-30 Nathan Sidwell <nathan@codesourcery.com>
11688
11689 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11690 incomplete return type.
11691
bb92901d
NS
116922000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11693
11694 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11695 * semantics.c (finish_base_specifier): Accept a _TYPE not a
11696 _DECL.
11697
2f3608c3
NS
116982000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11699
11700 * spew.c (yyerror): Cope if yylval.ttype is NULL.
11701
eeb75383
NS
117022000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11703
11704 * decl.c (grokdeclarator): Diagnose undefined template contexts.
11705
5ee4cc26
NS
117062000-11-28 Nathan Sidwell <nathan@codesourcery.com>
11707
11708 * decl.c (grokdeclarator): Do type access control on friend
11709 class.
11710
76e57b45
NS
117112000-11-27 Nathan Sidwell <nathan@codesourcery.com>
11712
11713 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11714 bison parser ickiness.
11715 * pt.c (tsubst_friend_function): Enter namespace scope when
11716 tsubsting the function name.
11717 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11718
f9825168
NS
117192000-11-27 Nathan Sidwell <nathan@codesourcery.com>
11720
11721 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11722 * cvt.c (cp_convert_to_pointer): Add force parameter.
11723 Allow conversions via virtual base if forced.
11724 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11725 (ocp_convert): Likewise.
11726 * search.c (binfo_from_vbase): Return the virtual base's binfo.
11727 * typeck.c (get_delta_difference): Adjust handling of virtual
11728 bases.
11729
9ccb25d5
MM
117302000-11-26 Mark Mitchell <mark@codesourcery.com>
11731
11732 * tree.c (struct list_hash): Remove.
11733 (list_hash_table): Make it be an htab.
11734 (struct list_proxy): New type.
11735 (list_hash_eq): New function.
11736 (list_hash_pieces): Renamed from ...
11737 (list_hash): ... this.
11738 (list_hash_lookup): Remove.
11739 (list_hash_add): Remove.
11740 (hash_tree_cons): Use the generic hashtable.
11741 (mark_list_hash): Remove.
11742 (init_tree): Create the hashtable.
11743
9399bad3
JM
117442000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
11745
11746 * method.c (build_mangled_C9x_name): Rename to
11747 build_mangled_C99_name. Change C9X references in comments to
11748 refer to C99.
11749
2f401cc8
NS
117502000-11-24 Nathan Sidwell <nathan@codesourcery.com>
11751
11752 * parse.y (unary_expr): Move VA_ARG from here ...
11753 (primary): ... to here.
11754
3d7e9ba4
NS
117552000-11-24 Nathan Sidwell <nathan@codesourcery.com>
11756
11757 * semantics.c (finish_id_expr): If type is error_mark, return
11758 error_mark.
11759
ab097535
NS
117602000-11-23 Nathan Sidwell <nathan@codesourcery.com>
11761
11762 * pt.c (lookup_template_class): Simplify loop exit constructs.
11763 Cope when there is no partial instantiation of a template
11764 template member.
11765
d2a6f3c0 117662000-11-23 J"orn Rennecke <amylaar@redhat.com>
9196ece5
R
11767
11768 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11769
cac78ea2
MM
117702000-11-22 Mark Mitchell <mark@codesourcery.com>
11771
6e1b44bc
MM
11772 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11773 prefix.
11774
cac78ea2
MM
11775 * pt.c (do_decl_instantiate): Explicitly clone constructors and
11776 destructors that haven't already been cloned.
11777
3aac38d7
RH
117782000-11-20 Richard Henderson <rth@redhat.com>
11779
11780 * parse.y (yyparse_1): Rename the parser entry point.
11781
117822000-11-20 Alex Samuel <samuel@codesourcery.com>
beac9b93
AS
11783
11784 * mangle.c (write_name): Use <unscoped-name> for names directly in
11785 function scope.
11786 (write_unscoped_name): Accept names directly in function scope.
d363e7bf 11787
447306fa
NS
117882000-11-20 Nathan Sidwell <nathan@codesourcery.com>
11789
11790 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11791 * parse.y (extdef): Add EXPORT reduction.
11792 * spew.c (yylex): Don't skip export here.
11793
2650255a
MM
117942000-11-19 Mark Mitchell <mark@codesourcery.com>
11795
11796 * decl.c (init_decl_processing): Correct name of pure virtual
11797 function under the new ABI.
11798 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11799 (throw_bad_typeid): Likewise for bad typeid function.
11800
0657c69c
MM
118012000-11-18 Mark Mitchell <mark@codesourcery.com>
11802
04f3dc2b
MM
11803 * decl.c (grokparms): Don't even function types of `void' type,
11804 either.
11805 * mangle.c (write_type): Don't crash when confronted with the
11806 error_mark_node.
11807
0657c69c
MM
11808 * decl.c (grokparms): Don't create parameters of `void' type.
11809
a8a05998
ZW
118102000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
11811
11812 * lex.c (mark_impl_file_chain): Delete.
11813 (init_parse): Remove call to ggc_add_string_root. No need to
11814 ggc_strdup a string constant. Do not add impl_file_chain to GC
11815 roots.
11816 (handle_pragma_implementation): No need to ggc_strdup main_filename.
11817
35728a80
NS
118182000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11819
11820 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11821
5cce22b6
NS
118222000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11823
11824 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11825 * decl.c (grokdeclarator): Don't reject void parms here.
11826 (require_complete_types_for_parms): Simplify, use
11827 complete_type_or_else.
11828 (grokparms): Remove bitrot. Remove funcdef parm.
11829 Deal with ellipsis parm lists here.
11830 * semantics.c (finish_parmlist): Don't append void_list_node
11831 here. Set PARMLIST_ELLIPSIS_P.
11832
146c8d60
NS
118332000-11-17 Nathan Sidwell <nathan@codesourcery.com>
11834
d30d6e7a 11835 * typeck2.c (incomplete_type_error): Reorganize to avoid
146c8d60
NS
11836 excessive diagnostics.
11837
520a57c8
ZW
118382000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
11839
11840 * lex.c (struct impl_files, internal_filename): Constify a char *.
11841
43048a06
MM
118422000-11-16 Mark Mitchell <mark@codesourcery.com>
11843
11844 * mangle.c (write_special_name_constructor): Don't generate
11845 assembler junk when confronted with an old-style constructor.
11846 (write_special_name_destructor): Likewise.
11847 (mangle_decl_string): Do it here instead.
11848
cdb71673
NS
118492000-11-16 Nathan Sidwell <nathan@codesourcery.com>
11850
11851 * call.c (op_error): Make error messages clearer.
11852
62136084
MM
118532000-11-15 Mark Mitchell <mark@codesourcery.com>
11854
11855 * decl.c (wrapup_globals_for_namespace): Don't mark things
11856 TREE_ASM_WRITTEN when they're not.
11857
ee3400e8
JM
118582000-11-15 Jason Merrill <jason@redhat.com>
11859
11860 * typeck2.c (friendly_abort): Uncount the error before handing
11861 off to fancy_abort.
11862
71631a1f
NS
118632000-11-15 Nathan Sidwell <nathan@codesourcery.com>
11864
11865 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11866
79cda2d1
MM
118672000-11-14 Mark Mitchell <mark@codesourcery.com>
11868
11869 * class.c (build_vtbl_initializer): Fix typo in comment.
11870 * typeck.c (expr_sizeof): Don't crash on errors.
11871
2567bc56
JW
118722000-11-14 Jim Wilson <wilson@redhat.com>
11873
11874 * lang-specs.h: Add %2 after %(cc1_options).
11875
8422942c
RH
118762000-11-14 Richard Henderson <rth@redhat.com>
11877
11878 * typeck.c (c_sizeof): Be strict about casting result value
11879 back to c_size_type_node.
11880 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11881
19552aa5
JM
118822000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
11883
11884 * typeck.c (build_unary_op): Use boolean_increment from
11885 c-common.c, moving the relevant code there.
11886
d96a6d1a
JM
118872000-11-11 Jason Merrill <jason@redhat.com>
11888
11889 * typeck.c (mark_addressable): Don't call put_var_into_stack.
492cca24
JM
11890
11891 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11892 in inlines.
11893
4e135bdd
KG
118942000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11895
11896 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11897 * lex.c (copy_lang_decl): Likewise.
11898
0a7394bc
MM
118992000-11-09 Mark Mitchell <mark@codesourcery.com>
11900
13507bd8
MM
11901 * dump.c (cp_dump_tree): Don't dump function bodies here.
11902
0a7394bc
MM
11903 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11904 (dump.o): Update dependency list.
11905 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11906 (flag_dump_translation_unit): Likewise.
11907 (CP_TYPE_QUALS): Adjust definition.
11908 (DECL_C_BIT_FIELD): Remove.
11909 (SET_DECL_C_BIT_FIELD): Likewise.
11910 (CLEAR_DECL_C_BIT_FIELD): Likewise.
11911 (add_maybe_template): Likewise.
11912 (strip_array_types): Likewise.
11913 (dump_node_to_file): Likewise.
11914 (cp_dump_tree): New function.
11915 * decl.c (init_decl_processing): Set lang_dump_tree.
11916 * decl2.c (flag_dump_translation_unit): Remove.
11917 * dump.c: Move most of it to ../c-dump.c.
11918 (cp_dump_tree): New function.
11919 * pt.c (add_maybe_template): Remove.
11920 * typeck.c (strip_array_types): Likewise.
a8a05998 11921
5362b086
EC
119222000-11-07 Eric Christopher <echristo@redhat.com>
11923
492cca24
JM
11924 * decl.c (init_decl_processing): Change definition of
11925 __wchar_t to wchar_t. Remove artificial declaration of
11926 wchar_t.
11927 * lex.c: Change instances of __wchar_t to wchar_t.
5362b086 11928
5361cbb7
NS
119292000-11-09 Nathan Sidwell <nathan@codesourcery.com>
11930
11931 * lex.c (do_identifier): Don't lookup_name for operators.
11932 * parse.y (operator): Save looking_for_typename.
11933 (unoperator): Restore it.
11934 * spew.c (frob_opname): Use nth_token for lookahead.
11935
36791f1e
NS
119362000-11-08 Nathan Sidwell <nathan@codesourcery.com>
11937
11938 * decl.c (grok_op_properties): Always use coerce_new_type and
11939 coerce_delete_type.
11940 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11941 exception specification. Tidy up.
11942 (coerce_delete_type): Preserve exception specification. Tidy up.
11943
961192e1
JM
119442000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
11945
11946 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11947 (push_binding_level), error.c (cp_tree_printer), pt.c
11948 (process_partial_specialization, tsubst_template_arg_vector),
11949 search.c (lookup_member): Use memset () instead of bzero ().
11950
d48ebde1
NS
119512000-11-07 Nathan Sidwell <nathan@codesourcery.com>
11952
11953 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11954
436a88a6
JM
119552000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
11956
11957 * Make-lang.in (c++.distdir): Remove.
11958
7a4e5091
MM
119592000-11-04 Mark Mitchell <mark@codesourcery.com>
11960
11961 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11962 declarations from different namespaces to be combined.
11963
0e9295cf
ZW
119642000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
11965
11966 * decl.c: Include tm_p.h.
11967
da61dec9
JM
119682000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
11969
11970 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11971
9473c522
JM
119722000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
11973
11974 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11975 (build_overload_value), repo.c (open_repo_file), xref.c
11976 (open_xref_file): Use strchr () and strrchr () instead of index ()
11977 and rindex ().
11978
b0b3afb2
BS
119792000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
11980
11981 * call.c (build_over_call): Call fold on the CALL_EXPR.
11982
faafaee6
GDR
119832000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
11984
11985 * error.c (dump_template_decl): Separate template hearders with
11986 space not comma.
11987
761f0855
GDR
119882000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
11989
11990 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
11991 TS_* flags with corresponding TFF_*. Adjust prototypes of
11992 functions (which used to take a tree_string_flags) to take an int.
11993
11994 * cp-tree.h (enum tree_string_flags): Remove
11995 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11996 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11997 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11998 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11999 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
12000 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
12001 (type_as_string, decl_as_string, expr_as_string,
12002 context_as_string): Adjust prototype.
12003
12004 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
12005 instead of TS_PLAIN.
12006
12007 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
12008 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
12009 plain `0'.
12010
ad50e811
MM
120112000-10-30 Mark Mitchell <mark@codesourcery.com>
12012
12013 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
12014 (linkage_kind): New enumeration.
12015 (decl_linkage): New function.
12016 * decl2.c (comdat_linkage): Extend comment.
12017 * error.c (dump_function_decl): Print the arguments used to
12018 instantiate a template, even when not printing the type of the
12019 function.
12020 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
12021 not TREE_PUBLIC, to test for external linkage.
12022 * tree.c (decl_linkage): New function.
12023
930cd796
MM
120242000-10-28 Mark Mitchell <mark@codesourcery.com>
12025
12026 * pt.c (instantiate_decl): Always instantiate static data members
12027 initialized in-class.
12028
b8dad04b
ZW
120292000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12030
12031 * Make-lang.in: Move all build rules here from Makefile.in,
12032 adapt to new context. Wrap all rules that change the current
12033 directory in parentheses. Expunge all references to $(P).
12034 When one command depends on another and they're run all at
12035 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12036 all object-file generation rules. Delete obsolete variables.
12037
12038 * Makefile.in: Delete.
12039 * config-lang.in: Delete outputs= line.
12040
5f9cd837
GDR
120412000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
12042
12043 * error.c (dump_function_decl): Print no space between
12044 `ptr-operator' the `type-specifier' of the return type.
12045 (dump_type_prefix): Make sure we put space at the appropriate
5362b086 12046 place.
5f9cd837 12047
6c6ed0ef
JM
120482000-10-23 Jason Merrill <jason@redhat.com>
12049
12050 * call.c (equal_functions): Also call decls_match for extern "C" fns.
12051
120522000-10-22 Jason Merrill <jason@redhat.com>
12053
12054 * call.c (build_conditional_expr): Use ocp_convert to force
12055 rvalue conversion.
12056
e36308b0
MM
120572000-10-22 Mark Mitchell <mark@codesourcery.com>
12058
583ca5a0
MM
12059 * call.c (standard_conversion): Use RVALUE_CONVs for all
12060 expressions that satisfy lvalue_p, not just those that satisfy
12061 real_lvalue_p.
12062
f9808f81
MM
12063 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
12064
5362b086 12065 * typeck.c (c_sizeof): Return an expression of `size_t' type,
e36308b0
MM
12066 not one with TYPE_IS_SIZETYPE set.
12067 (dubious_conversion_warnings): Remove special-case code.
12068
3b9ae6f0
GK
120692000-10-21 Geoffrey Keating <geoffk@cygnus.com>
12070
7a0f14e5
GK
12071 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
12072 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
12073 (dump_type_prefix): Print vector-of-int as 'int vector'.
12074 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
12075 * tree.c (walk_tree): Handle VECTOR_TYPE.
12076
3b9ae6f0 12077 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5362b086 12078
aca77bd1
JM
120792000-10-21 Jason Merrill <jason@redhat.com>
12080
12081 * parse.y (operator): Set got_object from got_scope.
12082 Set looking_for_typename.
12083 * decl.c (lookup_name_real): Clear val after setting from_obj.
12084 Reorganize diagnostic.
12085
ba523395
JM
120862000-10-20 Jason Merrill <jason@redhat.com>
12087
12088 * tree.c (walk_tree): Don't walk into default args.
12089
12090 * error.c (dump_expr): Use host_integerp.
12091
2e44948d
DE
120922000-10-20 David Edelsohn <edelsohn@gnu.org>
12093
12094 * typeck2.c (abstract_virtuals_error): Use "because" instead of
12095 "since" in error message.
12096
d2a6f3c0 120972000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
44475138
RK
12098
12099 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
12100
11306230
JO
121012000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
12102
12103 * decl.c (revert_static_member_fn): Fixed typo.
12104
97ba1e3c
MM
121052000-10-19 Mark Mitchell <mark@codesourcery.com>
12106
c20118a8
MM
12107 * class.c (subobject_offset_fn): New type.
12108 (dfs_record_base_offsets): Remove.
12109 (record_base_offsets): Likewise.
12110 (dfs_search_base_offsets): Likewise.
12111 (record_subobject_offset): New function.
12112 (check_subobject_offset): Likewise.
12113 (walk_subobject_offsets): Likewise.
12114 (record_subobject_offsets): Likewise.
12115 (layout_conflict_p): Reimplement.
12116 (layout_nonempty_base_or_field): Correct handling of type
12117 conflicts during layout.
12118 (layout_empty_base): Likewise.
12119 (build_base_field): Adjust to handle new representation of empty
12120 base offset table.
12121 (build_base_fields): Likewise.
12122 (layout_virtual_bases): Likewise.
12123 (splay_tree_compare_integer_csts): New function.
12124 (layout_class_type): Use a splay_tree, rather than a varray, to
12125 represent the offsets of empty bases.
5362b086 12126
97ba1e3c
MM
12127 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
12128 * decl.c (select_decl): Don't return declarations that are
12129 DECL_ANTICIPATED.
12130
6bcedb4e
MM
121312000-10-18 Mark Mitchell <mark@codesourcery.com>
12132
12133 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
12134 (fake_std_node): New macro.
12135 * decl.c (in_std): Rename to ...
12136 (in_fake_std): ... this.
12137 (flag_no_builtin): Remove.
12138 (flag_no_nonansi_builtin): Likewise.
12139 (walk_namespaces_r): Use fake_std_node.
12140 (push_namespace): Use std_identifier.
12141 (pop_namespace): Use in_fake_std.
12142 (lookup_name_real): Use fake_std_node.
12143 (init_decl_processing): When -fhonor-std, create the `std'
12144 namespace. Don't create a dummy fake_std_node in that case.
12145 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
12146 (builtin_function): Put builtins whose names don't begin
12147 with `_' in the std namespace.
12148 * decl2.c (flag_no_builtin): Remove.
12149 (flag_no_nonansi_builtin): Likewise.
12150 (set_decl_namespace): Use fake_std_node.
12151 (validate_nonmember_using_decl): Likewise.
12152 (do_using_directive): Likewise.
12153 (handle_class_head): Likewise.
12154 * dump.c (dequeue_and_dump): Likewise.
12155 * except.c (init_exception_processing): Use std_identifier.
12156 * init.c (build_member_call): Use fake_std_node.
12157 * rtti.c (init_rtti_processing): Use std_identifier.
5362b086 12158
67673f5c
MM
121592000-10-17 Mark Mitchell <mark@codesourcery.com>
12160
12161 * cp-tree.h (back_end_hook): Remove declaration.
12162 * decl2.c (back_end_hook): Remove definition.
12163
12164 * dump.c (dequeue_and_dump): Dump TREE_USED.
12165
d2a6f3c0 121662000-10-17 Brad Lucier <lucier@math.purdue.edu>
8fef2e47
BL
12167
12168 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
12169
652469d0
JM
121702000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12171
12172 * decl.c (WINT_TYPE): Define.
12173 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
12174 c_size_type_node, signed_size_type_node and wint_type_node.
12175
74ff4629
JM
121762000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
12177
12178 * decl2.c (warn_missing_format_attribute): New variable.
12179 (lang_decode_option): Decode -Wmissing-format-attribute.
12180
634790f4
MM
121812000-10-16 Mark Mitchell <mark@codesourcery.com>
12182
12183 * typeck.c (qualify_type): Remove.
12184 (composite_pointer_type): Fix handling of conversions to `cv void*'.
12185
bb12da9d
KG
121862000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12187
12188 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
12189
4b945402
KG
121902000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12191
12192 * Makefile.in (parse.c, parse.h): Create atomically.
12193
1f8f4a0b
MM
121942000-10-12 Mark Mitchell <mark@codesourcery.com>
12195
12196 * class.c (current_obstack): Remove.
12197 * decl.c (ggc_p): Remove.
12198 (start_decl): Don't use decl_tree_cons.
12199 (grokdeclarator): Don't use build_decl_list.
12200 (start_function): Don't use decl_tree_cons.
12201 (finish_function): Don't mess with obstacks.
12202 * decl2.c (grok_x_components): Don't use build_decl_list.
12203 * lex.c (make_call_declarator): Don't call decl_tree_cons.
12204 (implicitly_declare_fn): Don't call build_decl_list.
12205 * parse.y (frob_specs): Don't call build_decl_list or
12206 decl_tree_cons.
12207 (expr_or_declarator_intern): Don't call decl_tree_cons.
12208 (primary): Don't call build_decl_list.
12209 (fcast_or_absdcl): Likewise.
12210 (typed_declspecs): Don't call decl_tree_cons.
12211 (reserved_declspecs): Don't call build_decl_list.
12212 (declmods): Likewise.
12213 (reserved_typespecquals): Likewise.
12214 (aggr): Likewise.
12215 (new_type_id): Likewise.
12216 (cv_qualifiers): Likewise.
12217 (after_type_declarator_intern): Likewise.
12218 (notype_declarator_intern): Likewise.
12219 (absdcl_intern): Likewise.
12220 (named_parm): Likewise.
12221 * pt.c (most_specialized_class): Likewise.
12222 * repo.c (temporary_obstack): Make it a structure, not a pointer.
12223 (init_repo): Initialize it.
12224 * search.c (current_obstack): Remove.
12225 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5362b086 12226
8dc54971
RH
122272000-10-09 Richard Henderson <rth@cygnus.com>
12228
12229 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
12230 (c++ language support bits for libgcc): Remove.
12231 (c++.clean): Remove cplib2.txt cleanup.
12232 * config-lang.in (headers, lib2funcs): Remove.
12233
12234 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
12235 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
12236 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
12237 * inc/new.h, inc/typeinfo: Remove files.
12238
b15ad712
JM
122392000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
12240
12241 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
12242 defined.
12243 (init_decl_processing): Initialize intmax_type_node and
12244 uintmax_type_node.
12245
156ce211
RH
122462000-10-06 Richard Henderson <rth@cygnus.com>
12247
12248 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
12249 (original_result_rtx): Remove.
12250 * decl.c (save_function_data): Don't clear x_result_rtx.
12251 (mark_lang_function): Don't mark it either.
12252 * expr.c (fixup_result_decl): Remove.
12253 * semantics.c (genrtl_named_return_value): Frob the return decl
12254 before calling emit_local_var.
12255 (genrtl_finish_function): Don't call fixup_result_decl.
12256 Always emit the jump to return_label.
12257
92777ce4
NS
122582000-10-06 Nathan Sidwell <nathan@codesourcery.com>
12259
12260 * pt.c (lookup_template_class): Set current access for enum.
12261 (tsubst_enum): Set file & line for enum decl.
5362b086 12262
92777ce4
NS
12263 * spew.c (yylex): Remove unused variable.
12264
63c16fc5
RH
122652000-10-05 Richard Henderson <rth@cygnus.com>
12266
12267 * semantics.c (genrtl_finish_function): Don't init or check
12268 can_reach_end; remove noreturn and return value checks.
12269
d1a458c4
TT
122702000-10-05 Tom Tromey <tromey@cygnus.com>
12271
12272 * init.c (build_java_class_ref): Use `build_static_name' with a
12273 suffix, not a prefix, to build the class object's name.
12274
509fc277
NS
122752000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12276
12277 * cp-tree.h (access_kind): Fix comment typo.
12278 * decl2.c (grokfield): Fix diagnostic typo.
12279 * semantics.c (finish_template_type): Fix comment typo.
12280 (finish_qualified_object_call_expr): Likewise.
12281
ce2e5191
NS
122822000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12283
12284 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5362b086 12285 tsubsting fails.
ce2e5191 12286
79cc5312
NS
122872000-10-05 Nathan Sidwell <nathan@codesourcery.com>
12288
12289 * spew.c (frob_id): New static function.
12290 (frob_opname): Use it.
12291 (yylex): Use it.
12292
f15b9af9
MM
122932000-10-01 Mark Mitchell <mark@codesourcery.com>
12294
12295 * decl.c (lang_mark_false_label_stack): Remove.
12296 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5362b086 12297
28e6b1c2
JM
122982000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
12299
12300 * gxxint.texi: Use @email for formatting email addresses.
12301
99885b3f
GDR
123022000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
12303
12304 * error.c: Remove direct obstack manipulation. Replace with
12305 output_buffer-based formatting. Adjust calls to removed macros.
12306 (obstack_chunk_alloc, obstack_chunk_free): Remove.
12307 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
12308 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
12309
c06aa51e
MM
123102000-09-24 Mark Mitchell <mark@codesourcery.com>
12311
12312 * ir.texi: Move to ../c-tree.texi.
12313
99fada40
JM
123142000-09-20 Jason Merrill <jason@redhat.com>
12315
12316 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
12317
bb20cc46
AJ
123182000-09-21 Andreas Jaeger <aj@suse.de>
12319
12320 * errfn.c: Move declaration of cp_printer and cp_printers to ...
12321 * cp-tree.h: ... here.
12322
12323 * error.c: Remove declaration of cp_printer.
12324
fab701da
MM
123252000-09-20 Mark Mitchell <mark@codesourcery.com>
12326
12327 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
12328
0370fea1
HPN
123292000-09-20 Hans-Peter Nilsson <hp@axis.com>
12330
12331 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
12332 users.
12333
78c120b5
MM
123342000-09-18 Mark Mitchell <mark@codesourcery.com>
12335
12336 * decl.c (start_function): Robustify.
12337
3f80e6ac
KG
123382000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12339
12340 * cp-tree.h (check_function_format): Accept a `status' parameter.
bb20cc46 12341
3f80e6ac
KG
12342 * call.c, typeck.c: Updates calls to `check_function_format'.
12343
fc928afe
GK
123442000-09-17 Geoffrey Keating <geoffk@cygnus.com>
12345
12346 * decl2.c (handle_class_head): Always push some scope even
12347 in the error case.
12348
8f17b5c5
MM
123492000-09-16 Mark Mitchell <mark@codesourcery.com>
12350
12351 * cp-tree.h (struct cp_language_function): Remove
12352 x_scope_stmt_stack and name_declared.
12353 (current_scope_stmt_stack): Remove.
12354 (function_name_declared_p): New macro.
12355 (struct lang_decl_flags): Use c_lang_decl as a base class.
12356 (context): Remove.
12357 (struct lang_decl): Replace saved_tree with context.
12358 (DECL_FRIEND_CONTEXT): Adjust accordingly.
12359 (SET_DECL_FRIEND_CONTEXT): Likewise.
12360 (DECL_VIRTUAL_CONTEXT): Likewise.
12361 (DECL_SAVED_TREE): Remove.
12362 (C_DECLARED_LABEL_FLAG): Likewise.
12363 (cplus_expand_expr_stmt): Don't declare.
12364 (add_decl_stmt): Likewise.
12365 (add_scope_stmt): Likewise.
12366 * decl.c (mark_stmt_tree): Remove.
12367 (case_compare): Likewise.
12368 (finish_case_label): Use c_add_case_label.
12369 (init_decl_processing): Set more language-specific hooks.
12370 (build_enumerator): Fix typo in comment.
12371 (cplus_expand_expr_stmt): Remove.
12372 (mark_lang_function): Use mark_c_language_function.
12373 (lang_mark_tree): Use c_mark_lang_decl.
12374 * decl2.c: Change order of inclusion.
12375 * except.c: Likewise.
12376 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
12377 back on c_expand_expr.
12378 * friend.c: Include expr.h.
12379 * init.c: Change order of inclusion.
12380 * Makefile.in: Update dependencies.
12381 * lex.h (free_lang_decl_chain): Remove.
12382 * optimize.c (maybe_clone_body): Use function_name_declared_p.
12383 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
12384 it doesn't exist.
12385 (instantiate_decl): Use function_name_declared_p.
12386 * semantics.c (lang_expand_expr_stmt): Remove.
12387 (set_current_function_name_declared): Likewise.
12388 (current_function_name_declared): Likewise.
12389 (begin_compound_stmt): Use function_name_declared_p.
12390 (add_decl_stmt): Remove.
12391 (setup_vtbl_ptr): Use function_name_declared_p.
12392 (add_scope_stmt): Remove.
12393 (current_scope_stmt_stack): New function.
12394 (cp_expand_stmt): Don't handle SCOPE_STMTs.
12395 (expand_body): Use function_name_declared_p.
12396 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
12397 * typeck.c: Change order of includes.
12398 (convert_sequence): Remove.
bb20cc46 12399
d9dbd9b1
JM
124002000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
12401
12402 * lex.c (reswords): Add _Complex.
12403
d2a6f3c0 124042000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9985f210
RK
12405
12406 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
12407
f903ebb1
DA
124082000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
12409
12410 * init.c (begin_init_stmts): Don't use // comments.
12411
f2ae0c45
JM
124122000-09-12 Jason Merrill <jason@redhat.com>
12413
12414 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
12415 all non-extern arrays.
12416
12417 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
12418 typenames, too. Downgrade complaint to pedwarn.
12419 (xref_tag): Warn about surprising behavior of 'friend struct T'.
12420 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
12421 'class This::Inherited'.
12422
71ad4a16
MM
124232000-09-12 Mark Mitchell <mark@codesourcery.com>
12424
12425 * decl.c (finish_case_label): Given the LABEL_DECL a
12426 DECL_CONTEXT.
12427
c3e76028
GDR
124282000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
12429
12430 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
12431 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
12432 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
12433 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
12434 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
12435 New macros.
12436 (sorry_for_unsupported_tree, print_scope_operator,
12437 print_left_paren, print_right_paren, print_left_bracket,
12438 print_right_bracket, print_whitespace): Likewise.
12439 (aggr_variety): Rename to class_key_or_enum.
12440 (print_type): Rename to print_type_id.
12441 (print_type_specifier_seq, print_simple_type_specifier,
12442 print_elaborated_type_specifier,
12443 print_rest_of_abstract_declarator,
12444 print_parameter_declaration_clause, print_exception_specification,
12445 print_nested_name_specifier, print_template_id,
12446 typedef_original_name, print_template_argument_list_start,
12447 print_template_argument_list_end): New functions.
12448
eb50138b
GDR
124492000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
12450
a8a05998 12451 * ir.texi: Add more documentation.
eb50138b 12452
f444e36b
MM
124532000-09-11 Mark Mitchell <mark@codesourcery.com>
12454
12455 * cp-tree.h (struct saved_scope): Remove x_function_parms.
12456 (current_function_parms): Don't define.
12457 (struct cp_language_function): Remove parms_stored.
12458 (current_function_just_assigned_this): Don't define.
12459 (current_function_parms_stored): Likewise.
12460 (static_ctors): Declare.
12461 (static_dtors): Likewise.
12462 (SF_EXPAND): Don't define.
12463 (expand_start_early_try_stmts): Remove declaration.
12464 (store_parm_decls): Likewise.
12465 * decl.c (static_ctors): Don't declare.
12466 (static_dtors): Likewise.
12467 (struct binding_level): Remove this_block.
12468 (poplevel): Remove dead code.
12469 (set_block): Likewise.
12470 (mark_binding_level): Don't mark this_block.
12471 (mark_saved_scope): Don't mark x_function_parms.
12472 (init_decl_processing): Don't add current_function_parms as a GC
12473 root.
12474 (check_function_type): Change prototype.
12475 (start_function): Remove RTL-generation code.
12476 (expand_start_early_try_stmts): Remove.
12477 (store_parm_decls): Give it internal linkage. Remove
12478 RTL-generation code.
12479 (finish_function): Remove RTL-generation code.
12480 * decl2.c (static_ctors): Fix formatting.
12481 (static_dtors): Likewise.
12482 * method.c (use_thunk): Don't call store_parm_decls.
12483 (synthesize_method): Likewise.
12484 * optimize.c (maybe_clone_body): Likewise.
12485 * parse.y (fn.def2): Likewise.
12486 (.set_base_init): Likewise.
12487 (nodecls): Likewise.
12488 * pt.c (instantiate_decl): Likewise.
12489 * rtti.c (synthesize_tinfo_fn): Likewise.
12490 * semantics.c (genrtl_try_block): Simplify.
12491 (expand_body): Use genrtl_start_function and
12492 genrtl_finish_function.
12493 (genrtl_start_function): New function.
12494 (genrtl_finish_function): Likewise.
12495
181d2ba0
NS
124962000-09-11 Nathan Sidwell <nathan@codesourcery.com>
12497
12498 * error.c (cp_tree_printer, case 'P'): Append break.
12499
f2d71db6
NS
125002000-09-11 Nathan Sidwell <nathan@codesourcery.com>
12501
12502 * cp-tree.h (frob_opname): Declare.
12503 * parse.y (saved_scopes): New static variable.
12504 (cp_parse_init): Adjust.
12505 (do_id): If lastiddecl is NULL, do do_identifier.
12506 (operator): Save scope information.
aca77bd1 12507 (unoperator): New reduction. Restore scope information.
f2d71db6
NS
12508 (operator_name): Append unoperator. Call frob_opname.
12509 * spew.c (frob_opname): Define.
12510
d8ea8f28
ZW
125112000-09-10 Zack Weinberg <zack@wolery.cumb.org>
12512
12513 * decl.c, rtti.c: Include defaults.h if not already included.
12514 Don't define the *_TYPE_SIZE macros.
12515
56cb9733
MM
125162000-09-09 Mark Mitchell <mark@codesourcery.com>
12517
12518 * cp-tree.h (push_switch): Change prototype.
12519 (check_cp_case_value): Remove declaration.
12520 (decl_constant_value): Likewise.
12521 * decl.c (struct cp_switch): Add switch_stmt and cases.
12522 (case_compare): New function.
12523 (push_switch): Set switch_stmt. Initialize cases.
12524 (pop_switch): Clean up cases.
12525 (define_case_label): Rename to ...
12526 (finish_case_label): ... this. Do semantic analysis for case
12527 labels here.
12528 (start_function): Correct comment.
12529 * decl2.c (check_cp_case_value): Remove.
12530 * expr.c (do_case): Remove.
12531 * pt.c (tsubst_expr): Adjust call to finish_case_label.
12532 * semantics.c (genrtl_do_poplevel): Remove declaration.
12533 (RECHAIN_STMTS): Remove.
12534 (finish_break_stmt): Use build_break_stmt.
12535 (finish_continue_stmt): Use build_continue_stmt.
12536 (finish_switch_cond): Adjust condition here, rater than in
12537 c_expand_start_case.
12538 (finish_case_label): Remove.
12539 * typeck.c (c_expand_return): Remove.
12540 (c_expand_start_case): Likewise.
bb20cc46 12541
990a9693
GDR
125422000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
12543
12544 * ir.texi: Document type nodes.
12545
ae499cce
MM
125462000-09-06 Mark Mitchell <mark@codesourcery.com>
12547
54f7877c
MM
12548 * cp-tree.h (init_cp_semantics): Declare.
12549 (genrtl_try_block): Don't declare.
12550 (genrtl_handler): Likewise.
12551 (genrtl_catch_block): Likewise.
12552 (genrtl_ctor_stmt): Likewise.
12553 (genrtl_subobject): Likewise.
12554 (genrtl_do_poplevel): Likewise.
12555 (genrtl_named_return_value): Likewise.
12556 * lex.c (init_parse): Call init_cp_semantics.
12557 * semantics.c (genrtl_try_block): Give it internal linkage.
12558 (genrtl_handler): Likewise.
12559 (genrtl_catch_block): Likewise.
12560 (genrtl_ctor_stmt): Likewise.
12561 (genrtl_subobject): Likewise.
12562 (genrtl_do_poplevel): Likewise.
12563 (genrtl_named_return_value): Likewise.
12564 (lang_expand_stmt): Rename to ...
12565 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
12566 (init_cp_semantics): Define.
12567
3a0d3e1e
MM
12568 * decl.c (initialize_local_var): Remove RTL-generating code.
12569 * semantics.c (genrtl_try_block): Fix formatting.
12570
ae499cce
MM
12571 Move statement-tree facilities from C++ to C front-end.
12572 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
12573 (void_zero_node): Remove.
12574 (stmt_tree): Likewise.
12575 (scope_chain): Adjust.
12576 (language_function): Rename to cp_language_function.
12577 (cp_function_chain): Adjust.
12578 (current_stmt_tree): Remove.
12579 (last_tree): Likewise.
12580 (last_expr_type): Likewise.
12581 (struct lang_decl): Adjust.
12582 (STMT_IS_FULL_EXPR_P): Remove.
12583 (add_tree): Remove.
12584 (begin_stmt_tree): Likewise.
12585 (finish_stmt_tree): Likewise.
12586 (walk_tree_fn): Likewise.
12587 (walk_stmt_tree): Likewise.
12588 * class.c (finish_struct): Replace use of add_tree with add_stmt.
12589 * decl.c (mark_stmt_tree): Adjust type.
12590 (init_decl_processing): Don't build void_zero_node.
12591 (initialize_local_var): Adjust usage of current_stmt_tree.
12592 (finish_enum): Use add_stmt, not add_tree.
12593 (save_function_data): Adjust use of language_function.
12594 (finish_constructor_body): Use add_stmt, not add_tree.
12595 (finish_destructor_body): Likewise.
12596 (push_cp_function_context): Adjust use of language_function.
12597 (pop_cp_function_context): Likewise.
12598 (mark_lang_function): Likewise.
12599 (mark_cp_function_context): Likewise.
12600 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
12601 (build_vec_init): Likewise.
12602 * semantics.c (SET_LAST_STMT): Remove.
12603 (RECHAIN_STMTS): Don't use it.
12604 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
12605 (current_stmt_tree): Define.
12606 (add_tree): Remove.
12607 (finish_goto_stmt): Use add_stmt, not add_tree.
12608 (finish_expr_stmt): Likewise.
12609 (begin_if_stmt): Likewise.
12610 (finish_then_clause): Likewise.
12611 (begin_while_stmt): Likewise.
12612 (begin_do_stmt): Likewise.
12613 (finish_return_stmt): Likewise.
12614 (begin_for_stmt): Likewise.
12615 (finish_break_stmt): Likewise.
12616 (finish_continue_stmt): Likewise.
12617 (begin_switch_stmt): Likewise.
12618 (finish_case_label): Likewise.
12619 (begin_try_block): Likewise.
12620 (begin_function_try_block): Likewise.
12621 (begin_handler): Likewise.
12622 (begin_catch_block): Likewise.
12623 (begin_compound_stmt): Likewise.
12624 (begin_asm_stmt): Likewise.
12625 (finish_asm_stmt): Likewise.
12626 (finish_label_stmt): Likewise.
12627 (add_decl_stmt): Likewise.
12628 (finish_subobject): Likewise.
12629 (finish_decl_cleanup): Likewise.
12630 (finish_named_return_value): Likewise.
12631 (setup_vtbl_ptr): Likewise.
12632 (add_scope_stmt): Likewise.
12633 (finish_stmt_expr): Likewise.
12634 (prune_unused_decls): Remove.
12635 (begin_stmt_tree): Likewise.
12636 (finish_stmt_tree): Likewise.
12637 (prep_stmt): Adjust use of current_stmt_tree.
12638 (lang_expand_stmt): Likewise.
12639 * tree.c (statement_code_p): Remove.
12640 (cp_statement_code_p): New function.
12641 (walk_stmt_tree): Remove.
12642 (init_tree): Set lang_statement_code_p.
bb20cc46 12643
0e5921e8
ZW
126442000-09-06 Zack Weinberg <zack@wolery.cumb.org>
12645
12646 Integrated preprocessor.
12647
12648 * Make-lang.in, Makefile.in: Remove all references to input.c,
12649 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
12650 * gxx.gperf, hash.h, input.c: Delete.
12651 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
12652 initialized properly.
12653
12654 * class.c (fixup_pending_inline): Take a tree, not a
12655 struct pending_inline *. All callers changed.
12656 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
12657 RID_PROTECTED entries in ridpointers[] array here.
12658 * decl.c (duplicate_decls): Do not refer to struct
12659 pending_inline.
12660 (record_builtin_type, init_decl_processing): Use RID_MAX not
12661 CP_RID_MAX.
12662 (grokdeclarator): Use C_IS_RESERVED_WORD.
12663 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
12664 cpplib.
12665 (grok_x_components): Do not inspect pending_inlines chain.
12666
12667 * cp-tree.h (struct lang_identifier): Add rid_code entry.
12668 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
12669 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
12670 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12671 TIME_IDENTIFIER_FILEINFO): Kill.
12672 Update prototypes.
12673 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
12674 single 32-bit word.
12675 * parse.y: Call do_pending_inlines unconditionally.
12676 reinit_parse_for_method is now snarf_method. fn.defpen is no
12677 longer necessary. Remove unnecessary <itype> annotation on
12678 SCOPE. Do not refer to end_of_file or struct pending_inline.
12679 * semantics.c (begin_inline_definitions): Call
12680 do_pending_inlines unconditionally.
12681
12682 * lex.c: Remove all code now shared with C front end.
12683 Initialize cpplib properly if USE_CPPLIB. Put reserved words
12684 into the get_identifier table. Rewrite pragma handling to
12685 work with the registry. Move code to save tokens for later
12686 processing to spew.c.
12687
12688 * spew.c: Rewrite everything in terms of token streams instead
12689 of text. Move routines here from lex.c / input.c as
12690 appropriate. GC-mark trees hanging off the pending inlines
12691 chain.
12692
44835fdd
MM
126932000-09-06 Mark Mitchell <mark@codesourcery.com>
12694
12695 * NEWS: Mention that the named return value extension has been
12696 deprecated.
12697 * cp-tree.h (original_result_rtx): Define.
12698 (TREE_REFERENCE_EXPR): Remove.
12699 (DECL_VPARENT): Likewise.
12700 (pushdecl_nonclass_level): Likewise.
12701 (store_return_init): Likewise.
12702 (reinit_lang_specific): Likewise.
12703 (genrtl_named_return_value): Change prototype.
12704 * decl.c (original_result_rtx): Remove.
12705 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12706 Do not generate RTL for local variables here.
12707 (store_return_init): Remove.
12708 * semantics.c (genrtl_named_return_value): Simplify. Fold in
12709 store_return_init.
12710 (finish_named_return_value): Adjust accordingly. Warn that this
12711 extension is deprecated.
12712 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12713
d7c4edd0
NS
127142000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12715
12716 * pt.c (type_unification_real): Replace switch with if.
12717 (unify): Tsubst non-type parms before comparing.
12718
46e2747c
NS
127192000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12720
12721 * error.c (dump_typename): New function, broken out of ...
12722 (dump_type): ... here. Use it.
12723 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12724
c833d2be
NS
127252000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12726
12727 * init.c (build_offset_ref): Deal with namespace scoped
12728 TEMPLATE_ID_EXPRs.
12729
b1ce3eb2
NS
127302000-09-06 Nathan Sidwell <nathan@codesourcery.com>
12731
12732 * class.c (resolve_address_of_overloaded_function): Add
12733 explanation message.
12734 * decl.c (define_case_label): Reformat explanation.
12735 * decl2.c (finish_static_data_member_decl): Likewise.
12736 (grokfield): Likewise.
12737 * friend.c (do_friend): Likewise.
12738
11f53b6a
ZW
127392000-09-05 Zack Weinberg <zack@wolery.cumb.org>
12740
12741 * tree.c (walk_tree): Expose tail recursion.
12742 (walk_stmt_tree): New function.
12743 * cp-tree.h: Prototype walk_stmt_tree.
12744 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12745 the BLOCKs directly. If a BLOCK has no variables after
12746 pruning, discard it.
12747 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
12748 restore the line number.
12749
ee94fce6
MM
127502000-09-05 Mark Mitchell <mark@codesourcery.com>
12751
12752 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12753 (pt.o): Remove dependency on HTAB_H.
12754 * cp-tree.h: Include hashtab.h.
12755 (walk_tree): Change prototype.
12756 (walk_tree_without_duplicates): New function.
12757 * decl.c (check_default_argument): Use it.
12758 * optimize.c (remap_decl): Adjust calls to walk_tree.
12759 (copy_body): Likewise.
12760 (expand_calls_inline): Likewise.
12761 (calls_setjmp_p): Use walk_tree_without_duplicates.
12762 * pt.c: Don't include hashtab.h.
12763 (for_each_template_parm): Use walk_tree_without_duplicates.
12764 * semantics.c (finish-stmt_tree): Likewise.
12765 (expand_body): Likewise.
12766 * tree.c (walk_tree): Add additional parameter.
12767 (walk_tree_without_duplicates): New function.
12768 (count_trees): Use it.
12769 (verify_stmt_tree): Adjust call to walk_tree.
12770 (find_tree): Use walk_tree_without_duplicates.
12771 (no_linkage_check): Likewise.
12772 (break_out_target_exprs): Adjust call to walk_tree.
12773 (cp_unsave): Likewise.
12774
a1281f45
KL
127752000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12776
12777 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12778 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12779 * cp-tree.h (TYPE_BINFO): Adjust comment.
12780 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12781 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12782 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12783 (TYPE_TEMPLATE_INFO): Likewise.
12784 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12785 * class.c (push_nested_class): Likewise.
12786 * decl.c (lookup_name_real): Likewise.
12787 (grokdeclarator): Likewise.
12788 (grok_op_properties): Likewise.
12789 (xref_tag): Likewise.
12790 (xref_basetypes): Likewise.
12791 * decl2.c (constructor_name_full): Likewise.
12792 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12793 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12794 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12795 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12796 (dump_type_suffix): Likewise.
12797 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12798 instead.
12799 (get_aggr_from_typedef): Likewise.
12800 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12801 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12802 (write_template_parm): Likewise.
12803 (write_template_template_parm): Check tree code instead of
12804 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
0e5921e8 12805 * method.c (build_overload_nested_name): Add
a1281f45
KL
12806 BOUND_TEMPLATE_TEMPLATE_PARM.
12807 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12808 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12809 * pt.c (convert_template_argument): Check tree code instead of
12810 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12811 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12812 (for_each_template_parm): Adjust comment.
12813 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
12814 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12815 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
12816 template_args_equal to compare template template parameter cases.
12817 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12818 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12819 instead.
12820 * tree.c (copy_template_template_parm): Decide whether to create
12821 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12822 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12823 (copy_tree_r): Likewise.
12824 * typeck.c (comptypes): Likewise. Check tree code instead of
12825 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12826
c9672d45
ME
128272000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
12828
12829 * decl.c (finish_function): Move the code for handling functions
12830 marked with the constructor and destructor attributes inside the
12831 expand_p block.
12832
67804825
NS
128332000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12834
12835 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12836
1bc0793e
NS
128372000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12838
12839 * pt.c (lookup_template_class): Remove abort.
12840 * tree.c (get_type_decl): Allow error_mark_node.
12841
3338663b
NS
128422000-09-04 Nathan Sidwell <nathan@codesourcery.com>
12843
12844 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12845 TEMPLATE_ID_EXPRs.
12846
1b84dc37
MM
128472000-09-03 Mark Mitchell <mark@codesourcery.com>
12848
12849 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
c9672d45 12850 new ABI mangling.
1b84dc37 12851
9687f8f4
NS
128522000-09-01 Nathan Sidwell <nathan@codesourcery.com>
12853
12854 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
c9672d45 12855 union tag mismatch error reporting.
9687f8f4 12856
4f8025eb
NS
128572000-09-01 Nathan Sidwell <nathan@codesourcery.com>
12858
c9672d45 12859 * call.c (build_scoped_method_call): Check it is not a namespace.
4f8025eb 12860
495d26d6
JM
128612000-08-30 Jason Merrill <jason@redhat.com>
12862
12863 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12864
12865 * tree.c (bot_manip): Check TREE_CONSTANT rather than
12866 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
12867 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12868
12869 * decl.c (start_function): Always call make_function_rtl.
12870
7efcf466
ZW
128712000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12872
495d26d6 12873 * semantics.c (prune_unused_decls): New function.
7efcf466
ZW
12874 (finish_stmt_tree): Call it via walk_tree.
12875
63ad61ed
ZW
128762000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12877
12878 * class.c (build_secondary_vtable): Constify a char *.
12879 * decl.c (init_decl_processing): Initialize function_id_node,
12880 pretty_function_id_node, and func_id_node.
12881 * input.c (struct input_source): Constify 'str'.
12882 (feed_input): Constify first argument.
12883 * mangle.c (write_identifier): Constify argument.
12884 * pt.c (mangle_class_name_for_template): Constify argument.
12885
4361b41d
MM
128862000-08-29 Mark Mitchell <mark@codesourcery.com>
12887
12888 * typeck.c (mark_addressable): Remove code that pokes around in
12889 RTL.
12890
881c6935
JM
128912000-08-28 Jason Merrill <jason@redhat.com>
12892
12893 * lex.c (file_name_nondirectory): Move to toplev.c.
12894
12895 * cp-tree.h (LOCAL_CLASS_P): New macro.
12896 * class.c (finish_struct_1): Use it.
12897
f0f33848
AS
128982000-08-27 Alex Samuel <samuel@codesourcery.com>
12899
12900 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12901 (write_encoding): Pass another argument to write_name.
12902 (write_name): Add ignore_local_scope parameter. Fix handling of
12903 local names.
12904 (write_nested_name): Use write_unqualified_name.
12905 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
12906 (write_template_prefix): Use write_unqualified_name.
12907 (write_component): Remove.
12908 (write_local_name): Add parameter. Use direct local entity to
12909 discriminator calculation.
0e5921e8 12910 (write_class_enum_type): Pass another argument to write_name.
f0f33848
AS
12911 (write_template_template_arg): Likewise.
12912 (make_guard_variable): Likewise.
0e5921e8 12913
94dfccd1
JM
129142000-08-27 Jason Merrill <jason@redhat.com>
12915
12916 * decl.c (pushdecl): Matching decls for local externs are found in
12917 the current level. Propagate linkage information from previous
12918 declarations.
12919
14fdf4b6
GDR
129202000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
12921
12922 * ir.texi (Expressions): Fix typo.
12923
b5232c64
GM
129242000-08-25 Greg McGary <greg@mcgary.org>
12925
12926 * tree.c (init_tree): Use ARRAY_SIZE.
12927
22a4158c
GDR
129282000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
12929
12930 * error.c (cp_tree_printer): Rework.
12931
f22967f3
MM
129322000-08-25 Mark Mitchell <mark@codesourcery.com>
12933
a0c182fe
MM
12934 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12935 dyn-string.o.
12936 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12937 (cp-demangle.o): Remove target.
12938 (dyn-string.o): Likewise.
12939
f22967f3
MM
12940 * decl.c (grokfndecl): Require that `main' return an `int'.
12941 * mangle.c (write_encoding): Don't mangle return types for
12942 conversion functions.
12943
a1066c99
GDR
129442000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
12945
12946 * error.c (tree_formatting_info): New data type.
12947 (tree_being_formatted): New macro.
12948 (tree_formatting_flags): Likewise.
12949 (put_whitespace): Likewise.
12950 (print_tree_identifier): Likewise.
12951 (print_identifier): Likewise.
12952 (cp_tree_printer, print_function_argument_list, print_declaration,
12953 print_expression, print_function_declaration,
12954 print_function_parameter, print_type, print_cv_qualifier): New
0e5921e8 12955 functions.
a1066c99
GDR
12956 (init_error): Initialize lang_printer.
12957
3f2b640a
JM
129582000-08-24 Jason Merrill <jason@redhat.com>
12959
12960 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12961 adjustment necessary.
12962
7ec09bf7
GM
129632000-08-24 Greg McGary <greg@mcgary.org>
12964
12965 * cp-tree.h (MAIN_NAME_P): Remove macro.
12966
2ab99c46
GDR
129672000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
12968
12969 * error.c (print_instantiation_context): Don't forget to flush the
12970 buffer.
12971
7def1251
JM
129722000-08-23 Jason Merrill <jason@redhat.com>
12973
12974 * typeck.c (build_ptrmemfunc): Save the input pmf.
12975
12976 * method.c (process_modifiers): Use same_type_p.
12977
94350948
MM
129782000-08-23 Mark Mitchell <mark@codesourcery.com>
12979
12980 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12981 * mangle.c (write_function_type): Change prototype.
12982 (write_encoding): Don't mangle return types for
12983 constructors or destructors.
12984 (write_type): Adjust call to write_function_type.
12985 * pt.c (instantiate_template): Instantiate alternate entry points
12986 when instantiating the main function.
0e5921e8 12987
a64e7329
GDR
129882000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
12989
12990 * error.c (cp_print_error_function): Don't use embedded '\n' in
0e5921e8 12991 output_printf.
a64e7329 12992
a72462a4
GDR
129932000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
12994
12995 * decl.c (init_decl_processing): Remove bogus initialization.
12996 * error.c (lang_print_error_function): Restore here.
0e5921e8
ZW
12997 (init_error): Initialize print_error_function.
12998
3add6264
TP
129992000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13000
13001 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
13002
cb753e49
GDR
130032000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
13004
13005 * Makefile.in (error.o): Depends on diagnostic.h
13006
13007 * cp-tree.h (problematic_instantiation_changed,
13008 record_last_problematic_instantiation, current_instantiation,
13009 print_instantiation_context): Declare.
13010 (maybe_print_template_context): Remove.
13011
13012 * decl.c (init_decl_processing): Set print_error_function to NULL.
13013 (lang_print_error_function): Remove, since we're using a new
13014 machinery.
13015
13016 * error.c: #include diagnostic.h
13017 (function_category): New function.
13018 (cp_diagnostic_starter): Likewise.
13019 (cp_diagnostic_finalizer): Likewise.
13020 (cp_print_error_function): Likewise.
13021 (maybe_print_instantiation_context): Likewise.
13022 (print_instantiation_full_context): Likewise.
13023 (print_instantiation_partial_context): Likewise.
13024 (print_instantiation_context): Define.
13025 (init_error): Initialize diagnostic pager and finalizer.
13026
13027 * pt.c (problematic_instantiation_changed): Define.
13028 (record_last_problematic_instantiation): Likewise.
13029 (current_instantiation): Likewise.
13030 (maybe_print_template_context): Remove.
13031 (print_template_context): Likewise.
13032 (current_tinst_level): Make static to reflect Brendan Kehoe's
13033 change of 1995-04-13.
0e5921e8
ZW
13034 (push_tinst_level): Call print_instantiation_context.
13035
05a3d06e 130362000-08-21 Nix <nix@esperi.demon.co.uk>
0e5921e8 13037
05a3d06e
N
13038 * lang-specs.h: Do not process -o or run the assembler if
13039 -fsyntax-only.
13040
93e2382f
JM
130412000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
13042
13043 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
13044 variables.
13045 * decl2.c (lang_decode_option): Disable gettext attributes for
13046 -ansi.
13047
24805e80
GDR
130482000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
13049
13050 * lex.c (lang_init_options): Default diagnostic message maximum
13051 length to 80, when line-wrapping.
13052
b485e15b
MM
130532000-08-20 Mark Mitchell <mark@codesourcery.com>
13054
13055 * class.c (build_vtbl_initializer): Clear the entire
13056 vtbl_init_data. Start keeping track of the functions for which we
13057 have created vcall offsets here.
13058 (dfs_build_vcall_offset_vtbl_entries): Remove.
13059 (build_vcall_offset_vtbl_entries): Reimplement.
13060 (add_vcall_offset_vtbl_entries_r): New function.
13061 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
13062 computing when vcall offsets are necessary.
13063
2ae7bada
NS
130642000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13065
13066 * decl.c (member_function_or_else): Use cp_error ... %T.
13067 (grokdeclarator): Likewise.
13068 (start_method): Likewise.
0e5921e8 13069 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2ae7bada 13070
7a8b1375
NS
130712000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13072
13073 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
0e5921e8 13074 TYPE_DECLs.
7a8b1375 13075
19420d00
NS
130762000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13077
13078 * cp-tree.h (PTRMEM_OK_P): New macro.
13079 (itf_ptrmem_ok): New enumeration value.
13080 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
13081 argument. Diagnose implicit pointer to member.
13082 (instantiate_type): Don't diagnose implicit pointer to member
13083 here. Pass itf_ptrmem_ok if ok. Adjust calls to
13084 resolve_address_of_overloaded_function.
13085 * init.c (build_offset_ref): Set PTRMEM_OK_P.
13086 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
13087 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
13088 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
13089 (build_unary_op): Deal with single non-static member in
13090 microsoft-land.
13091
66081283
NS
130922000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13093
13094 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
13095
fa40aa12
NS
130962000-08-18 Nathan Sidwell <nathan@codesourcery.com>
13097
13098 * cp-tree.h (enum_name_string): Remove prototype.
13099 (report_case_error): Remove prototype.
13100 * cp/typeck2.c (enum_name_string): Remove.
13101 (report_case_error): Remove.
13102 * error.c (dump_expr): Deal with enum values directly.
13103 Correctly negate integer constant.
13104
d13b34e9
NS
131052000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13106
13107 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
13108 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
13109 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
13110 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
13111 (__cxa_vec_new): Use __cxa_vec_new2.
13112 (__cxa_vec_delete): Use __cxa_vec_delete2.
13113
2f1b80af
NS
131142000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13115
13116 * vec.cc (__cxa_vec_new): Set "C" linkage.
13117 (__cxa_vec_ctor): Likewise.
13118 (__cxa_vec_cctor): Likewise.
13119 (__cxa_vec_dtor): Likewise.
13120 (__cxa_vec_delete): Likewise.
13121 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
13122 (__cxa_vec_ctor): Likewise.
13123 (__cxa_vec_cctor): Likewise.
13124 (__cxa_vec_dtor): Likewise.
13125 (__cxa_vec_delete): Likewise.
13126
105d8e1f
NS
131272000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13128
13129 * class.c (instantiate_type): Reinstate local variable
13130 deleted in previous change.
0e5921e8 13131
f1819d9a
NS
13132 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
13133 itf_no_attributes.
105d8e1f 13134
5e76004e
NS
131352000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13136
13137 * cp-tree.h (instantiate_type_flags): New enumeration.
13138 (instantiate_type): Change parameter.
13139 * class.c (instantiate_type): Adjust prototype. Adjust.
13140 * call.c (standard_conversion): Adjust instantiate_type call.
13141 (reference_binding): Likewise.
13142 (build_op_delete_call): Likewise.
13143 (convert_like_real): Likewise.
13144 * cvt.c (cp_convert_to_pointer): Likewise.
13145 (convert_to_reference): Likewise.
13146 * pt.c (convert_nontype_argument): Likewise.
13147 * typeck.c (build_binary_op): Likewise.
13148 (build_ptrmemfunc): Likewise.
13149 (convert_for_assignment): Likewise.
13150
4b054b80
NS
131512000-08-17 Nathan Sidwell <nathan@codesourcery.com>
13152
13153 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
13154 (current_aggr): Define.
13155 * decl.c (grokdeclarator): Make sure a friend class is an
13156 elaborated type specifier.
13157 * parse.y (current_aggr): Remove static definition.
13158 (cp_parse_init): Adjust.
13159 (structsp): Clear and restore current_aggr.
13160 (component_decl_list): Clear current_aggr.
0e5921e8 13161
4b054b80
NS
13162 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
13163 aggregate tag on the typename's context.
0e5921e8 13164
321cba97
NS
13165 * pt.c (tsubst_friend_class): Return error_mark_node, if
13166 parms becomes NULL.
13167 (instantiate_class_template): Ignore error_mark_node friend types.
4b054b80 13168
08aead78
NS
131692000-08-14 Nathan Sidwell <nathan@codesourcery.com>
13170
13171 * cvt.c (warn_ref_binding): New static function, broken out of ...
0e5921e8 13172 (convert_to_reference): ... here. Use it.
08aead78 13173
fa1f3ebc
KL
131742000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13175
13176 * parse.y (template_arg): Add rule for template qualified with
13177 global scope.
13178
9845b52b
TP
131792000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13180
13181 * decl2.c (add_function): Reorganize.
13182 (arg_assoc): Do not consider function template decls.
13183
e69c8072
JM
131842000-08-11 Jason Merrill <jason@redhat.com>
13185
13186 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
13187 looking inside.
13188
5c1e5476
NS
131892000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13190
13191 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
13192 (lookup_nested_tag): Likewise.
0e5921e8 13193
5c1e5476
NS
13194 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
13195 can be produced.
13196
5426aa7f
NS
131972000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13198
13199 * parse.y (named_complex_class_head_sans_basetype): Remove
13200 always true if.
13201
fd037e0d
NS
132022000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13203
13204 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
13205 explicit TEMPLATE_ID_EXPR args.
13206 (build_expr_from_tree, case CALL_EXPR): Likewise.
13207
73ae5c34
NS
132082000-08-11 Nathan Sidwell <nathan@codesourcery.com>
13209
13210 * decl.c (check_tag_decl): Diagnose typename's which don't
13211 declare anything.
13212
aa54df09
NS
132132000-08-10 Nathan Sidwell <nathan@codesourcery.com>
13214
13215 * init.c (build_aggr_init): Reject bogus array initializers
13216 early.
13217
7e8dad18
NS
132182000-08-09 Nathan Sidwell <nathan@codesourcery.com>
13219
13220 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
13221 runtime.
13222 * cp/tinfo.cc (__dynamic_cast): Likewise.
0e5921e8 13223 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7e8dad18 13224
0f586b9b
NS
132252000-08-09 Nathan Sidwell <nathan@codesourcery.com>
13226
13227 * cvt.c (convert_to_pointer_force): Fix error message when
0e5921e8 13228 attempting to cast from ambiguous base.
0f586b9b 13229
08e72a19
JM
132302000-08-08 Jason Merrill <jason@redhat.com>
13231
13232 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
13233 (tsubst_template_arg_vector): Likewise.
13234
13235 * decl2.c (build_anon_union_vars): Choose the largest field; don't
13236 assume that one will be as large as the union.
13237
0811ea8f
KH
132382000-08-07 Kazu Hirata <kazu@hxi.com>
13239
13240 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
13241 * decl.c (pop_labels): Likewise.
13242
f9fcf62b
JO
132432000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
13244
13245 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
13246 specifications.
13247 (__pointer_to_member_type_info): Likewise.
13248 (__base_class_info): Likewise.
13249 (__class_type_info): Likewise.
13250 (__si_class_type_info): Likewise.
13251 (__vmi_class_type_info): Likewise.
13252 * tinfo.cc (__si_class_type_info::__do_find_public_src):
13253 Changed member names to match specifications.
13254 (__vmi_class_type_info::__do_find_public_src): Likewise.
13255 (__si_class_type_info::__do_dyncast): Likewise.
13256 (__vmi_class_type_info::__do_dyncast): Likewise.
13257 (__si_class_type_info::__do_upcast): Likewise.
13258 (__vmi_class_type_info::__do_upcast): Likewise.
13259 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
13260 (__pbase_type_info::__pointer_catch): Likewise.
13261 (__pointer_type_info::__pointer_catch): Likewise.
13262 (__pointer_to_member_type_info::__pointer_catch): Likewise.
13263
a36556a8
ZW
132642000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13265
0e5921e8
ZW
13266 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
13267 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
13268 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
a36556a8 13269
452a394b
MM
132702000-08-04 Mark Mitchell <mark@codesourcery.com>
13271
13272 * cp-tree.h (add_method): Change prototype.
13273 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
13274 Don't double the size of the method vector in the error case.
13275 (handle_using_decl): Adjust call to add_method.
13276 (add_implicitly_declared_members): Likewise.
13277 (clone_function_decl): Likewise.
13278 * decl2.c (check_classfn): Likewise.
13279 * semantics.c (finish_member_declaration): Likewise.
0e5921e8 13280
b8458e3e
JM
132812000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
13282
13283 * decl.c (flag_isoc94): New variable.
13284
a1bcc528
JM
132852000-08-02 Jason Merrill <jason@redhat.com>
13286
13287 * pt.c (do_type_instantiation): Add complain parm; don't complain
13288 if called recursively.
13289 * cp-tree.h, parse.y: Adjust.
13290
50e60bc3
ZW
132912000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13292
eae51189
ZW
13293 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
13294 -Wno-strict-prototypes.
13295
37620334
ZW
13296 * g++spec.c: Adjust type of second argument to
13297 lang_specific_driver, and update code as necessary.
13298
50e60bc3
ZW
13299 * cp-tree.h: Don't prototype min_precision here.
13300 (my_friendly_assert): Cast expression to void.
13301 * semantics.c (do_poplevel): Initialize scope_stmts.
13302
3f954fc3
MM
133032000-08-02 Mark Mitchell <mark@codesourcery.com>
13304
13305 * cp-tree.h (DECL_NEEDED_P): Tweak.
13306
ab4fa7ed
JM
133072000-07-28 Jason Merrill <jason@redhat.com>
13308
13309 * lang-specs.h: Use %i in rule for .ii files.
13310
4871239e
ZW
133112000-07-31 Zack Weinberg <zack@wolery.cumb.org>
13312
13313 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
13314
911a71a7
MM
133152000-07-30 Mark Mitchell <mark@codesourcery.com>
13316
13317 Allow indirect primary bases.
13318 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
13319 primary_base.
13320 (CLASSTYPE_VFIELD_PARENT): Remove.
13321 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
13322 (BINFO_PRIMARY_BINFO): Remove.
13323 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
13324 (BINFO_VBASE_PRIMARY_P): Likewise.
13325 (BINFO_PRIMARY_BASE_OF): New macro.
13326 (BINFO_INDIRECT_PRIMARY_P): Likewise.
13327 (get_primary_binfo): New function.
13328 * decl.c (lang_mark_tree): Make lang_type::primary_base.
13329 * class.c (vcall_offset_data_s): Rename to ...
13330 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
13331 and add ctor_vtbl_p.
13332 (get_derived_offset): Use get_primary_binfo.
13333 (dfs_mark_primary_bases): Adjust handling of virtual primary
13334 bases.
13335 (mark_primary_bases): Likewise.
13336 (set_primary_base): Take a binfo, not an integer, as a
13337 representation of the primary base.
13338 (indirect_primary_base_p): Remove.
13339 (determine_primary_base): Adjust for indirect primary bases.
13340 (dfs_find_final_overrider): Fix typo in coment.
13341 (update_vtable_entry_for_fn): Use get_primary_binfo.
13342 (layout_nonempty_base_or_field): Tweak.
13343 (build_base_fields): Adjust for new primary base semantics.
13344 (dfs_propagate_binfo_offsets): Remove.
13345 (propagate_binfo_offsets): Rewrite.
13346 (dfs_set_offset_for_shared_vbases): Remove.
13347 (layout_virtual_bases): Don't use it.
13348 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
13349 ABI.
13350 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
13351 CLASSTYPE_VFIELD_PARENT.
13352 (dfs_get_primary_binfo): New function.
13353 (get_primary_binfo): Likewise.
13354 (dump_class_hierarchy_r): Tweak printing of primary bases.
13355 (build_vtbl_initializer): Fix typo in comments. Use
13356 vtbl_init_data.
13357 (build_vcall_and_vbase_vtbl_entries): Likewise.
13358 (build_vbaes_offset_vtbl_entries): Likewise.
13359 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
13360 BV_VCALL_INDEX to handle indirect primary bases.
13361 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
13362 (build_rtti_vtbl_entries): Likewise.
13363 * search.c (get_shared_vbase_if_not_primary): Tweak.
13364 (find_vbase_instance): Likewise.
13365 (binfo_for_vtable): Simplify.
13366 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
13367 (make_binfo): Make it have 11 entries.
0e5921e8 13368
722bed0f
AS
133692000-07-30 Alex Samuel <samuel@codesourcery.com>
13370
13371 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
13372 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
13373 ascertaining primaryness.
13374 (G): Remove template_args.
13375 (decl_is_template_id): New function.
13376 (write_encoding): Use decl_is_template_id.
13377 (write_name): Likewise. Handle type_decls. Get main variant of
13378 type decls.
13379 (write_nested_name): Likewise.
13380 (write_prefix): Likewise.
13381 (write_template_prefix): Likewise.
13382 (write_special_name_constructor): Remove defunct production from
13383 comment.
13384 (write_bare_function_type): Remove comment about absent parameter.
13385 (write_template_template_arg): Add missing grammar production to
13386 comment.
13387
9076e292
JM
133882000-07-27 Jason Merrill <jason@redhat.com>
13389
13390 * decl.c (duplicate_decls): If common_type produces a non-typedef
13391 type for a typedef, just use the old type.
13392
b2244c65
MM
133932000-07-27 Mark Mitchell <mark@codesourcery.com>
13394
13395 * cp-tree.h (function_depth): Declare.
13396 (verify_stmt_tree): Likewise.
13397 (find_tree): Likewise.
13398 * decl.c (function_depth): Give it external linkage.
13399 * optimize.c (optimize_function): Increment and decrement it.
13400 * tree.c (verify_stmt_tree_r): New function.
13401 (verify_stmt_tree): Likewise.
13402 (find_tree_r): Likewise.
13403 (find_tree): Likewise.
13404
62e3bf54
JM
134052000-07-27 Jason Merrill <jason@redhat.com>
13406
9076e292
JM
13407 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
13408 TYPE_PTRMEMFUNC_P.
13409 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
62e3bf54 13410
5a728aca
MM
134112000-07-26 Mark Mitchell <mark@codesourcery.com>
13412
13413 * decl.c (start_cleanup_fn): Mark the function as `inline'.
13414 * decl2.c (get_guard): Call cp_finish_decl, not
13415 rest_of_decl_compilation, for local guards.
13416 * lex.c (do_identifier): Remove unused variable.
13417
d2a6f3c0 134182000-07-26 Marc Espie <espie@cvs.openbsd.org>
6a1fa5f9
ME
13419
13420 * parse.y: Add missing ';'.
13421
0c10a805
MM
134222000-07-26 Mark Mitchell <mark@codesourcery.com>
13423
13424 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
13425 of `extern "C++"'.
13426
8b27e9ef
NS
134272000-07-25 Nathan Sidwell <nathan@codesourcery.com>
13428
13429 Kill strict_prototype. Backwards compatibility only for
13430 non NO_IMPLICIT_EXTERN_C systems.
13431 * cp-tree.h (flag_strict_prototype): Remove.
13432 (strict_prototype): Remove.
13433 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13434 * decl.c (maybe_push_to_top_level): Adjust.
13435 (pop_from_top_level): Adjust.
13436 (decls_match): Only allow sloppy parm matching for ancient
13437 system headers.
13438 (init_decl_processing): Adjust.
13439 (grokdeclarator): Adjust.
13440 * decl2.c (flag_strict_prototype): Remove.
13441 (strict_prototype): Remove.
13442 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
13443 (lang_f_options): Remove "strict-prototype".
13444 (unsupported-options): Add "strict-prototype".
13445 * lex.c (do_identifier): Adjust.
13446 (do_scoped_id): Adjust.
13447 * parse.y (empty_parms): Adjust.
13448 * class.c (push_lang_context): Adjust.
13449 (pop_lang_context): Adjust.
13450 * typeck.c (comp_target_parms): Adjust.
13451
c3783399
NS
134522000-07-25 Nathan Sidwell <nathan@codesourcery.com>
13453
13454 * decl.c (poplevel): Deal with anonymous variables at for scope.
13455 (maybe_inject_for_scope_var): Likewise.
13456
a7023245
ZW
134572000-07-25 Zack Weinberg <zack@wolery.cumb.org>
13458
13459 * decl.c: Remove all signal handling code, now done in toplev.c.
13460
95ee998c
MM
134612000-07-23 Mark Mitchell <mark@codesourcery.com>
13462
13463 * decl.c (make_rtl_for_nonlocal_decl): Rework.
13464
13465 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
13466 correctly.
13467
1b493b81
ZW
134682000-07-20 Zack Weinberg <zack@wolery.cumb.org>
13469
13470 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
13471 Define my_friendly_assert and my_friendly_abort as macros
13472 which may call friendly_abort. Prototype friendly abort, not
13473 my_friendly_abort or my_friendly_assert.
13474 * decl.c (signal_catch): Report the signal caught in the error
13475 message. Call fatal directly.
13476 * typeck2.c (ack, my_friendly_assert): Delete.
13477 (my_friendly_abort): Rename to friendly_abort. Expect file,
13478 line, and function parameters. Report the abort code, then
13479 call fancy_abort. Do not mask an abort if errors have
13480 already occurred.
13481
a306451c
NS
134822000-07-18 Nathan Sidwell <nathan@codesourcery.com>
13483
13484 * typeck.c (comp_target_parms): Remove obsolete parameter.
13485 (comp_target_types): Adjust.
13486
f49fad00
JM
134872000-07-17 Jason Merrill <jason@redhat.com>
13488
13489 * typeck.c (mark_addressable): Never set TREE_USED.
13490 * call.c (build_call): Don't abort on calls to library functions
13491 that have been declared normally.
13492
13493 * typeck.c (build_binary_op): Fix grammar in warning.
13494
13495 * exception.cc (__eh_free): Fix prototype.
13496
13497 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
13498
0e5921e8 13499 * decl.c (pushdecl): Handle seeing an OVERLOAD in
f49fad00
JM
13500 IDENTIFIER_NAMESPACE_VALUE.
13501
69690d98
MM
135022000-07-16 Mark Mitchell <mark@codesourcery.com>
13503
13504 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
13505 * method.c (use_thunk): Correct handling of vcall offsets.
13506
bfbbc080
ZW
135072000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13508
13509 * .cvsignore: parse.h and parse.c have no cp- prefix.
13510
83a90717
MM
135112000-07-13 Mark Mitchell <mark@codesourcery.com>
13512
13513 * .cvsignore: New file.
13514
ea414c97
ZW
135152000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13516
13517 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13518
792abd35
MM
135192000-07-12 Mark Mitchell <mark@codesourcery.com>
13520
13521 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
13522 * parse.c: Remove.
13523 * parse.h: Likewise.
13524
72a50ab0
MM
135252000-07-11 Mark Mitchell <mark@codesourcery.com>
13526
13527 * class.c (layout_class_type): Add pointers to virtual bases after
13528 base classes under the old ABI.
13529
0dfdeca6
BC
135302000-07-10 Benjamin Chelf <chelf@codesourcery.com>
13531
13532 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
13533 (finish_continue_stmt): Likewise.
13534 (begin_for_stmt): Remove call to note_level_for_for.
13535 (finish_goto_stmt): Change call from build_min_nt
13536 to build_stmt.
13537 (finish_expr_stmt): Likewise.
13538 (begin_if_stmt): Likewise.
13539 (begin_while_stmt): Likewise.
13540 (finish_while_stmt): Likewise.
13541 (finish_return_stmt): Likewise.
13542 (begin_for_stmt): Likewise.
13543 (finish_for_stmt): Likewise.
13544 (finish_break_stmt): Likewise.
13545 (begin_switch_stmt): Likewise.
13546 (finish_case_label): Likewise.
13547 (genrtl_try_block): Likewise.
13548 (begin_try_block): Likewise.
13549 (begin_handler): Likewise.
13550 (begin_compound_stmt): Likewise.
13551 (finish_asm_stmt): Likewise.
13552 (finish_label_stmt): Likewise.
13553 (add_decl_stmt): Likewise.
13554 (finish_subobject): Likewise.
13555 (finish_decl_cleanup): Likewise.
13556 (finish_named_return_value): Likewise.
13557 (setup_vtbl_ptr): Likewise.
13558 (add_scope_stmt): Likewise.
13559 * decl.c (finish_constructor_body): Likewise.
13560 (finish_destructor_body): Likewise.
13561 * optimize.c (copy_body_r): Likewise.
13562 (initialize_inlined_parameters): Likewise.
13563 (declare_return_variable): Likewise.
13564 (expand_call_inline): Likewise.
0e5921e8 13565
f12eef58
JJ
135662000-07-10 Jakub Jelinek <jakub@redhat.com>
13567
13568 * semantics.c (expand_body): Sync interface information
13569 at the end of function body expansion.
13570
2bb5d995
JM
135712000-07-09 Jason Merrill <jason@redhat.com>
13572
13573 * init.c (build_new_1): Bail early if the call to new fails.
13574
0e5921e8 13575 * decl.c (compute_array_index_type): Check specifically for
2bb5d995
JM
13576 an INTEGER_CST, not just TREE_CONSTANT.
13577
0e5921e8 13578 * decl.c (duplicate_decls): Don't call duplicate_decls on
2bb5d995
JM
13579 the DECL_TEMPLATE_RESULT.
13580 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
13581 codes.
13582
13583 * error.c (dump_template_bindings): Don't crash if we had an
13584 invalid argument list.
13585
13586 * typeck.c (c_expand_start_case): Do narrowing here.
13587 * semantics.c (finish_switch_cond): Not here.
13588
135892000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
13590
13591 * parse.y (asm_clobbers): Do string concatenation.
13592
089acd57
MM
135932000-07-09 Mark Mitchell <mark@codesourcery.com>
13594
13595 * decl.c (pushtag): Don't put local classes in template functions
13596 on the local_classes list.
13597
135982000-07-04 Scott Snyder <snyder@fnal.gov>
13599
13600 * decl2.c (get_guard): Add missing return for old ABI local
13601 variable case.
13602
7b019c19
MM
136032000-07-09 Mark Mitchell <mark@codesourcery.com>
13604
13605 * cp-tree.h (char_type_p): New function.
13606 * decl.c (init_decl_processing): Don't initialize
13607 signed_wchar_type_node or unsigned_wchar_type_node.
13608 (complete_array_type): Handle brace-enclosed string-constants.
13609 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
13610 * tree.c (char_type_p): New function.
13611 * typeck2.c (digest_init): Use char_type_p.
13612
a5f1c5f8
NS
136132000-07-06 Nathan Sidwell <nathan@codesourcery.com>
13614
13615 * pt.c (tsubst): Don't layout type, if it's error_mark.
13616
84e5ca0f
NS
136172000-07-06 Nathan Sidwell <nathan@codesourcery.com>
13618
13619 * pt.c (instantiate_pending_templates): Reset template level.
13620
ab785305
JM
136212000-07-05 Jason Merrill <jason@redhat.com>
13622
13623 * call.c (joust): Don't complain about `operator char *()' beating
13624 `operator const char *() const'.
13625
90418208
JM
136262000-07-04 scott snyder <snyder@fnal.gov>
13627 Jason Merrill <jason@redhat.com>
13628
0e5921e8 13629 * repo.c (repo_get_id): Handle the case where a class with virtual
90418208
JM
13630 bases has a null TYPE_BINFO_VTABLE.
13631
136322000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
13633 Jason Merrill <jason@redhat.com>
13634
13635 * parse.y (member_init): Just pass in the type.
13636 * init.c (expand_member_init): Handle getting a type.
13637
13638