re PR c++/17695 (ICE in add_abstract_origin_attribute)
[gcc.git] / gcc / cp / ChangeLog
1 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2
3 PR c++/17695
4 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
5 appear in a constructor/destructor that will be cloned.
6
7 1004-10-28 Matt Austern <austern@apple.com>
8
9 PR c++/14124
10 * decl.c (finish_enum): Handle packed attribute.
11 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
12
13 2004-10-28 Mark Mitchell <mark@codesourcery.com>
14
15 PR c++/17132
16 * pt.c (instantiate_class_template): Increment
17 processing_template_decl when substituting into a member class
18 template.
19
20 2004-10-27 Mark Mitchell <mark@codesourcery.com>
21
22 PR c++/17435
23 * call.c (convert_like_real): Fix formatting.
24 (initialize_reference): When binding a temporary to a base class,
25 ensure that the nominal copy made is to the derived class, not the
26 base class.
27
28 PR c++/18140
29 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
30 include ">>".
31
32 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
33
34 * decl.c (bad_specifiers): Move the q after the %.
35
36 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
37
38 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
39 the %.
40
41 2004-10-26 Mark Mitchell <mark@codesourcery.com>
42
43 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
44 * search.c (current_scope): Fix prototype.
45
46 PR c++/18093
47 * search.c (current_scope): Return the innermost non-block scope,
48 not the innermost non-block, non-namespace scope.
49 (at_namespace_scope_p): Adjust accordingly.
50 (dfs_accessible_post): Do not pass namespaces to is_friend.
51 (dfs_walk_once_accessible_r): Likewise.
52 * decl.c (grokvardecl): Adjust call to current_scope.
53 (build_enumerator): Likewise.
54 * parser.c (cp_parser_using_declaration): Likewise.
55 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
56 current_scope.
57 (cp_parser_class_head): Adjust call to current_scope.
58 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
59 alias.
60
61 PR c++/18020
62 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
63 their underlying values.
64
65 PR c++/18161
66 * typeck.c (build_binary_op): Honor build_type, even when in a
67 template.
68
69 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
70
71 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
72 padding token checking.
73
74 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
75
76 PR c++/18121
77 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
78 layout_type as it is already done by create_array_type_for_decl.
79
80 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
81
82 PR c++/18095
83 * parser.c (eof_token): Make const, correctly initialize rid and
84 location fields.
85 (struct cp_lexer): Replace buffer_end pointer with buffer_length
86 count. Adjust.
87 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
88 zero it out.
89 (cp_lexer_new_from_tokens): Adjust.
90 (cp_lexer_grow_buffer): Remove.
91 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
92 cp_lexer_purge_token): Add const casts.
93
94 2004-10-21 Mark Mitchell <mark@codesourcery.com>
95
96 PR c++/18073
97 PR c++/10841
98 * cp-tree.h (convert_to_base): Change prototype.
99 (build_ptrmemfunc): Likewise.
100 (convert_ptrmem): New function.
101 * call.c (struct conversion): Adjust documentation for base_p.
102 (standard_conversion): Set base_p for ck_pmem conversions as
103 appropriate.
104 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
105 conversions.
106 * class.c (convert_to_base): Handle both pointers and objects.
107 Add nonnull parameter.
108 (build_vfield_ref): Adjust call to convert_to_base.
109 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
110 (convert_force): Likewise.
111 * typeck.c (build_unary_op): Likewise.
112 (convert_ptrmem): New function.
113 (build_static_cast_1): Use it.
114 (build_reinterpret_cast): Allow conversions to vector types.
115 (get_delta_difference): Add c_cast_p parameter.
116 (build_ptrmemfunc): Likewise. Adjust calls to
117 get_delta_difference.
118
119 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
120
121 PR c++/13560
122 * error.c (cp_error_at): Output the context as it might be
123 different file as the other location.
124
125 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
126
127 * typeck.c: Fix a comment typo.
128
129 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
130
131 PR c++/13495
132 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
133 * cp-tree.h (make_unbound_class_template): Adjust prototype.
134 * parser.c (cp_parser_lookup_name): Adjust call to
135 make_unbound_class_template.
136 (cp_parser_single_declaration): Handle member class of class
137 template as template friend parsing correctly.
138 * friend.c (is_friend): Call is_specialization_of_friend for
139 template friend class.
140 (make_friend_class): Handle member class of class template as
141 template friend.
142 * pt.c (is_specialization_of_friend): Likewise.
143 (instantiate_class_template): Likewise.
144 (tsubst): Adjust call to make_unbound_class_template.
145
146 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
147
148 * typeck.c (composite_pointer_type): Add comment about DR 195
149 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
150 Allow function pointer conversions that DR195 suggests.
151 (build_reinterpret_cast, build_c_cast): Update
152 build_reinterpret_cast_1 calls.
153
154 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
155
156 * call.c, typeck.c: Fix comment typos.
157
158 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
159
160 * parser.c (cp_token_position): New typedef. Define VEC thereof.
161 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
162 next_token and last_token cp_token_position. Make saved_tokens a
163 VEC(cp_token_position).
164 (eof_token): New static variable.
165 (CP_SAVED_TOKENS_SIZE): Rename to ...
166 (CP_SAVED_TOKEN_STACK): ... here.
167 (cp_lexer_new_main): Adjust main lexer creation and buffer
168 filling.
169 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
170 to the parent buffer. Do not append eof token.
171 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
172 stack.
173 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
174 (cp_lexer_token_position, cp_lexer_token_at): New.
175 (cp_lexer_saving_tokens): Adjust. Make inline.
176 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
177 (cp_lexer_peek_token_emit_debug_info): Fold into ...
178 (cp_lexer_peek_token): ... here.
179 (cp_lexer_peek_nth_token): Don't peek past EOF.
180 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
181 EOF.
182 (cp_lexer_purge_token): Adjust eof setting.
183 (cp_lexer_purge_tokens_after): Likewise.
184 (cp_lexer_save_tokens): Push next_token directly.
185 (cp_lexer_commit_tokens): Adjust.
186 (cp_lexer_rollback_tokens): Pop next_token directly.
187 (cp_parser_check_for_invalid_template_id): Adjust token purging.
188 (cp_parser_translation_unit): Do not consume the EOF.
189 (cp_parser_nested_name_specifier_opt): Adjust token purging.
190 (cp_parser_template_id, cp_parser_template_name): Likewise.
191
192 2004-10-19 Mark Mitchell <mark@codesourcery.com>
193
194 PR c++/14035
195 * call.c (struct conversion): Add base_p.
196 (convert_like): Add c_cast_p argument.
197 (convert_like_with_conversion): Likewise.
198 (build_conv): Clear base_p.
199 (standard_conversion): Set it, for derived-to-base conversions.
200 (convert_like_real): Add c_cast_p parameter. Handle pointer
201 conversions directly rather than relying on ocp_convert.
202 (perform_direct_initialization_if_possible): Add c_cast_p
203 parameter.
204 * cp-tree.h (perform_direct_initialization_if_possible): Change
205 prototype.
206 (convert_member_func_to_ptr): New function.
207 * typeck.c (check_for_casting_away_constness): Add diag_fn
208 parameter.
209 (build_static_cast_1): New function, split out from ...
210 (build_static_cast): ... here. Use build_static_cast_1.
211 (build_reinterpret_cast_1): New function, split out from ...
212 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
213 (build_const_cast_1): New function, split out from ...
214 (build_const_cast): ... here. Use build_const_cast_1.
215 (build_c_cast): Rewrite to use build_const_cast_1,
216 build_static_cast_1, and build_reinterpret_cast_1.
217 (convert_member_func_to_ptr): New function.
218
219 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
220
221 PR c++/18047
222 * parser.c (enum cp_parser_prec): Give relational expressions
223 a higher precedence than equality expressions.
224
225 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
226
227 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
228 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
229 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
230 (enum base_access): Reorganize.
231 (accessible_base_p, accessible_p): Add consider_local_p parameter.
232 * call.c (standard_conversion): Update comment about
233 DERIVED_FROM_P.
234 (enforce_access): Adjust accessible_p call.
235 (build_over_call): Adjust accessible_base_p call.
236 * class.c (convert_to_base): Adjust lookup_base call.
237 (build_vtbl_ref_1): Likewise.
238 (warn_about_ambiguous_bases): Likewise. Add early exit.
239 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
240 * search.c (accessible_base_p): Add consider_local_p parameter.
241 (lookup_base): Pass consider_local_p to accessible_base_p call.
242 (friend_accessible_p): Check whether scope is a class member.
243 Remove unnecessary class template check.
244 (accessible_p): Add consider_local_p parameter. Use it.
245 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
246 * tree.c (maybe_dummy_object): Likewise.
247 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
248 (build_class_member_access_expr): Adjust lookup_base call.
249 * typeck2.c (binfo_or_else): Likewise.
250 * rtti.c (build_dynamic_cast_1): Access can consider friendship
251 and current scope.
252
253 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
254
255 PR c++/17743
256 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
257
258 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
259
260 PR c++/10479
261 * parser.c (cp_parser_parenthesized_expression_list): Fold
262 non-dependent expressions in attribute lists.
263
264 2004-10-15 Mark Mitchell <mark@codesourcery.com>
265
266 PR c++/17042
267 * decl.c (declare_global_var): Use the return value from pushdecl.
268
269 PR c++/14667
270 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
271 type names if we have already found a valid type.
272 (cp_parser_member_declaration): Likewise.
273
274 PR c++/17916
275 * parser.c (cp_parser_member_specification_opt): Handle
276 CPP_PRAGMA.
277
278 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
279
280 * dump.c, g++spec.c, repo.c: Update copyright.
281
282 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
283
284 * decl.c: Fix a comment typo.
285
286 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
287
288 PR c++/16301
289 * name-lookup.c (parse_using_directive): If we have a
290 error_mark_node, do not set the decl namespace associations
291 on it.
292
293 2004-10-14 Mark Mitchell <mark@codesourcery.com>
294
295 PR c++/17976
296 * decl.c (cp_finish_decl): Do not call expand_static_init more
297 than once for a single variable.
298
299 2004-10-14 Matt Austern <austern@apple.com>
300
301 * Make-lang.in (pt.o): depends on pointer-set.h
302 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
303 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
304 (for_each_template_parm): Convert from htab_t to pointer_set_t.
305 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
306
307 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
308
309 PR c++/17661
310 * semantics.c (finish_for_expr): Convert expression to void
311 so that we don't create temporaries for a?b:c.
312
313 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
314
315 * search.c: Fix a comment typo.
316
317 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
318
319 * class.c (dfs_modify_vtables): Simplify condition. Return
320 dfs_skip_bases as appropriate.
321 (modify_all_vtables): Walk in pre-order.
322 * search.c (dfs_walk_all, dfs_walk_once_r,
323 dfs_walk_once_accessible_r): Assert post order function never
324 returns dfs_skip_bases.
325
326 * search.c (struct lookup_base_data_s): New.
327 (lookup_base_r): Replace with ...
328 (dfs_lookup_base): ... this.
329 (lookup_base): Use dfs_walk_all.
330
331 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
332
333 * search.c: Fix comment typos.
334
335 2004-10-11 Mark Mitchell <mark@codesourcery.com>
336
337 PR c++/15786
338 * parser.c (cp_parser_declarator): Add member_p parameter.
339 (cp_parser_condition): Adjust calls to cp_parser_declarator.
340 (cp_parser_explicit_instantiation): Likewise.
341 (cp_parser_init_declarator): Likewise.
342 (cp_parser_direct_declarator): Add member_p parameter. Do not
343 parse tentatively when parsing the parameters to a member.
344 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
345 (cp_parser_parameter_declaration): Likewise.
346 (cp_parser_member_declaration): Likewise.
347 (cp_parser_exception_declaration): Likewise.
348
349 PR c++/17936
350 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
351 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
352 for members of partial or explicit specializations.
353
354 PR c++/17929
355 * decl2.c (finish_anon_union): Robustify.
356
357 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
358
359 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
360 (dcast_base_hint): ... here.
361 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
362 * search.c (struct dcast_data_s): New.
363 (dynamic_cast_base_recurse): Remove. Replace with ...
364 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
365 (get_dynamic_cast_base_type): Rename to ...
366 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
367 (accessible_r): Remove.
368 (dfs_accessible_post): New, broken out of accessible_r.
369 (accessible_p): Use dfs_walk_once_accessible.
370 (dfs_walk_once_accessible_r): New. From accessible_r.
371 (dfs_walk_once_accessible): New. From acessible_p.
372
373 * cp-tree.h (SAME_BINFO_TYPE_P): New.
374 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
375 binfo types.
376 (convert_to_base_statically, determine_primary_bases,
377 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
378 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
379 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
380 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
381 * init.c (expand_member_init): Likewise.
382 * search.c (lookup_base_r, dynamic_cast_base_recurse,
383 binfo_via_virtual, copied_binfo, binfo_for_vbase,
384 original_binfo): Likewise.
385 * tree.c (copy_binfo): Likewise.
386
387 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
388
389 * semantics.c: Fix comment typos.
390
391 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
392
393 PR c++/17554
394 part of c++/17657
395 middle-end/17703
396 * semantics.c (maybe_cleanup_point_expr): Call
397 fold_build_cleanup_point_expr.
398 (maybe_cleanup_point_expr_void): New function.
399 (add_decl_expr): Call maybe_cleanup_point_expr_void.
400 (finish_expr_stmt): Likewise.
401 (finish_return_stmt): Likewise.
402 (finish_for_expr): Likewise.
403 (finish_asm_stmt): Likewise.
404 * typeck.c (condition_conversion): Call
405 fold_build_cleanup_point_expr.
406
407 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
408
409 PR c++/17907
410 * semantics.c (add_decl_expr): If the decl has a size which
411 has side effects then the decl expression needs a cleanup point.
412
413 2004-10-10 Mark Mitchell <mark@codesourcery.com>
414
415 PR c++/17393
416 * decl.c (grokdeclarator): Robustify error-recovery on invalid
417 declarations.
418
419 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
420
421 Convert diagnostics to use quoting flag q 7/n
422 * typeck.c (composite_pointer_type_r, composite_pointer_type,
423 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
424 string_conv_p, build_class_member_access_expr,
425 build_class_member_access_expr, lookup_destructor,
426 finish_class_member_access_expr, build_indirect_ref,
427 get_member_function_from_ptrfunc, build_function_call,
428 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
429 check_for_casting_away_constness, build_static_cast,
430 build_reinterpret_cast, build_const_cast, build_c_cast,
431 build_modify_expr, get_delta_difference, build_ptrmemfunc,
432 dubious_conversion_warnings, convert_for_assignment,
433 convert_for_initialization,
434 maybe_warn_about_returning_address_of_local, check_return_expr):
435 Use quoting marks.
436
437 * typeck2.c (error_not_base_type, readonly_error,
438 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
439 store_init_value, digest_init, build_x_arrow,
440 build_m_component_ref, require_complete_eh_spec_types): Likewise.
441
442 * tree.c (cp_build_qualified_type_real,
443 handle_java_interface_attribute, handle_init_priority_attribute):
444 Likewise.
445
446 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
447 finish_pseudo_destructor_expr,
448 check_template_template_default_arg, begin_class_definition,
449 finish_base_specifier, qualified_name_lookup_error,
450 finish_id_expression, finish_typeof): Likewise.
451
452 * search.c (lookup_base, check_final_overrider,
453 look_for_overrides_r): Likewise.
454
455 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
456
457 2004-10-09 Mark Mitchell <mark@codesourcery.com>
458
459 PR c++/17867
460 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
461 constructor.
462
463 PR c++/17670
464 * init.c (build_new): Correct comments.
465 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
466 the non-array case.
467
468 PR c++/17821
469 * parser.c (cp_parser_postfix_dot_deref_expression): If the
470 pseduo-destructor-name production does not work, fall back to the
471 ordinary production.
472
473 PR c++/17826
474 * tree.c (cp_tree_equal): Handle a BASELINK.
475
476 PR c++/17524
477 * cp-tree.h (check_var_type): New function.
478 * decl.c (check_var_type): New function, split out from ...
479 (grokdeclarator): ... here.
480 * pt.c (tsubst_decl): Use check_var_type.
481
482 PR c++/17685
483 * decl.c (grokdeclarator): Disallow declarations of operators as
484 non-functions.
485
486 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
487
488 PR c++/17868
489 * error.c (dump_expr): Add missing case for RDIV_EXPR.
490
491 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
492
493 * pt.c, search.c: Fix comment typos.
494
495 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
496
497 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
498 unmarkedp): Remove.
499 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
500 * class.c (struct find_final_overrider_data): Remove most_derived,
501 vpath_list and vpath fields. Add path field.
502 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
503 (dfs_find_final_overrider): Rename to ...
504 (dfs_find_final_overrider_pre): ... here. Adjust.
505 (dfs_find_final_overrider_post): Adjust.
506 (dfs_find_final_overrider_q): Fold into
507 dfs_find_final_overrider_pre.
508 (find_final_overrider): Adjust dfs searching.
509 (dfs_modify_vtables): Don't mark binfo here.
510 (modify_all_vtables): Use dfs_walk_once.
511 (build_vtt_inits): Likwise. Use dfs_walk_all.
512 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
513 Return dfs_skip_bases as appropriate.
514 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
515 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
516 appropriate. Don't mark binfo here.
517 (initialize_vtbl_ptrs): Use dfs_walk_once.
518 * search.c (struct vbase_info): Remove unused struct.
519 (access_in_type): Use dfs_walk_once.
520 (dfs_access_in_type): Don't mark binfo here.
521 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
522 Fold into ...
523 (accessible_r): ... here. New. Specialize dfs_walk_once.
524 (accessible_p): Use accessible_r.
525 (lookup_field_queue_p): Remove. Fold into ...
526 (lookup_field_r): ... here. Adjust.
527 (lookup_member): Use dfs_walk_all.
528 (dfs_walk_real, dfs_walk): Replace with ...
529 (dfs_walk_all, dfs_walk_once): ... these.
530 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
531 (dfs_unmark, unmarkedp, markedp): Remove.
532 (dfs_get_pure_virtuals): Don't mark binfo here.
533 (get_pure_virtuals): Use dfs_walk_once.
534 (dfs_debug_unmarked_p): Remove. Fold into ...
535 (dfs_debug_mark): ... here.
536 (note_debug_info_needed): Use dfs_walk_all.
537
538 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
539
540 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
541 CLEANUP_POINT_EXPR to get the asm expression.
542
543 2004-10-07 Mark Mitchell <mark@codesourcery.com>
544
545 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
546 (DECL_MEMBER_TEMPLATE_P): New macro.
547 (is_member_template): Remove.
548 (class_method_index_for_fn): New function.
549 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
550 * class.c (finish_struct_methods): Remove out-of-date comment.
551 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
552 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
553 class_method_index_for_fn.
554 * pt.c (is_member_template): Remove.
555 (is_member_template_class): Likewise.
556 (optimize_specialization_lookup_p): New function.
557 (retrieve_specialization): Optimize lookups for members that are
558 not member templates.
559 (register_specialization): Adjust accordingly.
560 (build_template_decl): Add member_template_p parameter. Set
561 DECL_MEMBER_TEMPLATE_P.
562 (process_partial_specialization): Adjust call to
563 retrieve_specialization.
564 (push_template_decl_real): Determine whether the template is a
565 member template.
566 (lookup_template_class): Use retrieve_specialization.
567 (tsubst_decl): Adjust call to retrieve_specialization.
568 (tsubst_exception_specification): New function.
569 (tsubst): Use it.
570 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
571 (instantiate_template): Adjust call to retrieve_specialization.
572 (regenerate_decl_from_template): Do not actually generate a new
573 DECL.
574 (instantiate_decl): Adjust call to retrieve_specialization.
575 (class_method_index_for_fn): New method.
576
577 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
578
579 * parser.c (cp_parser_asm_definition): Look passed the
580 CLEANUP_POINT_EXPR to get the asm expression.
581
582 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
583
584 PR c++/17368
585 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
586 also.
587
588 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
589
590 Convert diagnostics to use quoting flag q 6/n
591 * pt.c (finish_member_template_decl, check_specialization_scope,
592 maybe_process_partial_specialization, determine_specialization,
593 check_explicit_specialization, maybe_check_template_type,
594 process_partial_specialization, check_default_tmpl_args,
595 push_template_decl_real, redeclare_class_template,
596 convert_nontype_argument, coerce_template_parms,
597 lookup_template_class, push_tinst_level,
598 instantiate_class_template, tsubst_arg_types,
599 tsubst_function_type, tsubst, tsubst_qualified_id,
600 tsubst_copy_and_build, check_instantiated_args,
601 do_decl_instantiation, do_type_instantiation,
602 invalid_nontype_parm_type_p, check_specialization_namespace,
603 convert_template_argument, determine_specialization,
604 check_template_shadow, tsubst_decl
605 instantiate_pending_templates): Use quoting marks.
606
607 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
608
609 PR c++/17829
610 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
611 unqualified lookup finds a member function.
612
613 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
614
615 Convert diagnostics to use quoting flag q 5/n
616 * parser.c (cp_parser_name_lookup_error,
617 cp_parser_diagnose_invalid_type_name,
618 cp_parser_primary_expression, cp_parser_unqualified_id,
619 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
620 cp_parser_jump_statement, cp_parser_simple_declaration,
621 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
622 cp_parser_type_parameter, cp_parser_template_id,
623 cp_parser_template_name, cp_parser_direct_declarator,
624 cp_parser_parameter_declaration_list, cp_parser_class_head,
625 cp_parser_base_specifier, cp_parser_lookup_name,
626 cp_parser_late_parsing_default_args,
627 cp_parser_optional_template_keyword
628 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
629 cp_parser_check_access_in_redeclaration): Use quoting marks.
630
631 * name-lookup.c (supplement_binding, pushdecl,
632 check_for_out_of_scope_variable, validate_nonmember_using_decl,
633 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
634 push_namespace, do_namespace_alias, do_using_directive,
635 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
636
637 * method.c (use_thunk): Likewise.
638
639 * lex.c (unqualified_name_lookup_error,
640 unqualified_fn_lookup_error): Likewise.
641
642 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
643
644 Convert diagnostics to use quoting flag q 4/n
645 * except.c (decl_is_java_type, build_throw,
646 is_admissible_throw_operand, check_handlers_1, check_handlers):
647 Use quoting formats.
648 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
649 * init.c (sort_mem_initializers, emit_mem_initializers,
650 member_init_ok_or_else, expand_member_init, is_aggr_type,
651 build_offset_ref, build_java_class_ref): Likewise.
652
653 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
654
655 Convert diagnostics to use quoting flag q 3/n
656 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
657 redeclaration_error_message, lookup_label, check_goto,
658 make_typename_type, make_unbound_class_template,
659 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
660 grok_reference_init, layout_var_decl, maybe_commonize_var,
661 check_for_uninitialized_const_var, reshape_init_array,
662 reshape_init, check_initializer, cp_finish_decl,
663 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
664 check_static_variable_definition, compute_array_index_type,
665 create_array_type_for_decl, check_special_function_return_type,
666 grokdeclarator, check_default_argument, grokparms,
667 grok_ctor_properties, grok_op_properties,
668 check_elaborated_type_specifier, xref_tag, finish_enum,
669 build_enumerator, check_function_type, start_preparsed_function,
670 store_parm_decls): Use quoting formats.
671 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
672 check_java_method, check_classfn, finish_static_data_member_decl,
673 grokfield, grokbitfield, grok_function_init,
674 build_anon_union_vars, coerce_new_type, coerce_delete_type,
675 check_default_args): Likewise.
676 * parser.c (cp_parser_decl_specifier_seq): Likewise.
677
678 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
679
680 Convert diagnostics to use quoting flag q 2/n
681 * class.c (build_base_path, add_method, alter_access,
682 handle_using_decl, check_bases,
683 maybe_warn_about_overly_private_class, find_final_overrider,
684 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
685 check_bitfield_decl, check_field_decls, layout_empty_base,
686 build_base_field, check_methods, layout_virtual_bases,
687 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
688 resolve_address_of_overloaded_function, instantiate_type,
689 note_name_declared_in_class): Use format flag "q" for quoting.
690
691 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
692
693 Convert diagnostics to use quoting flag q 1/n
694 * error.c (locate_error): Ignore quoting flag q.
695 * call.c (build_user_type_conversion_1, build_operator_new_call,
696 build_object_call, op_error, build_conditional_expr,
697 build_new_op, build_op_delete_call, enforce_access,
698 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
699 convert_default_arg, build_over_call, build_new_method_call,
700 joust, perform_implicit_conversion, initialize_reference): Use the
701 quoting flag q.
702
703 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
704
705 PR c++/17797
706 * typeck.c (build_reinterpret_cast): Return if the inner type
707 is error_mark_node.
708
709 2004-10-01 Jan Hubicka <jh@suse.cz>
710
711 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
712
713 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
714
715 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
716 turning operator_code and fixed_offset into bitfields.
717
718 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
719
720 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
721
722 2004-09-29 Jason Merrill <jason@redhat.com>
723
724 PR tree-optimization/17697
725 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
726
727 2004-09-28 Jason Merrill <jason@redhat.com>
728
729 PR middle-end/17525
730 * class.c (build_base_field): Set TYPE_MODE.
731
732 2004-09-28 Roger Sayle <roger@eyesopen.com>
733
734 PR driver/17537
735 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
736 than -lc and -lm, may require linking against libstc++.
737
738 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
739
740 * tree.c: Fix a comment typo.
741
742 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
743
744 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
745 (struct secondary_vptr_vtt_init_data_s): New.
746 (build_vtt_inits): Adjust dfs_walkers.
747 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
748 secondary_vptr_vtt_init_data_s structure. Adjust.
749 (dfs_ctor_vtable_bases_queue_p): Remove.
750 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
751
752 * pt.c (struct get_template_base_data_s): Remove.
753 (get_template_base_r): Fold into get_template_base.
754 (get_template_base): Walk base binfos directly in inheritance
755 graph order.
756
757 2004-09-27 Mark Mitchell <mark@codesourcery.com>
758
759 PR c++/17642
760 * cp-tree.h (fold_if_not_in_template): New function.
761 * call.c (build_conditional_expr): Use fold_if_not_in_template.
762 (build_cxx_call): Likewise.
763 * cvt.c (convert_to_complex): Likewise.
764 (ocp_convert): Likewise.
765 (convert): Likewise.
766 (convert_force): Likewise.
767 * decl.c (compute_array_index_type): Clear
768 processing_template_decl while folding array bounds.
769 * pt.c (convert_nontype_argument): Clear
770 processing_template_decl while processing non-type argument
771 initialization.
772 * tree.c (fold_if_not_in_template): New function.
773 * typeck.c (build_class_member_access_expr): Use
774 fold_if_not_in_template.
775 (build_array_ref): Likewise.
776 (build_binary_op): Likewise. Do not try to optimize computations
777 when processing templates.
778 (cp_pointer_int_sum): Use fold_if_not_in_template.
779 (pointer_diff): Likewise.
780 (build_unary_op): Likewise.
781 (build_reinterpret_cast): Likewise.
782 (get_delta_difference): Likewise.
783 (expand_ptrmemfunc_cst): Likewise.
784 (dubious_conversion_warnings): Likewise.
785
786 2004-09-27 Matt Austern <austern@apple.com>
787
788 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
789 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
790 tokens that come from headers that are implicitly extern "C".
791 (struct cp_parser): new one-bit field, implicit_extern_c.
792 (cp_parser_new): Set parser's implicit_extern_c to false.
793 (cp_parser_translation_unit): Pop lang context if we were in a
794 header that was implicitly extern "C".
795 (cp_parser_declaration_seq_opt): Push/pop lang context as
796 required by the token's and parser's implicit_extern_c.
797
798 2004-09-27 Mark Mitchell <mark@codesourcery.com>
799
800 PR c++/17585
801 * cp-tree.h (shared_member_p): Declare.
802 * search.c (shared_member_p): Give it external linkage.
803 * semantics.c (finish_qualified_id_expr): Use it.
804 (finish_id_expression): Likewise.
805
806 PR c++/17585
807 * semantics.c (finish_id_expression): Do not add "this->" to
808 static member functions.
809
810 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
811
812 PR c++/17681
813 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
814
815 * class.c (struct count_depth_data): Remove.
816 (dfs_depth_post, dfs_depth_q): Remove.
817 (find_final_overrider): Use number of vbase classes as depth
818 bound.
819
820 * cp-tree.h (types_overlap_p): Remove.
821 * search.c (struct overlap_info): Remove.
822 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
823
824 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
825 (get_template_base_recursive): Remove. Replace with ...
826 (get_template_base_r): ... this.
827 (struct get_template_base_data_s): New.
828 (get_template_base): Use get_template_base_r via dfs_walk. Always
829 return NULL on failure.
830 (unify): Remove error_mark_node check from get_template_base result.
831
832 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
833
834 * parser.c (cp_parser_expression_stack): Clarify why it is
835 an array of NUM_PREC_VALUES elements.
836 (cp_parser_binary_expression): Clarify why we do not need to
837 handle stack overflow.
838
839 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
840
841 PR c++/16889
842 * search.c (lookup_field_queue_p): Correct check for hidden base.
843
844 * search.c (bfs_walk): Remove.
845 (lookup_member): Use dfs_walk_real.
846 (dfs_walk_real): Move and adjust documentation from bfs_walk.
847
848 2004-09-23 Zack Weinberg <zack@codesourcery.com>
849
850 * decl.c (grokfndecl): If ::main is found not to return int,
851 correct it after issuing a diagnostic.
852 (grokdeclarator): If the incoming type was error_mark_node, do
853 not complain about declaring something with no type.
854 (start_function): Change check for ::main not returning int to
855 an assertion, as grokfndecl now catches this when the user did it.
856 * init.c (perform_member_init, sort_mem_initializers)
857 (emit_mem_initializers): Make most diagnostics be issued on
858 the line of current_function_decl, not whatever the current
859 input line is.
860 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
861 definition and declaration with #ifdef ENABLE_CHECKING.
862 Avoid unnecessary use of fprintf.
863 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
864 definitions to avoid warnings.
865 (cp_lexer_new_main): Add assertion that first token is not a
866 padding token.
867 (cp_lexer_new_from_token_array): Fold into ...
868 (cp_lexer_new_from_tokens): ... here. Add assertion that
869 first token is not a padding token.
870 (cp_lexer_set_source_position_from_token): Move nearer to callers.
871 Remove unused lexer argument.
872 (cp_lexer_peek_token): Just print debugging report (if enabled)
873 and return lexer->next_token.
874 (cp_lexer_skip_purged_tokens): Delete.
875 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
876 inline, simplify bodies.
877 (cp_lexer_peek_nth_token): Add debugging report a la
878 cp_lexer_peek_token.
879 (cp_lexer_consume_token): Correct commentary. Advance over
880 purged tokens here. Set current source position here, from
881 token to be returned. Avoid unnecessary use of fprintf.
882 (cp_lexer_purge_token): Advance next_token pointer over this and
883 subsequent purged tokens.
884 (cp_parser_error): Adjust source position to that of the
885 peeked token.
886 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
887 (cp_parser_string_literal): Remove some excessive cleverness.
888 (cp_parser_enum_specifier): Call start_enum before consuming
889 the opening brace.
890 (cp_parser_member_declaration): Make the "extra semicolon"
891 diagnostic consistently-worded with the other place this is
892 diagnosed. Explicitly set the diagnostic location to the
893 location of the offending semicolon.
894 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
895 in diagnostics. Do not use cp_parser_require. Set location
896 of diagnostics about improper use of '>>' to location of
897 offending token.
898 (cp_parser_late_parsing_for_member):
899 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
900 (cp_parser_late_parsing_default_args): Likewise. Manually
901 move some logic outside the loop.
902
903 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
904
905 PR c++/17618
906 * cvt.c (cp_convert_to_pointer): Return early when the type is
907 an error_mark_node.
908
909 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
910
911 PR c++/13989
912 PR c++/9844
913 * decl.c (grokfndecl): Add new argument "attrlist", use it
914 to call cplus_decl_attributes.
915 (start_function): Remove call to cplus_decl_attributes.
916 * cvt.c (ocp_convert): Add support to use type conversion
917 function to vector type.
918 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
919 to the parsed type.
920
921 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
922
923 PR c++/17596
924
925 * parser.c (cp_parser_token_tree_map_node,
926 cp_parser_pm_expression, cp_parser_additive_expression,
927 cp_parser_multiplicative_expression, cp_parser_shift_expression,
928 cp_parser_relational_expression, cp_parser_equality_expression,
929 cp_parser_and_expression, cp_parser_exclusive_or_expression,
930 cp_parser_inclusive_or_expression,
931 cp_parser_logical_and_expression,
932 cp_parser_logical_or_expression): Removed.
933 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
934 binops, binops_by_token): New.
935 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
936 (cp_parser_new): Initialize binops_by_token.
937 (cp_parser_binary_expression): Rewritten.
938 (N_CP_TTYPES): New.
939
940 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
941
942 * parser.c: Fix a comment typo.
943
944 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
945
946 PR c++/17620
947 * decl.c (xref_basetypes): Look through typedefs before checking
948 for duplicate base.
949
950 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
951
952 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
953 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
954 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
955 (init_rtti_processing): Initialize it to something realistic.
956 (get_tinfo_decl): Adjust pushing the new decl.
957
958 * cp-tree.h (struct lang_type_class): Remove marked flags, add
959 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
960 (TYPE_MARKED_P): New.
961 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
962 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
963 CLEAR_CLASSTYPE_MARKED_N): Remove.
964 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
965 CLEAR_CLASSTYPE_MARKED_*): Remove.
966 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
967 shaped and repeated base properties.
968 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
969 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
970 class_hint_flags): Remove.
971 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
972 CLASSTYPE_DIAMOND_SHAPED_P.
973
974 2004-09-21 Ziemowit Laski <zlaski@apple.com>
975
976 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
977 cp-objcp-common.h.
978 (objcp_tsubst_copy_and_build): Reformat function signature.
979 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
980 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
981
982 2004-09-21 Zack Weinberg <zack@codesourcery.com>
983
984 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
985 Don't handle CPP_PRAGMA tokens specially.
986 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
987 purge the token; do clear token->value after processing. Add
988 assertion at beginning that token->value is nonzero.
989 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
990 CPP_PRAGMA as a full statement or declaration in its own right.
991
992 2004-09-21 Matt Austern <austern@apple.com>
993
994 PR c++/15049
995 * decl.c (grokvardecl): Accept declarations of global variables
996 using anonymous types.
997
998 2004-09-21 Roger Sayle <roger@eyesopen.com>
999
1000 PR c++/7503
1001 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
1002 if either operand has side-effects.
1003 * typeck.c (rationalize_conditional_expr): Assert that neither
1004 operand of MIN_EXPR or MAX_EXPR has side-effects.
1005 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
1006 Check that the "lhs" is a valid lvalue, i.e. that neither operand
1007 of a MIN_EXPR or MAX_EXPR has a side-effect.
1008
1009 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
1010
1011 * cp-tree.h (struct lang_type_header): Remove
1012 uses_multiple_inheritance field.
1013 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
1014 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
1015 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
1016 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
1017 (TYPE_CONTAINS_VPTR_P): Likewise.
1018 * call.c (add_template_candidate_real): Use
1019 CLASSTYPE_VBASECLASSES.
1020 (build_special_member_call): Likewise.
1021 * class.c (finish_struct_bits): Remove
1022 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
1023 bookkeeping.
1024 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1025 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
1026 bookkeeping.
1027 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
1028 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
1029 Likewise.
1030 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
1031 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1032 bookkeeping.
1033 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
1034 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1035 * init.c (expand_member, push_base_cleanups): Likewise.
1036 * pt.c (instantiate_class_template): Remove
1037 TYPE_USES_MULTIPLE_INHERITANCE,
1038 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
1039 bookkeeping.
1040 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
1041 check.
1042 * typeck2.c (process_init_constructor): Replace some sorrys with
1043 asserts.
1044
1045 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
1046
1047 * decl.c (reshape_init_array): Initialize max_index_cst to fix
1048 bootstrap failure.
1049
1050 2004-09-20 Mark Mitchell <mark@codesourcery.com>
1051
1052 PR c++/17530
1053 * pt.c (tsubst): Fix parentheses to accomodate emacs.
1054 (tsubst_baselink): If we get a single function, mark it as used.
1055
1056 2004-09-20 Matt Austern <austern@apple.com>
1057 Zack Weinberg <zack@codesourcery.com>
1058
1059 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
1060 Apply lbasename to input_filename before passing to get_fileinfo.
1061 * semantics.c (begin_class_definition): Likewise.
1062 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
1063 correct filename. Rename variables to be less confusing.
1064 (handle_pragma_implementation): Likewise. Disable "appears
1065 after file is included" diagnostic.
1066
1067 * parser.c (struct cp_token): Add in_system_header fiag.
1068 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
1069 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
1070 (CPP_NONE, cp_lexer_read_token): Delete.
1071 (struct cp_lexer): Remove first_token, string_tokens,
1072 main_lexer_p fields. Clarify comments.
1073 (struct cp_token_cache): Now just a pair of pointers.
1074 (CP_LEXER_BUFFER_SIZE): New #define.
1075 (CPP_PURGED): New fake token type.
1076 (cp_lexer_new_from_token_array, cp_lexer_destroy)
1077 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
1078 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
1079 New functions.
1080 (cp_lexer_new_from_tokens): Now a simple wrapper around
1081 cp_lexer_new_from_token_array.
1082 (cp_lexer_set_source_position_from_token): Also update
1083 in_system_header.
1084 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
1085 Don't wrap round.
1086 (cp_lexer_token_difference): Dont handle wrapping round.
1087 (cp_lexer_new_main): Enable pragma deferral and raw strings,
1088 read the entire translation unit through c_lex_with_flags into
1089 this lexer's buffer, then turn raw strings back off again.
1090 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
1091 (cp_lexer_get_preprocessor_token): No need to handle not being
1092 the main lexer. Set token->in_system_header too.
1093 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
1094 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
1095 (cp_lexer_peek_nth_token): Likewise.
1096 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
1097 the other tokens down.
1098 (cp_lexer_purge_tokens_after): Likewise.
1099 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
1100 about there being no tokens.
1101 (cp_lexer_print_token): Revise to give useful information on
1102 all tokens.
1103 (struct cp_parser): Add field translate_strings_p.
1104 (cp_parser_new): Initialize it.
1105 (cp_parser_translation_unit): Destroy the lexer when done.
1106 (cp_parser_parameter_declaration): Restructure saving of
1107 default arguments.
1108 (cp_parser_save_member_function_body): Likewise.
1109 (cp_parser_check_for_invalid_template_id)
1110 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
1111 Adjust calls to cp_lexer_advance_token.
1112 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
1113 No need to fiddle c_lex_string_translate.
1114 (cp_parser_primary_expression, cp_parser_linkage_specification)
1115 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
1116 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
1117 Use cp_parser_string_literal.
1118 (cp_parser_attribute_list): Save and restore
1119 parser->translate_strings_p, not c_lex_string_translate.
1120 (cp_parser_cache_group): Delete.
1121 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
1122 not take a cache argument.
1123
1124 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1125
1126 PR c++/14179
1127 * decl.c (reshape_init): Extract array handling into...
1128 (reshape_init_array): New function. Use integers instead of trees
1129 for indices. Handle out-of-range designated initializers.
1130
1131 2004-09-20 Steven Bosscher <stevenb@suse.de>
1132
1133 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
1134 to null_node.
1135
1136 2004-09-19 Mark Mitchell <mark@codesourcery.com>
1137
1138 * decl2.c (determine_visibility): Allow class visibility
1139 directives to override targetm.cxx.export_class_data.
1140
1141 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
1142
1143 * call.c, semantics.c: Follow spelling conventions.
1144 * class.c: Fix a comment typo.
1145
1146 2004-09-16 Geoffrey Keating <geoffk@apple.com>
1147
1148 PR pch/13361
1149 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1150 (handle_pragma_implementation): Likewise.
1151
1152 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1153 Zack Weinberg <zack@codesourcery.com>
1154
1155 * cp-tree.def: Use tree_code_class enumeration constants
1156 instead of code letters.
1157 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
1158 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
1159 Update for new tree-class enumeration constants.
1160
1161 2004-09-16 Mark Mitchell <mark@codesourcery.com>
1162
1163 PR c++/16002
1164 * parser.c (cp_parser_simple_declaration): Commit to tentative
1165 parses after seeing a decl-specifier.
1166 (cp_parser_simple_declaration): Eliminate spurious message.
1167 (cp_parser_init_declarator): Adjust error message.
1168
1169 PR c++/16029
1170 * lex.c (unqualified_name_lookup_error): Mark the dummy
1171 declaration as used.
1172
1173 PR c++/17501
1174 * parser.c (cp_parser_nested_name_specifier): Do not resolve
1175 typename types if the user explicitly said "typename".
1176
1177 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
1178
1179 * error.c (dump_decl): Make sure there is lang_specific info before
1180 checking for DTOR and CTOR decls.
1181
1182 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1183
1184 * class.c (copy_virtuals): Remove.
1185 (build_primary_vtable): Use copy_list directly.
1186 (build_secondary_vtable): Likewise.
1187 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
1188 (create_vtable_ptr): Likewise.
1189
1190 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1191
1192 * search.c: Follow spelling conventions.
1193
1194 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
1195
1196 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
1197 VEC(tree).
1198 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
1199 comments.
1200 * call.c (build_new_method_call): Don't confirm a pure virtual is
1201 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
1202 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
1203 (fixup_inline_methods, finish_struct): Likewise.
1204 * decl.c (finish_method): Likewise.
1205 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
1206 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
1207 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
1208 vector to avoid repeating the list in error messages.
1209
1210 2004-09-15 Mark Mitchell <mark@codesourcery.com>
1211
1212 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
1213 * cp-tree.h (cxx_comdat_group): Declare.
1214 * decl.c (cxx_comdat_group): New function.
1215
1216 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
1217
1218 * search.c (get_pure_virtuals): Remove unused variables.
1219
1220 * cp-tree.h (struct lang_decl_flags): Remove
1221 needs_final_overrider.
1222 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
1223 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
1224 * class.c (finish_struct_bits): Correct comment about
1225 CLASSTYPE_PURE_VIRTUALS.
1226 * search.c (get_pure_virtuals): Remove useless loop.
1227
1228 2004-09-14 Mark Mitchell <mark@codesourcery.com>
1229
1230 PR c++/17324
1231 * mangle.c (partially_mangled_name): New variable.
1232 (partially_mangled_name_len): Likewise.
1233 (save_partially_mangled_name): New function.
1234 (restore_partially_mangled_name): Likewise.
1235 (write_encoding): Save and restore partially mangled names around
1236 calls to get_mostly_instantiated_function_type.
1237 (write_unqualified_name): Likewise.
1238
1239 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
1240
1241 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
1242
1243 2004-09-13 Mark Mitchell <mark@codesourcery.com>
1244
1245 PR c++/16162
1246 * parser.c (cp_parser_id_expression): Correct value for
1247 is_declarator.
1248 (cp_parser_nested_name_specifier_opt): Look through typenames as
1249 necessary.
1250 (cp_parser_template_name): Honor check_dependency_p.
1251
1252 PR c++/16716
1253 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
1254 Robustify.
1255
1256 PR c++/17327
1257 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
1258 gcc_unreacable.
1259
1260 2004-09-12 Richard Henderson <rth@redhat.com>
1261
1262 PR c++/16254
1263 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
1264 * typeck.c (condition_conversion): Likewise.
1265
1266 2004-09-11 Richard Henderson <rth@redhat.com>
1267
1268 PR c++/17404
1269 * pt.c (cur_stmt_expr): Move from tsubst_expr.
1270 (tsubst_expr) <case STMT_EXPR>: Move ...
1271 (tsubst_copy_and_build): ... here.
1272
1273 2004-09-10 Zack Weinberg <zack@codesourcery.com>
1274
1275 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
1276 comment explaining them moved to c-common.h.
1277 * lex.c (interface_only, interface_unknown, extract_interface_info):
1278 Delete definitions.
1279 (cxx_finish): Don't reset interface_unknown.
1280 (handle_pragma_interface): Don't set interface_only and
1281 interface_unknown; just the like-named fields in finfo.
1282 (handle_pragma_implementation): Adjust comment.
1283 * decl2.c (cp_finish_file): Don't reset interface_only and
1284 interface_unknown.
1285 * method.c (synthesize_method): Don't reset interface_unknown or
1286 call extract_interface_info.
1287 * pt.c (pop_tinst_level): Don't call extract_interface_info.
1288 * decl.c (start_cleanup_fn): Don't save or restore interface_only
1289 and interface_unknown.
1290 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
1291 and use the result instead of the interface_only/interface_unknown
1292 globals.
1293 (start_preparsed_function): Likewise.
1294 * lex.c (cxx_make_type): Likewise.
1295 * semantics.c (begin_class_definition): Likewise.
1296 (expand_body): Don't call extract_interface_info.
1297
1298 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1299
1300 * decl.c (objc_mark_locals_volatile): Make description of
1301 routine more descriptive; only mark VAR_DECLs at each
1302 binding level.
1303
1304 2004-09-10 Richard Henderson <rth@redhat.com>
1305
1306 PR c++/17386
1307 * call.c (build_vfield_ref): Move...
1308 * class.c (build_vfield_ref): ... here. Convert datum to the
1309 primary base containing the vptr.
1310 (make_new_vtable): Simplify build_primary_vtable arguments.
1311 (finish_struct_1): Do not duplicate TYPE_VFIELD.
1312 * typeck.c (build_class_member_access_expr): Don't warn for
1313 null object access to base fields.
1314
1315 2004-09-10 Ziemowit Laski <zlaski@apple.com>
1316
1317 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
1318 New functions, to be called from ObjC++.
1319
1320 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
1321
1322 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
1323 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
1324 comment typos.
1325
1326 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1327
1328 * typeck.c (build_c_cast): Preserve the cast if casting
1329 to and from an Objective-C type.
1330
1331 2004-09-09 Ziemowit Laski <zlaski@apple.com>
1332
1333 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
1334 * typeck.c: Include c-common.h.
1335 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
1336 return the result if nonnegative.
1337
1338 2004-09-09 Zack Weinberg <zack@codesourcery.com>
1339
1340 * decl2.c (import_export_class)
1341 * lex.c (handle_pragma_interface):
1342 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
1343
1344 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1345
1346 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
1347 * semantics.c: Include c-common.h.
1348 (finish_compound_stmt): Call objc_clear_super_receiver().
1349
1350 2004-09-08 Ziemowit Laski <zlaski@apple.com>
1351
1352 * cp-tree.h (do_poplevel): New prototype.
1353 * semantics.c (do_poplevel): Make externally visible.
1354
1355 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
1356
1357 * cp-tree.h (tree_pair_s): Define a GC'd vector.
1358 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
1359 * semantics.c (deferred_access): Likewise.
1360
1361 2004-09-06 Daniel Jacobowitz <dan@debian.org>
1362
1363 * semantics.c (expand_body): Assert that we are not nested.
1364
1365 2004-09-06 Zack Weinberg <zack@codesourcery.com>
1366
1367 * decl.c (build_enumerator): Use add_double and int_fits_type_p
1368 instead of cp_build_binary_op, to avoid creating short-lived trees.
1369 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
1370 lookahead instead of backtracking. Move some code to avoid a
1371 conditional branch.
1372 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
1373 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1374 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
1375 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
1376
1377 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1378
1379 * decl.c (grok_declarator): Remove a redundant semicolon.
1380
1381 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
1382 Correct comments describing function parameters.
1383
1384 2004-09-03 Matt Austern <austern@apple.com>
1385 Compile speed improvement.
1386 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
1387 Otherwise define a stub macro that expands to nothing.
1388 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
1389 define a stub macro that expands to 0.
1390 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
1391 (cp_lexer_stop_debugging): Likewise.
1392 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
1393 define a stub macro that expands to NULL.
1394 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
1395 (cp_lexer_new_from_tokens): Likewise.
1396
1397 2004-09-03 Jan Hubicka <jh@suse.cz>
1398
1399 * decl.c (finish_function): Clean out pointers we no longer need.
1400
1401 2004-09-03 Jan Beulich <jbeulich@novell.com>
1402
1403 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
1404 than "-lm".
1405
1406 2004-09-02 Paul Brook <paul@codesourcery.com>
1407
1408 * decl2.c (determine_visibility): Only check data visibility
1409 for VAR_DECLS.
1410
1411 2004-08-31 Mark Mitchell <mark@codesourcery.com>
1412
1413 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
1414 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
1415 * decl2.c (determine_visibility): Honor
1416 TARGET_CXX_EXPORT_CLASS_DATA.
1417
1418 * class.c (key_method): Rename to ...
1419 (determine_key_method): ... this.
1420 (finish_struct_1): Adjust accordingly.
1421 * cp-tree.h (key_method): Declare.
1422 * decl2.c (maybe_emit_vtables): Determine the key method here if
1423 it has not already been done.
1424
1425 2004-08-31 Ziemowit Laski <zlaski@apple.com>
1426
1427 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
1428 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
1429 (cp/cp-decl.c): Do not depend on gtype-cp.h.
1430 (cp/cp-objcp-common.o): New target.
1431 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
1432 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
1433 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
1434 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
1435 respectively.
1436 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
1437 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
1438 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
1439 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
1440 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
1441 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
1442 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
1443 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
1444 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
1445 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1446 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1447 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
1448 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
1449 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
1450 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
1451 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
1452 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
1453 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
1454 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
1455 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
1456 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
1457 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
1458 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
1459 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
1460 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
1461 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
1462 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
1463 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1464 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
1465 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
1466 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
1467 hooks to cp-objcp-common.h.
1468 (finish_file): New function.
1469 * cp-objcp-common.c: New file.
1470 * cp-objcp-common.h: New file.
1471 * cp-tree.h (cp_finish_file): New prototype.
1472 * decl.c: Do not include gtype-cp.h.
1473 * decl2.c (finish_file): Rename to cp_finish_file.
1474
1475 2004-08-31 Richard Henderson <rth@redhat.com>
1476
1477 PR c++/17221
1478 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
1479 (tsubst_copy_and_build): ... here.
1480
1481 2004-08-30 Mark Mitchell <mark@codesourcery.com>
1482
1483 * cp-tree.h (initialize_artificial_var): Declare.
1484 * decl.c (initialize_artifical_var): New function.
1485 * class.c (initialize_array): Remove.
1486 (initialize_vtable): Use initialize_artificial_var.
1487 (build_vtt): Likewise.
1488 (build_ctor_vtbl_group): Likewise.
1489
1490 2004-08-30 Richard Henderson <rth@redhat.com>
1491
1492 * class.c (build_base_path): Use build_address directly.
1493 * typeck.c (build_unary_op): Don't lower &a.b to pointer
1494 arithmetic directly.
1495 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
1496 means !initializer_constant_valid_p.
1497
1498 2004-08-30 Richard Henderson <rth@redhat.com>
1499
1500 * class.c (fixed_type_or_null): Use get_base_address before
1501 assuming an ADDR_EXPR is non-null.
1502
1503 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1504
1505 * name-lookup.c (pop_binding, pushdecl,
1506 set_identifier_type_value_with_scope, push_overloaded_decl,
1507 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
1508 * parser.c (cp_parser_diagnose_invalid_type_name,
1509 cp_parser_postfix_expression, cp_parser_unary_expression,
1510 cp_parser_check_declarator_template_para): Likewise.
1511 * pt.c (push_inline_template_parms_recursive,
1512 check_explicit_specialization, convert_nontype_argument,
1513 coerce_template_template_parms, uses_template_parms,
1514 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
1515 tsubst_expr, instantiate_template,
1516 maybe_adjust_types_for_deduction, type_unification_real,
1517 resolve_overloaded_unification, template_decl_level,
1518 type_dependent_expression_p): Likewise.
1519 * search.c (lookup_base_r): Likewise.
1520 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
1521 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
1522 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
1523 * typeck.c (common_type, get_member_function_from_ptrfunc,
1524 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
1525 * typeck2.c (cxx_incomplete_type_diagnostic,
1526 split_nonconstant_init_1, store_init_value,
1527 process_init_constructor): Likewise.
1528
1529 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1530
1531 * call.c (check_dtor_name): Replace abort with gcc_assert or
1532 gcc_unreachable.
1533 (build_call, add_builtin_candidate, build_new_op,
1534 convert_like_real, build_over_call, in_charge_arg_for_name,
1535 source_type, joust): Likewise.
1536 * class.c (build_simple_base_path, get_vcall_index,
1537 finish_struct_1, instantiate_type, get_enclosing_class,
1538 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
1539 * cp-gimplify.c (cp_genericize): Likewise.
1540 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
1541 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
1542 * decl.c (poplevel, make_unbound_class_template, reshape_init,
1543 check_special_function_return_type, grokdeclarator,
1544 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
1545 finish_function): Likewise.
1546 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
1547 * error.c (dump_global_iord, dump_decl, dump_template_decl,
1548 language_to_string): Likewise.
1549 * except.c (choose_personality_routine): Likewise.
1550 * friend.c (do_friend): Likewise.
1551 * g++spec.c (lang_specific_driver): Likewise.
1552 * init.c (build_zero_init, expand_default_init, build_new_1,
1553 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
1554 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
1555 * mangle.c (add_substitution, write_unscoped_name,
1556 write_template_prefix, write_identifier,
1557 write_special_name_destructor, write_type, write_builtin_type,
1558 write_expression, write_template_param,
1559 write_java_integer_type_codes): Likewise.
1560 * method.c (implicitly_declare_fn): Likewise.
1561
1562 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
1563
1564 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
1565 (BINFO_INDIRECT_PRIMARY_P): Remove.
1566 * class.c (determine_primary_base): Rename to ...
1567 (determine_primary_bases): ... here. Set all primary bases.
1568 (set_primary_base): Remove.
1569 (mark_primary_bases): Remove.
1570 (build_simple_base_path, walk_subobject_offsets,
1571 propagate_binfo_offsets, end_of_class): Adjust.
1572 (layout_class_type): Rename determine_primary_base call.
1573 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
1574 to type_as_string.
1575 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
1576 build_rtti_vtbl_entries): Adjust.
1577 * init.c (build_vtbl_address): Adjust.
1578
1579 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
1580
1581 2004-08-28 Ziemowit Laski <zlaski@apple.com>
1582
1583 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
1584 CXX_AND_OBJCXX_OBJS.
1585 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
1586 separately on the link line.
1587
1588 2004-08-28 Jason Merrill <jason@redhat.com>
1589
1590 * decl.c (expand_static_init): Avoid bogus warnings.
1591
1592 2004-08-27 Jason Merrill <jason@redhat.com>
1593
1594 PR c++/16851
1595 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
1596
1597 PR c++/13684
1598 * decl.c (expand_static_init): Use thread-safety API.
1599 (register_dtor_fn): Return the call, don't expand it.
1600 * tree.c (add_stmt_to_compound): New fn.
1601 (stabilize_call): Use it.
1602
1603 2004-08-27 Richard Henderson <rth@redhat.com>
1604
1605 * cp-tree.def (OFFSETOF_EXPR): New.
1606 * parser.c (cp_parser_builtin_offsetof): Either built an
1607 OFFSETOF_EXPR, or call fold_offsetof immediately.
1608 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
1609
1610 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1611
1612 * call.c (validate_conversion_obstack): Replace
1613 my_friendly_assert with gcc_assert or gcc_unreachable.
1614 (direct_reference_binding, merge_conversion_sequences,
1615 build_user_type_conversion_1, perform_overload_resolution,
1616 build_op_delete_call, enforce_access, call_builtin_trap,
1617 build_over_call, build_special_member_call, build_new_method_call,
1618 initialize_reference): Likewise.
1619 * class.c (build_base_path, build_primary_vtable, alter_access,
1620 check_bases, update_vtable_entry_for_fn, layout_empty_base,
1621 clone_function_decl, adjust_clone_args,
1622 type_requires_array_cookie, include_empty_classes,
1623 finish_struct_1, resolve_address_of_overloaded_function,
1624 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
1625 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1626 accumulate_vtbl_inits, build_vtbl_initializer,
1627 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
1628 * cvt.c (build_up_reference, convert_to_reference): Likewise.
1629 * decl.c (poplevel, duplicate_decls, make_typename_type,
1630 cxx_init_decl_processing, reshape_init, check_initializer,
1631 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
1632 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
1633 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
1634 xref_basetypes, start_preparsed_function, save_function_data,
1635 finish_function, finish_method, maybe_register_incomplete_var,
1636 complete_vars): Likewise.
1637 * decl2.c (grok_array_decl, check_member_template,
1638 check_classfn, finish_static_data_member_decl, coerce_new_type,
1639 coerce_delete_type, import_export_class, decl_needed_p,
1640 determine_visibility, import_export_decl, build_cleanup,
1641 start_static_initialization_or_destructi, do_static_destruction,
1642 prune_vars_needing_no_initialization,
1643 build_offset_ref_call_from_tree): Likewise.
1644 * error.c (dump_decl, dump_expr): Likewise.
1645 * init.c (finish_init_stmts, build_zero_init,
1646 expand_virtual_init, expand_default_init, expand_aggr_init_1,
1647 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
1648 Likewise.
1649 * mangle.c (write_method_parms, write_template_args,
1650 write_expression, write_template_arg): Likewise.
1651 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
1652 * name-lookup.c (pop_binding, begin_scope, leave_scope,
1653 resume_scope, push_using_decl, validate_nonmember_using_decl,
1654 is_ancestor, poplevel_class, set_inherited_value_binding_p,
1655 push_class_level_binding, do_class_using_decl, push_namespace,
1656 pop_namespace, add_using_namespace, ambiguous_decl,
1657 lookup_namespace_name, lookup_type_current_level,
1658 maybe_process_template_type_declaration): Likewise.
1659 * parser.c (cp_lexer_peek_nth_token,
1660 cp_parser_parse_and_diagnose_invalid_typ,
1661 cp_parser_translation_unit, cp_parser_template_id,
1662 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
1663 * pt.c (push_access_scope, finish_member_template_decl,
1664 push_inline_template_parms_recursive, add_outermost_template_args,
1665 get_innermost_template_args, begin_explicit_instantiation,
1666 end_explicit_instantiation, retrieve_specialization,
1667 is_specialization_of, is_specialization_of_friend,
1668 register_specialization, check_explicit_specialization,
1669 comp_template_parms, process_template_parm,
1670 process_partial_specialization, convert_nontype_argument,
1671 coerce_template_template_parms, coerce_template_parms,
1672 mangle_class_name_for_template, lookup_template_function,
1673 lookup_template_class, instantiate_class_template, tsubst_decl,
1674 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
1675 instantiate_template, fn_type_unification, type_unification_real,
1676 get_template_base, regenerate_decl_from_template,
1677 template_for_substitution, instantiate_decl,
1678 get_mostly_instantiated_function_type, dependent_scope_ref_p,
1679 value_dependent_expression_p, resolve_typename_type): Likewise.
1680 * repo.c (repo_emit_p): Likewise.
1681 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
1682 create_tinfo_types, emit_tinfo_decl): Likewise.
1683 * search.c (lookup_base_r, lookup_base, lookup_field_1,
1684 dfs_access_in_type, build_baselink, lookup_member,
1685 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
1686 * semantics.c (perform_or_defer_access_check,
1687 finish_non_static_data_member, finish_stmt_expr_expr,
1688 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
1689 finish_template_template_parm, finish_member_declaration,
1690 emit_associated_thunks): Likewise.
1691 * tree.c (build_target_expr_with_type, force_target_expr,
1692 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
1693 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
1694 cxx_sizeof_or_alignof_type, perform_integral_promotions,
1695 build_class_member_access_expr, finish_class_member_access_expr,
1696 build_ptrmemfunc_access_expr, build_unary_op,
1697 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
1698 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
1699 * typeck2.c (complete_type_check_abstract,
1700 abstract_virtuals_error, process_init_constructor,
1701 add_exception_specifier): Likewise.
1702
1703 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
1704
1705 * class.c (build_vtbl_initializer): Use ssize_int.
1706 * decl.c (complete_array_type): Likewise.
1707 * method.c (finish_thunk): Likewise.
1708 * search.c (get_dynamic_base_type): Likewise.
1709
1710 2004-08-26 Richard Henderson <rth@redhat.com>
1711
1712 * cp-tree.h (DECL_FIELD_IS_BASE): New.
1713 * class.c (build_base_field): Set it.
1714 (build_simple_base_path): Use it.
1715 (fixed_type_or_null): Don't consider base fields definitive.
1716
1717 2004-08-25 Roger Sayle <roger@eyesopen.com>
1718
1719 PR middle-end/16693
1720 PR tree-optimization/16372
1721 * decl.c (finish_enum): Make the precision of the enumerated type
1722 the same width as the underlying integer type.
1723
1724 2004-08-25 Mark Mitchell <mark@codesourcery.com>
1725
1726 PR c++/17155
1727 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
1728 functions.
1729
1730 * mangle.c (get_identifier_nocopy): Add cast.
1731
1732 * cp-tree.h (mangle_type): Remove.
1733 * mangle.c (globals): GTY it.
1734 (mangle_obstack): New variable.
1735 (name_obstack): Likewise.
1736 (name_base): Likewise.
1737 (write_char): Adjust accordingly.
1738 (write_chars): Likewise.
1739 (write_string): Likewise.
1740 (start_mangling): Initialize G.substitutions only one. Add
1741 ident_p parameter.
1742 (finish_mangling): Use VARRAY_CLEAR to reclaim
1743 storage in G.substitutions. Use obstack_finish.
1744 (init_mangle): Adjust for changes to variable names above.
1745 Initialize G.substitutions.
1746 (mangle_decl_string): Adjust call to start_mangling.
1747 (get_identifier_nocopy): New function.
1748 (mangle_decl): Use it.
1749 (mangle_type_string): Adjust call to start_mangling.
1750 (mangle_special_for_type): Likewise.
1751 (mangle_vtt_for_type): Likewise.
1752 (mangle_ctor_vtbl_for_type): Likewise.
1753 (mangle_thunk): Likewise.
1754 (mangle_guard_variable): Likewise.
1755 (mangle_ref_init_variable): Likewise.
1756
1757 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1758
1759 PR c++/14428
1760 * pt.c (redeclare_class_template): Check the type of non-type and
1761 template template parameter.
1762
1763 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1764
1765 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
1766 (build_user_type_conversion_1, convert_like_real,
1767 build_java_interface_fn_ref, build_special_member_call): Likewise.
1768 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
1769 * cp-gimplify.c (cp_gimplify_expr): Likewise.
1770 * cvt.c (cp_convert_to_pointer): Likewise.
1771 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
1772 * decl2.c (start_static_initialization_or_destruction,
1773 generate_ctor_or_dtor_function): Likewise.
1774 * except.c (build_throw): Likewise.
1775 * mangle.c (write_integer_cst): Likewise.
1776 * method.c (finish_thunk): Likewise.
1777 * rtti.c (build_headof, get_tinfo_decl_dynamic,
1778 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
1779 get_pseudo_ti_init): Likewise.
1780 * search.c (get_dynamic_cast_base_type): Likewise.
1781
1782 2004-08-25 Zack Weinberg <zack@codesourcery.com>
1783
1784 * class.c, search.c: Remove references to DWARF_DEBUG.
1785
1786 2004-08-25 Adam Nemet <anemet@lnxw.com>
1787
1788 * repo.c (extract_string): Reset backquote after one character.
1789 (get_base_filename): Fix indentation.
1790
1791 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1792
1793 * decl.c (cxx_init_decl_processing): Adjust
1794 build_common_tree_nodes call.
1795
1796 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1797
1798 PR c++/16889
1799 * (is_subobject_of_p): Resurrect & optimize.
1800 (lookup_field_r): Use it.
1801
1802 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1803
1804 PR c++/16706
1805 * search.c (friend_accessible_p): Increment processing_template_decl
1806 when deal with TEMPLATE_DECL of SCOPE.
1807
1808 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1809
1810 PR c++/17149
1811 * semantics.c (check_accessibility_of_qualified_id): Defer check
1812 if qualifying_type is a template parameter.
1813
1814 2004-08-23 Mark Mitchell <mark@codesourcery.com>
1815
1816 PR c++/17163
1817 * pt.c (instantiate_decl): Do not try to apply
1818 DECL_DECLARED_INLINED_P to a VAR_DECL.
1819
1820 * search.c (build_baselink): Fix typo in comment.
1821
1822 2004-08-22 Andrew Pinski <apinski@apple.com>
1823
1824 Revert:
1825 2004-08-22 Andrew Pinski <apinski@apple.com>
1826 PR c++/14029
1827 * typeck.c (build_unary_op): Use &a.b if the folded lowered
1828 expression is not constant.
1829
1830 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1831
1832 * name-lookup.c (pushdecl): Rename build_type_copy call.
1833 * tree.c (cp_build_qualified_type_real,
1834 build_exception_variant, handle_java_interface_attribute): Likewise.
1835
1836 2004-08-22 Andrew Pinski <apinski@apple.com>
1837
1838 PR c++/14029
1839 * typeck.c (build_unary_op): Use &a.b if the folded lowered
1840 expression is not constant.
1841
1842 2004-08-20 Mark Mitchell <mark@codesourcery.com>
1843
1844 PR c++/17121
1845 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
1846
1847 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
1848
1849 PR c++/17120
1850 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
1851 MODOP_EXPR.
1852
1853 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1854
1855 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
1856 before calling comp_template_args.
1857
1858 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
1859
1860 * class.c (build_vtbl_initializer): Use build_int_cst for
1861 negative size types.
1862 * decl.c (complete_array_type): Likewise.
1863 * method.c (finish_thunk): Likewise.
1864
1865 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
1866
1867 * tree.c: Remove unused mark_local_for_remap_r.
1868
1869 2004-08-19 Eric Christopher <echristo@redhat.com>
1870
1871 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
1872 * tree.c (cxx_unsave_expr_now): Delete.
1873 (cp_unsave_r): Ditto.
1874
1875 2004-08-19 Mark Mitchell <mark@codesourcery.com>
1876
1877 PR c++/15890
1878 * pt.c (push_template_decl_real): Disallow template allocation
1879 functions with fewer than two parameters.
1880
1881 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1882
1883 * cp-tree.h (build_shared_int_cst): Remove.
1884 * tree.c (shared_int_cache): Remove.
1885 (build_shared_int_cst): Remove.
1886 * class.c (finish_struct_1): Use build_int_cst.
1887
1888 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1889
1890 * decl.c (finish_enum): Do not copy value node early, copy
1891 later.
1892 * lex.c (cxx_init): Force null_node to be unique.
1893
1894 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
1895
1896 PR c++/17041
1897 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
1898 from input for MODOP_EXPR.
1899
1900 2004-08-18 Mark Mitchell <mark@codesourcery.com>
1901
1902 * pt.c (dependent_template_p): Fix typo in commment.
1903
1904 PR c++/17068
1905 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
1906 dependent.
1907
1908 2004-08-17 Mark Mitchell <mark@codesourcery.com>
1909
1910 PR c++/16246
1911 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
1912 arguments have the same type as the corresponding parameter.
1913
1914 PR c++/16215
1915 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
1916 is set use it for diagnostic purposes.
1917 (cp_parser_pseudo_destructor_name): Remove special-case error
1918 message.
1919
1920 PR c++/15871
1921 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
1922
1923 PR c++/16965
1924 * cp-tree.h (qualified_name_lookup_error): Add parameter.
1925 * name-lookup.c (do_class_using_decl): Restrict set of entities
1926 passed to cp_emit_debug_info_for_using more carefully.
1927 (lookup_qualified_name): Allow lookup_member to return sets of
1928 ambiguous entries.
1929 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
1930 (cp_parser_primary_expression): Handle ambiguous lookups.
1931 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
1932 (cp_parser_template_argument): Likewise.
1933 (cp_parser_elaborate_type_specifier): Likewise.
1934 (cp_parser_namespace_name): Likewise.
1935 (cp_parser_class_name): Likewise.
1936 (cp_parser_lookup_name_simple): Likewise.
1937 * pt.c (tsubst_qualified_id): Handle ambiguous results.
1938 (tsubst_expr): Likewise.
1939 * semantics.c (qualified_name_lookup_error): Add decl paramter.
1940 For ambiguous lookups, print candidates.
1941
1942 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1943
1944 PR c++/6749
1945 * pt.c (instantiate_pending_templates): Add int parameter. Don't
1946 return anything.
1947 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
1948 * decl2.c (finish_file): Adjust call to
1949 instantiate_pending_templates.
1950
1951 2004-08-15 Roger Sayle <roger@eyesopen.com>
1952
1953 * call.c (build_vfield_ref, build_call, build_conditional_expr,
1954 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
1955 build_java_interface_fn_ref, build_special_member_call,
1956 build_new_method_call, initialize_reference): Replace calls to
1957 build with calls to buildN.
1958 * class.c (build_base_path, convert_to_base_statically,
1959 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
1960 build_vtbl_initializer): Likewise.
1961 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
1962 gimplify_if_stmt, cp_genericize_r): Likewise.
1963 * cvt.c (convert_to_void): Likewise.
1964 * decl.c (check_initializer, finish_constructor_body,
1965 finish_destructor_body): Likewise.
1966 * error.c (dump_expr): Likewise.
1967 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
1968 Likewise.
1969 * init.c (perform_member_init, expand_virtual_init,
1970 expand_cleanup_for_base, build_init, expand_default_init,
1971 build_offset_ref, decl_constant_value, build_new, build_new_1,
1972 build_vec_delete_1, build_vec_init, build_delete,
1973 push_base_cleanups, build_vec_delete): Likewise.
1974 * mangle.c (write_integer_cst): Likewise.
1975 * method.c (thunk_adjust, do_build_copy_constructor,
1976 do_build_assign_ref): Likewise.
1977 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
1978 unify, build_non_dependent_expr): Likewise.
1979 * rtti.c (build_headof, build_typeid, ifnonnull,
1980 build_dyanmic_cast_1, tinfo_base_init): Likewise.
1981 * semantics.c (begin_compound_stmt, finish_call_expr,
1982 finish_pseudo_destructor_expr, finish_id_expression,
1983 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
1984 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
1985 array_type_nelts_total, stabilize_call): Likewise.
1986 * typeck.c (decay_conversion, build_class_member_access_expr,
1987 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
1988 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
1989 build_x_unary_op, build_unary_op, unary_complex_lvalue,
1990 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
1991 check_return_expr): Likewise.
1992 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
1993 split_nonconstant_init, store_init_value, build_m_component_ref):
1994 Likewise.
1995
1996 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1997
1998 * call.c (convert_class_to_reference,
1999 build_user_type_conversion_1, convert_like_real,
2000 build_java_interface_fn_ref, build_special_member_call): Use
2001 build_int_cst.
2002 * class.c (build_vtbl_initializer): Likewise.
2003 * cp-gimplify.c (cp_gimplify_expr): Likewise.
2004 * cvt.c (cp_convert_to_pointer): Likewise.
2005 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
2006 * decl2.c (start_static_initialization_or_destruction,
2007 generate_ctor_or_dtor_function): Likewise.
2008 * except.c (build_throw): Likewise.
2009 * lex.c (cxx_init): Likewise.
2010 * mangle.c (write_integer_cst): Likewise.
2011 * rtti.c (build_headof, get_tinfo_decl_dynamic,
2012 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
2013 get_pseudo_ti_init): Likewise.
2014 * search.c (get_dynamic_cast_base_type): Likewise.
2015 * tree.c (build_shared_int_cst): Likewise.
2016
2017 2004-08-12 Mark Mitchell <mark@codesourcery.com>
2018
2019 PR c++/16273
2020 * class.c (count_depth_data): New type.
2021 (dfs_depth_post): New function.
2022 (dfs_depth_q): Likewise.
2023 (find_final_overrider_data_s): Change type of vpath.
2024 Add vpath_list.
2025 (dfs_find_final_overrider_1): New function.
2026 (dfs_find_final_overrider): Use it.
2027 (dfs_find_final_overrider_q): Adjust use of vpath.
2028 (dfs_find_final_overrider_post): Likewise.
2029 (find_final_overrider): Use dfs_depth. Allocate and deallocate
2030 vpath_list.
2031
2032 2004-08-12 Jan Beulich <jbeulich@novell.com>
2033
2034 * parser.c (cp_parser_asm_definition): Properly consume scope operator
2035 tokens preceding the clobbers. Don't check for scope operator
2036 following inputs. Simplify inputs handling to match that now used for
2037 clobbers.
2038
2039 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2040
2041 PR c++/16698
2042 * except.c (build_throw): Allocate cleanup_type and the function
2043 for __cxa_throw separately.
2044
2045 PR c++/16853
2046 * call.c (standard_conversion): Do not accept conversions between
2047 pointers to members if the class types are unrelated.
2048
2049 PR c++/16618
2050 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
2051 char &" instead of just "char &".
2052
2053 PR c++/16870
2054 * pt.c (tsubst): Just return the unknown_type_node.
2055
2056 2004-08-11 Mark Mitchell <mark@codesourcery.com>
2057
2058 PR c++/16964
2059 * parser.c (cp_parser_class_specifier): Robustify.
2060
2061 PR c++/16904
2062 * pt.c (tsubst_copy_and_build): Complain about invalid
2063 qualification.
2064
2065 PR c++/16929
2066 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
2067 current_class_ref while tsubsting.
2068
2069 2004-08-10 Mark Mitchell <mark@codesourcery.com>
2070
2071 PR c++/16971
2072 * parser.c (cp_parser_init_declarator): Robustify.
2073
2074 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
2075
2076 * typeck2.c (process_init_constructor): Guard the missing field warning
2077 with warn_missing_field_initializers rather than extra_warnings.
2078
2079 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
2080
2081 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
2082
2083 2004-08-05 Mark Mitchell <mark@codesourcery.com>
2084
2085 * decl.c (start_preparsed_function): Move determine_visibility
2086 call.
2087 * decl2.c (determine_visibility): Incorporate dllexport testing.
2088
2089 2004-08-05 Geoffrey Keating <geoffk@apple.com>
2090
2091 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
2092 means that libstdc++ is needed.
2093
2094 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2095
2096 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
2097
2098 2004-08-04 Geoffrey Keating <geoffk@apple.com>
2099
2100 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
2101 than passing it as a parameter to rest_of_decl_compilation.
2102 * decl2.c (grokfield): Use set_user_assembler_name.
2103
2104 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
2105
2106 * decl.c (complete_array_type): Don't gratuitously copy
2107 maxindex. Its type is always set.
2108
2109 2004-08-04 Paul Brook <paul@codesourcery.com>
2110
2111 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
2112 * cp-tree.h (struct language_function): Rename x_dtor_label to
2113 x_cdtor_label.
2114 (dtor_label): Rename ...
2115 (cdtor_label): ... to this.
2116 * decl.c (begin_constructor_body): Remove.
2117 (check_special_function_return_type): Maybe change the return type.
2118 (grokdeclarator): Pass the class type.
2119 (start_preparsed_function): Constructors may need a return label.
2120 (finish_constructor_body, finish_destructor_body): Set the return
2121 value.
2122 (begin_function_body): Don't call begin_constructor_body.
2123 (finish_function): Don't warn for constructors or destructors.
2124 (implicitly_declare_fn): Maybe change the return type.
2125 * optimize.c: Include target.h.
2126 (maybe_clone_body): Remap the function result.
2127 * semantics.c: Include target.h.
2128 (finish_return_stmt): Maybe jump to return label for constructors.
2129
2130 2004-08-03 Mark Mitchell <mark@codesourcery.com>
2131
2132 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
2133 (check_field_decls): Or here.
2134 (check_methods): Or here.
2135 (initialize_array): Don't mess with DECL_CONTEXT.
2136 * cp-tree.h (start_decl): Adjust prototype.
2137 (determine_visibility): New function.
2138 * decl.c (duplicate_decls): Remove checks for hidden "operator
2139 new".
2140 (build_library_fn_1): Give all library functions default
2141 visibility.
2142 (start_decl): Add pop_scope_p parameter. Tidy.
2143 (cp_finish_decl): Do not pop scopes here. Call
2144 determine_visibility for variable definitions.
2145 (start_preparsed_function): Call determine_visibility.
2146 * decl2.c (determine_visibility): New function.
2147 * method.c (use_thunk): Fix formatting.
2148 * parser.c (cp_parser_condition): Adjust calls to start_decl.
2149 (cp_parser_init_declarator): Likewise.
2150 * pt.c (instantiate_decl): Always call pop_nested_class.
2151 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
2152 (tinfo_base_init): Likewise.
2153
2154 2004-08-02 Mark Mitchell <mark@codesourcery.com>
2155
2156 PR c++/16707
2157 * name-lookup.c (validate_nonmember_using_decl): Robustify.
2158
2159 2004-08-01 Mark Mitchell <mark@codesourcery.com>
2160
2161 PR c++/16224
2162 * name-lookup.c (decl_namespace): Remove.
2163 (current_decl_namespace): Use decl_namespace_context instead of
2164 decl_namespace.
2165 (push_decl_namespace): Likewise.
2166 (arg_assoc_class): Likewise.
2167 (arg_assoc_type): Likewise.
2168 * pt.c (check_specialization_namespace): New function.
2169 (maybe_process_partial_specialization): Use it.
2170 (register_specialization): Likewise.
2171
2172 PR c++/16489
2173 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
2174 * call.c (null_ptr_cst_p): Handle variables with constant
2175 initializers.
2176 * pt.c (convert_nontype_argument): Use
2177 DECL_INTEGRAL_CONSTANT_VAR_P.
2178 * semantics.c (finish_id_expression): Likewise.
2179
2180 PR c++/16529
2181 * decl.c (duplicate_decls): Reject duplicate namespace
2182 declarations.
2183
2184 PR c++/16810
2185 * typeck.c (build_ptrmemfunc): Loosen assertion.
2186
2187 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2188
2189 * call.c (z_candidate::template_decl): Rename from template.
2190 (add_template_candidate_real): Adjust member reference.
2191 (joust): Likewise.
2192
2193 2004-07-29 Mark Mitchell <mark@codesourcery.com>
2194
2195 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
2196 (lang_decl_flags): Narrow the width of "languages". Add
2197 repo_available_p.
2198 (DECL_NEEDED_P): Remove.
2199 (FOR_EACH_CLONE): New macro.
2200 (DECL_REPO_AVAILABLE_P): Likewise.
2201 (DECL_TINFO_P): Likewise.
2202 (set_linkage_according_to_type): Declare.
2203 (import_export_vtable): Remove.
2204 (import_export_tinfo): Likewise.
2205 (mark_needed): New function.
2206 (decl_needed_p): Likewise.
2207 (note_vauge_linkage_fn): Likewise.
2208 (init_repo): Change prototype.
2209 (repo_template_used): Remove.
2210 (repo_template_instantiated): Likewise.
2211 (repo_emit_p): New function.
2212 (repo_export_class_p): Likewise.
2213 (no_linkage_check): Change prototype.
2214 * class.c (set_linkage_according_to_type): New function.
2215 (build_vtable): Use it. Do not call import_export_vtable. Set
2216 DECL_IGNORED_P if appropriate.
2217 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
2218 (make_rtL_for_nonlocal_decls): Check for template instantiations
2219 explicitly.
2220 (grokfndecl): Adjust call to no_linkage_check.
2221 (set_linkage_for_static_data_member): New function.
2222 (grokvardecl): Use it. Adjust call to no_linkage_check.
2223 (grokdeclarator): Use set_linkage_for_static_data_member.
2224 * decl2.c (note_vague_linkage_fn): New function.
2225 (note_vague_linkage_var): Likewise.
2226 (finish_static_data_member_decl): Use it.
2227 (import_export_vtable): Remove.
2228 (import_export_class): Use repo_export_class_p.
2229 (var_finalized_p): Simplify.
2230 (maybe_emit_vtables): Simplify.
2231 (mark_needed): New function.
2232 (decl_needed_p): Likewise.
2233 (import_export_decl): Add documentation and consistency checks.
2234 Use repo_emit_p. Handle virtual tables and RTTI information
2235 here.
2236 (import_export_tinfo): Remove.
2237 (write_out_vars): Call import_export_decl.
2238 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
2239 whenever one is.
2240 (finish_file): Use decl_needed_p. Do not call import_export_decl
2241 for undefined static data members. Do not warn about undefined
2242 inlines when using a repository.
2243 (mark_used): Use note_vague_linkage_fn. Always defer template
2244 instantiations.
2245 * lex.c (cxx_init): Adjust call to init_repo. Always set
2246 flag_unit_at_a-time.
2247 * method.c (synthesize_method): Remove unncessary
2248 import_export_decl call.
2249 (implicitly_declare_fn): Use set_linkage_according_to_type.
2250 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
2251 * pt.c (instantiate_class_template): Don't redundantly add classes
2252 to keyed_classes. Don't call repo_template_used.
2253 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
2254 templates with internal linkage.
2255 (check_instantiated_args): Adjust call to no_linkage_check.
2256 (instantiate_template): Use FOR_EACH_CLONE.
2257 (mark_definable): New function.
2258 (mark_decl_instantiated): Use it.
2259 (do_decl_instantiation): Adjust tests for explicit instantiation
2260 after "extern template".
2261 (instantiate_class_member): Do not use repo_template_instantiated.
2262 (do_type_instantiation): Simplify.
2263 (instantiate_decl): Use mark_definable. Check repo_emit_p.
2264 Simplify.
2265 * repo.c (repo_get_id): Remove.
2266 (original_repo): Remove.
2267 (IDENTIFIER_REPO_USED): Remove.
2268 (IDENTIFIER_REPO_CHOSEN): Remove.
2269 Remove all #if 0'd code.
2270 (repo_template_used): Remove.
2271 (repo_template_instantiated): Remove.
2272 (temporary_obstack_initialized_p): New variable.
2273 (init_repo): Register with lang_post_pch_load. Avoid creating
2274 identifiers unnecessarily. Don't use original_repo. Close the
2275 file here.
2276 (reopen_repo_file_for_write): Not here.
2277 (finish_repo): Always write out a new repository file.
2278 (repo_emit_p): New function.
2279 (repo_export_class_p): Likewise.
2280 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
2281 (involves_incomplete_p): New function.
2282 (tinfo_base_init): Use it.
2283 (ptr_initializer): Remove non_public_ptr parameter.
2284 (ptm_initializer): Likewise.
2285 (get_pseudo_ti_init): Likewise.
2286 (unemitted_tinfo_decl_p): Remove.
2287 (emit_tinfo_decl): Use import_export_decl.
2288 * semantics.c (expand_body): Move updates of static_ctors and
2289 static_dtors to ...
2290 (expand_or_defer_fn): ... here.
2291 * tree.c (no_linkage_check): Add relaxed_p parameter.
2292
2293 2004-07-28 Eric Christopher <echristo@redhat.com>
2294
2295 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2296
2297 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
2298
2299 * cp-tree.h (struct tree_pair_s): New.
2300 (typedef tree_pair_p): New.
2301 (DEF_VEC_O(tree_pair_s)): New.
2302 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
2303 (CLASSTYPE_VCALL_INDICES): Update documentation.
2304 * class.c (get_vcall_index): Adjust.
2305 (add_vcall_offset): Adjust.
2306
2307 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
2308
2309 * pt.c, typeck.c: Remove spurious carriage returns.
2310
2311 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2312
2313 PR c++/14429
2314 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
2315 when the type of ARG is not dependent.
2316
2317 2004-07-26 Geoffrey Keating <geoffk@apple.com>
2318
2319 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
2320 (lang_specific_driver): If the C++ or math library options don't
2321 start with '-l', don't count them as added libraries.
2322
2323 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
2324
2325 * decl.c (xref_basetypes): Adjust base access vector creation.
2326 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
2327 access accesses.
2328 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
2329
2330 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
2331 Brian Ryner <bryner@brianryner.com>
2332
2333 PR c++/15000
2334 PR c++/9283
2335 * class.c (check_field_decls): Apply hidden visibility if
2336 -fvisibility-inlines-hidden and inlined unless otherwise specified
2337 (build_vtable): Set vtable visibility to class visibility.
2338 (check_field_decls): Default static member visibility to class
2339 visibility.
2340 (check_methods): Default method visibility to class visibility.
2341 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
2342 CLASSTYPE_VISIBILITY_SPECIFIED macro.
2343 * decl.c (duplicate_decls): New logic for merging definition decls
2344 with declaration decls. Added ignore & warning when non default
2345 applied to global operator new or delete.
2346 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
2347 wherever VISIBILITY was changed
2348 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
2349 visibility.
2350 (tinfo_base_init): Set typeinfo name visibility to class visibility.
2351
2352 2004-07-25 Bernardo Innocenti <bernie@develer.com>
2353
2354 * decl.c: Rename all identifiers named `class' to `cl'.
2355 * cp-tree.h: Likewise.
2356
2357 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2358
2359 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
2360 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
2361 * name-lookup.c (binding_entry_make): Use GGC_NEW.
2362 (binding_table_construct): Use GGC_CNEWVEC.
2363 (binding_table_new): Use GGC_NEW.
2364 (cxx_binding_make): Likewise.
2365 (begin_scope): Likewise.
2366 (push_to_top_level): Use GCC_CNEW.
2367 * parser.c (cp_token_cache_new): Likewise.
2368 (cp_token_cache_push_token): Likewise.
2369 (cp_lexer_new_main): Likewise.
2370 (cp_lexer_new_from_tokens): Likewise.
2371 (cp_parser_context_new): Likewise.
2372 (cp_parser_new): Likewise.
2373 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
2374 * lex.c (cxx_make_type): Use GGC_CNEW.
2375 (retrofit_lang_decl): Use GGC_NEWVAR.
2376 (cxx_dup_lang_specific_decl): Likewise.
2377 (copy_lang_type): Likewise.
2378 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
2379 (save_function_data): Likewise.
2380 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
2381 (cxx_push_function_context): Likewise.
2382
2383 2004-07-25 Richard Henderson <rth@redhat.com>
2384
2385 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
2386 DECL_IGNORED_P on RESULT_DECL.
2387 * semantics.c (finalize_nrv): Copy them too.
2388
2389 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
2390
2391 * search.c (lookup_conversion_operator): Avoid two loops.
2392 (add_conversions): Remove.
2393 (check_hidden_convs, split_conversions,
2394 lookup_conversions_r): New.
2395 (lookup_conversions): Use lookup_conversions_r.
2396
2397 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
2398
2399 * pt.c (get_template_base): Check type is completable.
2400
2401 2004-07-21 Eric Christopher <echristo@redhat.com>
2402
2403 * decl.c (poplevel): Inline unused variable checking.
2404 Change formatting.
2405
2406 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
2407
2408 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
2409 integer vectors.
2410
2411 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2412
2413 PR c++/14497
2414 * pt.c (check_explicit_specialization): Remove extension to accept
2415 specializations without template headers. Fall-through to normal
2416 processing.
2417
2418 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2419
2420 PR c++/509
2421 * pt.c (determine_specialization): New parameter template_count.
2422 Disambiguate between member templates and member functions counting
2423 the template headers.
2424 (check_explicit_specialization): Update caller.
2425 (tsubst_friend_function): Likewise.
2426
2427 2004-07-20 Steven Bosscher <stevenb@suse.de>
2428
2429 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
2430 * cp-tree.h (tinst_level_t): New tree type.
2431 (union lang_tree_node): Handle it.
2432 (TINST_LOCATION): New accessor macro.
2433 (make_tinst_level): New prototype.
2434 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
2435 * decl.c (cp_tree_node_structure): Likewise.
2436 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
2437 (print_instantiation_partial_context): Likewise.
2438 * pt.c (pop_tinst_level): Likewise.
2439 (push_tinst_level): Use make_tinst_level.
2440 * tree.c (make_tinst_level): New function.
2441 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
2442
2443 2004-07-20 Mark Mitchell <mark@codesourcery.com>
2444
2445 * parser.c (cp_parser_simple_type_specifier): Fix typo.
2446
2447 PR c++/16637
2448 * parser.c (cp_parser_simple_type_specifier): Do not record usage
2449 of globally-qualified names.
2450
2451 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2452
2453 PR c++/16175
2454 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
2455 cv qualifier.
2456
2457 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2458
2459 PR c++/16623
2460 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2461 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2462 * class.c (add_implicitly_declared_members): Use
2463 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2464 * method.c (lazily_declare_fn): Clear
2465 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2466 * search.c (lookup_fnfields_1): Check it.
2467
2468 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2469
2470 * cp-tree.h (vec_binfo_member): Remove.
2471 * tree.c (vec_binfo_member): Remove.
2472
2473 * cp-tree.h (struct lang_type_class): Remove vfields field.
2474 (CLASSTYPE_VFIELDS): Remove.
2475 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
2476 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
2477 handling.
2478 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
2479 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
2480 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
2481
2482 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2483
2484 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
2485 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
2486 Moved to common.
2487 (BINFO_LANG_SLOTS): Remove.
2488 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
2489 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
2490 * class.c (check_bases): Adjust BINFO accessors.
2491 (determine_primary_base, finish_struct_bits,
2492 maybe_warn_about_overly_private_class, warn_hidden,
2493 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
2494 warn_about_ambiguous_bases, get_vfield_name,
2495 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
2496 add_vcall_offset_vtbl_entries_r): Likewise.
2497 * dump.c (cp_dump_tree): Likewise.
2498 * init.c (sort_mem_initializers, expand_member_init, build_delete,
2499 push_base_cleanups): Likewise.
2500 * method.c (do_build_copy_constructor, do_build_assign_ref,
2501 synthesize_exception_spec): Likewise.
2502 name-lookup.c (arg_assoc_class): Likewise.
2503 * pt.c (instantiate_class_template,
2504 get_template_base_recursive): Likewise.
2505 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
2506 * typeck2.c (process_init_constructor): Likewise.
2507 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2508 dfs_access_in_type, dfs_walk_real, look_for_overrides,
2509 types_overlap_p, copied_binfo, original_binfo): Likewise.
2510 (binfo_for_vtable): Remove
2511
2512 2004-07-20 Steven Bosscher <stevenb@suse.de>
2513
2514 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
2515 thunk_alias, and the access and virtual_offset fields.
2516 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
2517 * decl.c (finish_case_label): Update c_add_case_node call.
2518
2519 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2520
2521 Revert patch for PR c++/16623.
2522
2523 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
2524
2525 * except.c: Remove two spurious carriage returns.
2526
2527 2004-07-19 Mark Mitchell <mark@codesourcery.com>
2528
2529 PR c++/16623
2530 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
2531 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
2532 * class.c (add_implicitly_declared_members): Use
2533 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2534 * method.c (lazily_declare_fn): Clear
2535 CLASSTYPE_LAZY_ASSIGNMENT_OP.
2536 * search.c (lookup_fnfields_1): Check it.
2537
2538 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
2539
2540 * class.c (add_method): Delay adding the slot until the end.
2541 (determine_primary_base): Adjust VEC_iterate invokation.
2542 (resort_type_method_vec, finish_struct_methods, warn_hidden,
2543 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
2544 build_vtbl_initializer): Likewise.
2545 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
2546 build_vbase_delete): Likewise.
2547 * method.c (do_build_copy_constructor): Likewise.
2548 * name-lookup.c (new_class_binding, print_binding_level,
2549 poplevel_class, store_class_bindings, push_to_top_level,
2550 pop_from_top_level): Likewise.
2551 * pt.c (check_explicit_specialization): Likewise.
2552 * search.c (lookup_conversion_operator, lookup_fnfields_1,
2553 get_pure_virtuals, add_conversions, dfs_check_overlap,
2554 binfo_for_vbase): Likewise.
2555
2556 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2557
2558 PR c++/12170
2559 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
2560 innermost set of template arguments during deduction. Simplify.
2561
2562 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
2563
2564 * typeck.c (build_modify_expr, build_x_modify_expr): Set
2565 TREE_NO_WARNING on assignments with an operator other than '='.
2566
2567 2004-07-10 Steven Bosscher <stevenb@suse.de>
2568 Joseph S. Myers <jsm@polyomino.org.uk>
2569
2570 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
2571 * decl2.c (grokfield): Don't check current_class_depth via
2572 unused TREE_COMPLEXITY.
2573 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
2574 to avoid the missing parentheses warning.
2575 Don't set C_SET_EXP_ORIGINAL_CODE.
2576
2577 2004-07-18 Mark Mitchell <mark@codesourcery.com>
2578
2579 * tree.c (no_linkage_helper): Remove.
2580 (no_linkage_check): Don't use walk_tree_without_duplicates.
2581
2582 * mangle.c (write_expression): Issue a sorry for zero-operand
2583 functional casts.
2584
2585 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2586
2587 PR c++/13092
2588 * init.c (build_offset_ref): Build SCOPE_REF with non-null
2589 TREE_TYPE for non-dependent names.
2590 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
2591 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
2592 unknown_type_node as its TREE_TYPE.
2593 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
2594 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
2595 (dump_expr) <SCOPE_REF case>: Likewise.
2596
2597 2004-07-17 Jason Merrill <jason@redhat.com>
2598
2599 PR c++/16115
2600 * call.c (type_passed_as): Make the invisible reference type
2601 __restrict.
2602 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
2603 cp_genericize_r. Handle invisible reference lowering.
2604 (is_invisiref_parm): New fn.
2605 (cp_genericize): Adjust the types of invisible reference parms.
2606 Don't repeat the walk for clones.
2607 * decl.c (store_parm_decls): Don't generate any code for clones.
2608
2609 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2610
2611 * cp-tree.h (builtin_function): Declare.
2612
2613 2004-07-16 Mark Mitchell <mark@codesourcery.com>
2614
2615 * class.c (finish_struct_methods): Remove unncessary code.
2616 (add_implicitly_declared_members): Create declarations for default
2617 constructors and copy constructors lazily.
2618 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
2619 lazy_copy_ctor.
2620 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
2621 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
2622 * decl2.c (check_classfn): Robustify.
2623 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
2624 (locate_ctor): Handle lazy default constructors.
2625 (locate_copy): Handle lazy copy constructors.
2626 (implicitly_declare_fn): Make sure we're looking at the
2627 TYPE_MAIN_VARIANT for a class before creating functions. Don't
2628 set TYPE_HAS_CONSTRUCTOR.
2629 (lazily_declare_fn): New function.
2630 * name-lookup.c (constructor_name_full): Simplify.
2631 * search.c (lookup_fnfields_1): Lazily create methods, as
2632 necessary.
2633 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
2634
2635 2004-07-16 Steven Bosscher <stevenb@suse.de>
2636
2637 * cp-tree.h (struct lang_type): Don't have three GTY options on a
2638 single bit GTY desc.
2639
2640 2004-07-16 Richard Henderson <rth@redhat.com>
2641
2642 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
2643 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
2644 * tree.c (cp_copy_res_decl_for_inlining): Remove.
2645
2646 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
2647
2648 * class.c (finish_struct_bits): Use for loop.
2649 (propagate_binfo_offsets): Do primary binfo outside of loop.
2650
2651 PR c++/16583
2652 * dump.c (cp_dump_tree): Don't dump the bases if there's no
2653 binfo.
2654
2655 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
2656
2657 2004-07-15 Mark Mitchell <mark@codesourcery.com>
2658
2659 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
2660 has_abstract_assign_ref. Make methods a VEC(tree) *.
2661 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
2662 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
2663 (CLASSTYPE_DESTRUCTORS): Likewise.
2664 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
2665 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2666 (add_method): Change prototoype.
2667 * class.c (add_method): Remove error_p parameter. Adjust for
2668 changes to CLASSTYPE_METHOD_VEC.
2669 (handle_using_decl): Adjust call to add_method.
2670 (maybe_warn_about_overly_private_class): Adjust for
2671 changes to CLASSTYPE_METHOD_VEC.
2672 (resort_type_method_vec): Likewise.
2673 (finish_struct_methods): Likewise.
2674 (check_for_override): Likewise.
2675 (warn_hidden): Likewise.
2676 (add_implicitly_declared_members): Defer creation of assignment
2677 operators. Adjust call to add_method.
2678 (clone_function_decl): Adjust call to add_method.
2679 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
2680 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
2681 * decl.c (grok_special_member_properties): Don't set
2682 TYPE_HAS_ABSTRACT_ASSIGN_REF.
2683 * decl2.c (check_classfn): Adjust for
2684 changes to CLASSTYPE_METHOD_VEC.
2685 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
2686 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
2687 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
2688 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
2689 cp_finish_decl.
2690 * pt.c (check_explicit_specialization): Adjust for
2691 changes to CLASSTYPE_METHOD_VEC.
2692 (instantiate_class_template): Do not set
2693 TYPE_HAS_ABSTRACT_ASSIGN_REF.
2694 * ptree.c (cxx_print_type): Don't try to print
2695 CLASSTYPE_METHOD_VEC.
2696 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
2697 * search.c (lookup_field_r): Adjust for
2698 changes to CLASSTYPE_METHOD_VEC.
2699 (lookup_fnfields): Likewise.
2700 (lookup_conversion_operator): Likewise.
2701 (lookup_fnfields_1): Likewise. Create assignment operators
2702 lazily.
2703 (look_for_overrides_here): Adjust for
2704 changes to CLASSTYPE_METHOD_VEC.
2705 (add_conversions): Likewise.
2706 * semantics.c (finish_member_declaration): Adjust call to add_method.
2707
2708 2004-07-15 Jason Merrill <jason@redhat.com>
2709
2710 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
2711 references and pointers are compatible.
2712
2713 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
2714
2715 * decl.c (xref_basetypes): Refactor.
2716 * tree.c (copy_base_binfos): Replace with ...
2717 (copy_binfo): ... this. Deep copy the given binfo, (not the just
2718 bases of the given base).
2719 * cp-tree.h (copy_base_binfo): Remove.
2720 (copy_binfo): Declare.
2721
2722 2004-07-15 Mark Mitchell <mark@codesourcery.com>
2723
2724 * name-lookup.c (set_inherited_value_binding_p): Add class_type
2725 parameter.
2726 (get_class_binding): Adjust.
2727 (push_class_level_binding): Don't use set_inherited_value_binding_p.
2728
2729 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
2730
2731 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
2732 * decl.c (xref_basetypes): Set it here.
2733
2734 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
2735 Don't check for incomplete base.
2736 (get_vfield_name): Simplify while loop.
2737 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
2738
2739 2004-07-14 Mark Mitchell <mark@codesourcery.com>
2740
2741 * lex.c (cxx_make_type): Remove call to get_pointer_type.
2742
2743 * cp-tree.h (IDENTIFIER_VALUE): Remove.
2744 (BINFO_PUSHDECLS_MARKED): Likewise.
2745 (maybe_inject_for_scope_var): Likewise.
2746 (push_class_decls): Likewise.
2747 * name-lookup.h (push_class_binding): Remove.
2748 (innermost_non_namespace_value): New function.
2749 (outer_binding): Likewise.
2750 * class.c (add_method): Push bindings before adding to
2751 TYPE_METHODS.
2752 (restore_class_cache): Do not restore class_shadowed.
2753 (pushclass): Do not add USING_DECLs. Do not call
2754 push_class_decls.
2755 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
2756 * decl.c (pushdecl): Use outer_binding.
2757 (poplevel): Set the scope for an out-of-scope for-loop declaration
2758 appropriately.
2759 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
2760 * name-lookup.c (new_class_binding): New function.
2761 (push_binding): Use it.
2762 (pushdecl): Use innermost_non_namespace_value.
2763 (maybe_inject_for_scope_var): Remove.
2764 (push_class_binding): Remove.
2765 (set_inherited_value_binding_p): New function.
2766 (get_class_binding): New function.
2767 (push_class_level_binding): Assert that the current_class_type is
2768 being defined.
2769 (outer_binding): New function.
2770 (innermost_non_namespace_value): Likewise.
2771 (lookup_name_real): Use outer_binding.
2772 (lookup_name_current_level): Ignore out-of-scope variables.
2773 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
2774 (lookup_template_class): Likewise.
2775 * search.c (dfs_push_type_decls): Remove.
2776 (dfs_push_decls): Likewise.
2777 (setup_class_bindings): Likewise.
2778 (lookup_field_1): Handle USING_DECLs from dependent scopes.
2779 (marked_pushdecls_p): Remove.
2780 (unmarked_pushdecls_p): Remove.
2781 (marked_identifiers): Remove.
2782 (setup_class_bindings): Remove.
2783 (dfs_push_type_decls): Remove.
2784 (dfs_push_decls): Remove.
2785 (push_class_decls): Remove.
2786
2787 2004-07-13 Mark Mitchell <mark@codesourcery.com>
2788
2789 PR c++/16518
2790 PR c++/16337
2791 * decl.c (grokvardecl): Make declspecs parameter const.
2792 (grokdeclarator): Likewise. Adjust accordingly.
2793 * decl.h (grokdeclarator): Adjust declaration.
2794 * parser.c (cp_parser_init_declarator): Do not clear
2795 decl_specifiers->attributes.
2796
2797 * cp-tree.h (lang_identifier): Remove class_value.
2798 (IDENTIFIER_CLASS_VALUE): Remove.
2799 (pop_class_decls): Likewise.
2800 (init_search_processing): Likewise.
2801 * class.c (handle_using_decl): Use lookup_member, not
2802 IDENTIFIER_CLASS_VALUE.
2803 (restore_class_cache): New function, split out from ...
2804 (pushclass): ... here. Do not call clear_identifier_class_values.
2805 (invalidate_class_lookup_cache): Do not clear
2806 IDENTIFIER_CLASS_VALUE.
2807 (popclass): Do not call pop_class_decls.
2808 (maybe_note_name_used_in_class): Do not save names looked up after
2809 the class is complete. Use lookup_member, not
2810 IDENTIFIER_CLASS_VALUE.
2811 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
2812 * decl.c (cxx_init_decl_processing): Do not call
2813 init_search_processing.
2814 * method.c (do_build_copy_constructor): Remove unnecessary code.
2815 (do_build_assign_ref): Likewise.
2816 * name-lookup.c (pushdecl): Use lookup_member, not
2817 IDENTIFIER_CLASS_VALUE.
2818 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
2819 type_shadowed list.
2820 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
2821 (push_class_binding): Do not set it.
2822 (clear_identifier_class_values): Remove.
2823 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
2824 (store_binding): Do not save it.
2825 (pop_from_top_level): Do not restore it.
2826 * name-lookup.h (cxx_saved_binding): Remove class_value.
2827 (clear_identifier_class_values): Remove.
2828 * ptree.c (cxx_print_identifier): Do not print
2829 IDENTIFIER_CLASS_VALUE.
2830 * search.c (search_obstack): Remove.
2831 (push_stack_level): Remove.
2832 (pop_stack_level): Remove.
2833 (search_level): Remove.
2834 (search_stack): Remove.
2835 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
2836 (setup_class_bindings): Use IDENTIFIER_MARKED, not
2837 IDENTIFIER_CLASS_VALUE.
2838 (marked_identifiers): New variable.
2839 (push_class_decls): Clear IDENTIFIER_MARKED.
2840 (pop_class_decls): Don't call pop_search_level.
2841 (init_search_processing): Remove.
2842
2843 2004-07-12 Mark Mitchell <mark@codesourcery.com>
2844
2845 * cp-tree.h (get_aggr_typedef): Remove.
2846 * init.c (get_aggr_typedef): Likewise.
2847
2848 * name-lookup.c (push_class_level_binding): Simplify.
2849
2850 2004-07-12 Andrew Pinski <apinski@apple.com>
2851
2852 PR c++/16475
2853 Revert:
2854 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
2855 PR c++/16276
2856 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
2857 is not public.
2858
2859 2004-07-12 Eric Christopher <echristo@redhat.com>
2860
2861 * parser.c (cp_parser_class_head): Remove unused variable.
2862
2863 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2864
2865 * decl.c (grok_op_properties): Reject [de-]allocation functions
2866 declared in a namespace, or declared as static.
2867
2868 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
2869
2870 * cp-tree.h (make_binfo): Remove.
2871 * decl.c (xref_basetypes): Use make_tree_binfo directly.
2872 * tree.h (copy_base_binfos): Likewise.
2873 (make_binfo): Remove.
2874
2875 * call.c (build_user_type_conversion_1, build_new_op,
2876 check_constructor_callable, build_temp,
2877 perform_direct_initialization_of_possible): Pass type directly to
2878 lookup_fnfields & build_special_member_call.
2879 (build_special_member_call): Accept a type, and complete it.
2880 * class.c (finish_stuct_bits): Copy the BINFOs here.
2881 * cvt.c (ocp_convert): Pass type directly to
2882 build_special_member_call.
2883 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
2884 (xref_basetypes): Allocate the binfo here. Adjust.
2885 * init.c (build_init, build_new_1): Pass type directly to
2886 build_special_member_call.
2887 * lex.c (cxx_make_type): Do not allocate binfo here.
2888 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
2889 * parser.c (cp_parser_class_head): Always call xref_basetypes.
2890 * pt.c (instantiate_class_template): Likewise. Inhibit access
2891 checking for template friends.
2892 * ptree.c (cxx_print_type): Adjust record printing.
2893 * search.c (lookup_base): When taking a type, complete it before
2894 looking for a binfo.
2895 (lookup_member): Delay completing a type.
2896 (push_class_decls): Don't walk an incomplete type.
2897 (lookup_conversions): Likewise.
2898 * semantics.c (finish_stmt_expr_expr): Pass type directly to
2899 build_special_member_call.
2900 * tree.c (copy_base_binfos): Adjust.
2901 (make_binfo): Likewise.
2902 * typeck.c (build_modify_expr): Pass type directly to
2903 build_special_member_call.
2904 * typeck2.c (process_init_constructor): Check a binfo exists.
2905 (build_m_component_ref): Allow accessing an incomplete type.
2906 (build_functional_cast): Pass type directly to
2907 build_special_member_call.
2908
2909 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2910
2911 PR c++/2204
2912 * config-lang.in (gtfiles): Add typeck2.c.
2913 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
2914 gt-cp-typeck2.h.
2915 * cp-tree.h: Declare complete_type_check_abstract.
2916 * typeck2.c (pat_calc_hash, pat_compare,
2917 complete_type_check_abstract): New functions.
2918 (abstract_virtuals_error): If the type is abstract, register the
2919 declaration within abstract_pending_vars for further checks.
2920 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
2921 * decl.c (cp_finish_decl): Do not strip array types.
2922 (create_array_type_for_decl): Check for abstractness of the element
2923 type.
2924 (complete_vars): Call complete_type_check_abstract.
2925 * class.c (finish_struct): Prepare a list of virtual functions for
2926 template types, and call complete_vars on it to check for abstractness.
2927
2928 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
2929
2930 PR tree-optimization/14107
2931 * decl.c (finish_function): Remove temporary band-aid.
2932
2933 2004-07-11 Mark Mitchell <mark@codesourcery.com>
2934
2935 * call.c (build_operator_new_call): Avoid using push_to_top_level.
2936 (build_new_op): Adjust call to lookup_function_nonclass.
2937 * name-lookup.c (identifier_type_value): Adjust call to
2938 lookup_name_real.
2939 (lookup_name_real): Add block_p parameter.
2940 (lookup_name_nonclass): Adjust call to lookup_name_real.
2941 (lookup_function_nonclass): Likewise.
2942 (lookup_name): Likewise.
2943 * name-lookup.h (lookup_name_real): Change prototype.
2944 (lookup_name_nonclass): Likewise.
2945 * parser.c (cp_parser_lookup_name): Likewise.
2946
2947 * cp-tree.h (saved_scope): Make old_bindings a vector.
2948 (unuse_fields): Remove.
2949 * name-lookup.h (cxx_saved_binding): Define it.
2950 * class.c (pushclass): Don't use unuse_fields.
2951 * name-lookup.c (cxx_saved_binding_make): Remove.
2952 (store_binding): Add new bindings to a vector, using an
2953 accumulator style, rather than adding them to a list.
2954 (store_bindings): Adjust accordingly.
2955 (store_class_bindings): Likewise.
2956 (push_to_top_level): Likewise.
2957 (pop_from_top_level): Likewise.
2958 * optimize.c (maybe_clone_body): Must push_to_top_level and
2959 pop_from_top_level calls outside of loop.
2960 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
2961 calls here from cp_parser_late_parsing_default_args.
2962 (cp_parser_save_default_args): Record the class type in which the
2963 function is declared.
2964 (cp_parser_late_parsing_default_args): Do not call
2965 push_nested_class/pop_nested_class.
2966 * search.c (dfs_unuse_fields): Remove.
2967 (unuse_fields): Remove.
2968
2969 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2970
2971 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
2972 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
2973 * cp-tree.h (poplevel): Declare.
2974 (set_block): Remove.
2975 * decl.c (set_block): Remove.
2976
2977 2004-07-10 Mike Stump <mrs@apple.com>
2978
2979 * decl2.c (import_export_class): Never export/import vtables
2980 with inline key functions.
2981
2982 2004-07-09 Steven Bosscher <stevenb@suse.de>
2983
2984 * typeck.c (c_expand_asm_operands): Remove.
2985
2986 2004-07-09 Mike Stump <mrs@apple.com>
2987
2988 * typeck.c (build_class_member_access_expr): Skip null deref
2989 warning when we don't dereference it.
2990
2991 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2992
2993 PR c++/8211
2994 PR c++/16165
2995 * class.c (check_field_decls): Improve -Weffc++ warning: do not
2996 warn for pointers to functions/members, or for classes without
2997 destructors.
2998
2999 2004-07-08 Mark Mitchell <mark@codesourcery.com>
3000
3001 * name-lookup.h (struct cp_binding_level): Update documentation
3002 for class_shadowed.
3003
3004 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3005
3006 PR c++/16169
3007 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
3008 returning CALL_EXPR, and non-reference return type.
3009
3010 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
3011
3012 * name-lookup.c (push_binding): Use VEC_reserve.
3013
3014 2004-07-08 Richard Henderson <rth@redhat.com>
3015
3016 * cp-tree.h (expand_eh_spec_block): Remove.
3017
3018 2004-07-07 Mark Mitchell <mark@codesourcery.com>
3019
3020 * cp-tree.h (saved_scope): Remove x_previous_class_type and
3021 x_previous_class_values; add x_previous_class_level.
3022 (previous_class_type): Remove.
3023 (previous_class_values): Remove.
3024 (previous_class_level): New macro.
3025 * class.c (pushclass): Restore the identifier cache more
3026 expeditiously.
3027 (invalidate_class_lookup_cache): Use vector for class_shadowed and
3028 previous_class_values.
3029 * decl.c (poplevel): Likewise.
3030 * name-lookup.c (cxx_binding_init): New function.
3031 (cxx_binding_make): Use it.
3032 (push_binding): For a binding in a class level, use a vector of
3033 cp_class_binding nodes.
3034 (push_binding_level): New function.
3035 (begin_scope): Use it.
3036 (leave_scope): Do not put class binding levels on the free list.
3037 (print_binding_level): Adjust for the fact that class_shadowed is
3038 a vector.
3039 (poplevel_class): Likewise.
3040 (clear_identifier_class_values): Likewise.
3041 (push_class_level_binding): Likewise.
3042 (set_class_shadows): Remove.
3043 (store_binding): New function.
3044 (store_class_bindings): New function.
3045 (push_to_top_level): Use store_class_bindings as appropriate.
3046 (pop_from_top_level): Use previous_class_level, not
3047 previous_class_type.
3048 * name-lookup.h (cp_class_binding): New type.
3049 (cp_binding_level): Use a vector object for class_shadowed.
3050 (push_binding_level): Declare.
3051 (set_class_shadows): Remove.
3052
3053 2004-07-07 Andrew Pinski <apinski@apple.com>
3054
3055 * class.c (instantiate_type): BUFFER_REF is dead.
3056 * lex.c (init_operators): IN_EXPR is dead.
3057
3058 2004-07-07 Jason Merrill <jason@redhat.com>
3059
3060 PR c++/16334
3061 * call.c (build_new_op): Give overload warnings for built-in
3062 candidates.
3063
3064 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
3065
3066 PR c++/16276
3067 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
3068 is not public.
3069
3070 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
3071
3072 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
3073 * class.c (build_primary_vtable, check_bases,
3074 determine_primary_base, finish_struct_bits,
3075 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
3076 get_basefndecls, warn_hidden, walk_subobject_offsets,
3077 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
3078 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
3079 finish_struct_1, get_vfield_name, contains_empty_class_p,
3080 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
3081 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
3082 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
3083 BINFO macros.
3084 * decl.c (xref_basetypes): Likewise.
3085 * dump.c (cp_dump_tree): Likewise.
3086 * error.c (dump_expr): Likewise.
3087 * init.c (sort_mem_initializers, expand_member_init,
3088 push_base_cleanups): Likewise.
3089 * method.c (do_build_copy_constructor, do_build_assign_reg,
3090 synthesize_exception_spec): Likewise.
3091 * name-lookup.c (arg_assoc_class): Likewise.
3092 * pt.c (instantiate_class_template, tsubst,
3093 get_template_base_recursive): Likewise.
3094 * ptree.c (cxx_print_type): Likewise.
3095 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
3096 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3097 dfs_access_in_type, access_in_type, lookup_field_queue_p,
3098 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
3099 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
3100 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
3101 binfo_for_vtable, copied_binfo, original_binfo): Likewise
3102 * tree.c (copy_base_binfos, make_binfo): Likewise.
3103 * typeck.c (commmon_base_type): Likewise
3104 * typeck2.c (process_init_constructor): Likewise
3105
3106 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
3107
3108 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
3109
3110 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3111
3112 PR c++/3671
3113 * pt.c (convert_nontype_argument): Disallow conversions between
3114 different enumeration types.
3115
3116 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
3117
3118 * cp-tree.h (BINFO_MARKED): Remove.
3119 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
3120 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
3121 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
3122 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
3123 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
3124 (mark_primary_bases, determine_primary_base, base_derived_from,
3125 dfs_find_final_overrider, dfs_find_final_overrider_q,
3126 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
3127 dfs_modify_vtables, walk_subobject_offsets,
3128 layout_nonempty_base_or_field, build_base_field,
3129 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
3130 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
3131 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
3132 build_ctor_vtbl_group, accumulate_vtble_inits,
3133 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
3134 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
3135 add_vcall_offset_vtbl_entries_1): Likewise.
3136 * decl.c (xref_basetypes): Incomming virtual base indicated by
3137 TREE_TYPE. Adjust.
3138 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
3139 * init.c (finish_init_stmts, sort_mem_initializers,
3140 emit_mem_initializers, build_vtble_address, expand_member_init,
3141 push_base_cleanups): Likewise.
3142 * method.c (do_build_copy_constructor): Likewise.
3143 * pt.c (instantiate_class_template,
3144 get_template_base_recursive): Likewise.
3145 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
3146 get_pseudo_ti_desc): Likewise.
3147 * search.c (lookup_base_r, dynamic_cast_base_recurse,
3148 binfo_from_vbase, binfo_via_virtual, copied_binfo,
3149 original_binfo): Likewise.
3150 * semantics.c (finish_base_specifier): Virtualness is indicated
3151 by TREE_TYPE.
3152 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
3153
3154 2004-07-06 Mark Mitchell <mark@codesourcery.com>
3155
3156 Revert:
3157 2004-06-24 Jason Merrill <jason@redhat.com>
3158 PR c++/16115
3159 * decl.c (grokparms): Give the PARM_DECL reference type if the
3160 parameter is passed by invisible reference.
3161
3162 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3163
3164 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
3165 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
3166 * pt.c (check_instantiated_args, unify): Likewise.
3167
3168 2004-07-05 Phil Edwards <phil@codesourcery.com>
3169
3170 * Make-lang.in (check-c++, lang_checks): Add some comments.
3171
3172 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3173
3174 * cp-mudflap.c: Delete file.
3175 * Makefile.in: Remove all references to cp-mudflap.o.
3176
3177 2004-07-05 Zack Weinberg <zack@codesourcery.com>
3178
3179 * decl.c (cxx_init_decl_processing): Call
3180 build_common_tree_nodes before creating the global NAMESPACE_DECL.
3181
3182 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3183
3184 PR c++/2518
3185 * call.c (build_operator_new_call): Look only at global scope.
3186
3187 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
3188
3189 * call.c (enforce_access): Expect TREE_BINFO.
3190 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
3191 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
3192 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3193 Adjust.
3194 (BINFO_LANG_ELTS): Remove.
3195 (BINFO_LANG_SLOTS): New.
3196 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
3197 (CLASSTYPE_TEMPLATE_INFO): Adjust.
3198 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
3199 * search.c (lookup_member): Check TREE_BINFO.
3200 * semantics.c (perform_or_defer_access_check): Likewise.
3201 (check_accessibility_of_qualified_id): Check
3202 deferred_access_no_check.
3203 * tree.c (make_binfo): Use make_tree_binfo.
3204
3205 2004-07-04 Mark Mitchell <mark@codesourcery.com>
3206
3207 * method.c (implicitly_declare_fn): Set linkage of generated
3208 functions.
3209
3210 2004-07-04 Richard Henderson <rth@redhat.com>
3211
3212 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
3213
3214 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
3215
3216 PR c++/3761
3217 * name-lookup.c (push_class_level_binding): Don't pass a
3218 TREE_LIST of ambiguous names to check_template_shadow as it
3219 only handles declarations. Instead, pull the declaration
3220 out and pass that.
3221
3222 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3223
3224 PR c++/14971
3225 * pt.c (check_explicit_specialization): Clarify error message.
3226
3227 2004-07-02 Richard Henderson <rth@redhat.com>
3228
3229 * tree.c (cp_unsave_r): Update remap_save_expr call.
3230
3231 2004-07-02 Mark Mitchell <mark@codesourcery.com>
3232
3233 PR c++/16240
3234 * mangle.c (write_template_arg): Correct mangling.
3235
3236 PR c++/16297
3237 * decl.c (grokdeclarator): Robustify.
3238
3239 2004-07-01 Richard Henderson <rth@redhat.com>
3240
3241 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
3242 * method.c (synthesize_method): Don't clear_last_expr.
3243 * name-lookup.c (maybe_push_cleanup_level): Likewise.
3244
3245 2004-07-01 Nick Clifton <nickc@redhat.com>
3246
3247 * decl2.c (import_export_class): Invoke the
3248 import_export_class field in the gcc_target structure if it is not
3249 empty.
3250
3251 2004-06-30 Richard Henderson (rth@redhat.com>
3252
3253 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
3254 * method.c (use_thunk): Likewise.
3255
3256 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3257
3258 * call.c (build_over_call), typeck.c (build_function_call): Call
3259 check_function_arguments instead of check_function_format.
3260
3261 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
3262
3263 * call.c (build_over_call), typeck.c (build_function_call): Update
3264 calls to check_function_format.
3265
3266 2004-06-30 Richard Henderson <rth@redhat.com>
3267
3268 * call.c (build_over_call): Use __builtin_memcpy for copying
3269 CLASS_AS_BASE rather than funny casting.
3270
3271 2004-06-30 Richard Henderson <rth@redhat.com>
3272
3273 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
3274 TYPE_SIZE_UNIT of full_type.
3275
3276 2004-06-30 Per Bothner <per@bothner.com>
3277
3278 Conditionally compile support for --enable-mapped_location.
3279 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
3280 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
3281 adjustments - which I don't understand.
3282 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
3283 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
3284 (print_instantiation_partial_context): Use expand_location.
3285 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
3286 * name-lookup.c: Likewise.
3287 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
3288 * name-lookup.c: Use input_line macro.
3289 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
3290 (cp_parser_statement): Rename locaal variable statement_locus to
3291 statement_location and use SET_EXPR_LOCATION macro.
3292 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
3293 * tree.c (cp_walk_subtrees): Likewise.
3294
3295 2004-06-29 Per Bothner <per@bothner.com>
3296
3297 * tree.c (build_min_nt, build_min, build_min_non_dep):
3298 Don't set TREE_COMPLEXITY from input_line.
3299
3300 2004-06-29 Paul Brook <paul@codesourcery.com>
3301
3302 * init.c: Include target.h.
3303 (get_cookie_size): Remove and replace with target hook.
3304 Update callers.
3305 (build_new_1): Store the element size in the cookie.
3306
3307 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
3308
3309 PR c++/16260
3310 * parser.c (cp_parser_template_declaration_after_export): Disable
3311 access checks here ...
3312 (cp_parser_class_specifier): ... not here.
3313
3314 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3315
3316 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3317 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3318 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
3319 TREE_CHECK macro.
3320
3321 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3322
3323 * cp-tree.h (struct deferred_access): Move to ...
3324 * semantics.c (struct deferred_access): ... here. Adjust.
3325 (deferred_access_stack): Make a VEC(deferred_access),
3326 (deferred_access_free_list): Remove.
3327 (deferred_access_no_check): New.
3328 (push_deferring_access_checks, resume_deferring_access_checks,
3329 stop_deferring_access_checks, pop_deferring_access_checks,
3330 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
3331 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
3332
3333 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3334
3335 PR c++/16174
3336 * call.c (build_temp): Declare.
3337 (check_constructor_callable): New.
3338 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
3339 CONSTRUCTOR_CALLABLE.
3340 (convert_like_real, initialize_reference): Use
3341 check_constructor_callable.
3342 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
3343 (LOOKUP_*): Renumber.
3344
3345 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3346
3347 * friend.c (add_friend): Only perform access checks when context
3348 is a class.
3349 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
3350 * parser.c (cp_parser_class_specifier): Disable access checks here
3351 when parsing the body of a templated class.
3352 * semantics.c (perform_or_defer_access_checks): Reorder to allow
3353 NULL binfos when not checking access.
3354
3355 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
3356
3357 Use vector API for vbase list.
3358 * cp-tree.h: Include vec.h
3359 (DEF_VEC_P (tree)): New type.
3360 (struct lang_type_class): Change vbase's member type.
3361 (binfo_for_vbase): Declare.
3362 * class.c (determine_primary_base, base_derived_from,
3363 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
3364 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
3365 build_vtbl_initializer): Adjust.
3366 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
3367 vbases.
3368 * init.c (sort_mem_initializers, expand_member_init,
3369 push_base_cleanups): Adjust.
3370 * method.c (do_build_copy_constructor): Adjust.
3371 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
3372 (binfo_for_vbase): New.
3373 * tree.c (copy_base_binfos): Adjust.
3374
3375 2004-06-28 Mark Mitchell <mark@codesourcery.com>
3376
3377 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
3378
3379 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3380
3381 PR c++/14123
3382 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
3383 paranthesis in case of pointers to array members.
3384 * error.c (dump_type_prefix): Likewise.
3385 (dump_type_suffix): Maybe issue a whitespace when printing
3386 ARRAY_TYPE.
3387
3388 2004-06-27 Mark Mitchell <mark@codesourcery.com>
3389
3390 PR c++/16193
3391 * parser.c (cp_parser_set_decl_spec_type): Refine test for
3392 redefinition of built-in types.
3393
3394 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3395
3396 * error.c (pp_template_argument_list_start): Remove.
3397 (pp_template_argument_list_end): Likewise.
3398 (pp_separate_with_comma): Use pp_cxx_separate_with.
3399 (reinit_global_formatting_buffer): Remove.
3400 (pp_non_consecutive_character): Likewise.
3401 (dump_scope): Use pp_cxx_colon_colon.
3402 (dump_template_parameter): Use pp_cxx_identifier,
3403 pp_cxx_tree_identifier and pp_cxx_whitespace.
3404 (dump_templat_bindings): Replace use of pp_string with sequence
3405 of pp_cxx_whitespace and pp_equal.
3406 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
3407 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
3408 padding here.
3409 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
3410 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
3411 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
3412 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
3413 pp_cxx_right_bracket, pp_cxx_identifier throughout,
3414 (dump_decl): Likewise.
3415 (dump_template_decl): Likewise.
3416 (dump_function_decl): Likewise. Set padding as appropriate.
3417 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
3418 pp_cxx_right_paren.
3419 (dump_exception_spec): Likewise.
3420 (dump_function_name): Use pp_cxx_tree_identifier and
3421 pp_cxx_identifier.
3422 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
3423 pp_cxx_end_template_argument_list.
3424 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
3425 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
3426 pp_cxx_whitespace throughout.
3427 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
3428 pp_cxx_right_paren.
3429 (dump_unary_op): Likewise.
3430 (reinit_cxx_pp): New function.
3431 (type_as_string); Use it.
3432 (expr_as_string): Likewise.
3433 (decl_as_string); Likewise.
3434 (context_as_string): Likewise.
3435 (lang_decl_name): Likewise.
3436 (decl_to_string): Likewise.
3437 (expr_to_string): Likewise.
3438 (parm_to_string): Likewise.
3439 (type_to_string): Likewise.
3440 (args_to_string): Likewise.
3441 (cv_to_string): Likewise.
3442
3443 2004-06-26 Mark Mitchell <mark@codesourcery.com>
3444
3445 * cp-tree.h (cp_cv_quals): New type.
3446 (cp_declarator): Use it instead of "tree" as appropriate.
3447 (grok_method_quals): Adjust prototype.
3448 (grokclassfn): Likewise.
3449 (do_friend): Likewise.
3450 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
3451 (grokdeclarator): Likewise.
3452 * decl2.c (grok_method_quals): Likewise.
3453 (grokclassfn): Likewise.
3454 * friend.c (do_friend): Likewise.
3455 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
3456 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
3457 (make_pointer_declarator): Likewise.
3458 (make_reference_declarator): Likewise.
3459 (make_ptrmem_declarator): Likewise.
3460 (cp_parser_ptr_operator): Likewise.
3461 (cp_parser_cv_qualifier_seq_opt): Likewise.
3462 (cp_parser_cv_qualifier_opt): Remove.
3463 (cp_parser_new_declarator_opt): Adjust call to
3464 cp_parser_ptr_operator.
3465 (cp_parser_conversion_declaration_opt): Likewise.
3466 (cp_parser_declarator): Use cp_cv_quals, not tree.
3467 (cp_parser_direct_declarator): Likewise.
3468
3469 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3470
3471 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
3472 Rename DECL_STMT to DECL_EXPR.
3473 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
3474 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
3475 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
3476
3477 2004-06-26 Jan Hubicka <jh@suse.cz>
3478
3479 PR C++/14865
3480 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
3481 reachability analysis.
3482
3483 2004-06-25 Mark Mitchell <mark@codesourcery.com>
3484
3485 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
3486 2004-06-23 change.
3487
3488 2004-06-25 Paul Brook <paul@codesourcery.com>
3489
3490 * decl2.c (get_guard): Call targetm.cxx.guard_type.
3491 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
3492
3493 2004-06-24 Mark Mitchell <mark@codesourcery.com>
3494
3495 * decl.c (grokdeclarator): Restore error messages about __thread.
3496 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3497
3498 2004-06-24 Jason Merrill <jason@redhat.com>
3499
3500 PR c++/16115
3501 * decl.c (grokparms): Give the PARM_DECL reference type if the
3502 parameter is passed by invisible reference.
3503
3504 2004-06-24 Andreas Schwab <schwab@suse.de>
3505
3506 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
3507
3508 2004-06-23 Mark Mitchell <mark@codesourcery.com>
3509
3510 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
3511 (cp/decl.o): Likewise.
3512 (cp/decl2.o): Likewise.
3513 (cp/pt.o): Likewise.
3514 (cp/semantics.o): Likewise.
3515 * config-lang.in (gtfiles): Do not reference cp/lex.h.
3516 * class.c: Do not include lex.h.
3517 (add_implicitly_declared_members): Do not use
3518 adding_implicit_members.
3519 (check_bases_and_members): Do not talk about grok_x_components.
3520 * cp/cp-tree.h (adding_implicit_members): Remove.
3521 (cp_storage_class): New type.
3522 (cp_decl_spec): Likewise.
3523 (cp_decl_specifier_seq): Likewise.
3524 (cp_parameter_declarator): Use it for the decl_specifiers field.
3525 (check_tag_decl): Adjust prototype.
3526 (shadow_tag): Likewise.
3527 (groktypename): Likewise.
3528 (start_decl): Likewise.
3529 (start_function): Likewise.
3530 (start_method): Likewise.
3531 (grok_x_components): Remove.
3532 (grokfield): Adjust prototype.
3533 (grokbitfield): Likewise.
3534 (finish_member_class_template): Remove.
3535 * decl.c: Do not include lex.h.
3536 (adding_implicit_members): Do not define.
3537 (check_tag_decl): Do not use trees to represent decl-specifiers.
3538 (shadow_tag): Likewise.
3539 (groktypename): Likewise.
3540 (start_decl): Likewise.
3541 (grokvardecl): Likewise.
3542 (grokdeclarator): Likewise.
3543 (grokparms): Likewise.
3544 (start_function): Likewise.
3545 (start_method): Likewise.
3546 * decl.h (grokdeclarator): Adjust prototype.
3547 * decl2.c: Do not include lex.h.
3548 (grok_x_components): Remove.
3549 (grokfield): Do not use trees to represent decl-specifiers.
3550 (grokbitfield): Likewise.
3551 * lex.c: Do not include lex.h.
3552 * lex.h: Remove.
3553 * parser.c: Include target.h.
3554 (clear_decl_specs): New function.
3555 (cp_parser_translation_unit): Do not use trees to represent
3556 decl-specifiers.
3557 (cp_parser_postfix_expression): Likewise.
3558 (cp_parser_new_type_id): Likewise.
3559 (cp_parser_condition): Likewise.
3560 (cp_parser_simple_declaration): Likewise.
3561 (cp_parser_decl_specifier_seq): Likewise.
3562 (cp_parser_function_specifier_opt): Likewise.
3563 (cp_parser_conversion_type_id): Likewise.
3564 (cp_parser_template_parameter): Likewise.
3565 (cp_parser_explicit_instantiation): Likewise.
3566 (cp_parser_type_specifier): Likewise.
3567 (cp_parser_simple_type_specifier): Likewise.
3568 (cp_parser_init_declarator): Likewise.
3569 (cp_parser_type_id): Likewise.
3570 (cp_parser_type_specifier_seq): Likewise.
3571 (cp_parser_parameter_declaration): Likewise.
3572 (cp_parser_member_declaration): Likewise.
3573 (cp_parser_exception_declaration): Likewise.
3574 (cp_parser_function_definition_from_specifiers_and_declarator):
3575 Likewise.
3576 (cp_parser_single_declaration): Likewise.
3577 (cp_parser_save_member_function_body): Likewise.
3578 (cp_parser_friend_p): Likewise.
3579 (cp_parser_set_storage_class): New function.
3580 (cp_parser_set_decl_spec_type): Likewise.
3581 * pt.c: Do not include lex.h.
3582 * semantics.c: Likewise.
3583 (finish_member_class_template): Remove.
3584
3585 2004-06-23 Roger Sayle <roger@eyesopen.com>
3586
3587 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
3588 longer take both "args" and "convert_args" as arguments.
3589 (build_op_delete_call): Update call to build_cxx_call.
3590 (build_over_call): Likewise, update call to build_cxx_call.
3591 * cp-tree.h (build_cxx_call): Update funtion prototype.
3592 * typeck.c (build_function_call): Don't call expand_tree_builtin.
3593 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
3594 (throw_bad_typeid): Likewise.
3595 (build_dynamic_cast_1): Likewise.
3596
3597 2004-06-22 Richard Henderson <rth@redhat.com>
3598
3599 * class.c (build_vfn_ref): Take a pointer not object. Build
3600 an OBJ_TYPE_REF.
3601 (cp_fold_obj_type_ref): New.
3602 * call.c (build_over_call): Update build_vfn_ref call.
3603 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
3604 * cp-tree.h (cp_fold_obj_type_ref): Declare.
3605
3606 2004-06-21 Jason Merrill <jason@redhat.com>
3607
3608 PR c++/16112
3609 * cp-gimplify.c (cp_gimplify_init_expr): Look through
3610 CLEANUP_POINT_EXPR.
3611
3612 2004-06-21 Mark Mitchell <mark@codesourcery.com>
3613
3614 * cp-tree.def (NEW_EXPR): Add a fourth slot.
3615 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
3616 (TREE_PARMLIST): Likewise.
3617 (CALL_DECLARATOR_PARMS): Likewise.
3618 (CALL_DECLARATOR_QUALS): Likewise.
3619 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3620 (cp_declarator_kind): New type.
3621 (cp_parameter_declarator): Likewise.
3622 (cp_declarator): Likewise.
3623 (cp_error_declarator): Likewise.
3624 (no_parameters): Likewise.
3625 (groktypename): Change prototype.
3626 (start_decl): Likewise.
3627 (start_handler_parms): Likewise.
3628 (get_scope_of_declarator): Likewise.
3629 (start_function): Likewise.
3630 (start_preparsed_function): New function.
3631 (start_function): Change prototype.
3632 (start_method): Likewise.
3633 (grokfield): Likewise.
3634 (grokbitfield): Likewise.
3635 (build_new): Likewise.
3636 (make_pointer_declarator): Remove.
3637 (make_reference_declarator): Likewise.
3638 (make_call_declarator): Likewise.
3639 (set_quals_and_spec): Likewise.
3640 (process_template_parm): Change prototype.
3641 (begin_function_definition): Remove.
3642 (finish_parmlist): Remove.
3643 * decl.c (groktypename): Do not use trees to represent
3644 declarators.
3645 (start_decl): Likewise.
3646 (start_handler_parms): Remove.
3647 (get_scope_of_declarator): Reimplement.
3648 (grokdeclarator): Do not use trees to represent declarators.
3649 (grokparms): Likewise.
3650 (start_function): Likewise.
3651 (start_method): Likewise.
3652 (build_void_list_mode): Do not use TREE_PARMLIST.
3653 * decl.h (grokdeclarator): Change prototype.
3654 * decl2.c (grok_method_quals): Robustify.
3655 (grok_x_components): Do not use trees to represent declarators.
3656 (grokfield): Likewise.
3657 (grokbitfield): Likewise.
3658 (start_objects): Build FUNCTION_DECLs, not declarators.
3659 (start_static_storage_duration_function): Likewise.
3660 * init.c (build_new): Simplify.
3661 * lex.c (make_pointer_declarator): Remove.
3662 (make_reference_declarator): Likewise.
3663 (make_call_declarator): Likewise.
3664 (set_quals_and_spec): Likewise.
3665 * method.c (use_thunk): Use start_preparsed_function.
3666 (synthesize_method): Likewise.
3667 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
3668 * optimize.c (maybe_clone_body): Use start_preparsed_function.
3669 * parser.c (cp_error_declarator): New variable.
3670 (declarator_obstack): Likewise.
3671 (alloc_declarator): New function.
3672 (make_declarator): Likewise.
3673 (make_id_declarator): Likewise.
3674 (make_pointer_declarator): Likewise.
3675 (make_reference_declarator): Likewise.
3676 (make_ptrmem_declarator): Likewise.
3677 (make_call_declarator): Likewise.
3678 (make_array_declarator): Likewise.
3679 (no_parameters): New variable.
3680 (make_parameter_declarator): Likewise.
3681 (cp_parser_check_for_definition_in_return_type): Do not use trees
3682 to represent declarators.
3683 (cp_parser_translation_unit): Likewise.
3684 (cp_parser_new_expression): Likewise.
3685 (cp_parser_new_type_id): Likewise.
3686 (cp_parser_new_declarator_opt): Likewise.
3687 (cp_parser_direct_new_declarator): Likewise.
3688 (cp_parser_condition): Likewise.
3689 (cp_parser_declaration_statement): Likewise.
3690 (cp_parser_declaration): Likewise.
3691 (cp_parser_conversion_type_id): Likewise.
3692 (cp_parser_conversion_declarator_opt): Likewise.
3693 (cp_parser_template_parameter_list): Likewise.
3694 (cp_parser_template_parameter): Likewise.
3695 (cp_parser_explicit_instantiation): Likewise.
3696 (cp_parser_init_declarator): Likewise.
3697 (cp_parser_declarator): Likewise.
3698 (cp_parser_direct_declarator): Likewise.
3699 (cp_parser_type_id): Likewise.
3700 (cp_parser_parameter_declaration_clause): Likewise.
3701 (cp_parser_parameter_declaration_list): Likewise.
3702 (cp_parser_parameter_declaration): Likewise.
3703 (cp_parser_member_declaration): Likewise.
3704 (cp_parser_exception_declaration): Likewise.
3705 (cp_parser_check_declarator_template_parameters): Likewise.
3706 (cp_parser_function_definition_from_specifiers_and_declarator):
3707 Likewise.
3708 (cp_parser_save_member_function_body): Likewise.
3709 * pt.c (process_template_parm): Add is_non_type parameter.
3710 (convert_template_argument): Adjust call to groktypename.
3711 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
3712 (tsubst): Do not expect declarators.
3713 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
3714 argument.
3715 (instantiate_decl): Use start_preparsed_function.
3716 * semantics.c (begin_function_definition): Remove.
3717 (finish_parmlist): Remove.
3718 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
3719 declarators.
3720
3721 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3722
3723 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
3724 (build_new_method_call): Likewise.
3725 * decl.c (local_variable_p_walkfn): Don't walk into types.
3726 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
3727 (build_anon_union_vars): Add new operand for COMPONENT_REF.
3728 * init.c (buld_new): Add new operand for ARRAY_REF.
3729 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
3730 (do_build_assign_ref): Likewise.
3731 * parser.c (cp_parser_direct_new_declarator): Add new operands
3732 for ARRAY_REF.
3733 (cp_parser_direct_declarator): Likewise.
3734 * pt.c (tsubst): Likewise.
3735 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
3736 for COMPONENT_REF.
3737 * semantics.c (finish_non_static_data_member): Add new operand
3738 for COMPONENT_REF.
3739 * typeck.c (build_class_member_access_expr): Likewise.
3740 (build_class_member_access_expr, finish_class_member_access_expr):
3741 Likewise.
3742 (build_ptrmemfunc_access_expr): Likewise.
3743 (build_array_ref): Add new operands for ARRAY_REF.
3744 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
3745 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
3746
3747 2004-06-21 Richard Henderson <rth@redhat.com>
3748
3749 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
3750 * parser.c (cp_parser_jump_statement): Update commentary.
3751 * pt.c (tsubst_expr): Use RETURN_EXPR.
3752 * semantics.c (finish_return_stmt): Likewise.
3753 (finalize_nrv_r): Likewise.
3754 * typeck.c, typeck2.c: Update file start commentary.
3755
3756 2004-06-21 Richard Henderson <rth@redhat.com>
3757
3758 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
3759
3760 2004-06-20 Richard Henderson <rth@redhat.com>
3761
3762 * cp-tree.h (add_decl_stmt): Declare.
3763 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
3764 * semantics.c (maybe_cleanup_point_expr): New.
3765 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
3766 finish_for_expr, finish_switch_cond): Use it.
3767 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
3768
3769 2004-06-20 Richard Henderson <rth@redhat.com>
3770
3771 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
3772 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
3773 (cp_gimplify_expr): Call it.
3774 (gimplify_cleanup_stmt): Move from c-gimplify.c.
3775 (cp_genericize): New.
3776 * decl.c (finish_function): Call it.
3777 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
3778 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
3779 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
3780 (cp_genericize): Declare.
3781 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
3782 * dump.c (cp_dump_tree): Likewise.
3783 * semantics.c (push_cleanup): Move from c-semantics.c.
3784
3785 2004-06-20 Zack Weinberg <zack@codesourcery.com>
3786
3787 * cp-lang.c (has_c_linkage): Implement.
3788
3789 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
3790 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
3791 (builtin_function_1): Don't call make_decl_rtl.
3792 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
3793 (grokvardecl): Don't call mangle_decl.
3794 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
3795 DECL_ASSEMBLER_NAME.
3796 * method.c (set_mangled_name_for_decl): Delete.
3797 * name-lookup.c (pushdecl): When a local extern shadows a
3798 file-scope declaration of the same object, give both DECLs the
3799 same DECL_UID.
3800 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
3801 on DECL_ASSEMBLER_NAME.
3802
3803 2004-06-19 Richard Henderson <rth@redhat.com>
3804
3805 * cp-gimplify.c: Remove unnecessary prototypes.
3806 (cp_gimplify_stmt): Merge into ...
3807 (cp_gimplify_expr): ... here. Move to end of file. Handle
3808 stmts_are_full_exprs_p frobbing.
3809 * cp-tree.h (cp_gimplify_stmt): Remove.
3810 * pt.c (tsubst_expr): Merge prep_stmt and unify.
3811 * tree.c (init_tree): Don't set lang_gimplify_stmt.
3812
3813 2004-06-18 Richard Henderson <rth@redhat.com>
3814
3815 PR c++/16034
3816 * semantics.c (begin_cond): New.
3817 (finish_cond): Rewrite to handle template DECL_STMTs specially.
3818 Assume that non-template decls go land before the conditional.
3819 (simplify_loop_decl_cond): Likewise.
3820 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
3821 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
3822 begin_switch_stmt, finish_switch_cond): Update to match.
3823
3824 2004-06-17 Jason Merrill <jason@redhat.com>
3825
3826 PR c++/16015
3827 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
3828 (finish_stmt_expr_expr): Update type after conversions.
3829 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
3830 Handle void initializer.
3831 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
3832
3833 2004-06-17 Geoffrey Keating <geoffk@apple.com>
3834
3835 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
3836 * cp-tree.h (defer_fn): Delete.
3837 * decl2.c (defer_fn): Delete.
3838 (finish_file): Simplify deferred_fns loops; check that
3839 only used inline functions get into deferred_fns.
3840 (mark_used): Inline previous contents of defer_fn.
3841
3842 2004-06-16 Richard Henderson <rth@redhat.com>
3843
3844 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
3845 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
3846 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
3847 of CTOR_INITIALIZER ...
3848 (pp_cxx_statement): ... here.
3849 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
3850 (finish_function): Use alloc_stmt_list to zap entire function.
3851 * parser.c (cp_parser_compound_statement): Update commentary.
3852 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
3853 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
3854 (finish_stmt_expr): Don't look through COMPOUND_STMT.
3855
3856 2004-06-16 Geoffrey Keating <geoffk@apple.com>
3857
3858 * pt.c (mark_decl_instantiated): Don't call defer_fn.
3859
3860 2004-06-16 Richard Henderson <rth@redhat.com>
3861
3862 * parser.c (cp_parser_labeled_statement): Update commentary.
3863 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
3864 * tree.c (mark_local_for_remap_r): Likewise.
3865
3866 2004-06-16 Richard Henderson <rth@redhat.com>
3867
3868 * parser.c (cp_parser_asm_definition): Update commentary.
3869 * pt.c (tsubst_expr): Use ASM_EXPR.
3870 * semantics.c (finish_asm_stmt): Likewise.
3871
3872 2004-06-16 Richard Henderson <rth@redhat.com>
3873
3874 * decl.c (finish_destructor_body): Use LABEL_EXPR.
3875 * parser.c (cp_parser_statement): Update commentary.
3876 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
3877 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
3878 * tree.c (mark_local_for_remap_r): Likewise.
3879
3880 2004-06-16 Richard Henderson <rth@redhat.com>
3881
3882 PR c++/16012
3883 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
3884 statement in FOR_INIT_STMT for templates.
3885
3886 2004-06-15 Richard Henderson <rth@redhat.com>
3887
3888 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
3889 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
3890 (genericize_try_block): Use gimplify_stmt.
3891 (genericize_catch_block, genericize_eh_spec_block): Likewise.
3892 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
3893 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
3894 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
3895 (cp_tree_chain_matters_p): Remove.
3896 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
3897 (COMPOUND_STMT_BODY_BLOCK): New.
3898 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
3899 (EXPR_STMT_STMT_EXPR_RESULT): New.
3900 (building_stmt_tree): Check cur_stmt_list.
3901 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
3902 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
3903 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
3904 (cp_finish_decl): Use push_cleanup.
3905 (start_function, finish_function): Use statement lists.
3906 (finish_stmt): Do nothing.
3907 * except.c (begin_eh_spec_block): Use statement lists.
3908 (check_handlers_1, check_handlers): Likewise.
3909 * init.c (construct_virtual_base): Don't add extra compound stmts.
3910 (build_vec_init): Likewise.
3911 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
3912 * name-lookup.h (struct cp_binding_level): Add statement_list.
3913 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
3914 (cp_parser_labeled_statement, cp_parser_expression_statement,
3915 cp_parser_statement_seq_opt): Likewise.
3916 (cp_parser_compound_statement): Likewise. Take bool for try block.
3917 (cp_parser_selection_statement): Tidy if processing.
3918 (cp_parser_already_scoped_statement): Rewrite to do what it says.
3919 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
3920 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
3921 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
3922 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
3923 (finish_cond): New, rewritten from FINISH_COND.
3924 (simplify_loop_decl_cond): New.
3925 (finish_expr_stmt): Avoid nested EXPR_STMTs.
3926 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
3927 begin_else_clause, finish_else_clause, finish_if_stmt,
3928 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
3929 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
3930 finish_for_cond, finish_for_stmt, begin_switch_stmt,
3931 finish_switch_cond, finish_switch_stmt, begin_try_block,
3932 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
3933 finish_handler_sequence, finish_function_handler_sequence,
3934 begin_handler, finish_handler_parms, finish_handler,
3935 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
3936 using statement lists.
3937 (begin_compound_stmt): Replace has_no_scope argument with flags.
3938 Update all callers. Use statement lists.
3939 (finish_compound_stmt): Likewise.
3940 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
3941 (current_scope_stmt_stack): Remove.
3942 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
3943 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
3944 Rewrite with statement lists.
3945
3946 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
3947
3948 * parser.c: Change all assignments of c_lex_string_translate
3949 to true and false to 1 and 0.
3950 (cp_lexer_read_token): Convert type of the translated string.
3951 (cp_parser_skip_to_closing_parentheses): Preserve original
3952 value of c_lex_string_translate, and set it to -1 while
3953 running.
3954 (cp_parser_cache_group): Likewise.
3955 (cp_parser_cache_group_1): Renamed.
3956 (cp_parser_asm_operand_list): Remove redundant setting of
3957 c_lex_string_translate.
3958 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
3959 Handle chained strings.
3960
3961 2004-06-12 Andrew Pinski <apinski@apple.com>
3962
3963 PR c++/14639
3964 Revert:
3965 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
3966
3967 * cp-tree.h: Fix typo.
3968
3969 * cp-tree.h: Include cgraph.h
3970 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
3971 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
3972
3973 2004-06-12 Jason Merrill <jason@redhat.com>
3974
3975 PR tree-optimization/14107
3976 * decl.c (finish_function): Warn about no return in all functions.
3977
3978 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
3979
3980 * cp-tree.h (struct language_function): Remove cannot_inline.
3981 * decl.c (save_function_data): cannot_inline is no more.
3982 (cxx_push_function_context): Likewise.
3983 * decl2.c (start_objects, start_static_storage_duration_function):
3984 Reset DECL_INLINE, set DECL_UNINLINABLE.
3985
3986 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3987
3988 PR c++/15967
3989 * search.c (lookup_field): Propagate the ambiguity list.
3990 (lookup_fnfields): Likewise.
3991
3992 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3993
3994 PR c++/15947
3995 * parser.c (cp_parser_template_name): Ctors/dtors never need a
3996 template keyword to disambiguate.
3997
3998 2004-06-14 Mark Mitchell <mark@codesourcery.com>
3999
4000 PR c++/15096
4001 * decl.c (grokdeclarator): Ignore pointer-to-members when
4002 computing template depth.
4003
4004 PR c++/14930
4005 * name-lookup.c (pushtag): Do not try to put class declarations in
4006 explicit specialization scopes.
4007
4008 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
4009
4010 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
4011
4012 2004-06-11 Mark Mitchell <mark@codesourcery.com>
4013
4014 PR c++/15862
4015 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
4016 bindings for undeclared built-ins.
4017
4018 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4019
4020 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
4021 appear at the correct location.
4022
4023 2004-06-10 Jason Merrill <jason@redhat.com>
4024
4025 PR c++/15875
4026 Revert:
4027 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4028 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4029 TREE_TYPE for non-dependent names.
4030 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4031 unknown_type_node as its TREE_TYPE.
4032 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4033 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4034 (dump_expr) <SCOPE_REF case>: Likewise.
4035
4036 2004-06-10 Mark Mitchell <mark@codesourcery.com>
4037
4038 PR c++/15227
4039 * parser.c (cp_parser_direct_declarator): Robustify.
4040
4041 PR c++/15877
4042 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
4043 constants in non-dependent contexts.
4044
4045 PR c++/14211
4046 PR c++/15076
4047 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
4048 necessary.
4049
4050 2004-06-10 Jakub Jelinek <jakub@redhat.com>
4051
4052 PR c++/14791
4053 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
4054 specially.
4055
4056 2004-06-09 Mark Mitchell <mark@codesourcery.com>
4057
4058 Revert:
4059 PR c++/15815
4060 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4061 * lex.c (handle_pragma_interface): Deprecate.
4062 (handle_pragma_implementation): Likewise.
4063
4064 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
4065
4066 * g++spec.c (lang_specific_driver): Remove check for -lm
4067 and -lmath when check it see if it was the math library.
4068
4069 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4070
4071 PR c++/7841
4072 * parser.c (cp_parser_direct_declarator): Reject constructor named
4073 as qualified template-id.
4074
4075 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4076
4077 PR c++/15815
4078 * lex.c (handle_pragma_interface): Deprecate.
4079 (handle_pragma_implementation): Likewise.
4080
4081 2004-06-07 Mark Mitchell <mark@codesourcery.com>
4082
4083 PR c++/15766
4084 * parser.c (cp_parser_iteration_statement): Fix typo in error
4085 message.
4086
4087 PR c++/14777
4088 * pt.c (tsubst_default_argument): Do not defer access checks
4089 while substituting into the default argument.
4090
4091 PR c++/15554
4092 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
4093 constant in a non-dependent context.
4094
4095 PR c++/15057
4096 * except.c (build_throw): Ensure that temp_expr has been
4097 initialized.
4098
4099 2004-06-06 Roger Sayle <roger@eyesopen.com>
4100
4101 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
4102
4103 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4104
4105 PR c++/15503
4106 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
4107 'typename', and accept 'template'.
4108
4109 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
4110 Jan Hubicka <jh@suse.cz>
4111
4112 PR c++/14639
4113 * method.c (use_think): Do not mark thunk as referenced.
4114
4115 2004-06-03 Matt Austern <austern@apple.com>
4116
4117 PR c++/15428
4118 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
4119 is nonzero, and if we see a noninline definition of a key method,
4120 make the vtables nonweak.
4121
4122 2004-06-02 Matt Austern <austern@apple.com>
4123
4124 * cp-tree.h (instantiate_decl): new boolean parameter,
4125 undefined_ok. Current behavior is equivalent to its being 0.
4126 * decl2.c (mark_used): Add new argument when calling instantiate_decl
4127 * pt.c (mark_decl_instantiated): Unconditionally make
4128 instantiations explicit unconditionally
4129 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
4130 since mark_decl_instantiated now does it.
4131 (instantiate_class_member): New. Instantiate a member of an
4132 explicitly instantiated class template.
4133 (do_type_instantiation): Explicitly instantiate members of an
4134 explicitly instantiated class template.
4135 (instantiate_decl): if undefined_ok is nonzero, and if we're
4136 trying to explicitly instantiated a template with no definition,
4137 change it to an implicit instantiation.
4138 (instantiate_pending_templates): Add new argument to instantiate_decl.
4139 * tree.c (cp_cannot_inline_tree_fn): Likewise.
4140
4141 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
4142
4143 * cp-tree.h: Fix typo.
4144
4145 * cp-tree.h: Include cgraph.h
4146 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
4147 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
4148
4149 2004-06-01 Jason Merrill <jason@redhat.com>
4150
4151 PR c++/15142
4152 * call.c (call_builtin_trap): Remove type parm.
4153 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
4154 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
4155
4156 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4157
4158 PR c++/13092
4159 * init.c (build_offset_ref): Build SCOPE_REF with non-null
4160 TREE_TYPE for non-dependent names.
4161 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4162 unknown_type_node as its TREE_TYPE.
4163 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4164 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4165 (dump_expr) <SCOPE_REF case>: Likewise.
4166
4167 2004-06-01 Richard Henderson <rth@redhat.com>
4168 Andrew Pinski <pinskia@physics.uc.edu>
4169
4170 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
4171 * parser.c (struct cp_parser): Remove in_offsetof.
4172 (cp_parser_new): Don't set it.
4173 (cp_parser_unary_expression): Don't check it.
4174 (cp_parser_postfix_open_square_expression): Split out from ...
4175 (cp_parser_postfix_expression): ... here.
4176 (cp_parser_postfix_dot_deref_expression): Likewise.
4177 (cp_parser_builtin_offsetof): New.
4178 (cp_parser_primary_expression): Use it.
4179
4180 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4181
4182 PR c++/14932
4183 * parser.c (cp_parser_postfix_expression): Allow subscript
4184 operator in offsetof.
4185
4186 2004-05-31 Mark Mitchell <mark@codesourcery.com>
4187
4188 PR c++/15701
4189 * friend.c (add_friend): Do not try to perform access checks for
4190 functions from dependent classes.
4191
4192 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
4193
4194 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
4195 (pp_cxx_begin_template_argument_list): Turn into a function.
4196 (pp_cxx_end_template_argument_list): Likewise.
4197 (pp_cxx_separate_with): Define.
4198 (pp_cxx_unqualified_id): Tidy.
4199 (pp_cxx_primary_expression): Likewise.
4200 (pp_cxx_postfix_expression): Likewise.
4201 (pp_cxx_expression): Likewise.
4202 (pp_cxx_simple_type_specifier): Likewise.
4203 (pp_cxx_type_specifier_seq): Likewise.
4204 (pp_cxx_parameter_declaration_clause): Likewise.
4205 (pp_cxx_exception_specification): Likewise.
4206 (pp_cxx_direct_declarator): Likewise.
4207 (pp_cxx_type_id): Likewise.
4208 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
4209 cxx-pretty-print.c.
4210 (pp_cxx_left_paren): Likewise.
4211 (pp_cxx_right_paren): Likewise.
4212 (pp_cxx_left_brace): Likewise.
4213 (pp_cxx_right_brace): Likewise.
4214 (pp_cxx_left_bracket): Likewise.
4215 (pp_cxx_right_bracket): Likewise.
4216 (pp_cxx_dot): Likewise.
4217 (pp_cxx_identifier): Likewise.
4218 (pp_cxx_tree_identifier): Likewise.
4219 (pp_cxx_ampersand): New macro.
4220 (pp_cxx_star): Likewise.
4221 (pp_cxx_arrow): Likewise.
4222 (pp_cxx_semicolon): Likewise.
4223 (pp_cxx_complement): Likewise.
4224 (pp_cxx_begin_template_argument_list): Declaree.
4225 (pp_cxx_end_template_argument_list): Likewise.
4226 (pp_cxx_colon_colon): likewise.
4227
4228 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4229
4230 * parser.c (cp_parser_simple_type_specifier): Explicitly test
4231 against NULL_TREE.
4232
4233 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
4234
4235 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
4236 typeck.c: Fix comment formatting.
4237
4238 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
4239
4240 * cp-lang.c (cp_expand_decl): Remove.
4241 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
4242
4243 2004-05-30 Andreas Jaeger <aj@suse.de>
4244
4245 * lang-specs.h: Add missing initializers for .ii.
4246
4247 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
4248
4249 * decl.c (cp_make_fname_decl): Free return value from
4250 fname_as_string.
4251
4252 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4253
4254 PR c++/15083
4255 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
4256 even in a templat.e
4257 * init.c (build_new): Likewise.
4258
4259 PR c++/15640
4260 * name-lookup.c (arg_assoc): Robustify.
4261
4262 PR c++/15471
4263 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
4264 when determining the scope to use for a pointer to member.
4265 (lookup_anon_field): Give it external linkage.
4266 * cp-tree.h (lookup_anon_field): Declare it.
4267 * expr.c (cplus_expand_constant): Use it.
4268
4269 2004-05-28 Mark Mitchell <mark@codesourcery.com>
4270
4271 PR c++/14668
4272 * parser.c (cp_parser_simple_type_specifier): Call
4273 maybe_note_name_used_in_class.
4274
4275 2004-05-28 Tom Marshall <tmarshall@real.com>
4276
4277 PR c++/15214
4278 * class.c (finish_struct_1): Warn only if the dtor is non-private or
4279 the class has friends.
4280
4281 2004-05-27 Adam Nemet <anemet@lnxw.com>
4282
4283 PR c++/12883
4284 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
4285 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
4286
4287 2004-05-24 Geoffrey Keating <geoffk@apple.com>
4288
4289 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
4290 if it might be needed.
4291 * pt.c (mark_decl_instantiated): Only call defer_fn if
4292 the function actually needs processing in finish_file.
4293 * decl2.c (finish_file): Add check that elements in
4294 deferred_fns_used are really needed there. Remove unnecessary
4295 test of DECL_SAVED_TREE.
4296
4297 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4298
4299 * Make-lang.in: No need to specify $(LIBCPP).
4300
4301 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4302
4303 PR c++/15044
4304 * parser.c (cp_parser_class_head): Robustify.
4305
4306 PR c++/15317
4307 * parser.c (cp_parser_decl_specifier_seq): Correct error in
4308 comment.
4309 (cp_parser_constructor_declarator_p): Treat attributes
4310 as decl-specifiers.
4311
4312 PR c++/15329
4313 * typeck.c (build_unary_op): Do not attempt to resolve casts to
4314 base classes in templates.
4315
4316 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4317
4318 PR c++/15165
4319 * pt.c (instantiate_template): Robustify.
4320
4321 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4322
4323 PR c++/15025
4324 * decl.c (xref_tag): Issue errors about redeclaring template
4325 classes as non-template classes.
4326
4327 2004-05-23 Mark Mitchell <mark@codesourcery.com>
4328
4329 PR c++/14821
4330 * name-lookup.c (supplement_binding): Allow redefinitions of
4331 namespace aliases.
4332
4333 PR c++/14883
4334 * parser.c (cp_parser_template_argument): Robustify.
4335
4336 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4337
4338 * class.c (alter_access): Use %E format specifier to print an
4339 identifier node. Avoid looking at the IDENTIFIER_POINTER.
4340 (push_lang_context): Likewise.
4341 * decl.c (lookup_label): Likewise.
4342 (grokdeclarator): Likewise.
4343 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
4344 * pt.c (do_type_instantiation): Likewise.
4345 * tree.c (handle_java_interface_attribute): Likewise.
4346 (handle_com_interface_attribute): Likewise.
4347 (handle_init_priority_attribute): Likewise.
4348
4349 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4350
4351 PR c++/15285
4352 PR c++/15299
4353 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
4354 recognized as overloaded functions.
4355
4356 2004-05-22 Mark Mitchell <mark@codesourcery.com>
4357
4358 PR c++/15507
4359 * class.c (layout_nonempty_base_or_field): Do not try to avoid
4360 layout conflicts for unions.
4361
4362 PR c++/15542
4363 * typeck.c (build_x_unary_op): Instantiate template class
4364 specializations before looking for "operator &".
4365
4366 PR c++/15427
4367 * typeck.c (complete_type): Layout non-dependent array types, even
4368 in templates.
4369
4370 PR c++/15287
4371 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
4372 template.
4373
4374 2004-05-22 Roger Sayle <roger@eyesopen.com>
4375
4376 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
4377 returning when TREE_TYPE is error_mark_node.
4378 * typeck.c (require_complete_type): Return error_mark_node if
4379 value's type is an error_mark_node.
4380
4381 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
4382
4383 * optimize.c (calls_setjmp_r): Remove.
4384 (calls_setjmp_p): Remove.
4385 * cp-tree.c (calls_setjmp_p): Remove.
4386 * decl.c (finish_function): Do not call calls_setjmp_p.
4387
4388 2004-05-18 Zack Weinberg <zack@codesourcery.com>
4389
4390 * decl.c (cp_finish_decl): Use mark_decl_referenced.
4391 * decl2.c (maybe_make_one_only): Likewise.
4392 * method.c (use_thunk): Likewise.
4393
4394 2004-05-18 Jason Merrill <jason@redhat.com>
4395
4396 * class.c (build_base_path): Tidy a bit.
4397
4398 2004-05-14 Geoffrey Keating <geoffk@apple.com>
4399
4400 * name-lookup.c (struct scope_binding): New.
4401 (EMPTY_SCOPE_BINDING): New.
4402 (lookup_using_namespace): Take a scope_binding instead of a
4403 cxx_binding.
4404 (qualified_lookup_using_namespace): Likewise.
4405 (cxx_binding_clear): Delete.
4406 (do_nonmember_using_decl): Use a scope_binding instead of a
4407 cxx_binding.
4408 (lookup_tag): Don't call select_decl.
4409 (ambiguous_decl): Don't return anything (and change callers to match).
4410 Take a scope_binding as the second parameter.
4411 (lookup_namespace_name): Use a scope_binding instead of a
4412 cxx_binding.
4413 (unqualified_namespace_lookup): Likewise.
4414 (lookup_qualified_name): Likewise.
4415 (select_decl): Take a scope_binding instead of a cxx_binding.
4416 Use macros rather than hand-coding tests for type-ness.
4417
4418 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4419
4420 * cp-gimplify.c: Rename from cp-simplify.c.
4421 * Make-lang.in, optimize.c: Update.
4422
4423 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4424
4425 Merge from tree-ssa-20020619-branch. See
4426 ChangeLog.tree-ssa for details.
4427
4428 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
4429 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
4430 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
4431 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
4432 Merged.
4433 * cp-mudflap.c: New file.
4434 * cp-simplify.c:: New file.
4435
4436 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4437
4438 PR c++/14389
4439 * decl2.c (check_classfn): For member templates, compare also the
4440 template parameters to match the declaration.
4441 * cp-tree.h: Adjust declaration of check_classfn.
4442 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
4443 * friend.c (do_friend): Likewise.
4444 * pt.c (tsubst_friend_function): Likewise.
4445
4446 2004-05-01 Zack Weinberg <zack@codesourcery.com>
4447
4448 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
4449 Instead, dig into the representation type to find the array bound.
4450
4451 2004-04-30 Jason Merrill <jason@redhat.com>
4452
4453 Refer to base members using COMPONENT_REFs where possible.
4454 * class.c (build_simple_base_path): New fn.
4455 (build_base_path): Use it for non-virtual base references.
4456 (layout_class_type): Change base fields to their real type
4457 after layout is done.
4458 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
4459 * cp-lang.c (cxx_get_alias_set): Use it.
4460
4461 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
4462
4463 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
4464 comment typos.
4465
4466 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4467
4468 PR c++/15064
4469 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
4470 used in integral constant expressions.
4471
4472 2004-04-22 Mark Mitchell <mark@codesourcery.com>
4473
4474 * init.c (build_aggr_init): Fix accidental use of C99 construct in
4475 previous change.
4476
4477 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
4478 braced initializer.
4479 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
4480 * decl.c (reshape_init): Use it.
4481 * init.c (perform_member_init): Remove redundant condition.
4482 (build_aggr_init): Adjust to handle brace-enclosed initializers
4483 correctly.
4484 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4485
4486 * parser.c (cp_parser_initializer_clause): Do not set
4487 TREE_HAS_CONSTRUCTOR on the initializer.
4488 * rtti.c (tinfo_base_init): Likewise.
4489 (generic_initializer): Likewise.
4490 (ptr_initializer): Likewise.
4491 (ptm_initializer): Likewise.
4492 (class_initializer): Likewise.
4493 (get_pseudo_ti_init): Likewise.
4494 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
4495
4496 2004-04-22 Alan Modra <amodra@bigpond.net.au>
4497
4498 * name-lookup.c (anonymous_namespace_name): Make static.
4499
4500 2004-04-19 Roger Sayle <roger@eyesopen.com>
4501
4502 PR middle-end/14531
4503 * class.c (build_base_path): Call fold whilst building the NULL
4504 pointer check expression trees.
4505
4506 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4507
4508 * init.c (build_new_1): Don't use type size argument for Java
4509 _Jv_AllocObject call.
4510
4511 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
4512
4513 * method.c (make_alias_for_thunk): Remove preprocessor guard on
4514 declaration and definition.
4515
4516 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
4517
4518 PR c++/14808
4519 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
4520 than ASM_OUTPUT_DEF.
4521
4522 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4523
4524 * decl2.c (mark_used): Don't segfault if cfun != NULL but
4525 current_function_decl == NULL.
4526
4527 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
4528
4529 PR c++/3518
4530 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
4531 level.
4532
4533 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4534
4535 * init.c (decl_constant_value): Don't look at DECL_INITIAL
4536 of PARM_DECL.
4537 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
4538 or TREE_SIDE_EFFECTS of a type.
4539
4540 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
4541
4542 PR c++/14007
4543 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
4544 cv-qualifier unification.
4545 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
4546
4547 2004-04-02 Jan Hubicka <jh@suse.cz>
4548
4549 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
4550 * cp-tree.h (cp_update_decl_after_saving): Declare.
4551 * tree.c (cp_update_decl_after_saving): Define.
4552
4553 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4554
4555 PR c++/14803
4556 * typeck.c (get_delta_difference): Call fold before returning the
4557 value.
4558
4559 2004-04-01 Richard Henderson <rth@redhat.com>
4560
4561 PR c++/14804
4562 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
4563 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
4564
4565 2004-04-01 Mark Mitchell <mark@codesourcery.com>
4566
4567 PR c++/14810
4568 * name-lookup.c (maybe_push_cleanup_level): Robustify.
4569
4570 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4571
4572 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
4573
4574 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4575
4576 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
4577 * class.c (check_bitfield_decl): Likewise.
4578 * cvt.c (type_promotes_to): Likewise.
4579 * decl.c (finish_enum): Likewise.
4580 * mangle.c (write_builtin_type): Likewise.
4581 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
4582 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
4583 (build_binary_op): Likewise.
4584
4585 2004-03-31 Jan Hubicka <jh@suse.cz>
4586
4587 * tree.h (optimize_function): Kill prototype.
4588 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
4589 * semantics.c (expand_body): Kill.
4590
4591 2004-03-30 Mark Mitchell <mark@codesourcery.com>
4592
4593 PR c++/14724
4594 * decl.c (start_decl_1): Do not decide whether or not to create a
4595 new cleanup level until after the type has been completed.
4596
4597 PR c++/14763
4598 * pt.c (tsubst_default_argument): Clear current_function_decl.
4599
4600 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4601
4602 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
4603
4604 2004-03-29 Zack Weinberg <zack@codesourcery.com>
4605
4606 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
4607 is null, just print the literal name and return.
4608
4609 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
4610
4611 * cxx-pretty-print.c: Fix comment typos.
4612
4613 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
4614
4615 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
4616 Update copyright.
4617
4618 2004-03-23 Ziemowit Laski <zlaski@apple.com>
4619
4620 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
4621 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
4622 target hook.
4623
4624 2004-03-23 Zack Weinberg <zack@codesourcery.com>
4625
4626 PR 12267, 12391, 12560, 13129, 14114, 14133
4627 * cp-lang.c (c_reset_state): Delete.
4628 (push_file_scope, pop_file_scope): New stubs.
4629 * parser.c (c_parse_file): Call sorry() here if called more than once.
4630
4631 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4632
4633 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
4634 for INTEGER_CST.
4635
4636 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4637
4638 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
4639
4640 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
4641
4642 * error.c (enum pad): Remove.
4643 (dump_qualifiers): Likewise.
4644 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
4645 (dump_aggr_type): Likewise.
4646 (dump_type_suffix): Likewise.
4647 (dump_simple_decl): Likewise.
4648 (dump_function_decl): Likewise.
4649 (cv_to_string): Likewise.
4650 (dump_type_prefix): Likewise. Adjust return void.
4651 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
4652 cxx_pretty_print.h.
4653 (pp_cxx_template_keyword_if_needed): Document.
4654 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
4655 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
4656 MUST_NOT_THROW_EXPR.
4657
4658 2004-03-21 Mark Mitchell <mark@codesourcery.com>
4659
4660 PR c++/14616
4661 * decl.c (cp_finish_decl): Compute the size of arrays declared in
4662 templates, if their type is non-dependent.
4663
4664 2004-03-19 Mark Mitchell <mark@codesourcery.com>
4665
4666 * call.c (build_op_delete_call): Do not forget the placement
4667 arguments when iterating through mutiple delete operators.
4668
4669 * cp-tree.h (svaed_scope): Remove last_parms.
4670 (NEW_DELETE_OPNAME_P): New macro.
4671 (last_function_parms): Remove.
4672 (do_friend): Adjust prototype.
4673 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
4674 using last_function_parms.
4675 (grokfndecl): Take the PARM_DECLs as an argument, rather than
4676 using last_function_parms.
4677 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
4678 for class-specific operator new and operator delete.
4679 (grok_op_properties): Do not look for allocation functions with
4680 METHOD_TYPEs.
4681 (start_function): Use DECL_ARGUMENTS instead of
4682 last_function_parms.
4683 * decl.h (last_function_parms): Do not declare.
4684 * decl2.c (grokclassfn): Do not use last_function_parms.
4685 * friend.c (do_friend): Remove parmdecls parameter.
4686 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
4687 (pop_from_top_level): Do not restore it.
4688 * pt.c (check_explicit_specialization): Do not adjust
4689 last_function_parms.
4690
4691 * name-lookup.c (do_local_using_decl): Create a local binding for
4692 types brought in via using declarations.
4693
4694 * name-lookup.c (lookup_arg_dependent): Handle block-scope
4695 function declarations correctly.
4696
4697 * semantics.c (finish_id_expression): Correct handling of
4698 conversion operators to dependent types.
4699
4700 * typeck.c (lookup_destructor): Allow the use of destructors from
4701 base classes.
4702
4703 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4704
4705 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
4706 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
4707 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
4708 the field is named TEMPLATE_TYPE_PARM_INDEX.
4709
4710 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4711
4712 PR c++/14545
4713 * parser.c (cp_parser_functional_cast): A cast to anything
4714 but integral or enumaration type is not an integral constant
4715 expression.
4716 * pt.c (value_dependent_expression_p): Handle cast expressions
4717 without operands (such as "int()").
4718
4719 2004-03-18 Mark Mitchell <mark@codesourcery.com>
4720
4721 * semantics.c (finish_pseudo_destructor_expr): Allow differing
4722 cv-qualification between the type named by the
4723 pseudo-destructor-name and the object-type.
4724
4725 * search.c (accessible_base_p): Handle non-proper bases.
4726
4727 * name-lookup.c (do_nonmember_using_decl): If a using declaration
4728 refers to a single overloaded function, set the type of the
4729 function.
4730 * tree.c (lvalue_type): Simplify.
4731 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
4732 unknown type.
4733 (build_unary_op): Handle OVERLOADs with known types.
4734
4735 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
4736 function templates.
4737
4738 * parser.c (cp_parser_postfix_expression): Handle the use of
4739 "typename" in non-dependent contexts. Convert appropriately when
4740 when using a qualified name after "->" or ".".
4741
4742 * call.c (conditional_conversion): Honor the requirement that some
4743 conversions refer to the original object.
4744
4745 2004-03-18 Mark Mitchell <mark@codesourcery.com>
4746
4747 * call.c (build_conditional_expr): Do not call force_rvalue for
4748 operands of void_type when the conditional expression itself has
4749 void type.
4750 * name-lookup.c (pushdecl): Don't consider a declaration of a
4751 function named "main" to be an overload of a type named "main".
4752 * parser.c (cp_parser_template_name): Perform name lookup when the
4753 template name is proceeded by "template" if the qualifying scope
4754 is non-dependent.
4755 * typeck.c (composite_pointer_type_r): Correctly handle
4756 pointer-to-member types.
4757 (build_const_cast): Likewise.
4758
4759 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4760
4761 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
4762 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
4763 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
4764 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
4765 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
4766 (TYPEOF_TYPE_EXPR): New macro.
4767 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
4768 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
4769 * pt.c (tsubst): Likewise.
4770 * semantics.c (finish_typeof): Likewise.
4771 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
4772 and TEMPLATE_TYPE_PARM.
4773 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
4774 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
4775
4776 2004-03-16 Mark Mitchell <mark@codesourcery.com>
4777
4778 PR c++/14586
4779 * cp-tree.h (build_new_op): Change prototype.
4780 (build_x_binary_op): Likewise.
4781 * call.c (build_new_op): Add overloaded_p parameter.
4782 * decl2.c (grok_array_decl): Adjust call to build_new_op.
4783 * parser.c (cp_parser_binary_expression): Note that uses of
4784 overloaded operators prevents an expression from being considered
4785 an integral constant.
4786 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
4787 build_x_binary_op.
4788 * semantics.c (finish_call_expr): Likewise.
4789 * typeck.c (rationalize_conditional_expr): Likewise.
4790 (build_x_indirect_ref): Likewise.
4791 (build_x_binary_op): Likewise.
4792 (build_x_unary_op): Likewise.
4793 (build_x_compound_expr): Likewise.
4794 (build_modify_expr): Likewise.
4795 * typeck2.c (build_x_arrow): Likewise.
4796
4797 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
4798
4799 * cp-lang.c, ptree.c: Update copyright.
4800
4801 2004-03-13 Mark Mitchell <mark@codesourcery.com>
4802
4803 PR c++/14550
4804 * parser.c (cp_parser_non_integral_constant_expression): Encode
4805 more of the idiom that surrounded calls to this function within
4806 the function itself
4807 (cp_parser_primary_expression): Adjust accordingly.
4808 (cp_parser_postfix_expression): Likewise.
4809 (cp_parser_unary_expression): Likewise.
4810 (cp_parser_cast_expression): Likewise.
4811 (cp_parser_assignment_expression): Likewise.
4812 (cp_parser_expression): Likewise.
4813 (cp_parser_new_expression): Note that new-expressions are not
4814 allowed in integral constant expressions.
4815 (cp_parser_delete_expression): Likewise.
4816
4817 2004-03-12 Matt Austern <austern@apple.com>
4818
4819 * decl2.c (maybe_make_one_only): Look at
4820 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
4821 to make an explicit instantiation weak.
4822 * method.c (use_thunk): Make sure we call comdat_linkage
4823 when appropriate.
4824 * pt.c (do_type_instantiation): On systems where weak symbols
4825 don't go in a static archive's TOC, explicit instantiation of a
4826 class must imply *explicit* instantiation of its memeber.
4827
4828 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
4829
4830 * call.c, cp-tree.h, pt.c: Fix comment typos.
4831
4832 2004-03-10 Mark Mitchell <mark@codesourcery.com>
4833
4834 PR c++/14510
4835 * decl.c (xref_tag): Disregard non-type declarations when
4836 looking up a tagged type.
4837
4838 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
4839
4840 PR c++/14397
4841 * call.c (convert_like_real): Build a const qualified temporary,
4842 when testing ctor access.
4843
4844 2004-03-09 Mark Mitchell <mark@codesourcery.com>
4845
4846 * call.c (initialize_reference): Fix typo.
4847
4848 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4849
4850 PR c++/14409
4851 * pt.c (determine_specialization): For member templates, match also
4852 constness.
4853
4854 PR c++/14448
4855 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
4856 non-dependent.
4857 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
4858
4859 2004-03-09 Mark Mitchell <mark@codesourcery.com>
4860
4861 PR c++/14230
4862 * call.c (initialize_reference): Handle initializers that are
4863 class-member access expressions applies to rvalues.
4864
4865 2004-03-09 Mark Mitchell <mark@codesourcery.com>
4866
4867 PR c++/14432
4868 * name-lookup.c (supplement_binding): Ignore functions that are
4869 marked DECL_ANTICIPATED.
4870
4871 2004-03-08 Mark Mitchell <mark@codesourcery.com>
4872
4873 PR c++/14401
4874 * class.c (check_field_decls): Complain about non-static data
4875 members of reference type in unions. Propagate
4876 CLASSTYPE_REF_FIELDS_NEED_INIT and
4877 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
4878 data members.
4879 * init.c (perform_member_init): Complain about mbmers with const
4880 type that are not explicitly initialized.
4881
4882 2004-03-08 Mark Mitchell <mark@codesourcery.com>
4883
4884 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
4885 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
4886 (lang_identifier): Remove implicit_decl and error_locus.
4887 (IDENTIFIER_IMPLICIT_DECL): Remove.
4888 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
4889 (IDENTIFIER_ERROR_LOCUS): Likewise.
4890 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4891 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
4892 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
4893 (implicitly_declare): Remove.
4894 * decl.c (warn_extern_redeclared_static): Remove check of
4895 IDENTIFIER_IMPLICIT_DECL.
4896 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
4897 (implicitly_declare): Remove.
4898 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
4899 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
4900 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
4901 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
4902 in the innermost scope, rather than at namespace scope.
4903 * name-lookup.c (push_local_binding): Give it external linkage.
4904 (pushdecl): Remove dead code.
4905 * name-lookup.h (push_local_binding): Declare it.
4906 * ptree.c (cxx_print_identifier): Don't print
4907 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
4908 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
4909 not IDENTIFIER_ERROR_LOCUS.
4910 * typeck.c (build_function_call): Remove dead code.
4911
4912 2004-03-08 Jason Merrill <jason@redhat.com>
4913
4914 PR c++/13170
4915 * decl.c (xref_tag): Remove attribute handling.
4916 * cp-tree.h: Adjust prototype.
4917 * decl.c, parser.c, rtti.c: Adjust callers.
4918 * parser.c (cp_parser_class_head): Pass back attributes in the
4919 class head.
4920 (cp_parser_class_specifier): Adjust.
4921
4922 2004-03-08 Matt Austern <austern@apple.com>
4923
4924 PR debug/14079
4925 * name-lookup.c (add_decl_to_level): Add extern variables, as well
4926 as static, to static_decls array.
4927
4928 2004-03-05 Jason Merrill <jason@redhat.com>
4929
4930 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
4931
4932 2004-03-04 Geoffrey Keating <geoffk@apple.com>
4933
4934 * decl.c (grokfndecl): Update old incorrect comment.
4935 (grokvardecl): Diagnose C++ variables of type with no linkage.
4936
4937 2004-03-01 Mark Mitchell <mark@codesourcery.com>
4938
4939 PR c++/14369
4940 * pt.c (build_non_dependent_expr): Do not create a
4941 NON_DEPENDENT_EXPR for a THROW_EXPR.
4942
4943 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4944
4945 PR c++/14369
4946 * error.c (dump_expr): Handle THROW_EXPR.
4947
4948 2004-03-01 Mark Mitchell <mark@codesourcery.com>
4949
4950 PR c++/14360
4951 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
4952 lookup if ordinary name-lookup finds a non-function.
4953 * pt.c (tsubst_copy_and_build): Likewise.
4954
4955 PR c++/14361
4956 * parser.c (cp_parser_late_parsing_default_args): Check that there
4957 are no extra tokens after the end of the default-argument
4958 expression.
4959
4960 2004-03-01 Mark Mitchell <mark@codesourcery.com>
4961
4962 PR c++/14324
4963 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
4964 having C++ linkage for name-mangling purposes.
4965
4966 PR c++/14260
4967 * parser.c (cp_parser_direct_declarator): Recognize constructor
4968 declarators that use a template-id to name the class being
4969 constructed.
4970
4971 PR c++/14337
4972 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
4973 (tsubst_expr): Do not call tsubst_copy, even when
4974 processing_template_decl.
4975
4976 2004-03-01 Jeff Law <law@redhat.com>
4977
4978 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
4979 the proper type.
4980
4981 2004-02-29 Mark Mitchell <mark@codesourcery.com>
4982
4983 PR c++/14138
4984 * name-lookup.h (push_scope): Change prototype.
4985 * name-lookup.c (push_scope): Do not reenter the current class
4986 scope.
4987 * decl.c (grokfndecl): Check return code from push_scope before
4988 calling pop_scope.
4989 * decl2.c (check_classfn): Likewise.
4990 * parser.c (cp_parser_conversion_function_id): Likewise.
4991 (cp_parser_init_declarator): Likewise.
4992 (cp_parser_direct_declarator): Likewise.
4993 (cp_parser_class_specifier): Likewise.
4994 (cp_parser_class_head): Likewise.
4995 (cp_parser_lookup_name): Likewise.
4996 (cp_parser_constructor_declarator_p): Likewise.
4997 * pt.c (instantiate_class_template): Likewise.
4998 (resolve_typename_type): Likewise.
4999
5000 2004-02-29 Mark Mitchell <mark@codesourcery.com>
5001
5002 PR c++/14267
5003 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
5004 extension.
5005
5006 PR debug/12103
5007 * class.c (update_vtable_entry_for_fn): Do not go through
5008 covariance machinery if the type returned by an overrider is the
5009 same as the original.
5010
5011 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
5012
5013 * call.c: Fix a comment typo.
5014
5015 2004-02-27 Ziemowit Laski <zlaski@apple.com>
5016
5017 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
5018
5019 2004-02-26 Mark Mitchell <mark@codesourcery.com>
5020
5021 PR c++/14278
5022 * parser.c (cp_parser_parameter_declaration_list): Commit
5023 to fewer tentative parses.
5024
5025 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5026
5027 PR c++/14284
5028 * pt.c (dependent_type_p_r): A template template parameter is a
5029 dependent type.
5030
5031 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5032
5033 PR c++/14246
5034 * mangle.c (write_template_arg_literal): Don't rely on identity for
5035 boolean constants.
5036
5037 2004-02-24 Jason Merrill <jason@redhat.com>
5038
5039 * tree.c (build_exception_variant): Use check_qualified_type.
5040
5041 2004-02-23 Zack Weinberg <zack@codesourcery.com>
5042 Kazu Hirata <kazu@cs.umass.edu>
5043
5044 * decl.c (cxx_init_decl_processing): Don't check
5045 flag_writable_strings.
5046
5047 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
5048
5049 PR c++/14156
5050 * typeck.c (maybe_warn_about_returning_address_of_location):
5051 Change check for VAR_DECL to use DECL_P instead.
5052
5053 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5054
5055 PR c++/14250
5056 * cvt.c (build_expr_type_conversion): Type must be complete before
5057 looking up for conversions.
5058
5059 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5060
5061 PR c++/14143
5062 * name-lookup.c (arg_assoc_class): Don't look into template
5063 arguments if it is not a primary template.
5064
5065 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5066
5067 PR c++/12007
5068 * method.c (use_thunk): Always clone function argument tree.
5069
5070 2004-02-20 Mark Mitchell <mark@codesourcery.com>
5071
5072 PR c++/14199
5073 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
5074
5075 PR c++/14173
5076 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
5077 for all type variants.
5078
5079 2004-02-19 Mark Mitchell <mark@codesourcery.com>
5080
5081 PR c++/13927
5082 * decl.c (duplicate_decls): Return error_mark_node for invalid
5083 redeclarations.
5084 * name-lookup.c (push_namespace): Ignore the return value from
5085 pushdecl.
5086 * pt.c (push_template_decl_real): Robustify.
5087
5088 PR c++/14186
5089 * name-lookup.c (push_class_level_binding): Do not complain about
5090 adding a binding for a member whose name is the same as the
5091 enclosing class if the member is located in a base class of the
5092 current class.
5093
5094 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5095
5096 PR c++/14181
5097 * parser.c (cp_parser_new_expression): Parse an ill-formed
5098 direct-new-declarator after a parenthesized type-id to emit good
5099 diagnostic.
5100
5101 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
5102
5103 * cp-tree.def, cvt.c: Update copyright.
5104
5105 2004-02-17 Mark Mitchell <mark@codesourcery.com>
5106
5107 PR c++/11326
5108 * cp-tree.h (abi_version_at_least): Remove.
5109 * mangle.c: Include flags.h.
5110
5111 2004-02-15 Mark Mitchell <mark@codesourcery.com>
5112
5113 PR c++/13971
5114 * call.c (build_conditional_expr): Handle conversions between
5115 class types which result in differently cv-qualified type
5116 variants.
5117
5118 PR c++/14086
5119 * class.c (delete_duplicate_fields_1): Remove.
5120 (delete_duplicate_fields): Likewise.
5121 (finish_struct_anon): Remove check for members with the same name
5122 as their enclosing class.
5123 (check_field_decls): Do not call duplicate_fields.
5124 * decl.c (grokdeclarator): Remove check for static data members
5125 with the same name as their enclosing class.
5126 * name-lookup.c (push_class_level_binding): Check for members with
5127 the same name as their enclosing class.
5128
5129 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
5130
5131 PR c++/14085
5132 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
5133
5134 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5135
5136 PR c++/13635
5137 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
5138 has full set of arguments.
5139
5140 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5141
5142 PR c++/13927
5143 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
5144
5145 2004-02-13 Mark Mitchell <mark@codesourcery.com>
5146
5147 PR c++/14122
5148 * cp-tree.h (delete_sanity): Change prototype.
5149 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
5150 Remove dead code. Adjust code to warn about deleting an array.
5151 * typekc.c (decay_conversion): Use build_address and build_nop.
5152
5153 PR c++/14108
5154 * search.c (accessible_p): Do not check access in thunks.
5155
5156 PR c++/14083
5157 * call.c (build_conditional_expr): Call force_rvalue on the
5158 non-void operand in the case that one result is a throw-expression
5159 and the other is not.
5160
5161 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
5162
5163 PR c++/9851
5164 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
5165 the type name and look ahead for ::~, and bail out early with a
5166 better error message if the parse is going to fail.
5167
5168 2004-02-12 Mark Mitchell <mark@codesourcery.com>
5169
5170 * call.c (conversion_kind): New type.
5171 (conversion_rank): Likewise.
5172 (conversion): Likewise.
5173 (CONVERSION_RANK): New macro.
5174 (conversion_obstack): New variable.
5175 (obstack_initialized): Likewise.
5176 (z_candidate): Change type of convs and second_conv.
5177 (candidate_warning): New type.
5178 (IDENTITY_RANK): Remove.
5179 (EXACT_RANK): Likewise.
5180 (PROMO_RANK): Likewise.
5181 (STD_RANK): Likewise.
5182 (PBOOL_RANK): Likewise.
5183 (USER_RANK): Likewise.
5184 (ELLIPSIS_RANK): Likewise.
5185 (BAD_RANK): Likewise.
5186 (ICS_RANK): Likewise.
5187 (ICS_STD_RANK): Likewise.
5188 (ICS_USER_FLAG): Likewise.
5189 (ICS_ELLIPSIS_FLAG): Likewise.
5190 (ICS_THIS_FLAG): Likewise.
5191 (ICS_BAD_FLAG): Likewise.
5192 (NEED_TEMPORARY_P): Likewise.
5193 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
5194 (USER_CONV_CAND): Likewise.
5195 (USER_CONV_FN): Likewise.
5196 (conversion_obstack_alloc): New function.
5197 (alloc_conversion): Likewise.
5198 (validate_conversion_obstack): Likewise.
5199 (alloc_conversions): Likewise.
5200 (build_conv): Adjust to deal with new conversion data structures.
5201 (build_identity_conv): New function.
5202 (build_ambiguous_conv): Likewise.
5203 (standard_conversion): Adjust to deal with new conversion data
5204 structures.
5205 (convert_class_to_reference): Likewise.
5206 (direct_reference_binding): Likewise.
5207 (reference_binding): Likewise.
5208 (implicit_conversion): Likewise.
5209 (add_candidate): Likewise.
5210 (add_function_candidate): Likewise.
5211 (add_conv_candidate): Likewise.
5212 (build_builtin_candidate): Likewise.
5213 (print_z_candidate): Likewise.
5214 (merge_conversion_sequences): Likewise.
5215 (build_user_type_conversion_1): Likewise.
5216 (build_user_type_conversion): Likewise.
5217 (build_new_function_call): Likewise.
5218 (build_object_call): Likewise.
5219 (conditional_conversion): Likewise.
5220 (build_conditional_expr): Likewise.
5221 (build_new_op): Likewise.
5222 (build_op_delete_call): Likewise.
5223 (convert_like_real): Likewise.
5224 (build_over_call): Likewise.
5225 (build_new_method_call): Likewise.
5226 (is_subseq): Likewise.
5227 (maybe_handle_implicit_object): Likewise.
5228 (maybe_handle_ref_bind): Likewise.
5229 (compare_ics): Likewise.
5230 (source_type): Likewise.
5231 (add_warning): Likewise.
5232 (joust): Likewise.
5233 (can_convert_arg): Likewise.
5234 (can_convert_arg_bad): Likewise.
5235 (perform_implicit_conversion): Likewise.
5236 (perform_direct_initialization_if_possible): Likewise.
5237 (initialize_reference): Likewise.
5238 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
5239 * cp-tree.def (WRAPPER): Likewise.
5240 (IDENTITY_CONV): Remove.
5241 (LVALUE_CONV): Likewise.
5242 (QUAL_CONV): Likewise.
5243 (STD_CONV): Likewise.
5244 (PTR_CONV): Likewise.
5245 (PMEM_CONV): Likewise.
5246 (BASE_CONV): Likewise.
5247 (REF_BIND): Likewise.
5248 (USER_CONV): Likewise.
5249 (AMBIG_CONV): Likewise.
5250 (RVALUE_CONV): Likewise.
5251 * cp-tree.h (tree_wrapper): Remove.
5252 (WRAPPER_ZC): Remove.
5253 (lang_tree_node): Remove wrapper.
5254 (LOOKUP_SPECULATIVELY): Remove.
5255 (build_op_delete_call): Adjust prototype.
5256 (validate_conversion_obstack): Declare.
5257 (build_zc_wrapper): Remove.
5258 * cvt.c (convert_to_reference): Remove dead code.
5259 (ocp_convert): Likewise.
5260 * decl.c (redeclaration_error_message): Correct handling of
5261 templates.
5262 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
5263 (cp_tree_node_structure): Remove WRAPPER case.
5264 * decl2.c (finish_file): Call validate_conversion_obstack.
5265 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
5266 (build_op_delete_call): Likewise.
5267 (build_x_delete): Likewise.
5268 (build_delete): Adjust call to build_op_delete_call.
5269 * pt.c (tsubst_friend_declaration): Adjust code to determine
5270 whether or not a friend template is a definition.
5271 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
5272 * tree.c (build_zc_wrapper): Remove.
5273
5274 2004-02-12 Zack Weinberg <zack@codesourcery.com>
5275
5276 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
5277 * cp-tree.h: Don't declare cxx_builtin_type_decls.
5278 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
5279 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
5280
5281 2004-02-10 Mark Mitchell <mark@codesourcery.com>
5282
5283 * typeck.c (lookup_destructor): Fix typo in error message.
5284
5285 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
5286
5287 * call.c, parser.c, tree.c: Fix comment typos.
5288
5289 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5290
5291 Bug 13856
5292 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
5293 * decl.c (duplicate_decls, start_function): Likewise.
5294
5295 2004-02-07 Zack Weinberg <zack@codesourcery.com>
5296
5297 * name-lookup.c (pushdecl): Issue shadow warnings directly.
5298 * parser.c (free_parser_stacks): Delete.
5299
5300 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
5301
5302 * rtti.c: Update copyright.
5303
5304 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5305
5306 PR c++/14033
5307 * decl.c (require_complete_types_for_parms): Do not insert
5308 error_mark_node in the parameter list.
5309
5310 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5311
5312 PR c++/14028
5313 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
5314 error when terminator can not be found.
5315
5316 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
5317
5318 Make-lang.in (po-generated): Delete.
5319
5320 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
5321
5322 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
5323 targetm.calls.promote_prototypes.
5324
5325 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5326
5327 PR middle-end/13750
5328 Revert:
5329 2004-01-15 Geoffrey Keating <geoffk@apple.com>
5330 PR pch/13361
5331 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5332 (handle_pragma_implementation): Likewise.
5333
5334 2004-02-05 Mark Mitchell <mark@codesourcery.com>
5335
5336 PR c++/13714
5337 * typeck.c (lookup_destructor): Tweak error message.
5338
5339 2004-02-05 Jan Hubicka <jh@suse.cz>
5340
5341 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
5342 functions.
5343
5344 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5345
5346 PR c++/14008
5347 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
5348 code, only emits the diagnostic now. Added lookup of the identifier
5349 and support for qualified ids.
5350 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
5351 Parse an (invalid) type name as id-expression within a declarator.
5352 (cp_parser_simple_declaration): Use it.
5353 (cp_parser_member_declaration): Likewise.
5354 (cp_parser_make_typename_type): New function. Handle errors through
5355 cp_parser_diagnose_invalid_typename.
5356 (cp_parser_elaborated_type_specifier): Use it.
5357
5358 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5359
5360 PR c++/13932
5361 * call.c (convert_like_real): Use "converting" rather than
5362 "argument" as the descriptive keyword to
5363 dubious_conversion_warnings.
5364 * typeck.c (convert_for_assignment): Do not call
5365 dubious_conversion_warnings.
5366
5367 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5368
5369 PR c++/13086
5370 * init.c (build_delete): Emit a more informative error message in
5371 case of an incomplete type, and on the correct source line.
5372
5373 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
5374
5375 * error.c, search.c: Update copyright.
5376
5377 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5378
5379 PR c++/9941
5380 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
5381 linkage for the typeinfo name string.
5382
5383 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5384
5385 PR c++/13969
5386 * cp-tree.h (fold_non_dependent_expr): New function.
5387 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
5388 (cp_parser_template_argument): Use fold_non_dependent_expr.
5389 (cp_parser_direct_declarator): Likewise.
5390 * pt.c (fold_non_dependent_expr): New function.
5391 (convert_nontype_argument): Use it.
5392 (tsubst_qualified_id): Simplify.
5393 (tsubst_copy_and_build): Likewise.
5394
5395 2004-02-04 Mark Mitchell <mark@codesourcery.com>
5396
5397 * decl.c (cxx_push_function_context): Do not set
5398 current_function_is_thunk.
5399 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
5400 actual function.
5401
5402 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5403
5404 PR c++/13997
5405 * pt.c (more_specialized_class): Increase processing_template_decl
5406 while partial ordering.
5407
5408 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5409
5410 PR c++/13925
5411 * decl.c (start_function): Do not call pushdecl for any
5412 instantiation or specialization of a primary template.
5413
5414 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5415
5416 PR c++/13950
5417 * parser.c (cp_parser_class_name): Robustify.
5418
5419 PR c++/13970
5420 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
5421
5422 PR c++/14002
5423 * semantics.c (finish_id_expression): Do not return an
5424 IDENTIFIER_NODE when lookup finds a PARM_DECL.
5425
5426 2004-02-03 Mark Mitchell <mark@codesourcery.com>
5427
5428 PR c++/13978
5429 * pt.c (build_non_dependent_expr): Do not build
5430 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
5431
5432 PR c++/13968
5433 * semantics.c (finish_id_expression): Do not return an
5434 IDENTIFIER_NODE when lookup finds a VAR_DECL.
5435
5436 PR c++/13975
5437 * parser.c (cp_parser_simple_declaration): When skipping to the
5438 end of the statement swallow the terminating semicolon.
5439
5440 2004-02-02 Mark Mitchell <mark@codesourcery.com>
5441
5442 PR c++/13113
5443 * init.c (build_offset_ref): Improve error recovery for invalid
5444 uses of non-static member functions.
5445
5446 PR c++/13854
5447 * cp-tree.h (cp_build_type_attribute_variant): New function.
5448 * class.c (build_clone): Use cp_build_type_attribute_variant.
5449 * decl.c (duplicate_decls): Likewise.
5450 * pt.c (copy_default_args_to_explicit_spec): Likewise.
5451 (tsubst_function_type): Likewise.
5452 * tree.c (build_exception_variant): Check attributes before
5453 concluding that two types are the same.
5454 (cp_build_type-attribute_variant): New method.
5455 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
5456
5457 PR c++/13907
5458 * call.c (convert_class_to_reference): Keep better track of
5459 pedantically invalid user-defined conversions.
5460
5461 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5462
5463 PR c++/13957
5464 * pt.c (tsubst_qualified_id): Improved error message when a type
5465 is expected but not found.
5466
5467 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
5468
5469 * class.c: Fix comment typos.
5470 * decl.c: Likewise.
5471 * error.c: Likewise.
5472 * parser.c: Likewise.
5473 * pt.c: Likewise.
5474 * search.c: Likewise.
5475 * typeck.c: Likewise.
5476
5477 2004-01-30 Richard Henderson <rth@redhat.com>
5478
5479 PR c++/13693
5480 * method.c (use_thunk): Don't force_target_expr for void thunks.
5481 * tree.c (build_target_expr_with_type): Assert non-void type.
5482 (force_target_expr): Likewise.
5483
5484 2004-01-30 Michael Matz <matz@suse.de>
5485
5486 * parser.c (cp_parser_labeled_statement): Accept case ranges.
5487
5488 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5489
5490 DR206
5491 PR c++/13813
5492 * decl.c (grokdeclarator): Check immediatly type completeness for
5493 non-dependent types.
5494
5495 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5496
5497 PR c++/13683
5498 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
5499 a sizeof expression.block
5500
5501 2004-01-29 Mark Mitchell <mark@codesourcery.com>
5502
5503 PR c++/13883
5504 * mangle.c (write_encoding): Correct encoding of member template
5505 constructors.
5506
5507 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5508
5509 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
5510 template name as it was `<::' (digraph typo).
5511 (cp_parser_nth_token_starts_template_argument_list_p): New function.
5512 (cp_parser_id_expression): Use it.
5513 (cp_parser_nested_name_specifier_opt): Likewise.
5514 (cp_parser_template_name): Likewise.
5515 (cp_parser_class_name): Likewise.
5516 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
5517
5518 2004-01-28 Mark Mitchell <mark@codesourcery.com>
5519
5520 PR c++/13791
5521 * typeck.c (merge_types): Do not merge attributes into
5522 TYPENAME_TYPEs.
5523
5524 PR c++/13736
5525 * parser.c (cp_parser_direct_declarator): Do not prevent
5526 backtracking inside a parenthesized declarator.
5527 (cp_parser_parameter_declaration): Fix typo in comment.
5528
5529 2004-01-28 Jan Hubicka <jh@suse.cz>
5530
5531 * semantics.c (expand_body) Do emit_associated_thunks before
5532 expansion.
5533
5534 2004-01-27 Devang Patel <dpatel@apple.com>
5535
5536 * name-lookup.c: Include "debug.h"
5537 (do_namespace_alias): Invoke debug_hooks to emit debug info
5538 for namespace alias.
5539 (do_local_using_decl): Invoke debug_hooks to emit debug info
5540 for using decl.
5541 (do_class_using_decl): Same.
5542 (do_toplevel_using_decl): Same.
5543 (do_using_directive): Same.
5544 (cp_emit_debug_info_for_using): New function.
5545 * Make-lang.in (cp/parser.o): Depend on debug.h
5546 (cp/name-lookup.o): Same.
5547
5548 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5549
5550 * cp-tree.h (language_function, lang_type_header): Use
5551 BOOL_BITFIELD.
5552 * name-lookup.h (cp_binding_level): Likewise.
5553
5554 2004-01-26 Mark Mitchell <mark@codesourcery.com>
5555
5556 PR c++/13663
5557 * semantics.c (finish_for_expr): Check for unresolved overloaded
5558 functions.
5559
5560 * class.c (add_method): Just check processing_template_decl to
5561 determine whether or not we are within a template.
5562 * decl2.c (maybe_retrofit_in_chrg): Likewise.
5563 * init.c (decl_constant_value): Check the type of the declaration,
5564 not TREE_READONLY.
5565 * name-lookup.c (maybe_push_to_top_level): Rename to ...
5566 (push_to_top_level): ... this.
5567 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
5568 * pt.c (push_template_decl_real): Reorder condition for speed.
5569 (convert_template_argument): Use dependency-checking functions in
5570 place of uses_template_parms.
5571 (lookup_template_class): Avoid calling uses_template_parms more
5572 than once.
5573 (uses_template_parms): Reimplement, using dependency-checking
5574 functions.
5575 (instantiate_class_template): Use push_to_top_level, not
5576 maybe_push_to_top_level.
5577 (type_unification_real): Simplify.
5578 (type_dependent_expression_p): Handle OFFSET_REFs and
5579 TEMPLATE_DECLs.
5580 (any_dependent_template_arguments_p): Handle multiple levels of
5581 template argument.
5582 * semantics.c (expand_or_defer_fn): Do not check
5583 uses_template_parms for template instantiations.
5584 * typeck.c (comptypes): Avoid calling cp_type_quals.
5585
5586 2004-01-25 Mark Mitchell <mark@codesourcery.com>
5587
5588 PR c++/13833
5589 * call.c (build_over_call): Do not convert arguments when
5590 processing a template.
5591 * pt.c (build_non_dependent_expr): Do not build a
5592 NON_DEPENDENT_EXPR for arithmetic constants.
5593
5594 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5595
5596 PR c++/13810
5597 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
5598 returns a TYPE_DECL. no further lookup is required.
5599 * semantics.c (check_template_template_default_arg): A TYPE_DECL
5600 is invalid. Rework to give better diagnostics.
5601
5602 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5603
5604 PR c++/13797
5605 * pt.c (instantiate_class_template): Add an error_mark_node
5606 check.
5607 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
5608
5609 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
5610
5611 PR c++/13701
5612 * decl.c (finish_function): Move the call to
5613 finish_fname_decls below the call to
5614 finish_eh_spec_block.
5615
5616 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5617
5618 * optimize.c, typeck2.c: Update copyright.
5619
5620 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
5621
5622 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
5623 init.c, mangle.c, typeck.c: Update copyright.
5624
5625 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5626
5627 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
5628
5629 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5630
5631 * Make-lang.in: Replace $(docdir) with doc.
5632 (c++.info, c++.srcinfo): Dummy entry.
5633 (c++.man, c++.srcman): New rules.
5634 (c++.install-man): Revamp rule.
5635
5636 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5637
5638 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
5639 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
5640 immediate $(shell) instead of deferred backquote.
5641
5642 2004-01-19 Mark Mitchell <mark@codesourcery.com>
5643
5644 PR c++/13651
5645 * parser.c (cp_parser_postfix_expression): When encountering
5646 incomplete type on left-hand side of "->" or ".", treat the entire
5647 expression as erroneous.
5648
5649 PR c++/13592
5650 * call.c (build_field_call): Remove.
5651 (n_build_method_call): Likewise.
5652 (build_method_call): Likewise.
5653 (build_new_method_call): Do not call build_field_call.
5654 * class.c (n_build_method_call): Remove.
5655 (print_class_statistics): Do not print it.
5656 * cp-tree.h (build_method_call): Remove declaration.
5657 (finish_object_call_expr): Likewise.
5658 (build_new_1): Do not use build_method_call.
5659 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
5660 when the function appearing on the right-hand-side of "." or "->"
5661 is not actually a function.
5662 * pt.c (tsubst_copy_and_build): Likewise.
5663 * semantics.c (finish_object_call_expr): Remove.
5664
5665 2004-01-18 Mark Mitchell <mark@codesourcery.com>
5666
5667 PR c++/13710
5668 * pt.c (tsubst): Use finish_typeof.
5669
5670 2004-01-18 Jason Merrill <jason@redhat.com>
5671
5672 PR c++/11725
5673 * except.c (build_throw): In a template, set
5674 current_function_returns_abnormally.
5675
5676 2004-01-17 Fred Fish <fnf@intrinsity.com>
5677
5678 PR c++/11895
5679 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
5680 except don't call array_type_nelts() with a VECTOR_TYPE.
5681
5682 2004-01-16 Jan Hubicka <jh@suse.cz>
5683
5684 * mangle.c (write_mangled_name): Remove inline modifier.
5685
5686 2004-01-16 Mark Mitchell <mark@codesourcery.com>
5687
5688 PR c++/13574
5689 * decl.c (compute_array_index_type): Fix grammar in comment.
5690 * init.c (build_zero_init): Handle zero-sized arrays correctly.
5691
5692 PR c++/13178
5693 * call.c (name_as_c_string): Print conversion operator names
5694 correctly.
5695
5696 PR c++/13478
5697 * call.c (initialize_reference): Pass -1 for inner parameter to
5698 convert_like_real.
5699
5700 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5701
5702 PR c++/13407
5703 * parser.c (cp_parser_base_specifier): Check for an invalid
5704 keyword `typename' and emit an user-friendly error message.
5705
5706 2004-01-15 Geoffrey Keating <geoffk@apple.com>
5707
5708 PR pch/13361
5709 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
5710 (handle_pragma_implementation): Likewise.
5711
5712 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5713
5714 PR c++/9259
5715 * typeck.c (build_class_member_access_expr): Allow to access members
5716 of the currently open class.
5717 (finish_class_member_access_expr): Likewise.
5718
5719 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
5720
5721 PR c++/13659
5722 * name-lookup.c (validate_nonmember_using_decl): Take scope and
5723 name by value, instead of computing them.
5724 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
5725 arguments. Pass them to validate_nonmember_using_decl.
5726 * name-lookup.h (do_local_using_decl): Adjust.
5727 (do_toplevel_using_decl): Likewise.
5728 * parser.c (cp_parser_using_declaration): Likewise.
5729 * pt.c (tsubst_expr): Likewise.
5730
5731 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
5732
5733 PR c++/13594
5734 PR c++/13658
5735 * name-lookup.c (qualified_lookup_using_namespace): Search
5736 strongly-associated namespaces first, and only then try other
5737 namespaces.
5738
5739 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
5740
5741 * Make-lang.in (c++.srcextra): Dummy entry.
5742
5743 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5744
5745 PR c++/8856
5746 * parser.c (cp_parser_template_name): Don't try to parse a
5747 conversion-function-id, as it cannot be a template-name.
5748 (cp_parser_simple_type_specifier): Check for invalid template-ids
5749 even after a built-in type.
5750
5751 2004-01-14 Jan Hubicka <jh@suse.cz>
5752
5753 PR c++/12850
5754 * pt.c (instantiate_decl): Do not increase function_depth.
5755
5756 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
5757
5758 PR c++/9021
5759 PR c++/11005
5760 * parser.c (cp_parser_elaborated_type_specifier): Warn about
5761 attributes and discard.
5762 * decl.c (xref_tag): Don't overwite existing attributes with
5763 NULL_TREE.
5764
5765 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5766
5767 PR c++/12335
5768 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
5769 is no destructor while looking up a BIT_NOT_EXPR.
5770
5771 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
5772
5773 * cxxfilt.c: Remove unused file.
5774
5775 2004-01-14 Jan Hubicka <jh@suse.cz>
5776
5777 Partial fix to PR c++/12850
5778 * decl2.c (mark_used): Do not proactively instantiate templates
5779 when compiling in unit-at-a-time or not optimizing.
5780 * optimize.c (maybe_clone_body): Do not increase function depth.
5781
5782 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5783
5784 PR c++/13474
5785 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
5786
5787 2004-01-12 Steven Bosscher <stevenb@suse.de>
5788
5789 PR c++/13558
5790 * parser.c (cp_parser_member_declaration): Any non-type is also
5791 not a class or a function.
5792
5793 2004-01-12 Jason Merrill <jason@redhat.com>
5794
5795 PR c++/12815
5796 * class.c (build_base_path): Do not mark vtable references as
5797 TREE_CONSTANT.
5798 (build_vtbl_ref_1): Likewise.
5799
5800 2004-01-12 Richard Henderson <rth@redhat.com>
5801
5802 PR opt/10776
5803 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
5804 (store_init_value): Use it.
5805 * decl.c (check_initializer): Expect full initialization code
5806 from store_init_value.
5807 * init.c (expand_aggr_init_1): Likewise.
5808 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
5809
5810 2004-01-12 Mark Mitchell <mark@codesourcery.com>
5811
5812 * class.c (layout_class_type): For non-POD class types, also copy
5813 the DECL_SIZE and DECL_MODE of fields to the base class type.
5814
5815 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5816
5817 PR c++/13289
5818 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
5819 calling regenerate_decl_from_template.
5820
5821 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
5822
5823 PR c++/4100
5824 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
5825 decl-specifier occurring along with a class definition.
5826
5827 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
5828
5829 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
5830 clauses to comments describing declares_class_or_enum.
5831 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
5832 false.
5833
5834 2004-01-12 Jan Hubicka <jh@suse.cz>
5835
5836 * pt.c (for_each_template_parm): Do not check for duplicates.
5837 (for_each_template_parm): Use walk_tree duplicate checking code.
5838
5839 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
5840
5841 PR c++/3478
5842 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
5843 is error_mark_node, don't add any more decl_specs.
5844 (cp_parser_init_declarator): After committing to a declaration, if
5845 the decl_specifiers start with error_mark_node, issue an error and
5846 change the type to "int".
5847
5848 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
5849
5850 PR bootstrap/7817
5851 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
5852
5853 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5854
5855 DR 337
5856 PR c++/9256
5857 * pt.c (tsubst): Substitution must fail if we are attempting to
5858 create an array with element type that is an abstract class type.
5859 * decl.c (cp_finish_decl): Strip pointers and array types recursively
5860 before calling abstract_virtuals_error.
5861
5862 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
5863
5864 * name-lookup.c (qualified_lookup_using_namespace): Consider
5865 strong using directives even if we've already found a binding.
5866
5867 2004-01-09 Mark Mitchell <mark@codesourcery.com>
5868
5869 * cp-tree.h (cxx_expand_expr): Change prototype.
5870 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
5871
5872 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5873
5874 PR c++/12573
5875 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
5876 looking into them recursively. They can be there because of the
5877 new __offsetof__ extension.
5878
5879 2004-01-07 Zack Weinberg <zack@codesourcery.com>
5880
5881 * parser.c (cp_parser_save_member_function_body): Mark the
5882 definition static.
5883
5884 2004-01-05 Mark Mitchell <mark@codesourcery.com>
5885
5886 PR c++/13057
5887 * class.c (build_clone): Copy type attributes from the original
5888 function to the clone.
5889
5890 PR c++/12815
5891 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
5892 references as constant.
5893
5894 PR c++/12132
5895 * parser.c (cp_parser_explicit_instantiation): Improve error
5896 recovery.
5897 (cp_parser_require): Improve indication of the error location.
5898
5899 PR c++/13451
5900 * parser.c (cp_parser_class_head): Reorder logic to check for
5901 invalid qualification.
5902
5903 2004-01-04 Mark Mitchell <mark@codesourcery.com>
5904
5905 PR c++/13157
5906 * name-lookup.c (lookup_using_namespace): Remove spacesp
5907 parameter.
5908 (unqualified_namespace_lookup): Likewise.
5909 (lookup_qualified_name): Adjust accordingly.
5910 (lookup_name_real): Likewise.
5911 (lookup_arg_dependent): Do not eliminate the namespace of the
5912 functions found by unqualified name lookup unless that is the
5913 current namespace.
5914
5915 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
5916
5917 * semantics.c (push_deferring_access_checks): Fix format.
5918 (resume_deferring_access_checks): Likewise.
5919 (stop_deferring_access_checks): Likewise.
5920 (pop_deferring_access_checks): Likewise.
5921 (get_deferred_access_checks): Likewise.
5922 (pop_to_parent_deferring_access_checks): Likewise.
5923 (perform_deferred_access_checks): Likewise.
5924 (perform_or_defer_access_check): Likewise.
5925
5926 2004-01-04 Richard Henderson <rth@redhat.com>
5927
5928 * call.c (build_over_call): Don't create a save_expr of an
5929 aggregate, but rather its address.
5930
5931 2004-01-04 Mark Mitchell <mark@codesourcery.com>
5932
5933 PR c++/13529
5934 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
5935 an offsetof expression.
5936
5937 * parser.c (cp_parser_parameter_declaration): Fix comment.
5938
5939 PR c++/12226
5940 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
5941 (reference_binding): Set it when appropriate.
5942 (build_temp): New function, split out from ...
5943 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
5944 (initialize_reference): Likewise.
5945
5946 PR c++/13536
5947 * parser.c (cp_parser): Add in_type_id_in_expr_p.
5948 (cp_parser_new): Initialize it.
5949 (cp_parser_postfix_expression): Set it.
5950 (cp_parser_sizeof_operand): Likewise.
5951 (cp_parser_parameteR_declaration): Do not commit early to tenative
5952 parsers when in_type_id_in_expr_p is set.
5953
5954 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5955
5956 PR c++/13094
5957 * parser.c (cp_parser_template_argument): Don't call
5958 make_unbound_class_template directly.
5959 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
5960 UNBOUND_CLASS_TEMPLATE tree node.
5961
5962 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
5963
5964 PR target/12729
5965 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
5966
5967 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5968
5969 PR c++/13520
5970 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
5971 (DECL_FUNCTION_TEMPLATE_P): Use it.
5972 (DECL_CLASS_TEMPLATE_P): Likewise.
5973 * parser.c (cp_parser_lookup_name): Add is_template parameter.
5974 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
5975 (cp_parser_template_name): Likewise.
5976 (cp_parser_elaborated_type_specifier): Likewise.
5977 (cp_parser_namespace_name): Likewise.
5978 (cp_parser_class_name): Likewise.
5979 (cp_parser_lookup_name_simple): Likewise.
5980
5981 See ChangeLog.3 for earlier changes.