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