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