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