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