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