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