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