pt.c, typeck.c: Remove spurious carriage returns.
[gcc.git] / gcc / cp / ChangeLog
1 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
2
3 * pt.c, typeck.c: Remove spurious carriage returns.
4
5 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6
7 PR c++/14429
8 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
9 when the type of ARG is not dependent.
10
11 2004-07-26 Geoffrey Keating <geoffk@apple.com>
12
13 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
14 (lang_specific_driver): If the C++ or math library options don't
15 start with '-l', don't count them as added libraries.
16
17 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
18
19 * decl.c (xref_basetypes): Adjust base access vector creation.
20 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
21 access accesses.
22 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
23
24 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
25 Brian Ryner <bryner@brianryner.com>
26
27 PR c++/15000
28 PR c++/9283
29 * class.c (check_field_decls): Apply hidden visibility if
30 -fvisibility-inlines-hidden and inlined unless otherwise specified
31 (build_vtable): Set vtable visibility to class visibility.
32 (check_field_decls): Default static member visibility to class
33 visibility.
34 (check_methods): Default method visibility to class visibility.
35 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
36 CLASSTYPE_VISIBILITY_SPECIFIED macro.
37 * decl.c (duplicate_decls): New logic for merging definition decls
38 with declaration decls. Added ignore & warning when non default
39 applied to global operator new or delete.
40 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
41 wherever VISIBILITY was changed
42 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
43 visibility.
44 (tinfo_base_init): Set typeinfo name visibility to class visibility.
45
46 2004-07-25 Bernardo Innocenti <bernie@develer.com>
47
48 * decl.c: Rename all identifiers named `class' to `cl'.
49 * cp-tree.h: Likewise.
50
51 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
52
53 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
54 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
55 * name-lookup.c (binding_entry_make): Use GGC_NEW.
56 (binding_table_construct): Use GGC_CNEWVEC.
57 (binding_table_new): Use GGC_NEW.
58 (cxx_binding_make): Likewise.
59 (begin_scope): Likewise.
60 (push_to_top_level): Use GCC_CNEW.
61 * parser.c (cp_token_cache_new): Likewise.
62 (cp_token_cache_push_token): Likewise.
63 (cp_lexer_new_main): Likewise.
64 (cp_lexer_new_from_tokens): Likewise.
65 (cp_parser_context_new): Likewise.
66 (cp_parser_new): Likewise.
67 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
68 * lex.c (cxx_make_type): Use GGC_CNEW.
69 (retrofit_lang_decl): Use GGC_NEWVAR.
70 (cxx_dup_lang_specific_decl): Likewise.
71 (copy_lang_type): Likewise.
72 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
73 (save_function_data): Likewise.
74 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
75 (cxx_push_function_context): Likewise.
76
77 2004-07-25 Richard Henderson <rth@redhat.com>
78
79 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
80 DECL_IGNORED_P on RESULT_DECL.
81 * semantics.c (finalize_nrv): Copy them too.
82
83 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
84
85 * search.c (lookup_conversion_operator): Avoid two loops.
86 (add_conversions): Remove.
87 (check_hidden_convs, split_conversions,
88 lookup_conversions_r): New.
89 (lookup_conversions): Use lookup_conversions_r.
90
91 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
92
93 * pt.c (get_template_base): Check type is completable.
94
95 2004-07-21 Eric Christopher <echristo@redhat.com>
96
97 * decl.c (poplevel): Inline unused variable checking.
98 Change formatting.
99
100 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
101
102 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
103 integer vectors.
104
105 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
106
107 PR c++/14497
108 * pt.c (check_explicit_specialization): Remove extension to accept
109 specializations without template headers. Fall-through to normal
110 processing.
111
112 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
113
114 PR c++/509
115 * pt.c (determine_specialization): New parameter template_count.
116 Disambiguate between member templates and member functions counting
117 the template headers.
118 (check_explicit_specialization): Update caller.
119 (tsubst_friend_function): Likewise.
120
121 2004-07-20 Steven Bosscher <stevenb@suse.de>
122
123 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
124 * cp-tree.h (tinst_level_t): New tree type.
125 (union lang_tree_node): Handle it.
126 (TINST_LOCATION): New accessor macro.
127 (make_tinst_level): New prototype.
128 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
129 * decl.c (cp_tree_node_structure): Likewise.
130 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
131 (print_instantiation_partial_context): Likewise.
132 * pt.c (pop_tinst_level): Likewise.
133 (push_tinst_level): Use make_tinst_level.
134 * tree.c (make_tinst_level): New function.
135 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
136
137 2004-07-20 Mark Mitchell <mark@codesourcery.com>
138
139 * parser.c (cp_parser_simple_type_specifier): Fix typo.
140
141 PR c++/16637
142 * parser.c (cp_parser_simple_type_specifier): Do not record usage
143 of globally-qualified names.
144
145 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
146
147 PR c++/16175
148 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
149 cv qualifier.
150
151 2004-07-19 Mark Mitchell <mark@codesourcery.com>
152
153 PR c++/16623
154 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
155 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
156 * class.c (add_implicitly_declared_members): Use
157 CLASSTYPE_LAZY_ASSIGNMENT_OP.
158 * method.c (lazily_declare_fn): Clear
159 CLASSTYPE_LAZY_ASSIGNMENT_OP.
160 * search.c (lookup_fnfields_1): Check it.
161
162 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
163
164 * cp-tree.h (vec_binfo_member): Remove.
165 * tree.c (vec_binfo_member): Remove.
166
167 * cp-tree.h (struct lang_type_class): Remove vfields field.
168 (CLASSTYPE_VFIELDS): Remove.
169 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
170 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
171 handling.
172 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
173 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
174 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
175
176 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
177
178 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
179 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
180 Moved to common.
181 (BINFO_LANG_SLOTS): Remove.
182 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
183 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
184 * class.c (check_bases): Adjust BINFO accessors.
185 (determine_primary_base, finish_struct_bits,
186 maybe_warn_about_overly_private_class, warn_hidden,
187 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
188 warn_about_ambiguous_bases, get_vfield_name,
189 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
190 add_vcall_offset_vtbl_entries_r): Likewise.
191 * dump.c (cp_dump_tree): Likewise.
192 * init.c (sort_mem_initializers, expand_member_init, build_delete,
193 push_base_cleanups): Likewise.
194 * method.c (do_build_copy_constructor, do_build_assign_ref,
195 synthesize_exception_spec): Likewise.
196 name-lookup.c (arg_assoc_class): Likewise.
197 * pt.c (instantiate_class_template,
198 get_template_base_recursive): Likewise.
199 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
200 * typeck2.c (process_init_constructor): Likewise.
201 * search.c (lookup_base_r, dynamic_cast_base_recurse,
202 dfs_access_in_type, dfs_walk_real, look_for_overrides,
203 types_overlap_p, copied_binfo, original_binfo): Likewise.
204 (binfo_for_vtable): Remove
205
206 2004-07-20 Steven Bosscher <stevenb@suse.de>
207
208 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
209 thunk_alias, and the access and virtual_offset fields.
210 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
211 * decl.c (finish_case_label): Update c_add_case_node call.
212
213 2004-07-19 Mark Mitchell <mark@codesourcery.com>
214
215 Revert patch for PR c++/16623.
216
217 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
218
219 * except.c: Remove two spurious carriage returns.
220
221 2004-07-19 Mark Mitchell <mark@codesourcery.com>
222
223 PR c++/16623
224 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
225 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
226 * class.c (add_implicitly_declared_members): Use
227 CLASSTYPE_LAZY_ASSIGNMENT_OP.
228 * method.c (lazily_declare_fn): Clear
229 CLASSTYPE_LAZY_ASSIGNMENT_OP.
230 * search.c (lookup_fnfields_1): Check it.
231
232 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
233
234 * class.c (add_method): Delay adding the slot until the end.
235 (determine_primary_base): Adjust VEC_iterate invokation.
236 (resort_type_method_vec, finish_struct_methods, warn_hidden,
237 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
238 build_vtbl_initializer): Likewise.
239 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
240 build_vbase_delete): Likewise.
241 * method.c (do_build_copy_constructor): Likewise.
242 * name-lookup.c (new_class_binding, print_binding_level,
243 poplevel_class, store_class_bindings, push_to_top_level,
244 pop_from_top_level): Likewise.
245 * pt.c (check_explicit_specialization): Likewise.
246 * search.c (lookup_conversion_operator, lookup_fnfields_1,
247 get_pure_virtuals, add_conversions, dfs_check_overlap,
248 binfo_for_vbase): Likewise.
249
250 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
251
252 PR c++/12170
253 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
254 innermost set of template arguments during deduction. Simplify.
255
256 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
257
258 * typeck.c (build_modify_expr, build_x_modify_expr): Set
259 TREE_NO_WARNING on assignments with an operator other than '='.
260
261 2004-07-10 Steven Bosscher <stevenb@suse.de>
262 Joseph S. Myers <jsm@polyomino.org.uk>
263
264 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
265 * decl2.c (grokfield): Don't check current_class_depth via
266 unused TREE_COMPLEXITY.
267 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
268 to avoid the missing parentheses warning.
269 Don't set C_SET_EXP_ORIGINAL_CODE.
270
271 2004-07-18 Mark Mitchell <mark@codesourcery.com>
272
273 * tree.c (no_linkage_helper): Remove.
274 (no_linkage_check): Don't use walk_tree_without_duplicates.
275
276 * mangle.c (write_expression): Issue a sorry for zero-operand
277 functional casts.
278
279 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
280
281 PR c++/13092
282 * init.c (build_offset_ref): Build SCOPE_REF with non-null
283 TREE_TYPE for non-dependent names.
284 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
285 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
286 unknown_type_node as its TREE_TYPE.
287 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
288 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
289 (dump_expr) <SCOPE_REF case>: Likewise.
290
291 2004-07-17 Jason Merrill <jason@redhat.com>
292
293 PR c++/16115
294 * call.c (type_passed_as): Make the invisible reference type
295 __restrict.
296 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
297 cp_genericize_r. Handle invisible reference lowering.
298 (is_invisiref_parm): New fn.
299 (cp_genericize): Adjust the types of invisible reference parms.
300 Don't repeat the walk for clones.
301 * decl.c (store_parm_decls): Don't generate any code for clones.
302
303 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
304
305 * cp-tree.h (builtin_function): Declare.
306
307 2004-07-16 Mark Mitchell <mark@codesourcery.com>
308
309 * class.c (finish_struct_methods): Remove unncessary code.
310 (add_implicitly_declared_members): Create declarations for default
311 constructors and copy constructors lazily.
312 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
313 lazy_copy_ctor.
314 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
315 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
316 * decl2.c (check_classfn): Robustify.
317 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
318 (locate_ctor): Handle lazy default constructors.
319 (locate_copy): Handle lazy copy constructors.
320 (implicitly_declare_fn): Make sure we're looking at the
321 TYPE_MAIN_VARIANT for a class before creating functions. Don't
322 set TYPE_HAS_CONSTRUCTOR.
323 (lazily_declare_fn): New function.
324 * name-lookup.c (constructor_name_full): Simplify.
325 * search.c (lookup_fnfields_1): Lazily create methods, as
326 necessary.
327 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
328
329 2004-07-16 Steven Bosscher <stevenb@suse.de>
330
331 * cp-tree.h (struct lang_type): Don't have three GTY options on a
332 single bit GTY desc.
333
334 2004-07-16 Richard Henderson <rth@redhat.com>
335
336 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
337 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
338 * tree.c (cp_copy_res_decl_for_inlining): Remove.
339
340 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
341
342 * class.c (finish_struct_bits): Use for loop.
343 (propagate_binfo_offsets): Do primary binfo outside of loop.
344
345 PR c++/16583
346 * dump.c (cp_dump_tree): Don't dump the bases if there's no
347 binfo.
348
349 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
350
351 2004-07-15 Mark Mitchell <mark@codesourcery.com>
352
353 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
354 has_abstract_assign_ref. Make methods a VEC(tree) *.
355 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
356 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
357 (CLASSTYPE_DESTRUCTORS): Likewise.
358 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
359 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
360 (add_method): Change prototoype.
361 * class.c (add_method): Remove error_p parameter. Adjust for
362 changes to CLASSTYPE_METHOD_VEC.
363 (handle_using_decl): Adjust call to add_method.
364 (maybe_warn_about_overly_private_class): Adjust for
365 changes to CLASSTYPE_METHOD_VEC.
366 (resort_type_method_vec): Likewise.
367 (finish_struct_methods): Likewise.
368 (check_for_override): Likewise.
369 (warn_hidden): Likewise.
370 (add_implicitly_declared_members): Defer creation of assignment
371 operators. Adjust call to add_method.
372 (clone_function_decl): Adjust call to add_method.
373 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
374 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
375 * decl.c (grok_special_member_properties): Don't set
376 TYPE_HAS_ABSTRACT_ASSIGN_REF.
377 * decl2.c (check_classfn): Adjust for
378 changes to CLASSTYPE_METHOD_VEC.
379 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
380 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
381 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
382 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
383 cp_finish_decl.
384 * pt.c (check_explicit_specialization): Adjust for
385 changes to CLASSTYPE_METHOD_VEC.
386 (instantiate_class_template): Do not set
387 TYPE_HAS_ABSTRACT_ASSIGN_REF.
388 * ptree.c (cxx_print_type): Don't try to print
389 CLASSTYPE_METHOD_VEC.
390 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
391 * search.c (lookup_field_r): Adjust for
392 changes to CLASSTYPE_METHOD_VEC.
393 (lookup_fnfields): Likewise.
394 (lookup_conversion_operator): Likewise.
395 (lookup_fnfields_1): Likewise. Create assignment operators
396 lazily.
397 (look_for_overrides_here): Adjust for
398 changes to CLASSTYPE_METHOD_VEC.
399 (add_conversions): Likewise.
400 * semantics.c (finish_member_declaration): Adjust call to add_method.
401
402 2004-07-15 Jason Merrill <jason@redhat.com>
403
404 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
405 references and pointers are compatible.
406
407 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
408
409 * decl.c (xref_basetypes): Refactor.
410 * tree.c (copy_base_binfos): Replace with ...
411 (copy_binfo): ... this. Deep copy the given binfo, (not the just
412 bases of the given base).
413 * cp-tree.h (copy_base_binfo): Remove.
414 (copy_binfo): Declare.
415
416 2004-07-15 Mark Mitchell <mark@codesourcery.com>
417
418 * name-lookup.c (set_inherited_value_binding_p): Add class_type
419 parameter.
420 (get_class_binding): Adjust.
421 (push_class_level_binding): Don't use set_inherited_value_binding_p.
422
423 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
424
425 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
426 * decl.c (xref_basetypes): Set it here.
427
428 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
429 Don't check for incomplete base.
430 (get_vfield_name): Simplify while loop.
431 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
432
433 2004-07-14 Mark Mitchell <mark@codesourcery.com>
434
435 * lex.c (cxx_make_type): Remove call to get_pointer_type.
436
437 * cp-tree.h (IDENTIFIER_VALUE): Remove.
438 (BINFO_PUSHDECLS_MARKED): Likewise.
439 (maybe_inject_for_scope_var): Likewise.
440 (push_class_decls): Likewise.
441 * name-lookup.h (push_class_binding): Remove.
442 (innermost_non_namespace_value): New function.
443 (outer_binding): Likewise.
444 * class.c (add_method): Push bindings before adding to
445 TYPE_METHODS.
446 (restore_class_cache): Do not restore class_shadowed.
447 (pushclass): Do not add USING_DECLs. Do not call
448 push_class_decls.
449 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
450 * decl.c (pushdecl): Use outer_binding.
451 (poplevel): Set the scope for an out-of-scope for-loop declaration
452 appropriately.
453 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
454 * name-lookup.c (new_class_binding): New function.
455 (push_binding): Use it.
456 (pushdecl): Use innermost_non_namespace_value.
457 (maybe_inject_for_scope_var): Remove.
458 (push_class_binding): Remove.
459 (set_inherited_value_binding_p): New function.
460 (get_class_binding): New function.
461 (push_class_level_binding): Assert that the current_class_type is
462 being defined.
463 (outer_binding): New function.
464 (innermost_non_namespace_value): Likewise.
465 (lookup_name_real): Use outer_binding.
466 (lookup_name_current_level): Ignore out-of-scope variables.
467 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
468 (lookup_template_class): Likewise.
469 * search.c (dfs_push_type_decls): Remove.
470 (dfs_push_decls): Likewise.
471 (setup_class_bindings): Likewise.
472 (lookup_field_1): Handle USING_DECLs from dependent scopes.
473 (marked_pushdecls_p): Remove.
474 (unmarked_pushdecls_p): Remove.
475 (marked_identifiers): Remove.
476 (setup_class_bindings): Remove.
477 (dfs_push_type_decls): Remove.
478 (dfs_push_decls): Remove.
479 (push_class_decls): Remove.
480
481 2004-07-13 Mark Mitchell <mark@codesourcery.com>
482
483 PR c++/16518
484 PR c++/16337
485 * decl.c (grokvardecl): Make declspecs parameter const.
486 (grokdeclarator): Likewise. Adjust accordingly.
487 * decl.h (grokdeclarator): Adjust declaration.
488 * parser.c (cp_parser_init_declarator): Do not clear
489 decl_specifiers->attributes.
490
491 * cp-tree.h (lang_identifier): Remove class_value.
492 (IDENTIFIER_CLASS_VALUE): Remove.
493 (pop_class_decls): Likewise.
494 (init_search_processing): Likewise.
495 * class.c (handle_using_decl): Use lookup_member, not
496 IDENTIFIER_CLASS_VALUE.
497 (restore_class_cache): New function, split out from ...
498 (pushclass): ... here. Do not call clear_identifier_class_values.
499 (invalidate_class_lookup_cache): Do not clear
500 IDENTIFIER_CLASS_VALUE.
501 (popclass): Do not call pop_class_decls.
502 (maybe_note_name_used_in_class): Do not save names looked up after
503 the class is complete. Use lookup_member, not
504 IDENTIFIER_CLASS_VALUE.
505 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
506 * decl.c (cxx_init_decl_processing): Do not call
507 init_search_processing.
508 * method.c (do_build_copy_constructor): Remove unnecessary code.
509 (do_build_assign_ref): Likewise.
510 * name-lookup.c (pushdecl): Use lookup_member, not
511 IDENTIFIER_CLASS_VALUE.
512 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
513 type_shadowed list.
514 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
515 (push_class_binding): Do not set it.
516 (clear_identifier_class_values): Remove.
517 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
518 (store_binding): Do not save it.
519 (pop_from_top_level): Do not restore it.
520 * name-lookup.h (cxx_saved_binding): Remove class_value.
521 (clear_identifier_class_values): Remove.
522 * ptree.c (cxx_print_identifier): Do not print
523 IDENTIFIER_CLASS_VALUE.
524 * search.c (search_obstack): Remove.
525 (push_stack_level): Remove.
526 (pop_stack_level): Remove.
527 (search_level): Remove.
528 (search_stack): Remove.
529 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
530 (setup_class_bindings): Use IDENTIFIER_MARKED, not
531 IDENTIFIER_CLASS_VALUE.
532 (marked_identifiers): New variable.
533 (push_class_decls): Clear IDENTIFIER_MARKED.
534 (pop_class_decls): Don't call pop_search_level.
535 (init_search_processing): Remove.
536
537 2004-07-12 Mark Mitchell <mark@codesourcery.com>
538
539 * cp-tree.h (get_aggr_typedef): Remove.
540 * init.c (get_aggr_typedef): Likewise.
541
542 * name-lookup.c (push_class_level_binding): Simplify.
543
544 2004-07-12 Andrew Pinski <apinski@apple.com>
545
546 PR c++/16475
547 Revert:
548 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
549 PR c++/16276
550 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
551 is not public.
552
553 2004-07-12 Eric Christopher <echristo@redhat.com>
554
555 * parser.c (cp_parser_class_head): Remove unused variable.
556
557 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
558
559 * decl.c (grok_op_properties): Reject [de-]allocation functions
560 declared in a namespace, or declared as static.
561
562 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
563
564 * cp-tree.h (make_binfo): Remove.
565 * decl.c (xref_basetypes): Use make_tree_binfo directly.
566 * tree.h (copy_base_binfos): Likewise.
567 (make_binfo): Remove.
568
569 * call.c (build_user_type_conversion_1, build_new_op,
570 check_constructor_callable, build_temp,
571 perform_direct_initialization_of_possible): Pass type directly to
572 lookup_fnfields & build_special_member_call.
573 (build_special_member_call): Accept a type, and complete it.
574 * class.c (finish_stuct_bits): Copy the BINFOs here.
575 * cvt.c (ocp_convert): Pass type directly to
576 build_special_member_call.
577 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
578 (xref_basetypes): Allocate the binfo here. Adjust.
579 * init.c (build_init, build_new_1): Pass type directly to
580 build_special_member_call.
581 * lex.c (cxx_make_type): Do not allocate binfo here.
582 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
583 * parser.c (cp_parser_class_head): Always call xref_basetypes.
584 * pt.c (instantiate_class_template): Likewise. Inhibit access
585 checking for template friends.
586 * ptree.c (cxx_print_type): Adjust record printing.
587 * search.c (lookup_base): When taking a type, complete it before
588 looking for a binfo.
589 (lookup_member): Delay completing a type.
590 (push_class_decls): Don't walk an incomplete type.
591 (lookup_conversions): Likewise.
592 * semantics.c (finish_stmt_expr_expr): Pass type directly to
593 build_special_member_call.
594 * tree.c (copy_base_binfos): Adjust.
595 (make_binfo): Likewise.
596 * typeck.c (build_modify_expr): Pass type directly to
597 build_special_member_call.
598 * typeck2.c (process_init_constructor): Check a binfo exists.
599 (build_m_component_ref): Allow accessing an incomplete type.
600 (build_functional_cast): Pass type directly to
601 build_special_member_call.
602
603 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
604
605 PR c++/2204
606 * config-lang.in (gtfiles): Add typeck2.c.
607 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
608 gt-cp-typeck2.h.
609 * cp-tree.h: Declare complete_type_check_abstract.
610 * typeck2.c (pat_calc_hash, pat_compare,
611 complete_type_check_abstract): New functions.
612 (abstract_virtuals_error): If the type is abstract, register the
613 declaration within abstract_pending_vars for further checks.
614 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
615 * decl.c (cp_finish_decl): Do not strip array types.
616 (create_array_type_for_decl): Check for abstractness of the element
617 type.
618 (complete_vars): Call complete_type_check_abstract.
619 * class.c (finish_struct): Prepare a list of virtual functions for
620 template types, and call complete_vars on it to check for abstractness.
621
622 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
623
624 PR tree-optimization/14107
625 * decl.c (finish_function): Remove temporary band-aid.
626
627 2004-07-11 Mark Mitchell <mark@codesourcery.com>
628
629 * call.c (build_operator_new_call): Avoid using push_to_top_level.
630 (build_new_op): Adjust call to lookup_function_nonclass.
631 * name-lookup.c (identifier_type_value): Adjust call to
632 lookup_name_real.
633 (lookup_name_real): Add block_p parameter.
634 (lookup_name_nonclass): Adjust call to lookup_name_real.
635 (lookup_function_nonclass): Likewise.
636 (lookup_name): Likewise.
637 * name-lookup.h (lookup_name_real): Change prototype.
638 (lookup_name_nonclass): Likewise.
639 * parser.c (cp_parser_lookup_name): Likewise.
640
641 * cp-tree.h (saved_scope): Make old_bindings a vector.
642 (unuse_fields): Remove.
643 * name-lookup.h (cxx_saved_binding): Define it.
644 * class.c (pushclass): Don't use unuse_fields.
645 * name-lookup.c (cxx_saved_binding_make): Remove.
646 (store_binding): Add new bindings to a vector, using an
647 accumulator style, rather than adding them to a list.
648 (store_bindings): Adjust accordingly.
649 (store_class_bindings): Likewise.
650 (push_to_top_level): Likewise.
651 (pop_from_top_level): Likewise.
652 * optimize.c (maybe_clone_body): Must push_to_top_level and
653 pop_from_top_level calls outside of loop.
654 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
655 calls here from cp_parser_late_parsing_default_args.
656 (cp_parser_save_default_args): Record the class type in which the
657 function is declared.
658 (cp_parser_late_parsing_default_args): Do not call
659 push_nested_class/pop_nested_class.
660 * search.c (dfs_unuse_fields): Remove.
661 (unuse_fields): Remove.
662
663 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
664
665 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
666 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
667 * cp-tree.h (poplevel): Declare.
668 (set_block): Remove.
669 * decl.c (set_block): Remove.
670
671 2004-07-10 Mike Stump <mrs@apple.com>
672
673 * decl2.c (import_export_class): Never export/import vtables
674 with inline key functions.
675
676 2004-07-09 Steven Bosscher <stevenb@suse.de>
677
678 * typeck.c (c_expand_asm_operands): Remove.
679
680 2004-07-09 Mike Stump <mrs@apple.com>
681
682 * typeck.c (build_class_member_access_expr): Skip null deref
683 warning when we don't dereference it.
684
685 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
686
687 PR c++/8211
688 PR c++/16165
689 * class.c (check_field_decls): Improve -Weffc++ warning: do not
690 warn for pointers to functions/members, or for classes without
691 destructors.
692
693 2004-07-08 Mark Mitchell <mark@codesourcery.com>
694
695 * name-lookup.h (struct cp_binding_level): Update documentation
696 for class_shadowed.
697
698 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
699
700 PR c++/16169
701 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
702 returning CALL_EXPR, and non-reference return type.
703
704 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
705
706 * name-lookup.c (push_binding): Use VEC_reserve.
707
708 2004-07-08 Richard Henderson <rth@redhat.com>
709
710 * cp-tree.h (expand_eh_spec_block): Remove.
711
712 2004-07-07 Mark Mitchell <mark@codesourcery.com>
713
714 * cp-tree.h (saved_scope): Remove x_previous_class_type and
715 x_previous_class_values; add x_previous_class_level.
716 (previous_class_type): Remove.
717 (previous_class_values): Remove.
718 (previous_class_level): New macro.
719 * class.c (pushclass): Restore the identifier cache more
720 expeditiously.
721 (invalidate_class_lookup_cache): Use vector for class_shadowed and
722 previous_class_values.
723 * decl.c (poplevel): Likewise.
724 * name-lookup.c (cxx_binding_init): New function.
725 (cxx_binding_make): Use it.
726 (push_binding): For a binding in a class level, use a vector of
727 cp_class_binding nodes.
728 (push_binding_level): New function.
729 (begin_scope): Use it.
730 (leave_scope): Do not put class binding levels on the free list.
731 (print_binding_level): Adjust for the fact that class_shadowed is
732 a vector.
733 (poplevel_class): Likewise.
734 (clear_identifier_class_values): Likewise.
735 (push_class_level_binding): Likewise.
736 (set_class_shadows): Remove.
737 (store_binding): New function.
738 (store_class_bindings): New function.
739 (push_to_top_level): Use store_class_bindings as appropriate.
740 (pop_from_top_level): Use previous_class_level, not
741 previous_class_type.
742 * name-lookup.h (cp_class_binding): New type.
743 (cp_binding_level): Use a vector object for class_shadowed.
744 (push_binding_level): Declare.
745 (set_class_shadows): Remove.
746
747 2004-07-07 Andrew Pinski <apinski@apple.com>
748
749 * class.c (instantiate_type): BUFFER_REF is dead.
750 * lex.c (init_operators): IN_EXPR is dead.
751
752 2004-07-07 Jason Merrill <jason@redhat.com>
753
754 PR c++/16334
755 * call.c (build_new_op): Give overload warnings for built-in
756 candidates.
757
758 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
759
760 PR c++/16276
761 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
762 is not public.
763
764 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
765
766 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
767 * class.c (build_primary_vtable, check_bases,
768 determine_primary_base, finish_struct_bits,
769 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
770 get_basefndecls, warn_hidden, walk_subobject_offsets,
771 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
772 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
773 finish_struct_1, get_vfield_name, contains_empty_class_p,
774 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
775 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
776 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
777 BINFO macros.
778 * decl.c (xref_basetypes): Likewise.
779 * dump.c (cp_dump_tree): Likewise.
780 * error.c (dump_expr): Likewise.
781 * init.c (sort_mem_initializers, expand_member_init,
782 push_base_cleanups): Likewise.
783 * method.c (do_build_copy_constructor, do_build_assign_reg,
784 synthesize_exception_spec): Likewise.
785 * name-lookup.c (arg_assoc_class): Likewise.
786 * pt.c (instantiate_class_template, tsubst,
787 get_template_base_recursive): Likewise.
788 * ptree.c (cxx_print_type): Likewise.
789 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
790 * search.c (lookup_base_r, dynamic_cast_base_recurse,
791 dfs_access_in_type, access_in_type, lookup_field_queue_p,
792 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
793 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
794 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
795 binfo_for_vtable, copied_binfo, original_binfo): Likewise
796 * tree.c (copy_base_binfos, make_binfo): Likewise.
797 * typeck.c (commmon_base_type): Likewise
798 * typeck2.c (process_init_constructor): Likewise
799
800 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
801
802 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
803
804 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
805
806 PR c++/3671
807 * pt.c (convert_nontype_argument): Disallow conversions between
808 different enumeration types.
809
810 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
811
812 * cp-tree.h (BINFO_MARKED): Remove.
813 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
814 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
815 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
816 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
817 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
818 (mark_primary_bases, determine_primary_base, base_derived_from,
819 dfs_find_final_overrider, dfs_find_final_overrider_q,
820 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
821 dfs_modify_vtables, walk_subobject_offsets,
822 layout_nonempty_base_or_field, build_base_field,
823 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
824 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
825 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
826 build_ctor_vtbl_group, accumulate_vtble_inits,
827 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
828 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
829 add_vcall_offset_vtbl_entries_1): Likewise.
830 * decl.c (xref_basetypes): Incomming virtual base indicated by
831 TREE_TYPE. Adjust.
832 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
833 * init.c (finish_init_stmts, sort_mem_initializers,
834 emit_mem_initializers, build_vtble_address, expand_member_init,
835 push_base_cleanups): Likewise.
836 * method.c (do_build_copy_constructor): Likewise.
837 * pt.c (instantiate_class_template,
838 get_template_base_recursive): Likewise.
839 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
840 get_pseudo_ti_desc): Likewise.
841 * search.c (lookup_base_r, dynamic_cast_base_recurse,
842 binfo_from_vbase, binfo_via_virtual, copied_binfo,
843 original_binfo): Likewise.
844 * semantics.c (finish_base_specifier): Virtualness is indicated
845 by TREE_TYPE.
846 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
847
848 2004-07-06 Mark Mitchell <mark@codesourcery.com>
849
850 Revert:
851 2004-06-24 Jason Merrill <jason@redhat.com>
852 PR c++/16115
853 * decl.c (grokparms): Give the PARM_DECL reference type if the
854 parameter is passed by invisible reference.
855
856 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
857
858 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
859 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
860 * pt.c (check_instantiated_args, unify): Likewise.
861
862 2004-07-05 Phil Edwards <phil@codesourcery.com>
863
864 * Make-lang.in (check-c++, lang_checks): Add some comments.
865
866 2004-07-05 Zack Weinberg <zack@codesourcery.com>
867
868 * cp-mudflap.c: Delete file.
869 * Makefile.in: Remove all references to cp-mudflap.o.
870
871 2004-07-05 Zack Weinberg <zack@codesourcery.com>
872
873 * decl.c (cxx_init_decl_processing): Call
874 build_common_tree_nodes before creating the global NAMESPACE_DECL.
875
876 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
877
878 PR c++/2518
879 * call.c (build_operator_new_call): Look only at global scope.
880
881 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
882
883 * call.c (enforce_access): Expect TREE_BINFO.
884 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
885 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
886 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
887 Adjust.
888 (BINFO_LANG_ELTS): Remove.
889 (BINFO_LANG_SLOTS): New.
890 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
891 (CLASSTYPE_TEMPLATE_INFO): Adjust.
892 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
893 * search.c (lookup_member): Check TREE_BINFO.
894 * semantics.c (perform_or_defer_access_check): Likewise.
895 (check_accessibility_of_qualified_id): Check
896 deferred_access_no_check.
897 * tree.c (make_binfo): Use make_tree_binfo.
898
899 2004-07-04 Mark Mitchell <mark@codesourcery.com>
900
901 * method.c (implicitly_declare_fn): Set linkage of generated
902 functions.
903
904 2004-07-04 Richard Henderson <rth@redhat.com>
905
906 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
907
908 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
909
910 PR c++/3761
911 * name-lookup.c (push_class_level_binding): Don't pass a
912 TREE_LIST of ambiguous names to check_template_shadow as it
913 only handles declarations. Instead, pull the declaration
914 out and pass that.
915
916 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
917
918 PR c++/14971
919 * pt.c (check_explicit_specialization): Clarify error message.
920
921 2004-07-02 Richard Henderson <rth@redhat.com>
922
923 * tree.c (cp_unsave_r): Update remap_save_expr call.
924
925 2004-07-02 Mark Mitchell <mark@codesourcery.com>
926
927 PR c++/16240
928 * mangle.c (write_template_arg): Correct mangling.
929
930 PR c++/16297
931 * decl.c (grokdeclarator): Robustify.
932
933 2004-07-01 Richard Henderson <rth@redhat.com>
934
935 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
936 * method.c (synthesize_method): Don't clear_last_expr.
937 * name-lookup.c (maybe_push_cleanup_level): Likewise.
938
939 2004-07-01 Nick Clifton <nickc@redhat.com>
940
941 * decl2.c (import_export_class): Invoke the
942 import_export_class field in the gcc_target structure if it is not
943 empty.
944
945 2004-06-30 Richard Henderson (rth@redhat.com>
946
947 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
948 * method.c (use_thunk): Likewise.
949
950 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
951
952 * call.c (build_over_call), typeck.c (build_function_call): Call
953 check_function_arguments instead of check_function_format.
954
955 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
956
957 * call.c (build_over_call), typeck.c (build_function_call): Update
958 calls to check_function_format.
959
960 2004-06-30 Richard Henderson <rth@redhat.com>
961
962 * call.c (build_over_call): Use __builtin_memcpy for copying
963 CLASS_AS_BASE rather than funny casting.
964
965 2004-06-30 Richard Henderson <rth@redhat.com>
966
967 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
968 TYPE_SIZE_UNIT of full_type.
969
970 2004-06-30 Per Bothner <per@bothner.com>
971
972 Conditionally compile support for --enable-mapped_location.
973 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
974 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
975 adjustments - which I don't understand.
976 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
977 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
978 (print_instantiation_partial_context): Use expand_location.
979 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
980 * name-lookup.c: Likewise.
981 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
982 * name-lookup.c: Use input_line macro.
983 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
984 (cp_parser_statement): Rename locaal variable statement_locus to
985 statement_location and use SET_EXPR_LOCATION macro.
986 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
987 * tree.c (cp_walk_subtrees): Likewise.
988
989 2004-06-29 Per Bothner <per@bothner.com>
990
991 * tree.c (build_min_nt, build_min, build_min_non_dep):
992 Don't set TREE_COMPLEXITY from input_line.
993
994 2004-06-29 Paul Brook <paul@codesourcery.com>
995
996 * init.c: Include target.h.
997 (get_cookie_size): Remove and replace with target hook.
998 Update callers.
999 (build_new_1): Store the element size in the cookie.
1000
1001 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
1002
1003 PR c++/16260
1004 * parser.c (cp_parser_template_declaration_after_export): Disable
1005 access checks here ...
1006 (cp_parser_class_specifier): ... not here.
1007
1008 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1009
1010 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1011 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1012 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1013 TREE_CHECK macro.
1014
1015 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1016
1017 * cp-tree.h (struct deferred_access): Move to ...
1018 * semantics.c (struct deferred_access): ... here. Adjust.
1019 (deferred_access_stack): Make a VEC(deferred_access),
1020 (deferred_access_free_list): Remove.
1021 (deferred_access_no_check): New.
1022 (push_deferring_access_checks, resume_deferring_access_checks,
1023 stop_deferring_access_checks, pop_deferring_access_checks,
1024 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1025 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1026
1027 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1028
1029 PR c++/16174
1030 * call.c (build_temp): Declare.
1031 (check_constructor_callable): New.
1032 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1033 CONSTRUCTOR_CALLABLE.
1034 (convert_like_real, initialize_reference): Use
1035 check_constructor_callable.
1036 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1037 (LOOKUP_*): Renumber.
1038
1039 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1040
1041 * friend.c (add_friend): Only perform access checks when context
1042 is a class.
1043 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1044 * parser.c (cp_parser_class_specifier): Disable access checks here
1045 when parsing the body of a templated class.
1046 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1047 NULL binfos when not checking access.
1048
1049 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1050
1051 Use vector API for vbase list.
1052 * cp-tree.h: Include vec.h
1053 (DEF_VEC_P (tree)): New type.
1054 (struct lang_type_class): Change vbase's member type.
1055 (binfo_for_vbase): Declare.
1056 * class.c (determine_primary_base, base_derived_from,
1057 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1058 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1059 build_vtbl_initializer): Adjust.
1060 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1061 vbases.
1062 * init.c (sort_mem_initializers, expand_member_init,
1063 push_base_cleanups): Adjust.
1064 * method.c (do_build_copy_constructor): Adjust.
1065 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1066 (binfo_for_vbase): New.
1067 * tree.c (copy_base_binfos): Adjust.
1068
1069 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1070
1071 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1072
1073 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1074
1075 PR c++/14123
1076 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1077 paranthesis in case of pointers to array members.
1078 * error.c (dump_type_prefix): Likewise.
1079 (dump_type_suffix): Maybe issue a whitespace when printing
1080 ARRAY_TYPE.
1081
1082 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1083
1084 PR c++/16193
1085 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1086 redefinition of built-in types.
1087
1088 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1089
1090 * error.c (pp_template_argument_list_start): Remove.
1091 (pp_template_argument_list_end): Likewise.
1092 (pp_separate_with_comma): Use pp_cxx_separate_with.
1093 (reinit_global_formatting_buffer): Remove.
1094 (pp_non_consecutive_character): Likewise.
1095 (dump_scope): Use pp_cxx_colon_colon.
1096 (dump_template_parameter): Use pp_cxx_identifier,
1097 pp_cxx_tree_identifier and pp_cxx_whitespace.
1098 (dump_templat_bindings): Replace use of pp_string with sequence
1099 of pp_cxx_whitespace and pp_equal.
1100 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1101 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1102 padding here.
1103 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1104 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1105 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1106 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1107 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1108 (dump_decl): Likewise.
1109 (dump_template_decl): Likewise.
1110 (dump_function_decl): Likewise. Set padding as appropriate.
1111 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1112 pp_cxx_right_paren.
1113 (dump_exception_spec): Likewise.
1114 (dump_function_name): Use pp_cxx_tree_identifier and
1115 pp_cxx_identifier.
1116 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1117 pp_cxx_end_template_argument_list.
1118 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1119 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1120 pp_cxx_whitespace throughout.
1121 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1122 pp_cxx_right_paren.
1123 (dump_unary_op): Likewise.
1124 (reinit_cxx_pp): New function.
1125 (type_as_string); Use it.
1126 (expr_as_string): Likewise.
1127 (decl_as_string); Likewise.
1128 (context_as_string): Likewise.
1129 (lang_decl_name): Likewise.
1130 (decl_to_string): Likewise.
1131 (expr_to_string): Likewise.
1132 (parm_to_string): Likewise.
1133 (type_to_string): Likewise.
1134 (args_to_string): Likewise.
1135 (cv_to_string): Likewise.
1136
1137 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1138
1139 * cp-tree.h (cp_cv_quals): New type.
1140 (cp_declarator): Use it instead of "tree" as appropriate.
1141 (grok_method_quals): Adjust prototype.
1142 (grokclassfn): Likewise.
1143 (do_friend): Likewise.
1144 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1145 (grokdeclarator): Likewise.
1146 * decl2.c (grok_method_quals): Likewise.
1147 (grokclassfn): Likewise.
1148 * friend.c (do_friend): Likewise.
1149 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1150 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1151 (make_pointer_declarator): Likewise.
1152 (make_reference_declarator): Likewise.
1153 (make_ptrmem_declarator): Likewise.
1154 (cp_parser_ptr_operator): Likewise.
1155 (cp_parser_cv_qualifier_seq_opt): Likewise.
1156 (cp_parser_cv_qualifier_opt): Remove.
1157 (cp_parser_new_declarator_opt): Adjust call to
1158 cp_parser_ptr_operator.
1159 (cp_parser_conversion_declaration_opt): Likewise.
1160 (cp_parser_declarator): Use cp_cv_quals, not tree.
1161 (cp_parser_direct_declarator): Likewise.
1162
1163 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1164
1165 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1166 Rename DECL_STMT to DECL_EXPR.
1167 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1168 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1169 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1170
1171 2004-06-26 Jan Hubicka <jh@suse.cz>
1172
1173 PR C++/14865
1174 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1175 reachability analysis.
1176
1177 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1178
1179 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1180 2004-06-23 change.
1181
1182 2004-06-25 Paul Brook <paul@codesourcery.com>
1183
1184 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1185 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1186
1187 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1188
1189 * decl.c (grokdeclarator): Restore error messages about __thread.
1190 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1191
1192 2004-06-24 Jason Merrill <jason@redhat.com>
1193
1194 PR c++/16115
1195 * decl.c (grokparms): Give the PARM_DECL reference type if the
1196 parameter is passed by invisible reference.
1197
1198 2004-06-24 Andreas Schwab <schwab@suse.de>
1199
1200 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1201
1202 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1203
1204 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1205 (cp/decl.o): Likewise.
1206 (cp/decl2.o): Likewise.
1207 (cp/pt.o): Likewise.
1208 (cp/semantics.o): Likewise.
1209 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1210 * class.c: Do not include lex.h.
1211 (add_implicitly_declared_members): Do not use
1212 adding_implicit_members.
1213 (check_bases_and_members): Do not talk about grok_x_components.
1214 * cp/cp-tree.h (adding_implicit_members): Remove.
1215 (cp_storage_class): New type.
1216 (cp_decl_spec): Likewise.
1217 (cp_decl_specifier_seq): Likewise.
1218 (cp_parameter_declarator): Use it for the decl_specifiers field.
1219 (check_tag_decl): Adjust prototype.
1220 (shadow_tag): Likewise.
1221 (groktypename): Likewise.
1222 (start_decl): Likewise.
1223 (start_function): Likewise.
1224 (start_method): Likewise.
1225 (grok_x_components): Remove.
1226 (grokfield): Adjust prototype.
1227 (grokbitfield): Likewise.
1228 (finish_member_class_template): Remove.
1229 * decl.c: Do not include lex.h.
1230 (adding_implicit_members): Do not define.
1231 (check_tag_decl): Do not use trees to represent decl-specifiers.
1232 (shadow_tag): Likewise.
1233 (groktypename): Likewise.
1234 (start_decl): Likewise.
1235 (grokvardecl): Likewise.
1236 (grokdeclarator): Likewise.
1237 (grokparms): Likewise.
1238 (start_function): Likewise.
1239 (start_method): Likewise.
1240 * decl.h (grokdeclarator): Adjust prototype.
1241 * decl2.c: Do not include lex.h.
1242 (grok_x_components): Remove.
1243 (grokfield): Do not use trees to represent decl-specifiers.
1244 (grokbitfield): Likewise.
1245 * lex.c: Do not include lex.h.
1246 * lex.h: Remove.
1247 * parser.c: Include target.h.
1248 (clear_decl_specs): New function.
1249 (cp_parser_translation_unit): Do not use trees to represent
1250 decl-specifiers.
1251 (cp_parser_postfix_expression): Likewise.
1252 (cp_parser_new_type_id): Likewise.
1253 (cp_parser_condition): Likewise.
1254 (cp_parser_simple_declaration): Likewise.
1255 (cp_parser_decl_specifier_seq): Likewise.
1256 (cp_parser_function_specifier_opt): Likewise.
1257 (cp_parser_conversion_type_id): Likewise.
1258 (cp_parser_template_parameter): Likewise.
1259 (cp_parser_explicit_instantiation): Likewise.
1260 (cp_parser_type_specifier): Likewise.
1261 (cp_parser_simple_type_specifier): Likewise.
1262 (cp_parser_init_declarator): Likewise.
1263 (cp_parser_type_id): Likewise.
1264 (cp_parser_type_specifier_seq): Likewise.
1265 (cp_parser_parameter_declaration): Likewise.
1266 (cp_parser_member_declaration): Likewise.
1267 (cp_parser_exception_declaration): Likewise.
1268 (cp_parser_function_definition_from_specifiers_and_declarator):
1269 Likewise.
1270 (cp_parser_single_declaration): Likewise.
1271 (cp_parser_save_member_function_body): Likewise.
1272 (cp_parser_friend_p): Likewise.
1273 (cp_parser_set_storage_class): New function.
1274 (cp_parser_set_decl_spec_type): Likewise.
1275 * pt.c: Do not include lex.h.
1276 * semantics.c: Likewise.
1277 (finish_member_class_template): Remove.
1278
1279 2004-06-23 Roger Sayle <roger@eyesopen.com>
1280
1281 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1282 longer take both "args" and "convert_args" as arguments.
1283 (build_op_delete_call): Update call to build_cxx_call.
1284 (build_over_call): Likewise, update call to build_cxx_call.
1285 * cp-tree.h (build_cxx_call): Update funtion prototype.
1286 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1287 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1288 (throw_bad_typeid): Likewise.
1289 (build_dynamic_cast_1): Likewise.
1290
1291 2004-06-22 Richard Henderson <rth@redhat.com>
1292
1293 * class.c (build_vfn_ref): Take a pointer not object. Build
1294 an OBJ_TYPE_REF.
1295 (cp_fold_obj_type_ref): New.
1296 * call.c (build_over_call): Update build_vfn_ref call.
1297 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1298 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1299
1300 2004-06-21 Jason Merrill <jason@redhat.com>
1301
1302 PR c++/16112
1303 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1304 CLEANUP_POINT_EXPR.
1305
1306 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1307
1308 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1309 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1310 (TREE_PARMLIST): Likewise.
1311 (CALL_DECLARATOR_PARMS): Likewise.
1312 (CALL_DECLARATOR_QUALS): Likewise.
1313 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1314 (cp_declarator_kind): New type.
1315 (cp_parameter_declarator): Likewise.
1316 (cp_declarator): Likewise.
1317 (cp_error_declarator): Likewise.
1318 (no_parameters): Likewise.
1319 (groktypename): Change prototype.
1320 (start_decl): Likewise.
1321 (start_handler_parms): Likewise.
1322 (get_scope_of_declarator): Likewise.
1323 (start_function): Likewise.
1324 (start_preparsed_function): New function.
1325 (start_function): Change prototype.
1326 (start_method): Likewise.
1327 (grokfield): Likewise.
1328 (grokbitfield): Likewise.
1329 (build_new): Likewise.
1330 (make_pointer_declarator): Remove.
1331 (make_reference_declarator): Likewise.
1332 (make_call_declarator): Likewise.
1333 (set_quals_and_spec): Likewise.
1334 (process_template_parm): Change prototype.
1335 (begin_function_definition): Remove.
1336 (finish_parmlist): Remove.
1337 * decl.c (groktypename): Do not use trees to represent
1338 declarators.
1339 (start_decl): Likewise.
1340 (start_handler_parms): Remove.
1341 (get_scope_of_declarator): Reimplement.
1342 (grokdeclarator): Do not use trees to represent declarators.
1343 (grokparms): Likewise.
1344 (start_function): Likewise.
1345 (start_method): Likewise.
1346 (build_void_list_mode): Do not use TREE_PARMLIST.
1347 * decl.h (grokdeclarator): Change prototype.
1348 * decl2.c (grok_method_quals): Robustify.
1349 (grok_x_components): Do not use trees to represent declarators.
1350 (grokfield): Likewise.
1351 (grokbitfield): Likewise.
1352 (start_objects): Build FUNCTION_DECLs, not declarators.
1353 (start_static_storage_duration_function): Likewise.
1354 * init.c (build_new): Simplify.
1355 * lex.c (make_pointer_declarator): Remove.
1356 (make_reference_declarator): Likewise.
1357 (make_call_declarator): Likewise.
1358 (set_quals_and_spec): Likewise.
1359 * method.c (use_thunk): Use start_preparsed_function.
1360 (synthesize_method): Likewise.
1361 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1362 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1363 * parser.c (cp_error_declarator): New variable.
1364 (declarator_obstack): Likewise.
1365 (alloc_declarator): New function.
1366 (make_declarator): Likewise.
1367 (make_id_declarator): Likewise.
1368 (make_pointer_declarator): Likewise.
1369 (make_reference_declarator): Likewise.
1370 (make_ptrmem_declarator): Likewise.
1371 (make_call_declarator): Likewise.
1372 (make_array_declarator): Likewise.
1373 (no_parameters): New variable.
1374 (make_parameter_declarator): Likewise.
1375 (cp_parser_check_for_definition_in_return_type): Do not use trees
1376 to represent declarators.
1377 (cp_parser_translation_unit): Likewise.
1378 (cp_parser_new_expression): Likewise.
1379 (cp_parser_new_type_id): Likewise.
1380 (cp_parser_new_declarator_opt): Likewise.
1381 (cp_parser_direct_new_declarator): Likewise.
1382 (cp_parser_condition): Likewise.
1383 (cp_parser_declaration_statement): Likewise.
1384 (cp_parser_declaration): Likewise.
1385 (cp_parser_conversion_type_id): Likewise.
1386 (cp_parser_conversion_declarator_opt): Likewise.
1387 (cp_parser_template_parameter_list): Likewise.
1388 (cp_parser_template_parameter): Likewise.
1389 (cp_parser_explicit_instantiation): Likewise.
1390 (cp_parser_init_declarator): Likewise.
1391 (cp_parser_declarator): Likewise.
1392 (cp_parser_direct_declarator): Likewise.
1393 (cp_parser_type_id): Likewise.
1394 (cp_parser_parameter_declaration_clause): Likewise.
1395 (cp_parser_parameter_declaration_list): Likewise.
1396 (cp_parser_parameter_declaration): Likewise.
1397 (cp_parser_member_declaration): Likewise.
1398 (cp_parser_exception_declaration): Likewise.
1399 (cp_parser_check_declarator_template_parameters): Likewise.
1400 (cp_parser_function_definition_from_specifiers_and_declarator):
1401 Likewise.
1402 (cp_parser_save_member_function_body): Likewise.
1403 * pt.c (process_template_parm): Add is_non_type parameter.
1404 (convert_template_argument): Adjust call to groktypename.
1405 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1406 (tsubst): Do not expect declarators.
1407 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1408 argument.
1409 (instantiate_decl): Use start_preparsed_function.
1410 * semantics.c (begin_function_definition): Remove.
1411 (finish_parmlist): Remove.
1412 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1413 declarators.
1414
1415 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1416
1417 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1418 (build_new_method_call): Likewise.
1419 * decl.c (local_variable_p_walkfn): Don't walk into types.
1420 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1421 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1422 * init.c (buld_new): Add new operand for ARRAY_REF.
1423 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1424 (do_build_assign_ref): Likewise.
1425 * parser.c (cp_parser_direct_new_declarator): Add new operands
1426 for ARRAY_REF.
1427 (cp_parser_direct_declarator): Likewise.
1428 * pt.c (tsubst): Likewise.
1429 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1430 for COMPONENT_REF.
1431 * semantics.c (finish_non_static_data_member): Add new operand
1432 for COMPONENT_REF.
1433 * typeck.c (build_class_member_access_expr): Likewise.
1434 (build_class_member_access_expr, finish_class_member_access_expr):
1435 Likewise.
1436 (build_ptrmemfunc_access_expr): Likewise.
1437 (build_array_ref): Add new operands for ARRAY_REF.
1438 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1439 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1440
1441 2004-06-21 Richard Henderson <rth@redhat.com>
1442
1443 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1444 * parser.c (cp_parser_jump_statement): Update commentary.
1445 * pt.c (tsubst_expr): Use RETURN_EXPR.
1446 * semantics.c (finish_return_stmt): Likewise.
1447 (finalize_nrv_r): Likewise.
1448 * typeck.c, typeck2.c: Update file start commentary.
1449
1450 2004-06-21 Richard Henderson <rth@redhat.com>
1451
1452 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1453
1454 2004-06-20 Richard Henderson <rth@redhat.com>
1455
1456 * cp-tree.h (add_decl_stmt): Declare.
1457 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1458 * semantics.c (maybe_cleanup_point_expr): New.
1459 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1460 finish_for_expr, finish_switch_cond): Use it.
1461 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1462
1463 2004-06-20 Richard Henderson <rth@redhat.com>
1464
1465 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1466 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1467 (cp_gimplify_expr): Call it.
1468 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1469 (cp_genericize): New.
1470 * decl.c (finish_function): Call it.
1471 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1472 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1473 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1474 (cp_genericize): Declare.
1475 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1476 * dump.c (cp_dump_tree): Likewise.
1477 * semantics.c (push_cleanup): Move from c-semantics.c.
1478
1479 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1480
1481 * cp-lang.c (has_c_linkage): Implement.
1482
1483 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1484 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1485 (builtin_function_1): Don't call make_decl_rtl.
1486 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1487 (grokvardecl): Don't call mangle_decl.
1488 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1489 DECL_ASSEMBLER_NAME.
1490 * method.c (set_mangled_name_for_decl): Delete.
1491 * name-lookup.c (pushdecl): When a local extern shadows a
1492 file-scope declaration of the same object, give both DECLs the
1493 same DECL_UID.
1494 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1495 on DECL_ASSEMBLER_NAME.
1496
1497 2004-06-19 Richard Henderson <rth@redhat.com>
1498
1499 * cp-gimplify.c: Remove unnecessary prototypes.
1500 (cp_gimplify_stmt): Merge into ...
1501 (cp_gimplify_expr): ... here. Move to end of file. Handle
1502 stmts_are_full_exprs_p frobbing.
1503 * cp-tree.h (cp_gimplify_stmt): Remove.
1504 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1505 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1506
1507 2004-06-18 Richard Henderson <rth@redhat.com>
1508
1509 PR c++/16034
1510 * semantics.c (begin_cond): New.
1511 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1512 Assume that non-template decls go land before the conditional.
1513 (simplify_loop_decl_cond): Likewise.
1514 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1515 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1516 begin_switch_stmt, finish_switch_cond): Update to match.
1517
1518 2004-06-17 Jason Merrill <jason@redhat.com>
1519
1520 PR c++/16015
1521 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1522 (finish_stmt_expr_expr): Update type after conversions.
1523 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1524 Handle void initializer.
1525 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1526
1527 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1528
1529 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1530 * cp-tree.h (defer_fn): Delete.
1531 * decl2.c (defer_fn): Delete.
1532 (finish_file): Simplify deferred_fns loops; check that
1533 only used inline functions get into deferred_fns.
1534 (mark_used): Inline previous contents of defer_fn.
1535
1536 2004-06-16 Richard Henderson <rth@redhat.com>
1537
1538 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1539 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1540 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1541 of CTOR_INITIALIZER ...
1542 (pp_cxx_statement): ... here.
1543 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1544 (finish_function): Use alloc_stmt_list to zap entire function.
1545 * parser.c (cp_parser_compound_statement): Update commentary.
1546 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1547 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1548 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1549
1550 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1551
1552 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1553
1554 2004-06-16 Richard Henderson <rth@redhat.com>
1555
1556 * parser.c (cp_parser_labeled_statement): Update commentary.
1557 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1558 * tree.c (mark_local_for_remap_r): Likewise.
1559
1560 2004-06-16 Richard Henderson <rth@redhat.com>
1561
1562 * parser.c (cp_parser_asm_definition): Update commentary.
1563 * pt.c (tsubst_expr): Use ASM_EXPR.
1564 * semantics.c (finish_asm_stmt): Likewise.
1565
1566 2004-06-16 Richard Henderson <rth@redhat.com>
1567
1568 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1569 * parser.c (cp_parser_statement): Update commentary.
1570 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1571 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1572 * tree.c (mark_local_for_remap_r): Likewise.
1573
1574 2004-06-16 Richard Henderson <rth@redhat.com>
1575
1576 PR c++/16012
1577 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1578 statement in FOR_INIT_STMT for templates.
1579
1580 2004-06-15 Richard Henderson <rth@redhat.com>
1581
1582 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1583 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1584 (genericize_try_block): Use gimplify_stmt.
1585 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1586 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1587 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1588 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1589 (cp_tree_chain_matters_p): Remove.
1590 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1591 (COMPOUND_STMT_BODY_BLOCK): New.
1592 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1593 (EXPR_STMT_STMT_EXPR_RESULT): New.
1594 (building_stmt_tree): Check cur_stmt_list.
1595 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1596 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1597 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1598 (cp_finish_decl): Use push_cleanup.
1599 (start_function, finish_function): Use statement lists.
1600 (finish_stmt): Do nothing.
1601 * except.c (begin_eh_spec_block): Use statement lists.
1602 (check_handlers_1, check_handlers): Likewise.
1603 * init.c (construct_virtual_base): Don't add extra compound stmts.
1604 (build_vec_init): Likewise.
1605 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1606 * name-lookup.h (struct cp_binding_level): Add statement_list.
1607 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1608 (cp_parser_labeled_statement, cp_parser_expression_statement,
1609 cp_parser_statement_seq_opt): Likewise.
1610 (cp_parser_compound_statement): Likewise. Take bool for try block.
1611 (cp_parser_selection_statement): Tidy if processing.
1612 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1613 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1614 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1615 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1616 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1617 (finish_cond): New, rewritten from FINISH_COND.
1618 (simplify_loop_decl_cond): New.
1619 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1620 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1621 begin_else_clause, finish_else_clause, finish_if_stmt,
1622 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1623 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1624 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1625 finish_switch_cond, finish_switch_stmt, begin_try_block,
1626 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1627 finish_handler_sequence, finish_function_handler_sequence,
1628 begin_handler, finish_handler_parms, finish_handler,
1629 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1630 using statement lists.
1631 (begin_compound_stmt): Replace has_no_scope argument with flags.
1632 Update all callers. Use statement lists.
1633 (finish_compound_stmt): Likewise.
1634 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1635 (current_scope_stmt_stack): Remove.
1636 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1637 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1638 Rewrite with statement lists.
1639
1640 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1641
1642 * parser.c: Change all assignments of c_lex_string_translate
1643 to true and false to 1 and 0.
1644 (cp_lexer_read_token): Convert type of the translated string.
1645 (cp_parser_skip_to_closing_parentheses): Preserve original
1646 value of c_lex_string_translate, and set it to -1 while
1647 running.
1648 (cp_parser_cache_group): Likewise.
1649 (cp_parser_cache_group_1): Renamed.
1650 (cp_parser_asm_operand_list): Remove redundant setting of
1651 c_lex_string_translate.
1652 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1653 Handle chained strings.
1654
1655 2004-06-12 Andrew Pinski <apinski@apple.com>
1656
1657 PR c++/14639
1658 Revert:
1659 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1660
1661 * cp-tree.h: Fix typo.
1662
1663 * cp-tree.h: Include cgraph.h
1664 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1665 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1666
1667 2004-06-12 Jason Merrill <jason@redhat.com>
1668
1669 PR tree-optimization/14107
1670 * decl.c (finish_function): Warn about no return in all functions.
1671
1672 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1673
1674 * cp-tree.h (struct language_function): Remove cannot_inline.
1675 * decl.c (save_function_data): cannot_inline is no more.
1676 (cxx_push_function_context): Likewise.
1677 * decl2.c (start_objects, start_static_storage_duration_function):
1678 Reset DECL_INLINE, set DECL_UNINLINABLE.
1679
1680 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1681
1682 PR c++/15967
1683 * search.c (lookup_field): Propagate the ambiguity list.
1684 (lookup_fnfields): Likewise.
1685
1686 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1687
1688 PR c++/15947
1689 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1690 template keyword to disambiguate.
1691
1692 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1693
1694 PR c++/15096
1695 * decl.c (grokdeclarator): Ignore pointer-to-members when
1696 computing template depth.
1697
1698 PR c++/14930
1699 * name-lookup.c (pushtag): Do not try to put class declarations in
1700 explicit specialization scopes.
1701
1702 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1703
1704 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1705
1706 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1707
1708 PR c++/15862
1709 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1710 bindings for undeclared built-ins.
1711
1712 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1713
1714 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1715 appear at the correct location.
1716
1717 2004-06-10 Jason Merrill <jason@redhat.com>
1718
1719 PR c++/15875
1720 Revert:
1721 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1722 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1723 TREE_TYPE for non-dependent names.
1724 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1725 unknown_type_node as its TREE_TYPE.
1726 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1727 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1728 (dump_expr) <SCOPE_REF case>: Likewise.
1729
1730 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1731
1732 PR c++/15227
1733 * parser.c (cp_parser_direct_declarator): Robustify.
1734
1735 PR c++/15877
1736 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1737 constants in non-dependent contexts.
1738
1739 PR c++/14211
1740 PR c++/15076
1741 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1742 necessary.
1743
1744 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1745
1746 PR c++/14791
1747 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1748 specially.
1749
1750 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1751
1752 Revert:
1753 PR c++/15815
1754 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1755 * lex.c (handle_pragma_interface): Deprecate.
1756 (handle_pragma_implementation): Likewise.
1757
1758 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1759
1760 * g++spec.c (lang_specific_driver): Remove check for -lm
1761 and -lmath when check it see if it was the math library.
1762
1763 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1764
1765 PR c++/7841
1766 * parser.c (cp_parser_direct_declarator): Reject constructor named
1767 as qualified template-id.
1768
1769 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1770
1771 PR c++/15815
1772 * lex.c (handle_pragma_interface): Deprecate.
1773 (handle_pragma_implementation): Likewise.
1774
1775 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1776
1777 PR c++/15766
1778 * parser.c (cp_parser_iteration_statement): Fix typo in error
1779 message.
1780
1781 PR c++/14777
1782 * pt.c (tsubst_default_argument): Do not defer access checks
1783 while substituting into the default argument.
1784
1785 PR c++/15554
1786 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1787 constant in a non-dependent context.
1788
1789 PR c++/15057
1790 * except.c (build_throw): Ensure that temp_expr has been
1791 initialized.
1792
1793 2004-06-06 Roger Sayle <roger@eyesopen.com>
1794
1795 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1796
1797 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1798
1799 PR c++/15503
1800 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1801 'typename', and accept 'template'.
1802
1803 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1804 Jan Hubicka <jh@suse.cz>
1805
1806 PR c++/14639
1807 * method.c (use_think): Do not mark thunk as referenced.
1808
1809 2004-06-03 Matt Austern <austern@apple.com>
1810
1811 PR c++/15428
1812 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1813 is nonzero, and if we see a noninline definition of a key method,
1814 make the vtables nonweak.
1815
1816 2004-06-02 Matt Austern <austern@apple.com>
1817
1818 * cp-tree.h (instantiate_decl): new boolean parameter,
1819 undefined_ok. Current behavior is equivalent to its being 0.
1820 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1821 * pt.c (mark_decl_instantiated): Unconditionally make
1822 instantiations explicit unconditionally
1823 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1824 since mark_decl_instantiated now does it.
1825 (instantiate_class_member): New. Instantiate a member of an
1826 explicitly instantiated class template.
1827 (do_type_instantiation): Explicitly instantiate members of an
1828 explicitly instantiated class template.
1829 (instantiate_decl): if undefined_ok is nonzero, and if we're
1830 trying to explicitly instantiated a template with no definition,
1831 change it to an implicit instantiation.
1832 (instantiate_pending_templates): Add new argument to instantiate_decl.
1833 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1834
1835 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1836
1837 * cp-tree.h: Fix typo.
1838
1839 * cp-tree.h: Include cgraph.h
1840 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1841 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1842
1843 2004-06-01 Jason Merrill <jason@redhat.com>
1844
1845 PR c++/15142
1846 * call.c (call_builtin_trap): Remove type parm.
1847 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1848 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1849
1850 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1851
1852 PR c++/13092
1853 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1854 TREE_TYPE for non-dependent names.
1855 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1856 unknown_type_node as its TREE_TYPE.
1857 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1858 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1859 (dump_expr) <SCOPE_REF case>: Likewise.
1860
1861 2004-06-01 Richard Henderson <rth@redhat.com>
1862 Andrew Pinski <pinskia@physics.uc.edu>
1863
1864 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1865 * parser.c (struct cp_parser): Remove in_offsetof.
1866 (cp_parser_new): Don't set it.
1867 (cp_parser_unary_expression): Don't check it.
1868 (cp_parser_postfix_open_square_expression): Split out from ...
1869 (cp_parser_postfix_expression): ... here.
1870 (cp_parser_postfix_dot_deref_expression): Likewise.
1871 (cp_parser_builtin_offsetof): New.
1872 (cp_parser_primary_expression): Use it.
1873
1874 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1875
1876 PR c++/14932
1877 * parser.c (cp_parser_postfix_expression): Allow subscript
1878 operator in offsetof.
1879
1880 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1881
1882 PR c++/15701
1883 * friend.c (add_friend): Do not try to perform access checks for
1884 functions from dependent classes.
1885
1886 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1887
1888 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1889 (pp_cxx_begin_template_argument_list): Turn into a function.
1890 (pp_cxx_end_template_argument_list): Likewise.
1891 (pp_cxx_separate_with): Define.
1892 (pp_cxx_unqualified_id): Tidy.
1893 (pp_cxx_primary_expression): Likewise.
1894 (pp_cxx_postfix_expression): Likewise.
1895 (pp_cxx_expression): Likewise.
1896 (pp_cxx_simple_type_specifier): Likewise.
1897 (pp_cxx_type_specifier_seq): Likewise.
1898 (pp_cxx_parameter_declaration_clause): Likewise.
1899 (pp_cxx_exception_specification): Likewise.
1900 (pp_cxx_direct_declarator): Likewise.
1901 (pp_cxx_type_id): Likewise.
1902 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1903 cxx-pretty-print.c.
1904 (pp_cxx_left_paren): Likewise.
1905 (pp_cxx_right_paren): Likewise.
1906 (pp_cxx_left_brace): Likewise.
1907 (pp_cxx_right_brace): Likewise.
1908 (pp_cxx_left_bracket): Likewise.
1909 (pp_cxx_right_bracket): Likewise.
1910 (pp_cxx_dot): Likewise.
1911 (pp_cxx_identifier): Likewise.
1912 (pp_cxx_tree_identifier): Likewise.
1913 (pp_cxx_ampersand): New macro.
1914 (pp_cxx_star): Likewise.
1915 (pp_cxx_arrow): Likewise.
1916 (pp_cxx_semicolon): Likewise.
1917 (pp_cxx_complement): Likewise.
1918 (pp_cxx_begin_template_argument_list): Declaree.
1919 (pp_cxx_end_template_argument_list): Likewise.
1920 (pp_cxx_colon_colon): likewise.
1921
1922 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1923
1924 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1925 against NULL_TREE.
1926
1927 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1928
1929 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1930 typeck.c: Fix comment formatting.
1931
1932 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1933
1934 * cp-lang.c (cp_expand_decl): Remove.
1935 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1936
1937 2004-05-30 Andreas Jaeger <aj@suse.de>
1938
1939 * lang-specs.h: Add missing initializers for .ii.
1940
1941 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1942
1943 * decl.c (cp_make_fname_decl): Free return value from
1944 fname_as_string.
1945
1946 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1947
1948 PR c++/15083
1949 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1950 even in a templat.e
1951 * init.c (build_new): Likewise.
1952
1953 PR c++/15640
1954 * name-lookup.c (arg_assoc): Robustify.
1955
1956 PR c++/15471
1957 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1958 when determining the scope to use for a pointer to member.
1959 (lookup_anon_field): Give it external linkage.
1960 * cp-tree.h (lookup_anon_field): Declare it.
1961 * expr.c (cplus_expand_constant): Use it.
1962
1963 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1964
1965 PR c++/14668
1966 * parser.c (cp_parser_simple_type_specifier): Call
1967 maybe_note_name_used_in_class.
1968
1969 2004-05-28 Tom Marshall <tmarshall@real.com>
1970
1971 PR c++/15214
1972 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1973 the class has friends.
1974
1975 2004-05-27 Adam Nemet <anemet@lnxw.com>
1976
1977 PR c++/12883
1978 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1979 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1980
1981 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1982
1983 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1984 if it might be needed.
1985 * pt.c (mark_decl_instantiated): Only call defer_fn if
1986 the function actually needs processing in finish_file.
1987 * decl2.c (finish_file): Add check that elements in
1988 deferred_fns_used are really needed there. Remove unnecessary
1989 test of DECL_SAVED_TREE.
1990
1991 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1992
1993 * Make-lang.in: No need to specify $(LIBCPP).
1994
1995 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1996
1997 PR c++/15044
1998 * parser.c (cp_parser_class_head): Robustify.
1999
2000 PR c++/15317
2001 * parser.c (cp_parser_decl_specifier_seq): Correct error in
2002 comment.
2003 (cp_parser_constructor_declarator_p): Treat attributes
2004 as decl-specifiers.
2005
2006 PR c++/15329
2007 * typeck.c (build_unary_op): Do not attempt to resolve casts to
2008 base classes in templates.
2009
2010 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2011
2012 PR c++/15165
2013 * pt.c (instantiate_template): Robustify.
2014
2015 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2016
2017 PR c++/15025
2018 * decl.c (xref_tag): Issue errors about redeclaring template
2019 classes as non-template classes.
2020
2021 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2022
2023 PR c++/14821
2024 * name-lookup.c (supplement_binding): Allow redefinitions of
2025 namespace aliases.
2026
2027 PR c++/14883
2028 * parser.c (cp_parser_template_argument): Robustify.
2029
2030 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2031
2032 * class.c (alter_access): Use %E format specifier to print an
2033 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2034 (push_lang_context): Likewise.
2035 * decl.c (lookup_label): Likewise.
2036 (grokdeclarator): Likewise.
2037 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2038 * pt.c (do_type_instantiation): Likewise.
2039 * tree.c (handle_java_interface_attribute): Likewise.
2040 (handle_com_interface_attribute): Likewise.
2041 (handle_init_priority_attribute): Likewise.
2042
2043 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2044
2045 PR c++/15285
2046 PR c++/15299
2047 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2048 recognized as overloaded functions.
2049
2050 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2051
2052 PR c++/15507
2053 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2054 layout conflicts for unions.
2055
2056 PR c++/15542
2057 * typeck.c (build_x_unary_op): Instantiate template class
2058 specializations before looking for "operator &".
2059
2060 PR c++/15427
2061 * typeck.c (complete_type): Layout non-dependent array types, even
2062 in templates.
2063
2064 PR c++/15287
2065 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2066 template.
2067
2068 2004-05-22 Roger Sayle <roger@eyesopen.com>
2069
2070 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2071 returning when TREE_TYPE is error_mark_node.
2072 * typeck.c (require_complete_type): Return error_mark_node if
2073 value's type is an error_mark_node.
2074
2075 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2076
2077 * optimize.c (calls_setjmp_r): Remove.
2078 (calls_setjmp_p): Remove.
2079 * cp-tree.c (calls_setjmp_p): Remove.
2080 * decl.c (finish_function): Do not call calls_setjmp_p.
2081
2082 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2083
2084 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2085 * decl2.c (maybe_make_one_only): Likewise.
2086 * method.c (use_thunk): Likewise.
2087
2088 2004-05-18 Jason Merrill <jason@redhat.com>
2089
2090 * class.c (build_base_path): Tidy a bit.
2091
2092 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2093
2094 * name-lookup.c (struct scope_binding): New.
2095 (EMPTY_SCOPE_BINDING): New.
2096 (lookup_using_namespace): Take a scope_binding instead of a
2097 cxx_binding.
2098 (qualified_lookup_using_namespace): Likewise.
2099 (cxx_binding_clear): Delete.
2100 (do_nonmember_using_decl): Use a scope_binding instead of a
2101 cxx_binding.
2102 (lookup_tag): Don't call select_decl.
2103 (ambiguous_decl): Don't return anything (and change callers to match).
2104 Take a scope_binding as the second parameter.
2105 (lookup_namespace_name): Use a scope_binding instead of a
2106 cxx_binding.
2107 (unqualified_namespace_lookup): Likewise.
2108 (lookup_qualified_name): Likewise.
2109 (select_decl): Take a scope_binding instead of a cxx_binding.
2110 Use macros rather than hand-coding tests for type-ness.
2111
2112 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2113
2114 * cp-gimplify.c: Rename from cp-simplify.c.
2115 * Make-lang.in, optimize.c: Update.
2116
2117 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2118
2119 Merge from tree-ssa-20020619-branch. See
2120 ChangeLog.tree-ssa for details.
2121
2122 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2123 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2124 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2125 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2126 Merged.
2127 * cp-mudflap.c: New file.
2128 * cp-simplify.c:: New file.
2129
2130 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2131
2132 PR c++/14389
2133 * decl2.c (check_classfn): For member templates, compare also the
2134 template parameters to match the declaration.
2135 * cp-tree.h: Adjust declaration of check_classfn.
2136 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2137 * friend.c (do_friend): Likewise.
2138 * pt.c (tsubst_friend_function): Likewise.
2139
2140 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2141
2142 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2143 Instead, dig into the representation type to find the array bound.
2144
2145 2004-04-30 Jason Merrill <jason@redhat.com>
2146
2147 Refer to base members using COMPONENT_REFs where possible.
2148 * class.c (build_simple_base_path): New fn.
2149 (build_base_path): Use it for non-virtual base references.
2150 (layout_class_type): Change base fields to their real type
2151 after layout is done.
2152 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2153 * cp-lang.c (cxx_get_alias_set): Use it.
2154
2155 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2156
2157 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2158 comment typos.
2159
2160 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2161
2162 PR c++/15064
2163 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2164 used in integral constant expressions.
2165
2166 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2167
2168 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2169 previous change.
2170
2171 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2172 braced initializer.
2173 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2174 * decl.c (reshape_init): Use it.
2175 * init.c (perform_member_init): Remove redundant condition.
2176 (build_aggr_init): Adjust to handle brace-enclosed initializers
2177 correctly.
2178 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2179
2180 * parser.c (cp_parser_initializer_clause): Do not set
2181 TREE_HAS_CONSTRUCTOR on the initializer.
2182 * rtti.c (tinfo_base_init): Likewise.
2183 (generic_initializer): Likewise.
2184 (ptr_initializer): Likewise.
2185 (ptm_initializer): Likewise.
2186 (class_initializer): Likewise.
2187 (get_pseudo_ti_init): Likewise.
2188 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2189
2190 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2191
2192 * name-lookup.c (anonymous_namespace_name): Make static.
2193
2194 2004-04-19 Roger Sayle <roger@eyesopen.com>
2195
2196 PR middle-end/14531
2197 * class.c (build_base_path): Call fold whilst building the NULL
2198 pointer check expression trees.
2199
2200 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2201
2202 * init.c (build_new_1): Don't use type size argument for Java
2203 _Jv_AllocObject call.
2204
2205 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2206
2207 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2208 declaration and definition.
2209
2210 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2211
2212 PR c++/14808
2213 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2214 than ASM_OUTPUT_DEF.
2215
2216 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2217
2218 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2219 current_function_decl == NULL.
2220
2221 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2222
2223 PR c++/3518
2224 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2225 level.
2226
2227 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2228
2229 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2230 of PARM_DECL.
2231 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2232 or TREE_SIDE_EFFECTS of a type.
2233
2234 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2235
2236 PR c++/14007
2237 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2238 cv-qualifier unification.
2239 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2240
2241 2004-04-02 Jan Hubicka <jh@suse.cz>
2242
2243 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2244 * cp-tree.h (cp_update_decl_after_saving): Declare.
2245 * tree.c (cp_update_decl_after_saving): Define.
2246
2247 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2248
2249 PR c++/14803
2250 * typeck.c (get_delta_difference): Call fold before returning the
2251 value.
2252
2253 2004-04-01 Richard Henderson <rth@redhat.com>
2254
2255 PR c++/14804
2256 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2257 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2258
2259 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2260
2261 PR c++/14810
2262 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2263
2264 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2265
2266 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2267
2268 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2269
2270 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2271 * class.c (check_bitfield_decl): Likewise.
2272 * cvt.c (type_promotes_to): Likewise.
2273 * decl.c (finish_enum): Likewise.
2274 * mangle.c (write_builtin_type): Likewise.
2275 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2276 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2277 (build_binary_op): Likewise.
2278
2279 2004-03-31 Jan Hubicka <jh@suse.cz>
2280
2281 * tree.h (optimize_function): Kill prototype.
2282 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2283 * semantics.c (expand_body): Kill.
2284
2285 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2286
2287 PR c++/14724
2288 * decl.c (start_decl_1): Do not decide whether or not to create a
2289 new cleanup level until after the type has been completed.
2290
2291 PR c++/14763
2292 * pt.c (tsubst_default_argument): Clear current_function_decl.
2293
2294 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2295
2296 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2297
2298 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2299
2300 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2301 is null, just print the literal name and return.
2302
2303 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2304
2305 * cxx-pretty-print.c: Fix comment typos.
2306
2307 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2308
2309 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2310 Update copyright.
2311
2312 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2313
2314 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2315 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2316 target hook.
2317
2318 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2319
2320 PR 12267, 12391, 12560, 13129, 14114, 14133
2321 * cp-lang.c (c_reset_state): Delete.
2322 (push_file_scope, pop_file_scope): New stubs.
2323 * parser.c (c_parse_file): Call sorry() here if called more than once.
2324
2325 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2326
2327 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2328 for INTEGER_CST.
2329
2330 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2331
2332 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2333
2334 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2335
2336 * error.c (enum pad): Remove.
2337 (dump_qualifiers): Likewise.
2338 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2339 (dump_aggr_type): Likewise.
2340 (dump_type_suffix): Likewise.
2341 (dump_simple_decl): Likewise.
2342 (dump_function_decl): Likewise.
2343 (cv_to_string): Likewise.
2344 (dump_type_prefix): Likewise. Adjust return void.
2345 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2346 cxx_pretty_print.h.
2347 (pp_cxx_template_keyword_if_needed): Document.
2348 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2349 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2350 MUST_NOT_THROW_EXPR.
2351
2352 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2353
2354 PR c++/14616
2355 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2356 templates, if their type is non-dependent.
2357
2358 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2359
2360 * call.c (build_op_delete_call): Do not forget the placement
2361 arguments when iterating through mutiple delete operators.
2362
2363 * cp-tree.h (svaed_scope): Remove last_parms.
2364 (NEW_DELETE_OPNAME_P): New macro.
2365 (last_function_parms): Remove.
2366 (do_friend): Adjust prototype.
2367 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2368 using last_function_parms.
2369 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2370 using last_function_parms.
2371 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2372 for class-specific operator new and operator delete.
2373 (grok_op_properties): Do not look for allocation functions with
2374 METHOD_TYPEs.
2375 (start_function): Use DECL_ARGUMENTS instead of
2376 last_function_parms.
2377 * decl.h (last_function_parms): Do not declare.
2378 * decl2.c (grokclassfn): Do not use last_function_parms.
2379 * friend.c (do_friend): Remove parmdecls parameter.
2380 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2381 (pop_from_top_level): Do not restore it.
2382 * pt.c (check_explicit_specialization): Do not adjust
2383 last_function_parms.
2384
2385 * name-lookup.c (do_local_using_decl): Create a local binding for
2386 types brought in via using declarations.
2387
2388 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2389 function declarations correctly.
2390
2391 * semantics.c (finish_id_expression): Correct handling of
2392 conversion operators to dependent types.
2393
2394 * typeck.c (lookup_destructor): Allow the use of destructors from
2395 base classes.
2396
2397 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2398
2399 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2400 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2401 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2402 the field is named TEMPLATE_TYPE_PARM_INDEX.
2403
2404 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2405
2406 PR c++/14545
2407 * parser.c (cp_parser_functional_cast): A cast to anything
2408 but integral or enumaration type is not an integral constant
2409 expression.
2410 * pt.c (value_dependent_expression_p): Handle cast expressions
2411 without operands (such as "int()").
2412
2413 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2414
2415 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2416 cv-qualification between the type named by the
2417 pseudo-destructor-name and the object-type.
2418
2419 * search.c (accessible_base_p): Handle non-proper bases.
2420
2421 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2422 refers to a single overloaded function, set the type of the
2423 function.
2424 * tree.c (lvalue_type): Simplify.
2425 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2426 unknown type.
2427 (build_unary_op): Handle OVERLOADs with known types.
2428
2429 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2430 function templates.
2431
2432 * parser.c (cp_parser_postfix_expression): Handle the use of
2433 "typename" in non-dependent contexts. Convert appropriately when
2434 when using a qualified name after "->" or ".".
2435
2436 * call.c (conditional_conversion): Honor the requirement that some
2437 conversions refer to the original object.
2438
2439 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2440
2441 * call.c (build_conditional_expr): Do not call force_rvalue for
2442 operands of void_type when the conditional expression itself has
2443 void type.
2444 * name-lookup.c (pushdecl): Don't consider a declaration of a
2445 function named "main" to be an overload of a type named "main".
2446 * parser.c (cp_parser_template_name): Perform name lookup when the
2447 template name is proceeded by "template" if the qualifying scope
2448 is non-dependent.
2449 * typeck.c (composite_pointer_type_r): Correctly handle
2450 pointer-to-member types.
2451 (build_const_cast): Likewise.
2452
2453 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2454
2455 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2456 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2457 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2458 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2459 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2460 (TYPEOF_TYPE_EXPR): New macro.
2461 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2462 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2463 * pt.c (tsubst): Likewise.
2464 * semantics.c (finish_typeof): Likewise.
2465 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2466 and TEMPLATE_TYPE_PARM.
2467 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2468 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2469
2470 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2471
2472 PR c++/14586
2473 * cp-tree.h (build_new_op): Change prototype.
2474 (build_x_binary_op): Likewise.
2475 * call.c (build_new_op): Add overloaded_p parameter.
2476 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2477 * parser.c (cp_parser_binary_expression): Note that uses of
2478 overloaded operators prevents an expression from being considered
2479 an integral constant.
2480 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2481 build_x_binary_op.
2482 * semantics.c (finish_call_expr): Likewise.
2483 * typeck.c (rationalize_conditional_expr): Likewise.
2484 (build_x_indirect_ref): Likewise.
2485 (build_x_binary_op): Likewise.
2486 (build_x_unary_op): Likewise.
2487 (build_x_compound_expr): Likewise.
2488 (build_modify_expr): Likewise.
2489 * typeck2.c (build_x_arrow): Likewise.
2490
2491 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2492
2493 * cp-lang.c, ptree.c: Update copyright.
2494
2495 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2496
2497 PR c++/14550
2498 * parser.c (cp_parser_non_integral_constant_expression): Encode
2499 more of the idiom that surrounded calls to this function within
2500 the function itself
2501 (cp_parser_primary_expression): Adjust accordingly.
2502 (cp_parser_postfix_expression): Likewise.
2503 (cp_parser_unary_expression): Likewise.
2504 (cp_parser_cast_expression): Likewise.
2505 (cp_parser_assignment_expression): Likewise.
2506 (cp_parser_expression): Likewise.
2507 (cp_parser_new_expression): Note that new-expressions are not
2508 allowed in integral constant expressions.
2509 (cp_parser_delete_expression): Likewise.
2510
2511 2004-03-12 Matt Austern <austern@apple.com>
2512
2513 * decl2.c (maybe_make_one_only): Look at
2514 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2515 to make an explicit instantiation weak.
2516 * method.c (use_thunk): Make sure we call comdat_linkage
2517 when appropriate.
2518 * pt.c (do_type_instantiation): On systems where weak symbols
2519 don't go in a static archive's TOC, explicit instantiation of a
2520 class must imply *explicit* instantiation of its memeber.
2521
2522 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2523
2524 * call.c, cp-tree.h, pt.c: Fix comment typos.
2525
2526 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2527
2528 PR c++/14510
2529 * decl.c (xref_tag): Disregard non-type declarations when
2530 looking up a tagged type.
2531
2532 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2533
2534 PR c++/14397
2535 * call.c (convert_like_real): Build a const qualified temporary,
2536 when testing ctor access.
2537
2538 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2539
2540 * call.c (initialize_reference): Fix typo.
2541
2542 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2543
2544 PR c++/14409
2545 * pt.c (determine_specialization): For member templates, match also
2546 constness.
2547
2548 PR c++/14448
2549 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2550 non-dependent.
2551 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2552
2553 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2554
2555 PR c++/14230
2556 * call.c (initialize_reference): Handle initializers that are
2557 class-member access expressions applies to rvalues.
2558
2559 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2560
2561 PR c++/14432
2562 * name-lookup.c (supplement_binding): Ignore functions that are
2563 marked DECL_ANTICIPATED.
2564
2565 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2566
2567 PR c++/14401
2568 * class.c (check_field_decls): Complain about non-static data
2569 members of reference type in unions. Propagate
2570 CLASSTYPE_REF_FIELDS_NEED_INIT and
2571 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2572 data members.
2573 * init.c (perform_member_init): Complain about mbmers with const
2574 type that are not explicitly initialized.
2575
2576 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2577
2578 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2579 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2580 (lang_identifier): Remove implicit_decl and error_locus.
2581 (IDENTIFIER_IMPLICIT_DECL): Remove.
2582 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2583 (IDENTIFIER_ERROR_LOCUS): Likewise.
2584 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2585 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2586 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2587 (implicitly_declare): Remove.
2588 * decl.c (warn_extern_redeclared_static): Remove check of
2589 IDENTIFIER_IMPLICIT_DECL.
2590 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2591 (implicitly_declare): Remove.
2592 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2593 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2594 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2595 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2596 in the innermost scope, rather than at namespace scope.
2597 * name-lookup.c (push_local_binding): Give it external linkage.
2598 (pushdecl): Remove dead code.
2599 * name-lookup.h (push_local_binding): Declare it.
2600 * ptree.c (cxx_print_identifier): Don't print
2601 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2602 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2603 not IDENTIFIER_ERROR_LOCUS.
2604 * typeck.c (build_function_call): Remove dead code.
2605
2606 2004-03-08 Jason Merrill <jason@redhat.com>
2607
2608 PR c++/13170
2609 * decl.c (xref_tag): Remove attribute handling.
2610 * cp-tree.h: Adjust prototype.
2611 * decl.c, parser.c, rtti.c: Adjust callers.
2612 * parser.c (cp_parser_class_head): Pass back attributes in the
2613 class head.
2614 (cp_parser_class_specifier): Adjust.
2615
2616 2004-03-08 Matt Austern <austern@apple.com>
2617
2618 PR debug/14079
2619 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2620 as static, to static_decls array.
2621
2622 2004-03-05 Jason Merrill <jason@redhat.com>
2623
2624 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2625
2626 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2627
2628 * decl.c (grokfndecl): Update old incorrect comment.
2629 (grokvardecl): Diagnose C++ variables of type with no linkage.
2630
2631 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2632
2633 PR c++/14369
2634 * pt.c (build_non_dependent_expr): Do not create a
2635 NON_DEPENDENT_EXPR for a THROW_EXPR.
2636
2637 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2638
2639 PR c++/14369
2640 * error.c (dump_expr): Handle THROW_EXPR.
2641
2642 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2643
2644 PR c++/14360
2645 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2646 lookup if ordinary name-lookup finds a non-function.
2647 * pt.c (tsubst_copy_and_build): Likewise.
2648
2649 PR c++/14361
2650 * parser.c (cp_parser_late_parsing_default_args): Check that there
2651 are no extra tokens after the end of the default-argument
2652 expression.
2653
2654 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2655
2656 PR c++/14324
2657 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2658 having C++ linkage for name-mangling purposes.
2659
2660 PR c++/14260
2661 * parser.c (cp_parser_direct_declarator): Recognize constructor
2662 declarators that use a template-id to name the class being
2663 constructed.
2664
2665 PR c++/14337
2666 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2667 (tsubst_expr): Do not call tsubst_copy, even when
2668 processing_template_decl.
2669
2670 2004-03-01 Jeff Law <law@redhat.com>
2671
2672 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2673 the proper type.
2674
2675 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2676
2677 PR c++/14138
2678 * name-lookup.h (push_scope): Change prototype.
2679 * name-lookup.c (push_scope): Do not reenter the current class
2680 scope.
2681 * decl.c (grokfndecl): Check return code from push_scope before
2682 calling pop_scope.
2683 * decl2.c (check_classfn): Likewise.
2684 * parser.c (cp_parser_conversion_function_id): Likewise.
2685 (cp_parser_init_declarator): Likewise.
2686 (cp_parser_direct_declarator): Likewise.
2687 (cp_parser_class_specifier): Likewise.
2688 (cp_parser_class_head): Likewise.
2689 (cp_parser_lookup_name): Likewise.
2690 (cp_parser_constructor_declarator_p): Likewise.
2691 * pt.c (instantiate_class_template): Likewise.
2692 (resolve_typename_type): Likewise.
2693
2694 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2695
2696 PR c++/14267
2697 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2698 extension.
2699
2700 PR debug/12103
2701 * class.c (update_vtable_entry_for_fn): Do not go through
2702 covariance machinery if the type returned by an overrider is the
2703 same as the original.
2704
2705 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2706
2707 * call.c: Fix a comment typo.
2708
2709 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2710
2711 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2712
2713 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2714
2715 PR c++/14278
2716 * parser.c (cp_parser_parameter_declaration_list): Commit
2717 to fewer tentative parses.
2718
2719 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2720
2721 PR c++/14284
2722 * pt.c (dependent_type_p_r): A template template parameter is a
2723 dependent type.
2724
2725 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2726
2727 PR c++/14246
2728 * mangle.c (write_template_arg_literal): Don't rely on identity for
2729 boolean constants.
2730
2731 2004-02-24 Jason Merrill <jason@redhat.com>
2732
2733 * tree.c (build_exception_variant): Use check_qualified_type.
2734
2735 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2736 Kazu Hirata <kazu@cs.umass.edu>
2737
2738 * decl.c (cxx_init_decl_processing): Don't check
2739 flag_writable_strings.
2740
2741 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2742
2743 PR c++/14156
2744 * typeck.c (maybe_warn_about_returning_address_of_location):
2745 Change check for VAR_DECL to use DECL_P instead.
2746
2747 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2748
2749 PR c++/14250
2750 * cvt.c (build_expr_type_conversion): Type must be complete before
2751 looking up for conversions.
2752
2753 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2754
2755 PR c++/14143
2756 * name-lookup.c (arg_assoc_class): Don't look into template
2757 arguments if it is not a primary template.
2758
2759 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2760
2761 PR c++/12007
2762 * method.c (use_thunk): Always clone function argument tree.
2763
2764 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2765
2766 PR c++/14199
2767 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2768
2769 PR c++/14173
2770 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2771 for all type variants.
2772
2773 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2774
2775 PR c++/13927
2776 * decl.c (duplicate_decls): Return error_mark_node for invalid
2777 redeclarations.
2778 * name-lookup.c (push_namespace): Ignore the return value from
2779 pushdecl.
2780 * pt.c (push_template_decl_real): Robustify.
2781
2782 PR c++/14186
2783 * name-lookup.c (push_class_level_binding): Do not complain about
2784 adding a binding for a member whose name is the same as the
2785 enclosing class if the member is located in a base class of the
2786 current class.
2787
2788 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2789
2790 PR c++/14181
2791 * parser.c (cp_parser_new_expression): Parse an ill-formed
2792 direct-new-declarator after a parenthesized type-id to emit good
2793 diagnostic.
2794
2795 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2796
2797 * cp-tree.def, cvt.c: Update copyright.
2798
2799 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2800
2801 PR c++/11326
2802 * cp-tree.h (abi_version_at_least): Remove.
2803 * mangle.c: Include flags.h.
2804
2805 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2806
2807 PR c++/13971
2808 * call.c (build_conditional_expr): Handle conversions between
2809 class types which result in differently cv-qualified type
2810 variants.
2811
2812 PR c++/14086
2813 * class.c (delete_duplicate_fields_1): Remove.
2814 (delete_duplicate_fields): Likewise.
2815 (finish_struct_anon): Remove check for members with the same name
2816 as their enclosing class.
2817 (check_field_decls): Do not call duplicate_fields.
2818 * decl.c (grokdeclarator): Remove check for static data members
2819 with the same name as their enclosing class.
2820 * name-lookup.c (push_class_level_binding): Check for members with
2821 the same name as their enclosing class.
2822
2823 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2824
2825 PR c++/14085
2826 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2827
2828 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2829
2830 PR c++/13635
2831 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2832 has full set of arguments.
2833
2834 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2835
2836 PR c++/13927
2837 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2838
2839 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2840
2841 PR c++/14122
2842 * cp-tree.h (delete_sanity): Change prototype.
2843 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2844 Remove dead code. Adjust code to warn about deleting an array.
2845 * typekc.c (decay_conversion): Use build_address and build_nop.
2846
2847 PR c++/14108
2848 * search.c (accessible_p): Do not check access in thunks.
2849
2850 PR c++/14083
2851 * call.c (build_conditional_expr): Call force_rvalue on the
2852 non-void operand in the case that one result is a throw-expression
2853 and the other is not.
2854
2855 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2856
2857 PR c++/9851
2858 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2859 the type name and look ahead for ::~, and bail out early with a
2860 better error message if the parse is going to fail.
2861
2862 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2863
2864 * call.c (conversion_kind): New type.
2865 (conversion_rank): Likewise.
2866 (conversion): Likewise.
2867 (CONVERSION_RANK): New macro.
2868 (conversion_obstack): New variable.
2869 (obstack_initialized): Likewise.
2870 (z_candidate): Change type of convs and second_conv.
2871 (candidate_warning): New type.
2872 (IDENTITY_RANK): Remove.
2873 (EXACT_RANK): Likewise.
2874 (PROMO_RANK): Likewise.
2875 (STD_RANK): Likewise.
2876 (PBOOL_RANK): Likewise.
2877 (USER_RANK): Likewise.
2878 (ELLIPSIS_RANK): Likewise.
2879 (BAD_RANK): Likewise.
2880 (ICS_RANK): Likewise.
2881 (ICS_STD_RANK): Likewise.
2882 (ICS_USER_FLAG): Likewise.
2883 (ICS_ELLIPSIS_FLAG): Likewise.
2884 (ICS_THIS_FLAG): Likewise.
2885 (ICS_BAD_FLAG): Likewise.
2886 (NEED_TEMPORARY_P): Likewise.
2887 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2888 (USER_CONV_CAND): Likewise.
2889 (USER_CONV_FN): Likewise.
2890 (conversion_obstack_alloc): New function.
2891 (alloc_conversion): Likewise.
2892 (validate_conversion_obstack): Likewise.
2893 (alloc_conversions): Likewise.
2894 (build_conv): Adjust to deal with new conversion data structures.
2895 (build_identity_conv): New function.
2896 (build_ambiguous_conv): Likewise.
2897 (standard_conversion): Adjust to deal with new conversion data
2898 structures.
2899 (convert_class_to_reference): Likewise.
2900 (direct_reference_binding): Likewise.
2901 (reference_binding): Likewise.
2902 (implicit_conversion): Likewise.
2903 (add_candidate): Likewise.
2904 (add_function_candidate): Likewise.
2905 (add_conv_candidate): Likewise.
2906 (build_builtin_candidate): Likewise.
2907 (print_z_candidate): Likewise.
2908 (merge_conversion_sequences): Likewise.
2909 (build_user_type_conversion_1): Likewise.
2910 (build_user_type_conversion): Likewise.
2911 (build_new_function_call): Likewise.
2912 (build_object_call): Likewise.
2913 (conditional_conversion): Likewise.
2914 (build_conditional_expr): Likewise.
2915 (build_new_op): Likewise.
2916 (build_op_delete_call): Likewise.
2917 (convert_like_real): Likewise.
2918 (build_over_call): Likewise.
2919 (build_new_method_call): Likewise.
2920 (is_subseq): Likewise.
2921 (maybe_handle_implicit_object): Likewise.
2922 (maybe_handle_ref_bind): Likewise.
2923 (compare_ics): Likewise.
2924 (source_type): Likewise.
2925 (add_warning): Likewise.
2926 (joust): Likewise.
2927 (can_convert_arg): Likewise.
2928 (can_convert_arg_bad): Likewise.
2929 (perform_implicit_conversion): Likewise.
2930 (perform_direct_initialization_if_possible): Likewise.
2931 (initialize_reference): Likewise.
2932 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2933 * cp-tree.def (WRAPPER): Likewise.
2934 (IDENTITY_CONV): Remove.
2935 (LVALUE_CONV): Likewise.
2936 (QUAL_CONV): Likewise.
2937 (STD_CONV): Likewise.
2938 (PTR_CONV): Likewise.
2939 (PMEM_CONV): Likewise.
2940 (BASE_CONV): Likewise.
2941 (REF_BIND): Likewise.
2942 (USER_CONV): Likewise.
2943 (AMBIG_CONV): Likewise.
2944 (RVALUE_CONV): Likewise.
2945 * cp-tree.h (tree_wrapper): Remove.
2946 (WRAPPER_ZC): Remove.
2947 (lang_tree_node): Remove wrapper.
2948 (LOOKUP_SPECULATIVELY): Remove.
2949 (build_op_delete_call): Adjust prototype.
2950 (validate_conversion_obstack): Declare.
2951 (build_zc_wrapper): Remove.
2952 * cvt.c (convert_to_reference): Remove dead code.
2953 (ocp_convert): Likewise.
2954 * decl.c (redeclaration_error_message): Correct handling of
2955 templates.
2956 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2957 (cp_tree_node_structure): Remove WRAPPER case.
2958 * decl2.c (finish_file): Call validate_conversion_obstack.
2959 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2960 (build_op_delete_call): Likewise.
2961 (build_x_delete): Likewise.
2962 (build_delete): Adjust call to build_op_delete_call.
2963 * pt.c (tsubst_friend_declaration): Adjust code to determine
2964 whether or not a friend template is a definition.
2965 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2966 * tree.c (build_zc_wrapper): Remove.
2967
2968 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2969
2970 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2971 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2972 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2973 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2974
2975 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2976
2977 * typeck.c (lookup_destructor): Fix typo in error message.
2978
2979 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2980
2981 * call.c, parser.c, tree.c: Fix comment typos.
2982
2983 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2984
2985 Bug 13856
2986 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2987 * decl.c (duplicate_decls, start_function): Likewise.
2988
2989 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2990
2991 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2992 * parser.c (free_parser_stacks): Delete.
2993
2994 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2995
2996 * rtti.c: Update copyright.
2997
2998 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2999
3000 PR c++/14033
3001 * decl.c (require_complete_types_for_parms): Do not insert
3002 error_mark_node in the parameter list.
3003
3004 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3005
3006 PR c++/14028
3007 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
3008 error when terminator can not be found.
3009
3010 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3011
3012 Make-lang.in (po-generated): Delete.
3013
3014 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3015
3016 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3017 targetm.calls.promote_prototypes.
3018
3019 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3020
3021 PR middle-end/13750
3022 Revert:
3023 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3024 PR pch/13361
3025 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3026 (handle_pragma_implementation): Likewise.
3027
3028 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3029
3030 PR c++/13714
3031 * typeck.c (lookup_destructor): Tweak error message.
3032
3033 2004-02-05 Jan Hubicka <jh@suse.cz>
3034
3035 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3036 functions.
3037
3038 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3039
3040 PR c++/14008
3041 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3042 code, only emits the diagnostic now. Added lookup of the identifier
3043 and support for qualified ids.
3044 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3045 Parse an (invalid) type name as id-expression within a declarator.
3046 (cp_parser_simple_declaration): Use it.
3047 (cp_parser_member_declaration): Likewise.
3048 (cp_parser_make_typename_type): New function. Handle errors through
3049 cp_parser_diagnose_invalid_typename.
3050 (cp_parser_elaborated_type_specifier): Use it.
3051
3052 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3053
3054 PR c++/13932
3055 * call.c (convert_like_real): Use "converting" rather than
3056 "argument" as the descriptive keyword to
3057 dubious_conversion_warnings.
3058 * typeck.c (convert_for_assignment): Do not call
3059 dubious_conversion_warnings.
3060
3061 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3062
3063 PR c++/13086
3064 * init.c (build_delete): Emit a more informative error message in
3065 case of an incomplete type, and on the correct source line.
3066
3067 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3068
3069 * error.c, search.c: Update copyright.
3070
3071 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3072
3073 PR c++/9941
3074 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3075 linkage for the typeinfo name string.
3076
3077 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3078
3079 PR c++/13969
3080 * cp-tree.h (fold_non_dependent_expr): New function.
3081 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3082 (cp_parser_template_argument): Use fold_non_dependent_expr.
3083 (cp_parser_direct_declarator): Likewise.
3084 * pt.c (fold_non_dependent_expr): New function.
3085 (convert_nontype_argument): Use it.
3086 (tsubst_qualified_id): Simplify.
3087 (tsubst_copy_and_build): Likewise.
3088
3089 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3090
3091 * decl.c (cxx_push_function_context): Do not set
3092 current_function_is_thunk.
3093 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3094 actual function.
3095
3096 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3097
3098 PR c++/13997
3099 * pt.c (more_specialized_class): Increase processing_template_decl
3100 while partial ordering.
3101
3102 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3103
3104 PR c++/13925
3105 * decl.c (start_function): Do not call pushdecl for any
3106 instantiation or specialization of a primary template.
3107
3108 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3109
3110 PR c++/13950
3111 * parser.c (cp_parser_class_name): Robustify.
3112
3113 PR c++/13970
3114 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3115
3116 PR c++/14002
3117 * semantics.c (finish_id_expression): Do not return an
3118 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3119
3120 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3121
3122 PR c++/13978
3123 * pt.c (build_non_dependent_expr): Do not build
3124 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3125
3126 PR c++/13968
3127 * semantics.c (finish_id_expression): Do not return an
3128 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3129
3130 PR c++/13975
3131 * parser.c (cp_parser_simple_declaration): When skipping to the
3132 end of the statement swallow the terminating semicolon.
3133
3134 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3135
3136 PR c++/13113
3137 * init.c (build_offset_ref): Improve error recovery for invalid
3138 uses of non-static member functions.
3139
3140 PR c++/13854
3141 * cp-tree.h (cp_build_type_attribute_variant): New function.
3142 * class.c (build_clone): Use cp_build_type_attribute_variant.
3143 * decl.c (duplicate_decls): Likewise.
3144 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3145 (tsubst_function_type): Likewise.
3146 * tree.c (build_exception_variant): Check attributes before
3147 concluding that two types are the same.
3148 (cp_build_type-attribute_variant): New method.
3149 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3150
3151 PR c++/13907
3152 * call.c (convert_class_to_reference): Keep better track of
3153 pedantically invalid user-defined conversions.
3154
3155 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3156
3157 PR c++/13957
3158 * pt.c (tsubst_qualified_id): Improved error message when a type
3159 is expected but not found.
3160
3161 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3162
3163 * class.c: Fix comment typos.
3164 * decl.c: Likewise.
3165 * error.c: Likewise.
3166 * parser.c: Likewise.
3167 * pt.c: Likewise.
3168 * search.c: Likewise.
3169 * typeck.c: Likewise.
3170
3171 2004-01-30 Richard Henderson <rth@redhat.com>
3172
3173 PR c++/13693
3174 * method.c (use_thunk): Don't force_target_expr for void thunks.
3175 * tree.c (build_target_expr_with_type): Assert non-void type.
3176 (force_target_expr): Likewise.
3177
3178 2004-01-30 Michael Matz <matz@suse.de>
3179
3180 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3181
3182 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3183
3184 DR206
3185 PR c++/13813
3186 * decl.c (grokdeclarator): Check immediatly type completeness for
3187 non-dependent types.
3188
3189 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3190
3191 PR c++/13683
3192 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3193 a sizeof expression.block
3194
3195 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3196
3197 PR c++/13883
3198 * mangle.c (write_encoding): Correct encoding of member template
3199 constructors.
3200
3201 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3202
3203 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3204 template name as it was `<::' (digraph typo).
3205 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3206 (cp_parser_id_expression): Use it.
3207 (cp_parser_nested_name_specifier_opt): Likewise.
3208 (cp_parser_template_name): Likewise.
3209 (cp_parser_class_name): Likewise.
3210 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3211
3212 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3213
3214 PR c++/13791
3215 * typeck.c (merge_types): Do not merge attributes into
3216 TYPENAME_TYPEs.
3217
3218 PR c++/13736
3219 * parser.c (cp_parser_direct_declarator): Do not prevent
3220 backtracking inside a parenthesized declarator.
3221 (cp_parser_parameter_declaration): Fix typo in comment.
3222
3223 2004-01-28 Jan Hubicka <jh@suse.cz>
3224
3225 * semantics.c (expand_body) Do emit_associated_thunks before
3226 expansion.
3227
3228 2004-01-27 Devang Patel <dpatel@apple.com>
3229
3230 * name-lookup.c: Include "debug.h"
3231 (do_namespace_alias): Invoke debug_hooks to emit debug info
3232 for namespace alias.
3233 (do_local_using_decl): Invoke debug_hooks to emit debug info
3234 for using decl.
3235 (do_class_using_decl): Same.
3236 (do_toplevel_using_decl): Same.
3237 (do_using_directive): Same.
3238 (cp_emit_debug_info_for_using): New function.
3239 * Make-lang.in (cp/parser.o): Depend on debug.h
3240 (cp/name-lookup.o): Same.
3241
3242 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3243
3244 * cp-tree.h (language_function, lang_type_header): Use
3245 BOOL_BITFIELD.
3246 * name-lookup.h (cp_binding_level): Likewise.
3247
3248 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3249
3250 PR c++/13663
3251 * semantics.c (finish_for_expr): Check for unresolved overloaded
3252 functions.
3253
3254 * class.c (add_method): Just check processing_template_decl to
3255 determine whether or not we are within a template.
3256 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3257 * init.c (decl_constant_value): Check the type of the declaration,
3258 not TREE_READONLY.
3259 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3260 (push_to_top_level): ... this.
3261 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3262 * pt.c (push_template_decl_real): Reorder condition for speed.
3263 (convert_template_argument): Use dependency-checking functions in
3264 place of uses_template_parms.
3265 (lookup_template_class): Avoid calling uses_template_parms more
3266 than once.
3267 (uses_template_parms): Reimplement, using dependency-checking
3268 functions.
3269 (instantiate_class_template): Use push_to_top_level, not
3270 maybe_push_to_top_level.
3271 (type_unification_real): Simplify.
3272 (type_dependent_expression_p): Handle OFFSET_REFs and
3273 TEMPLATE_DECLs.
3274 (any_dependent_template_arguments_p): Handle multiple levels of
3275 template argument.
3276 * semantics.c (expand_or_defer_fn): Do not check
3277 uses_template_parms for template instantiations.
3278 * typeck.c (comptypes): Avoid calling cp_type_quals.
3279
3280 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3281
3282 PR c++/13833
3283 * call.c (build_over_call): Do not convert arguments when
3284 processing a template.
3285 * pt.c (build_non_dependent_expr): Do not build a
3286 NON_DEPENDENT_EXPR for arithmetic constants.
3287
3288 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3289
3290 PR c++/13810
3291 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3292 returns a TYPE_DECL. no further lookup is required.
3293 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3294 is invalid. Rework to give better diagnostics.
3295
3296 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3297
3298 PR c++/13797
3299 * pt.c (instantiate_class_template): Add an error_mark_node
3300 check.
3301 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3302
3303 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3304
3305 PR c++/13701
3306 * decl.c (finish_function): Move the call to
3307 finish_fname_decls below the call to
3308 finish_eh_spec_block.
3309
3310 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3311
3312 * optimize.c, typeck2.c: Update copyright.
3313
3314 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3315
3316 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3317 init.c, mangle.c, typeck.c: Update copyright.
3318
3319 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3320
3321 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3322
3323 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3324
3325 * Make-lang.in: Replace $(docdir) with doc.
3326 (c++.info, c++.srcinfo): Dummy entry.
3327 (c++.man, c++.srcman): New rules.
3328 (c++.install-man): Revamp rule.
3329
3330 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3331
3332 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3333 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3334 immediate $(shell) instead of deferred backquote.
3335
3336 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3337
3338 PR c++/13651
3339 * parser.c (cp_parser_postfix_expression): When encountering
3340 incomplete type on left-hand side of "->" or ".", treat the entire
3341 expression as erroneous.
3342
3343 PR c++/13592
3344 * call.c (build_field_call): Remove.
3345 (n_build_method_call): Likewise.
3346 (build_method_call): Likewise.
3347 (build_new_method_call): Do not call build_field_call.
3348 * class.c (n_build_method_call): Remove.
3349 (print_class_statistics): Do not print it.
3350 * cp-tree.h (build_method_call): Remove declaration.
3351 (finish_object_call_expr): Likewise.
3352 (build_new_1): Do not use build_method_call.
3353 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3354 when the function appearing on the right-hand-side of "." or "->"
3355 is not actually a function.
3356 * pt.c (tsubst_copy_and_build): Likewise.
3357 * semantics.c (finish_object_call_expr): Remove.
3358
3359 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3360
3361 PR c++/13710
3362 * pt.c (tsubst): Use finish_typeof.
3363
3364 2004-01-18 Jason Merrill <jason@redhat.com>
3365
3366 PR c++/11725
3367 * except.c (build_throw): In a template, set
3368 current_function_returns_abnormally.
3369
3370 2004-01-17 Fred Fish <fnf@intrinsity.com>
3371
3372 PR c++/11895
3373 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3374 except don't call array_type_nelts() with a VECTOR_TYPE.
3375
3376 2004-01-16 Jan Hubicka <jh@suse.cz>
3377
3378 * mangle.c (write_mangled_name): Remove inline modifier.
3379
3380 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3381
3382 PR c++/13574
3383 * decl.c (compute_array_index_type): Fix grammar in comment.
3384 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3385
3386 PR c++/13178
3387 * call.c (name_as_c_string): Print conversion operator names
3388 correctly.
3389
3390 PR c++/13478
3391 * call.c (initialize_reference): Pass -1 for inner parameter to
3392 convert_like_real.
3393
3394 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3395
3396 PR c++/13407
3397 * parser.c (cp_parser_base_specifier): Check for an invalid
3398 keyword `typename' and emit an user-friendly error message.
3399
3400 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3401
3402 PR pch/13361
3403 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3404 (handle_pragma_implementation): Likewise.
3405
3406 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3407
3408 PR c++/9259
3409 * typeck.c (build_class_member_access_expr): Allow to access members
3410 of the currently open class.
3411 (finish_class_member_access_expr): Likewise.
3412
3413 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3414
3415 PR c++/13659
3416 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3417 name by value, instead of computing them.
3418 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3419 arguments. Pass them to validate_nonmember_using_decl.
3420 * name-lookup.h (do_local_using_decl): Adjust.
3421 (do_toplevel_using_decl): Likewise.
3422 * parser.c (cp_parser_using_declaration): Likewise.
3423 * pt.c (tsubst_expr): Likewise.
3424
3425 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3426
3427 PR c++/13594
3428 PR c++/13658
3429 * name-lookup.c (qualified_lookup_using_namespace): Search
3430 strongly-associated namespaces first, and only then try other
3431 namespaces.
3432
3433 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3434
3435 * Make-lang.in (c++.srcextra): Dummy entry.
3436
3437 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3438
3439 PR c++/8856
3440 * parser.c (cp_parser_template_name): Don't try to parse a
3441 conversion-function-id, as it cannot be a template-name.
3442 (cp_parser_simple_type_specifier): Check for invalid template-ids
3443 even after a built-in type.
3444
3445 2004-01-14 Jan Hubicka <jh@suse.cz>
3446
3447 PR c++/12850
3448 * pt.c (instantiate_decl): Do not increase function_depth.
3449
3450 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3451
3452 PR c++/9021
3453 PR c++/11005
3454 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3455 attributes and discard.
3456 * decl.c (xref_tag): Don't overwite existing attributes with
3457 NULL_TREE.
3458
3459 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3460
3461 PR c++/12335
3462 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3463 is no destructor while looking up a BIT_NOT_EXPR.
3464
3465 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3466
3467 * cxxfilt.c: Remove unused file.
3468
3469 2004-01-14 Jan Hubicka <jh@suse.cz>
3470
3471 Partial fix to PR c++/12850
3472 * decl2.c (mark_used): Do not proactively instantiate templates
3473 when compiling in unit-at-a-time or not optimizing.
3474 * optimize.c (maybe_clone_body): Do not increase function depth.
3475
3476 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3477
3478 PR c++/13474
3479 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3480
3481 2004-01-12 Steven Bosscher <stevenb@suse.de>
3482
3483 PR c++/13558
3484 * parser.c (cp_parser_member_declaration): Any non-type is also
3485 not a class or a function.
3486
3487 2004-01-12 Jason Merrill <jason@redhat.com>
3488
3489 PR c++/12815
3490 * class.c (build_base_path): Do not mark vtable references as
3491 TREE_CONSTANT.
3492 (build_vtbl_ref_1): Likewise.
3493
3494 2004-01-12 Richard Henderson <rth@redhat.com>
3495
3496 PR opt/10776
3497 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3498 (store_init_value): Use it.
3499 * decl.c (check_initializer): Expect full initialization code
3500 from store_init_value.
3501 * init.c (expand_aggr_init_1): Likewise.
3502 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3503
3504 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3505
3506 * class.c (layout_class_type): For non-POD class types, also copy
3507 the DECL_SIZE and DECL_MODE of fields to the base class type.
3508
3509 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3510
3511 PR c++/13289
3512 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3513 calling regenerate_decl_from_template.
3514
3515 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3516
3517 PR c++/4100
3518 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3519 decl-specifier occurring along with a class definition.
3520
3521 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3522
3523 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3524 clauses to comments describing declares_class_or_enum.
3525 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3526 false.
3527
3528 2004-01-12 Jan Hubicka <jh@suse.cz>
3529
3530 * pt.c (for_each_template_parm): Do not check for duplicates.
3531 (for_each_template_parm): Use walk_tree duplicate checking code.
3532
3533 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3534
3535 PR c++/3478
3536 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3537 is error_mark_node, don't add any more decl_specs.
3538 (cp_parser_init_declarator): After committing to a declaration, if
3539 the decl_specifiers start with error_mark_node, issue an error and
3540 change the type to "int".
3541
3542 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3543
3544 PR bootstrap/7817
3545 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3546
3547 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3548
3549 DR 337
3550 PR c++/9256
3551 * pt.c (tsubst): Substitution must fail if we are attempting to
3552 create an array with element type that is an abstract class type.
3553 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3554 before calling abstract_virtuals_error.
3555
3556 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3557
3558 * name-lookup.c (qualified_lookup_using_namespace): Consider
3559 strong using directives even if we've already found a binding.
3560
3561 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3562
3563 * cp-tree.h (cxx_expand_expr): Change prototype.
3564 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3565
3566 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3567
3568 PR c++/12573
3569 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3570 looking into them recursively. They can be there because of the
3571 new __offsetof__ extension.
3572
3573 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3574
3575 * parser.c (cp_parser_save_member_function_body): Mark the
3576 definition static.
3577
3578 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3579
3580 PR c++/13057
3581 * class.c (build_clone): Copy type attributes from the original
3582 function to the clone.
3583
3584 PR c++/12815
3585 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3586 references as constant.
3587
3588 PR c++/12132
3589 * parser.c (cp_parser_explicit_instantiation): Improve error
3590 recovery.
3591 (cp_parser_require): Improve indication of the error location.
3592
3593 PR c++/13451
3594 * parser.c (cp_parser_class_head): Reorder logic to check for
3595 invalid qualification.
3596
3597 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3598
3599 PR c++/13157
3600 * name-lookup.c (lookup_using_namespace): Remove spacesp
3601 parameter.
3602 (unqualified_namespace_lookup): Likewise.
3603 (lookup_qualified_name): Adjust accordingly.
3604 (lookup_name_real): Likewise.
3605 (lookup_arg_dependent): Do not eliminate the namespace of the
3606 functions found by unqualified name lookup unless that is the
3607 current namespace.
3608
3609 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3610
3611 * semantics.c (push_deferring_access_checks): Fix format.
3612 (resume_deferring_access_checks): Likewise.
3613 (stop_deferring_access_checks): Likewise.
3614 (pop_deferring_access_checks): Likewise.
3615 (get_deferred_access_checks): Likewise.
3616 (pop_to_parent_deferring_access_checks): Likewise.
3617 (perform_deferred_access_checks): Likewise.
3618 (perform_or_defer_access_check): Likewise.
3619
3620 2004-01-04 Richard Henderson <rth@redhat.com>
3621
3622 * call.c (build_over_call): Don't create a save_expr of an
3623 aggregate, but rather its address.
3624
3625 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3626
3627 PR c++/13529
3628 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3629 an offsetof expression.
3630
3631 * parser.c (cp_parser_parameter_declaration): Fix comment.
3632
3633 PR c++/12226
3634 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3635 (reference_binding): Set it when appropriate.
3636 (build_temp): New function, split out from ...
3637 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3638 (initialize_reference): Likewise.
3639
3640 PR c++/13536
3641 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3642 (cp_parser_new): Initialize it.
3643 (cp_parser_postfix_expression): Set it.
3644 (cp_parser_sizeof_operand): Likewise.
3645 (cp_parser_parameteR_declaration): Do not commit early to tenative
3646 parsers when in_type_id_in_expr_p is set.
3647
3648 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3649
3650 PR c++/13094
3651 * parser.c (cp_parser_template_argument): Don't call
3652 make_unbound_class_template directly.
3653 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3654 UNBOUND_CLASS_TEMPLATE tree node.
3655
3656 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3657
3658 PR target/12729
3659 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3660
3661 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3662
3663 PR c++/13520
3664 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3665 (DECL_FUNCTION_TEMPLATE_P): Use it.
3666 (DECL_CLASS_TEMPLATE_P): Likewise.
3667 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3668 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3669 (cp_parser_template_name): Likewise.
3670 (cp_parser_elaborated_type_specifier): Likewise.
3671 (cp_parser_namespace_name): Likewise.
3672 (cp_parser_class_name): Likewise.
3673 (cp_parser_lookup_name_simple): Likewise.
3674
3675 See ChangeLog.3 for earlier changes.