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