OSDN Git Service

* decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2005-05-16  Richard Henderson  <rth@redhat.com>
2
3         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
4         (build_library_fn): ... here.
5
6 2005-05-12  Ian Lance Taylor  <ian@airs.com>
7
8         * cp-tree.h (cp_stmt_codes): Don't define.
9         (statement_code_p): Declare.
10         (STATEMENT_CODE_P): Define.
11         * lex.c (statement_code_p): Define.
12         (cxx_init): Use actual codes in stmt_codes initializer, not
13         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
14         than using INIT_STATEMENT_CODES.
15
16 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
17
18         * typeck.c (build_unary_op): Do not resort to address arithmetic
19         when taking the address of a COMPONENT_REF.
20         
21 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
22
23         * class.c (vtbl_init_data_s): Change the type of fns to
24         VEC(tree,gc)*.
25         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
26         Use VEC instead of VARRAY.
27
28 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
29
30         * mangle.c: Remove a reference to the MIPS -mint64 option.
31
32 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
33
34         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
35         VARRAY.
36         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
37         * name-lookup.h (cp_binding_level): Change the type of
38         static_decls to VEC(tree,gc)*.
39
40         * mangle.c (globals): Change the type of substitutions to
41         VEC(tree,gc)*.
42         (dump_substitution_candidates, add_substitution,
43         find_substitution, finish_mangling, init_mangle): Use VEC
44         instead of VARRAY.
45
46 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
47
48         * decl2.c (spew_debug): Remove.
49
50         * decl2.c (ssdf_decls, start_static_storage_duration_function,
51         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
52
53         * decl2.c (pending_statics, note_vague_linkage_var,
54         cp_finish_file): Use VEC instead of VARRAY.
55         (pending_statics_used): Remove.
56
57 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
58
59         * decl2.c (deferred_fns, note_vague_linkage_fn,
60         cp_finish_file): Use VEC instead of VARRAY.
61
62 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
63
64         PR c++/21352
65         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
66
67 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
68
69         * pt.c: Fix a comment typo.
70
71 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
72
73         * cp-tree.h (language_function): Change the type of
74         x_local_names to VEC.
75         * decl.c (push_local_name): Adjust uses of local_names.
76
77 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
78
79         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
80
81 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
82
83         * class.c (local_classes, init_class_processing): Use VEC
84         instead of VARRAY.
85         * cp-tree.h (local_classes): Likewise.
86         * mangle.c (discriminator_for_local_entity): Likewise.
87         * name-lookup.c (pushtag): Likewise.
88
89         * class.c (current_lang_depth, push_lang_context,
90         pop_lang_context): Use VEC instead of VARRAY.
91         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
92         VARRAY.
93         * name-lookup.c (push_to_top_level): Use VEC instead of
94         VARRAY.
95
96 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
97
98         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
99         for BUILT_IN_MD built-ins.
100
101 2005-05-02  Michael Matz  <matz@suse.de>
102
103         PR c++/19542
104         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
105         common frontend.
106         (null_node): Remove.
107         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
108
109 2005-04-25  Ian Lance Taylor  <ian@airs.com>
110
111         * cp-tree.def: Add EXPR_STMT.
112         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
113         (EXPR_STMT_EXPR): Define.
114         * cp-gimplify.c: Include "flags.h".
115         (gimplify_expr_stmt): New static function.
116         (cp_gimplify_expr): Handle EXPR_STMT.
117         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
118         rather than pp_expression.
119         (pp_cxx_statement): Handle EXPR_STMT.
120         * dump.c (cp_dump_tree): Handle EXPR_STMT.
121         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
122         initializer.
123
124 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
125
126         PR C++/21188
127         * rtti.c (ifnonnull): Cast the zero comparison operand
128         to the correct type.
129
130 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
131
132         PR middle-end/20991
133         * class.c: Include cgraph.h.
134         (cp_fold_obj_type_ref): Set node->local.vtable_method.
135         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
136
137 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
138
139         * mangle.c (write_builtin_type): Handle integer types which are
140         not one of the shared integer type nodes and emit a "vendor
141         extended builtin type" with an encoding in the form of "u5int96".
142
143 2005-04-24  Ian Lance Taylor  <ian@airs.com>
144
145         * cp-tree.def (USING_STMT): Change class to tcc_statement.
146         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
147         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
148         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
149
150 2005-04-23  DJ Delorie  <dj@redhat.com>
151
152         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
153         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
154         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
155         callers.
156
157 2005-04-22  Per Bothner  <per@bothner.com>
158
159         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
160         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
161
162 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
163
164         PR c++/21087
165         * name-lookup.c (push_overloaded_decl): Do not overload with
166         non-duplicate anticipated built-in.
167
168 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
169
170         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
171         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
172
173 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
174
175         * cp-tree.h: Adjust for new VEC API.
176         Define VEC(tree_pair_s,gc).
177         (struct save_scope): Adjust.
178         (struct lang_type_class): Adjust.
179         (unemitted_tinfo_decls): Adjust.
180         * class.c (add_method, resort_type_method_vec,
181         finish_struct_methods, struct find_final_overrider_data,
182         dfs_find_final_overrider_pre, find_final_overrider,
183         get_vcall_index, warn_hidden, walk_subobject_offsets,
184         check_methods, fixup_inline_methods, end_of_class,
185         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
186         add_vcall_offset): Adjust.
187         * decl.c (xref_basetypes, finish_method): Adjust.
188         * decl2.c (check_classfn): Adjust.
189         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
190         * method.c (do_build_copy_constructor): Adjust.
191         * name-lookup.c (new_class_binding, store_binding, 
192         store_bindings, store_class_bindings): Adjust.
193         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
194         VEC(cp_class_binding,gc).
195         (struct cp_binding_level): Adjust.
196         * parser.c: Define VEC(cp_token_position,heap).
197         (struct cp_lexer): Adjust.
198         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
199         cp_lexer_save_tokens): Adjust.
200         * pt.c (retrieve_specialization,
201         check_explicit_specialization): Adjust.
202         * rtti.c (unemitted_tinfo_decls): Adjust.
203         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
204         get_pseudo_ti_desc): Adjust.
205         * search.c (dfs_access_in_type, lookup_conversion_operator,
206         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
207         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
208         * semantics.c: Define VEC(deferred_access,gc).
209         (push_deferring_access_checks): Adjust.
210         * typeck2.c (abstract_virtuals_error): Adjust.
211
212 2005-04-20  Ian Lance Taylor  <ian@airs.com>
213
214         * cp-tree.def: Add STMT_EXPR.
215         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
216         (STMT_EXPR_STMT): Define.
217         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
218         STMT_EXPR.
219         (pp_cxx_expression): Likewise.
220         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
221         * dump.c (cp_dump_tree): Handle STMT_EXPR.
222
223 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
224
225         * decl.c (expand_static_init): Call build2 and build3 instead
226         of build.
227
228         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
229
230 2005-04-17  Ian Lance Taylor  <ian@airs.com>
231
232         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
233         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
234         ARROW_EXPR.
235         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
236         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
237         ALIGNOF_EXPR.
238         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
239         c_sizeof_or_alignof_type for change in parameter type.
240
241 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
242
243         PR c++/21025
244         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
245         which sizeof/alignof is dependent, rather than just whether we are
246         processing_template_decl.
247         
248 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
249
250         * cp-tree.h (LOOKUP_GLOBAL): Remove.
251         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
252         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
253         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
254         their values.
255
256 2005-04-15  Richard Henderson  <rth@redhat.com>
257
258         PR middle-end/14311
259         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
260
261 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
262
263         * cp-tree.h (lang_type_class): Remove redefined.  Move
264         java_interface into where redefined was.  Increment the width
265         of dummy.
266         (TYPE_REDEFINED): Remove.
267
268 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
269
270         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
271         CLASSTYPE_TEMPLATE_LEVEL): Remove.
272
273 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
274
275         * decl2.c (determine_visibility): Don't use export_class_data.
276         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
277         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY. 
278
279 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
280
281         * cp-tree.h (cxx_alignof): Remove.
282
283         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
284
285         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
286         CONV_STATIC_CAST): Remove.
287
288         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
289
290         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
291
292         * cp-tree.h (cp_deprecated): Remove.
293
294 2005-04-08  Ian Lance Taylor  <ian@airs.com>
295
296         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
297         CONTINUE_STMT, SWITCH_STMT.
298         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
299         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
300         (WHILE_COND, WHILE_BODY): Define.
301         (DO_COND, DO_BODY): Define.
302         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
303         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
304         * cp-gimplify.c (enum bc_t): Define.
305         (struct cp_gimplify_ctx, ctxp): Define.
306         (push_context, pop_context): New static functions.
307         (begin_bc_block, finish_bc_block): New static functions.
308         (build_bc_goto): New static function.
309         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
310         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
311         (gimplify_switch_stmt): Likewise.
312         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
313         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
314         (cp_genericize): Call push_context and pop_context.
315         * semantics.c (finish_break_stmt): Just call build_stmt
316         (BREAK_STMT) rather than build_break_stmt.
317         (finish_continue_stmt): Corresponding change.
318         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
319         parameters.
320         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
321         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
322         * dump.c (cp_dump_tree): Likewise.
323
324 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
325
326         PR c++/20905
327         * parser.c (cp_parser_type_specifier_seq): Add is_condition
328         parameter.
329         (cp_parser_new_type_id): Pass it.
330         (cp_parser_condition): Likewise.
331         (cp_parser_conversion_type_id): Likewise.
332         (cp_parser_type_id): Likewise.
333         (cp_parser_type_specifier_seq): In a condition, do not allow
334         invalid type-specifier combinations.
335         (cp_parser_exception_declaration): Adjust call to
336         cp_parser_type_specifier_seq. 
337
338         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
339         * cp-tree.h (struct tinst_level): Add in_system_header_p.
340         (TINST_IN_SYSTEM_HEADER_P): New macro.
341         (make_tinst_level): Remove.
342         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
343         the instantiated class.
344         (push_tinst_level): Do not use make_tinst_level.  Set
345         TINST_IN_SYSTEM_HEADER_P.
346         (pop_tinst_level): Likewise.
347         (instantiate_class_template): Set in_system_header.
348         (instantiate_pending_templates): Likewise.
349         * tree.c (make_tinst_level): Remove.
350
351 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
352
353         * decl.c (start_decl): Apply pending #pragma weak regardless of
354         scope.
355
356 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
357
358         PR c++/20212
359         * pt.c (regenerate_decl_from_template): Copy attributes for
360         parameters from the pattern to the instantiation.
361
362 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
363
364         PR c++/20734
365         * cp-tree.def (OFFSET_REF): Correct comments.
366         * init.c (build_offset_ref): Remove misleading comment.
367         * typeck.c (build_unary_op): Handle pointer-to-member creation
368         here, rather than ...
369         (unary_complex_lvalue): ... here.
370
371 2005-04-06  Jason Merrill  <jason@redhat.com>
372
373         PR c++/19312
374         * tree.c (stabilize_init): Don't bother trying to stabilize
375         something with no side-effects.
376
377 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
378
379         PR c++/20763
380         * decl.c (grokdeclarator): Correct attribute handling.
381
382 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
383
384         PR c++/19159
385         * decl2.c (import_export_decl): Use non-COMDAT external linkage
386         for virtual tables, typeinfo, etc. that will be emitted in only
387         one translation unit on systems without weak symbols.
388
389 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
390
391         PR c++/20679
392         * parser.c (cp_parser_template_name): Fix thinko.
393
394 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
395
396         PR c++/20746
397         * method.c (use_thunk): Protect covariant pointer return
398         adjustments from NULL pointers.
399
400 2005-04-04  Jan Hubicka  <jh@suse.cz>
401
402         * decl2.c (finish_objects): Revert my previous patch.
403         (cp_finish_file): Likewise.
404
405 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
406
407         * pt.c: Fix comment typos.
408
409 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
410
411         PR c++/20723
412         * pt.c (more_specialized_fn): Member functions are unordered wrt
413         non-members.  Conversion operators are unordered wrt other
414         functions.
415
416 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
417
418         * call.c (add_template_candidates_real): Remove length parameter
419         from fn_type_unification call.
420         * class.c (resolve_address_of_overloaded_function): Likewise
421         * cp-tree.h (fn_type_unification): Remove length parameter.
422         * pt.c (get_bindings_overload): Remove.
423         (get_bindings_real): Rename to ...
424         (get_bindings): ... here.  Remove length and strict
425         parameters. Change return type flag to boolean.  Remove original
426         forwarding function.
427         (determine_specialization): Adjust get_bindings call.
428         (fn_type_unification): Remove length parameter.  Adjust.
429         (type_unification_real): Remove length parameter.  Adjust.
430         (resolve_overloaded_unification): Adjust get_bindings call.
431         (try_one_overload): Simplify confusing cascaded if control flow.
432         (unify): Remove length paramter from type_unification_real call.
433         (most_specialized_instantiation): Adjust get_bindings calls.
434         (most_specialized): Likewise.
435
436 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
437
438         PR c++/19203, implement DR 214
439         * call.c (joust): Use more_specialized_fn.
440         * cp-tree.h (DEDUCE_ORDER): Remove.
441         (more_specialized): Replace with ...
442         (more_specialized_fn): ... this.
443         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
444         case.
445         (type_unification_real): Remove DEDUCE_ORDER case.
446         (more_specialized): Replace with ...
447         (more_specialized_fn): ... this.  Implement DR 214.
448         (most_specialized_instantiation): Use get_bindings_real directly.
449
450 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
451
452         PR c++/18644
453         * call.c (build_new_op): Remove check for -Wsynth.
454
455 2005-03-31  Jan Hubicka  <jh@suse.cz>
456
457         * decl2.c (finish_objects): Mark ctor as needed.
458         (cp_finish_file): Output variables only in nonunit-at-a-time.
459
460 2005-03-29  Richard Henderson  <rth@redhat.com>
461
462         PR c/20519
463         * decl.c (cp_complete_array_type): Rename from complete_array_type.
464         Use the new complete_array_type in c-common.c.  Update all callers.
465         * cp-tree.h (cp_complete_array_type): Update to match.
466
467 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
468
469         * typeck.c (build_static_cast_1): Allow scalar_cast between
470         any integral, floating, or enumeration type.
471
472 2005-03-24  Steven Bosscher  <stevenb@suse.de>
473
474         * typeck.c (comptypes): First determine if the types are compatible
475         from a target-independent point of view.  Check target attributes
476         last.
477
478         * class.c (build_base_path):
479         (build_vbase_offset_vtbl_entries):
480         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
481         * error.c (dump_expr): Likewise.
482         * init.c (build_zero_init, expand_cleanup_for_base,
483         build_vec_delete_1): Likewise.
484         * mangle.c (write_integer_cst): Likewise.
485         * method.c (thunk_adjust): Likewise.
486         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
487         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
488         * typeck.c (build_ptrmemfunc_access_expr,
489         (get_member_function_from_ptrfunc): Likewise.
490
491 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
492
493         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
494
495 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
496
497         * cp-tree.h (perform_integral_promotions): Remove.
498         (default_conversion): Add.
499
500 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
501
502         * parser.c (cp_parser_warn_min_max): New function.
503         (cp_parser_binary_expression): Use it.
504         (cp_parser_assignment_operator_opt): Likewise.
505         (cp_parser_operator): Likewise.
506
507 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
508
509         PR c++/19980
510         * decl.c (start_preparsed_function): Robustify.
511
512 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
513
514         PR c++/20499
515         * parser.c (cp_parser_class_head): Return NULL_TREE when
516         encountering a redefinition.
517
518 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
519
520         PR c++/20465
521         PR c++/20381
522         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
523         template.
524
525 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
526
527         PR c++/20461
528         PR c++/20536
529         * init.c (emit_mem_initializers): Don't crash on undefined
530         types.
531
532 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
533
534         PR c++/20147
535         * semantics.c (finish_stmt_expr_expr): Return immediately
536         if error_operand_p (expr).
537
538 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
539
540         * cp-tree.h (lvalue_or_else, lvalue_p): New.
541         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
542
543 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
544
545         PR c++/20240
546         * decl.c (decls_match): Compare context of VAR_DECL.
547
548 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
549
550         PR c++/20333
551         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
552         Check the return value of cp_parser_nested_name_specifier.
553
554 2005-03-18  Dale Johannesen <dalej@apple.com>
555
556         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
557
558 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
559
560         PR c++/20463
561         * parser.c (cp_parser_diagnose_invalid_type_name):
562         Check TYPE_BINFO (current_class_type) before attempting
563         to emit inform messages.
564
565 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
566
567         PR c++/19966
568         * cp-tree.h (grok_op_properties): Change return type to void.
569         * decl.c (grok_op_properties): Return early - don't check the
570         arity - in case of a static member or an operator that cannot
571         be non-member; tidy a bit.
572
573 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
574
575         PR c++/20186
576         * pt.c (contains_dependent_cast_p): Remove.
577         (fold_non_dependent_expr): Don't use it.
578         (value_dependent_expression_p): Use a switch statement.
579         reference_exprs can be dependent.
580
581 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
582
583         PR c++/4403
584         PR c++/9783, DR433
585         * name-lookup.c (pushtag): Skip template parameter scope when
586         scope is ts_global.  Don't push tag into template parameter
587         scope.
588         * pt.c (instantiate_class_template): Reorder friend class
589         template substitution to handle non-dependent friend class
590         that hasn't been previously declared.
591
592 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
593
594         Friend class name lookup 5/n
595         PR c++/1016
596         * cp-tree.h (pushtag): Adjust declaration.
597         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
598         lookup_name fails.
599         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
600         (start_enum): Adjust call to pushtag.
601         * name-lookup.c (ambiguous_decl): Ignore hidden names.
602         (qualify_lookup): Change return type to bool.
603         (hidden_name_p): New function.
604         (lookup_namespace_name, unqualified_namespace_lookup,
605         lookup_name_real): Use it.
606         (lookup_type_scope): Update comments.
607         (maybe_process_template_type_declaration): Change parameter name
608         from globalize to is_friend.
609         (pushtag): Change globalize parameter of type int to tag_scope.
610         Hide name if introduced by friend declaration.
611         * name-lookup.h (hidden_name_p): Add declaration.
612         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
613         here.
614         * pt.c (push_template_decl_real): Make hidden class template
615         visible.
616         (lookup_template_class, instantiate_class_template): Adjust call
617         to pushtag.
618         * semantics.c (begin_class_definition): Likewise.
619         * rtti.c (init_rtti_processing, build_dynamic_cast_1, 
620         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
621         ts_global.
622
623 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
624
625         PR c++/20157
626         * pt.c (determine_specialization): Reject non-specializations. 
627
628 2005-03-11  Per Bothner  <per@bothner.com>
629
630         * cp-tree.h (struct cp_declarator): New id_loc field.
631         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
632         location using c_lex_with_flags, instead of input_location.
633         (cp_parser_direct_declarator): Set declarator's id_loc from
634         cp_token's id_loc.
635
636 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
637
638         PR c++/18384, c++/18327
639         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
640         and index.  Convert max_index to size_type_node if it isn't
641         host_integerp (, 1).
642
643 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
644
645         PR c++/20208
646         * pt.c (tsubst_decl): Apply array-to-pointer and
647         function-to-pointer conversions to function arguments.
648         (regenerate_decl_from_template): Likewise.
649
650 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
651
652         PR c++/16859    
653         * decl.c (complete_array_type): In pedantic mode, return
654         3 for an empty initializer list as the initializer for an
655         array of unknown bound (8.5.1/4).
656         (maybe_deduce_size_from_array_init): Fix final test to use
657         the above.
658
659 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
660
661         PR c++/20186
662         * pt.c (contains_dependent_cast_p): New.
663         (fold_non_dependent_expr): Call it.
664
665 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
666
667         PR c++/20142
668         * cp-tree.h (target_type): Remove.
669         * decl.c (layout_var_decl): Remove #if 0'd code.
670         (cp_finish_decl): Remove dead code.
671         * init.c (build_vec_init): When determining whether or not the
672         element type has an asignment operator, look through all array
673         dimensions. 
674         * typeck.c (target_type): Remove.
675
676 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
677
678         * class.c (finish_struct_1): Do not warn about non-virtual
679         destructors in Java classes.
680
681 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
682
683         PR c++/19311
684         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
685         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
686         for OFFSET_TYPE.
687         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
688         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
689         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
690         template.
691
692 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
693
694         * name-lookup.c (push_overloaded_decl): Don't error if the new
695         decl matches the old one.
696         * decl.c (redeclaration_error_message): Likewise.
697
698 2005-03-01  Per Bothner  <per@bothner.com>
699
700         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
701         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
702
703 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
704
705         PR c++/20232
706         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
707         covariancy. 
708
709         * cp-tree.g (THUNK_TARGET): Expand comment.
710         * method.c (use_thunk): Make sure we also use the target, if that
711         is a thunk.
712
713 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
714
715         PR c++/20206
716         * decl.c (cxx_comdat_group): Put thunks for
717         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
718         comdat group as the thunk target.
719
720 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
721
722         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
723         parser.c: Fix comment typo(s).
724
725 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
726
727         PR c++/20175
728         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
729         initializes a char/wchar_t array.
730
731 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
732
733         PR c++/19878
734         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
735         with internal linkage.
736
737 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
738
739         * decl.c (grokvardecl): Don't exempt anonymous types from having
740         linkage for variables that have linkage other than "C".
741
742 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
743
744         * cp-objcp-common.h, error.c: Update copyright.
745
746 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
747
748         PR c++/20073
749         * decl.c (start_decl_1): Don't clear TREE_READONLY.
750         (cp_finish_decl): Likewise.
751         (complete_vars): Call cp_apply_type_quals_to_decl.
752         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
753         cases where that's not valid.
754
755         PR c++/19991
756         * init.c (integral_constant_value): Iterate if the value of a decl
757         is itself a constant.
758
759         PR c++/20152
760         * parser.c (cp_parser_class_head): Check for redefintions here.
761         * semantics.c (begin_class_definition): Not here.
762         
763         PR c++/20153
764         * decl2.c (build_anon_union_vars): Add type parameter.
765         (finish_anon_union): Pass it.
766
767         PR c++/20148
768         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
769         Handle STATEMENT_LIST.
770
771         PR c++/19883
772         * parser.c (cp_parser_direct_declarator): Always complain about
773         non-constant array bounds when in a function scope.
774         * semantics.c (finish_id_expression): Do not mark dependent names
775         as non-constant. 
776
777 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
778         
779         PR c++/19076
780         PR c++/6628
781         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
782         * decl.c (grokdeclarator): Pedwarn about qualifying a function
783         type. 
784         Add qualifiers when declaring a typedef of a function type.
785         Member function pointers pick up the qualifiers of the typedef
786         used to declare them.
787         Don't complain about creating cv-qualified function types.
788         Complain about qualified function typedefs that are used to
789         declare non-static member functions or free functions.
790         Use cp_apply_type_quals_to_decl.
791         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
792         (grokclassfn): Use cp_apply_type_quals_to_decl.
793         * error.c (dump_type_suffix): Print qualifiers for function
794         types. 
795         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
796         (tsubst): When substituting a function type into a member
797         pointer type, pass along the qualifiers.
798         (unify): Unify member pointers to member function pointers.
799         * tree.c (cp_build_qualified_type_real): Function types may be
800         qualified. This includes restrict qualifiers.
801         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
802         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
803         added to function types.
804
805 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
806
807         PR 18785
808         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
809         c_common_to_target_charset.  Delete bogus comment.
810
811 2005-02-18  Richard Henderson  <rth@redhat.com>
812
813         PR libstdc++/10606
814         * except.c (do_get_exception_ptr): New.
815         (expand_start_catch_block): Use it.
816
817 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
818
819         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
820         if type is not error_mark_node.
821
822 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
823
824         PR c++/19508
825         * decl2.c (grokfield): Do not apply attributes to template parameters
826         as they are ignored by tsubst anyway.
827
828 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
829
830         PR c++/19813
831         * decl.c (start_decl_1): Clear TREE_READONLY flag if
832         its type has TYPE_NEEDS_CONSTRUCTING.
833         (complete_vars): Likewise.
834
835 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
836
837         PR c++/20028
838         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
839         template along with TYPE_SIZE.
840
841         PR c++/20022
842         * semantics.c (perform_deferred_access_checks): Use
843         get_deferred_access_checks to get the top of the stack.
844
845 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
846
847         PR c++/17788
848         * class.c (add_implicitly_declared_members, check_field_decl)
849         (check_field_decls, check_bases): Remove arguments, tests and
850         assignments of cant_have_default_ctor-related variables.
851
852 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
853
854         * decl2.c (mark_used): Set the source location of the used decl to
855         the current input location here...
856         * method.c (synthesize_method): ... not here.  Set input_location
857         from the decl instead.
858
859 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
860
861         PR c++/19608
862         * parser.c (cp_parser_late_parsing_for_member): Use
863         current_function_decl as scope to push to and from.
864
865         PR c++/19884
866         * pt.c (check_explicit_specialization): Make sure namespace
867         binding lookup found an overloaded function.
868         (lookup_template_function): Just assert FNS is an overloaded
869         function.
870
871         PR c++/19895
872         * decl.c (grokdeclarator): Check for error mark node in ptrmem
873         construction.
874
875 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
876
877         PR c++/17816
878         * decl.c (redeclaration_error_message): Report redefinition of
879         pure virtual function.
880
881 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
882
883         PR c++/19891
884         * class.c (build_simple_base_path): Build the component_ref
885         directly.
886         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
887         rather than using lookup_base.
888         * search.c (dfs_walk_once): Add non-recursive assert check.
889         * typeck.c (build_class_member_access_expr): It is possible for
890         the member type to be both const and volatile.
891
892 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
893
894         PR c++/14479
895         PR c++/19487
896         * pt.c (maybe_check_template_type): Remove.
897         * cp-tree.h (maybe_check_template_type): Remove prototype.
898         * name-lookup.c (maybe_process_template_type_declaration): Don't
899         use maybe_check_template_type.
900
901 2005-02-11  Richard Henderson  <rth@redhat.com>
902
903         PR c++/19632
904         * pt.c (get_mostly_instantiated_function_type): Save and restore
905         flag_access_control instead of push/pop_access_scope.
906
907 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
908
909         PR c++/19755
910         * decl.c (reshape_init): Issue warnings about missing braces.
911
912 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
913
914         * cp-tree.def, except.c, ptree.c: Update copyright.
915
916 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
917
918         PR c++/19811
919         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
920         attempting name lookup.
921
922         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
923
924         PR c++/19787
925         * call.c (initialize_reference): Robustify.
926
927         PR ++/19732
928         * decl.c (grokdeclarator): Check for invalid use of destructor
929         names.
930
931         PR c++/19762
932         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
933         names with invalid types.
934
935         PR c++/19826
936         * parser.c (cp_parser_direct_declarator): Allow type-dependent
937         expressions as array bounds.
938
939         PR c++/19739
940         * parser.c (cp_parser_attributes_list): Allow empty lists.
941
942 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
943
944         PR c++/19733
945         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
946         (check_bases): Give warnings about a base class with a
947         non-virtual destructor, even if it is implicit.
948         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
949         (maybe_warn_about_overly_private_class): Don't use
950         TYPE_HAS_DESTRUCTOR.
951         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
952         (check_for_override): Give it external linkage.
953         (add_implicitly_declared_members): Generate destructors lazily.
954         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
955         TYPE_HAS_DESTRUCTOR.
956         (check_bases_and_members): Call check_methods before
957         check_field_decls.
958         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
959         TYPE_HAS_DESTRUCTOR.
960         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
961         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
962         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
963         (lang_type_class): Add lazy_destructor.
964         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
965         (CLASSTYPE_DESTRUCTORS): Robustify.
966         (TYPE_HAS_DESTRUCTOR): Remove.
967         (check_for_override): Declare.
968         (build_vbase_delete): Remove.
969         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
970         expressions.
971         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
972         * except.c (dtor_nothrow): Lazily create destructors if necessary.
973         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
974         * init.c (build_delete): Lazily create destructors, if necessary.
975         (build_vbase_delete): Remove.
976         * method.c (locate_dtor): Simplify.
977         (implicitly_declare_fn): Add support for destructors.
978         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
979         necessary.
980         * pt.c (check_explicit_specialization): Don't use
981         TYPE_HAS_DESTRUCTOR.
982         (instantiate_class_template): Likewise.
983         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
984         * rtti.c (emit_support_tinfos): Robustify.
985         * search.c (lookup_fnfields_1): Lazily create destructors.
986         * typeck.c (build_class_member_access_expr): Remove
987         PSEUDO_DTOR_EXPR handling.
988         (lookup_destructor): Likewise.
989
990 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
991
992         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
993         copyright.
994
995 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
996
997         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
998         on boolean variables.
999         (cp_lexer_stop_debugging): Likewise.
1000
1001 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1002
1003         PR c++/17401
1004         * parser.c (cp_parser_pure_specifier): Emit a specific error
1005         message with an invalid pure specifier.
1006         * decl2.c (grok_function_init): Remove.
1007         (grokfield): An initializer for a method is a always a pure
1008         specifier.
1009
1010 2005-02-02  Matt Austern  <austern@apple.com>
1011
1012         PR c++/19628
1013         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1014         * parser.c (cp_parser_postfix_expression): Accept function call in
1015         constant expression if builtin_valid_in_constant_expr_p is true
1016         for that function.
1017         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1018         * semantics.c (finish_id_expression): Accept function call in constant
1019         expression if builtin_valid_in_constant_expr_p is true for that
1020         function.
1021         * tree.c (builtin_valid_in_constant_expr_p): New.
1022
1023 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1024
1025         PR c++/17413
1026         * pt.c (check_instantiated_args): Improve error message.
1027         Fix logic when to print its second part.
1028
1029 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1030
1031         * cp-tree.h (complete_type_or_else): Remove macro.
1032         (complete_type_or_diagnostic): Rename to complete_type_or_else
1033         and remove last argument.
1034         * typeck.c (complete_type_or_diagnostic): Rename to
1035         complete_type_or_else and remove last argument.
1036
1037 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1038
1039         * cp-tree.h (commonparms): Remove prototype.
1040         (convert_arguments): Likewise.
1041         (PFN_FROM_PTRMEMFUNC): Remove.
1042         * typeck.c (commonparms): Make static.
1043         (convert_arguments): Add prototype. Make static.
1044         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1045
1046 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1047
1048         * parser.c (cp_parser_primary_expression): Don't complain about
1049         floating-point literals in integral constant expressions when
1050         !pedantic.
1051
1052 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
1053
1054         * parser.c (cp_parser_template_id): Revert comment patch too.
1055
1056         PR c++/18757
1057         PR c++/19366
1058         PR c++/19499
1059         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1060         Issue an error when creating the template id.
1061         * pt.c (fn_type_unification): Return early if the explicit
1062         template arg list is an error_mark_node.
1063
1064 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1065
1066         * decl.c (build_enumerator): Do not issue duplicate error messages
1067         about invalid enumeration constants.
1068         * parser.c (cp_parser_non_integral_constant_expression): Always
1069         set parser->non_integral_constant_expression_p.
1070         (cp_parser_primary_expression): Add cast_p parameter.  Issue
1071         errors about invalid uses of floating-point literals in
1072         cast-expressions.
1073         (cp_parser_postfix_expression): Add cast_p parameter.
1074         (cp_parser_open_square_expression): Pass it.
1075         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1076         (cp_parser_unary_expression): Likewise.
1077         (cp_parser_new_placement): Pass it.
1078         (cp_parser_direct_new_declarator): Likewise.
1079         (cp_parser_new_initializer): Likewise.
1080         (cp_parser_cast_expression): Add cast_p parameter.
1081         (cp_parser_binary_expression): Likewise.
1082         (cp_parser_question_colon_clause): Likewise.
1083         (cp_parser_assignment_expression): Likewise.
1084         (cp_parser_expression): Likewise.
1085         (cp_parser_constant_expression): If an integral constant
1086         expression is invalid, return error_mark_node.
1087         (cp_parser_expression_statement): Pass cast_p.
1088         (cp_parser_condition): Likewise.
1089         (cp_parser_iteration_statement): Likewise.
1090         (cp_parser_jump_statement): Likewise.
1091         (cp_parser_mem_initializer): Likewise.
1092         (cp_parser_template_argument): Likewise.
1093         (cp_parser_parameter_declaration): Likewise.
1094         (cp_parser_initializer): Likewise.
1095         (cp_parser_throw_expression): Likewise.
1096         (cp_parser_attribute_list): Likewise.
1097         (cp_parser_simple_cast_expression): Likewise.
1098         (cp_parser_functional_cast): Likewise.
1099         (cp_parser_late_parsing_default_args): Likewise.
1100         (cp_parser_sizeof_operand): Save/restore
1101         non_integral_constant_expression_p.
1102
1103 2005-01-31  Mike Stump  <mrs@apple.com>
1104
1105         * parser.c (cp_lexer_new_main): Get the first token, first, before
1106         doing anything.
1107
1108 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1109
1110         * decl.c (start_decl): Add missing parentheses.
1111
1112 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
1113
1114         PR c++/19555
1115         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1116         * decl.c (duplicate_decls): Do not discard
1117         DECL_IMPLICIT_INSTANTIATION when merging declarations.
1118         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1119         variables that do not have DECL_USE_TEMPLATE.
1120
1121         PR c++/19395
1122         * decl.c (grokdeclarator): Refactor code so that qualified names
1123         are never allowed as the declarator in a typedef.
1124
1125         PR c++/19367
1126         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1127         builtin declarations.
1128
1129         PR c++/19457
1130         * call.c (convert_like_real): Inline call to
1131         dubious_conversion_warnings here.
1132         * cp-tree.h (dubious_conversion_warnings): Remove.
1133         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1134         setting TREE_NEGATED_INT.
1135         * typeck.c (dubious_conversion_warnings): Remove.
1136
1137         PR c++/19349
1138         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1139         memory.
1140
1141 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
1142
1143         PR c++/19253
1144         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1145         tentative parses.
1146
1147         PR c++/19667
1148         * pt.c (redeclare_class_template): Robustify.
1149
1150 2005-01-27  Steven Bosscher  <stevenb@suse.de>
1151
1152         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1153         instead of SWITCH_EXPR ones.
1154         * pt.c (tsubst_expr): Likewise.
1155         * semantics.c (begin_switch_stmt, finish_switch_cond,
1156         finish_switch_stmt): Likewise.
1157
1158 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
1159
1160         PR c++/18370
1161         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1162
1163 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
1164
1165         * class.c (abort_fndecl_addr): New variable.
1166         (build_vtbl_initializer): If we have a pure virtual function
1167         share the abort function's address.
1168         Include gt-cp-class.h at the end.
1169         * config-lang.in (gtfiles): Add cp/class.c.
1170
1171 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1172
1173         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1174         (pp_cxx_function_definition): Make static.
1175         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1176         (pp_cxx_function_definition): Likewise.
1177
1178 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1179
1180         * name-lookup.c (print_binding_level): Make static.
1181         (constructor_name_full): Make static inline.
1182         (current_decl_namespace): Make static.
1183         * name-lookup.h (constructor_name_full): Remove prototype.
1184         (print_binding_level): Likewise.
1185         (current_decl_namespace): Likewise.
1186
1187 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1188
1189         * decl.h (debug_bindings_indentation): Remove.
1190
1191 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
1192
1193         * typeck.c: Fix a comment typo.
1194
1195 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1196
1197         PR c++/19208
1198         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1199         at least once.
1200         (tsubst): Use fold_decl_constant_value in place of a bare call to
1201         integral_constant_value.
1202
1203 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
1204
1205         * typeck.c (more_qualified_p): Remove.
1206         * cp-tree.h: Remove the corresponding prototype.
1207
1208 2005-01-19  Matt Austern  <austern@apple.com>
1209
1210         * typeck.c (comptypes): Handle return code from objc_comptypes
1211         correctly.
1212
1213 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
1214
1215         * cp-tree.h, name-lookup.h: Remove unused prototypes.
1216
1217 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1218
1219         PR c++/19375
1220         * semantics.c (finish_id_expression): Disable access checking for
1221         already lookuped FIELD_DECL.
1222
1223 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1224
1225         * decl.c (delete_block): Remove.
1226         * cp-tree.h: Remove the corresponding prototype.
1227
1228         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1229         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1230         Remove.
1231         * cp-tree.h: Remove the corresponding prototypes.
1232
1233         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1234         cp_update_decl_after_saving, name_p): Remove.
1235         * cp-tree.h: Remove the corresponding prototypes.
1236
1237 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
1238
1239         PR c/19472
1240         * semantics.c (finish_asm_stmt): Strip nops off
1241         input memory operands.
1242
1243 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1244
1245         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1246         typeck2.c: Update copyright.
1247
1248 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
1249
1250         * class.c (get_enclosing_class): Remove.
1251         * cp-tree.h: Remove the corresponding prototypes.
1252
1253         * cvt.c (convert_lvalue): Remove.
1254         * cp-tree.h: Remove the corresponding prototype.
1255
1256         * pt.c (tinst_for_decl): Remove.
1257         * cp-tree.h: Remove the corresponding prototypes.
1258
1259         * tree.c (hash_chainon): Remove.
1260         * cp-tree.h: Remove the corresponding prototypes.
1261
1262 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
1263
1264         PR c++/19263
1265         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1266         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1267
1268 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1269
1270         * Make-lang.in (cp-warn): Don't append $(WERROR).
1271
1272 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
1273
1274         * cp-tree.h: Fix a comment typo.
1275
1276 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
1277
1278         PR c++/19298
1279         * pt.c (tsubst_qualified_id): Call convert_from_reference.
1280
1281 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
1282
1283         PR c++/19244
1284         * class.c (add_implicitly_declared_members): Remove dead code.
1285         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
1286         DECL_CONSTRUCTOR_P.
1287         (grokdeclarator): Adjust calls to grokfndecl.
1288         * method.c (implicitly_declare_fn): Improve documentation.
1289         * parser.c (cp_parser_direct_declarator): Do not consider a
1290         function to be a constructor if the containing class was
1291         originally anonymous.
1292
1293 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1294
1295         PR c++/17154
1296         * search.c (lookup_field_1): Handle using declaration in
1297         class template partial specialization.
1298
1299 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1300
1301         PR c++/19258
1302         * pt.c (push_access_scope): Handle friend defined in class.
1303         (pop_access_scope): Likewise.
1304
1305 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1306
1307         PR c++/19270
1308         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1309         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1310         array-new handling code.  Use build_x_binary_op.
1311
1312 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1313
1314         PR c++/19030
1315         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1316         * name-lookup.h (push_scope): Return pushed scope, not flag.
1317         * name-lookup.c (push_scope): Return scope that should be popped,
1318         not a flag.
1319         * decl.c (start_decl): Adjust.
1320         (grokfndecl): Adjust scope push and pop.
1321         * decl2.c (check_classfn): Likewise.
1322         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1323         cp_parser_init_declarator, cp_parser_direct_declarator,
1324         cp_parser_class_specifier, cp_parser_class_head,
1325         cp_parser_lookup_name,
1326         cp_parser_constructor_declarator_p): Likewise.
1327         * pt.c (instantiate_class_template,
1328         resolve_typename_type): Likewise.
1329
1330 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
1331
1332         PR c++/14136
1333         * parser.c (cp_parser_unqualified_id): Do not issue error message
1334         for typedef-name as destructor declarator when performing an
1335         uncommitted tentative parse.
1336
1337 2005-01-01  Steven Bosscher  <stevenb@suse.de>
1338
1339         PR middle-end/17544
1340         * decl.c (finish_function): Fix comment.  Annotate the compiler
1341         generated return with the current file name and line 0.
1342
1343 2004-12-31  Richard Henderson  <rth@redhat.com>
1344
1345         PR middle-end/17799
1346         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1347         * class.c (build_vtable): Don't conditionallize setting it
1348         based on DWARF2_DEBUG.
1349         (layout_class_type): Set DECL_IGNORED_P.
1350         * decl2.c (get_guard): Likewise.
1351         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1352         * tree.c (build_local_temp): Likewise.
1353
1354 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
1355
1356         * cp-tree.h (cp_declarator): Split "name" field into
1357         qualifying_scope and unqualified_name.
1358         * decl.c (get_scope_of_declarator): Adjust accordingly.
1359         (grokdeclarator): Likewise.
1360         * decl2.c (grokfield): Likewise, and adjust call to
1361         do_class_using_decl.
1362         * name-lookup.c (do_class_using_decl): Split "decl" into
1363         "scope" and "name".  Remove unnecessary code.
1364         * name-lookup.h (do_class_using_decl): Adjust declaration.
1365         * parser.c (make_id_declarator): Split "id" into qualifying_scope
1366         and unqualified_name.
1367         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1368         (cp_parser_direct_declarator): Adjust to handle the fact that
1369         cp_parser_declarator_id no longer returns a SCOPE_REF.
1370         (cp_parser_direct_declarator): Likewise.
1371         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1372         names.
1373         (cp_parser_member_declaration): Adjust call to make_id_declarator.
1374         (cp_parser_check_declarator_template_parameters): Do not expect a
1375         SCOPE_REF.
1376
1377         * decl.c (duplicate_decls): Call ggc_free on declarations we will
1378         not be needing any longer.
1379
1380         PR c++/19190
1381         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1382
1383 2004-12-28  Richard Henderson  <rth@redhat.com>
1384
1385         PR inline-asm/15740
1386         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
1387         constraints.  Mark memory inputs addressable.
1388
1389 2004-12-27  Jason Merrill  <jason@redhat.com>
1390
1391         * decl.c (expand_static_init): Don't use shortcut if
1392         targetm.relaxed_ordering.
1393
1394 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
1395
1396         PR c++/19149
1397         * decl.c (check_tag_decl): Robustify.
1398
1399 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
1400
1401         PR c++/17595
1402         * parser.c (cp_parser_error): Issue better messages about
1403         #pragma in locations where it is not permitted.
1404
1405         PR c++/17413
1406         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1407
1408         * cvt.c (convert_to_void): Fix typo in comment.
1409
1410 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
1411
1412         PR c++/18962
1413         * pt.c (check_explicit_specialization): Use the argument list from
1414         the definition in a template function specialization definition.
1415
1416 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1417
1418         PR c++/18733
1419         * pt.c (check_explicit_specialization): Use special logic to validate
1420         befriended specializations.
1421
1422 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
1423
1424         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1425
1426         PR c++/18464
1427         * call.c (build_this): In templates, do not bother with
1428         build_unary_op.
1429         * typeck.c (unary_complex_lvalue): In a template, always refuse
1430         simplifications.
1431
1432         PR c++/18492
1433         * cp-gimplify.c (cp_genericize): Relax assertion.
1434
1435         PR c++/11224
1436         * cvt.c (convert_to_void): Warn about unused values.
1437
1438         PR c++/18257
1439         * rtti.c (emit_support_tinfos): On systems without weak symbols,
1440         emit the runtime library type-info objects as non-COMDAT.
1441
1442 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
1443
1444         PR c++/18378
1445         * call.c (convert_like_real): Do not permit the use of a copy
1446         constructor to copy a packed field.
1447
1448         PR c++/19063
1449         * decl.c (grokdeclarator): Return error_mark_node, not
1450         void_type_node, to indicate errors.
1451         * parser.c (cp_parser_template_parameter_list): Robustify.
1452         (cp_parser_template_parameter): Likewise.
1453
1454         PR c++/19034
1455         * tree.c (cp_tree_equal): Handle OVERLOAD.
1456
1457 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1458
1459         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1460         * name-lookup.c (pushdecl_class_level): Likewise.
1461
1462 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1463
1464         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1465
1466 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
1467
1468         PR c++/18984
1469         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1470         check to see if contains the pointer.  Insert the statement before
1471         returning.
1472
1473 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
1474
1475         PR c++/14075
1476         * decl.c (check_initializer): Check string initializer of array is
1477         not parenthesized.
1478         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1479         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1480         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1481
1482         * cp-tree.def (TEMPLATE_TYPE_PARM,
1483         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1484         for better code efficiency.
1485         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1486         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1487         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1488         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1489         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1490         TYPE_PTROBV_P): Likewise.
1491
1492         PR c++/18975
1493         * method.c (do_build_copy_constructor): Refactor. Don't const
1494         qualify a mutable field.
1495         (do_build_assign_ref): Likewise.
1496
1497 2004-12-20  Matt Austern <austern@apple.com>
1498
1499         PR c++/19044
1500         * decl.c (make_rtl_for_nonlocal_decl): Use
1501         set_builtin_user_assembler_name.
1502
1503 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
1504
1505         * cp-tree.h (note_decl_for_pch): New function.
1506         * class.c (build_clone): Call note_decl_for_pch.
1507         * semantics.c (finish_member_declaration): Likewise.
1508         (note_decl_for_pch): New function.
1509
1510 2004-12-17  Steven Bosscher  <stevenb@suse.de>
1511
1512         * init.c (build_zero_init): max_index is the number of
1513         elements, minus 1.
1514
1515 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
1516
1517         PR c++/18721
1518         * class.c (add_method): Do not push conversion operators into a
1519         binding level.
1520
1521         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1522         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1523
1524 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
1525
1526         PR c++/18905
1527         * cp-tree.h (integral_constant_value): Declare.
1528         * call.c (null_ptr_cst_p): Use integral_constant_value, not
1529         decl_constant_value.
1530         (convert_like_real): Likewise.
1531         * class.c (check_bitfield_decl): Likewise.
1532         * cvt.c (ocp_convert): Likewise.
1533         (convert): Remove unnecessary decl_constant_value call.
1534         * decl.c (compute_array_index_type): Use integral_constant_value,
1535         not decl_constant_value.
1536         (build_enumerator): Likewise.
1537         * decl2.c (grokfield): Likewise.
1538         * init.c (decl_constant_value): Simplify.
1539         (integral_constant_value): New.
1540         * pt.c (fold_decl_constant_value): Use integral_constant_value,
1541         remove subsequent check.
1542         (tsubst): Use integral_constant_value, not decl_constant_value.
1543         (tsubst_copy, unify): Likewise.
1544         * typeck.c (decay_conversion): Likewise.
1545         (build_compound_expr): Remove unnecessary decl_constant_value
1546         calls.
1547         (build_static_cast_1, build_reinterpret_cast_1):
1548         (convert_for_assignment): Remove comment about not calling
1549         decl_constant_value.
1550
1551 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1552
1553         PR c++/18825
1554         * pt.c (instantiate_class_template): Set input_location for
1555         friend function.
1556         (tsubst_friend_function): Don't set input_location here.
1557         Make sure the context is complete if necessary.
1558
1559 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
1560
1561         PR c++/18981
1562         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1563         flag setting.
1564
1565 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1566
1567         PR c++/18738
1568         * decl.c (make_typename_type): Do not handle namespace-scoped
1569         names here.
1570         (tag_name): Handle typename_type.
1571         (check_elaborated_type_specifier): Handle typenames.
1572         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1573         comment.
1574         (cp_parser_elaborated_type_specifier): Use
1575         cp_parser_diagnose_invalid_type_name.
1576
1577 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
1578
1579         PR c++/18965
1580         * init.c (build_zero_init): If the max_index is 0, there is no
1581         need to create a RANGE_EXPR.
1582
1583 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1584
1585         PR c++/18793
1586         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1587
1588 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
1589
1590         PR c++/18949
1591         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1592         REFERENCE_REF_P is dereferencing a reference type.
1593         * typeck.c (build_static_cast): Convert from reference even in a
1594         template.
1595         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1596
1597 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1598
1599         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1600         (cp_parser_name_lookup_error): Use it.
1601         (cp_parser_check_for_invalid_template_id): Likewise.
1602         (cp_parser_skip_to_closing_parenthesis): Likewise.
1603         (cp_parser_nested_name_specifier_opt): Likewise.
1604         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1605         (cp_parser_parameter_declaration_list): Likewise.
1606         (cp_parser_parameter_declaration): Likewise.
1607         (cp_parser_template_name): Let cp_parser_simulate_error perform
1608         the checking.
1609         (cp_parser_committed_to_tentative_parse): Remove.
1610
1611 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
1612
1613         PR c++/18968
1614         * class.c (build_base_path): Convert the zero constant to the correct
1615         type when comparing.
1616
1617 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
1618
1619         PR c++/18925
1620         * class.c (layout_class_type): Determine the visibility of static
1621         data members.
1622
1623 2004-12-12  Roger Sayle  <roger@eyesopen.com>
1624
1625         PR middle-end/12454
1626         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1627         condition is a constant and the unexecuted clause is empty.
1628
1629 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1630
1631         PR c++/18731
1632         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1633
1634 2004-12-09  Matt Austern  <austern@apple.com>
1635
1636         PR c++/18514
1637         * name-lookup.c (do_nonmember_using_decl): A real function
1638         declaration takes precedence over an anticipated declaration.
1639
1640 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1641
1642         * parser.c (cp_parser_member_declaration): Fix comment typo.
1643
1644 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
1645
1646         PR c++/18757
1647         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1648         if parsing failed.
1649
1650 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1651
1652         PR c++/18073
1653         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1654
1655 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1656
1657         PR c++/16681
1658         * init.c (build_zero_init): Build a RANGE_EXPR for an array
1659         initializer.
1660
1661 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
1662
1663         * typeck.c: Remove DOS line endings.
1664
1665 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1666
1667         PR c++/18100
1668         * decl.c (lookup_and_check_tag): Diagnose nested class with
1669         the same name as enclosing class.
1670
1671 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
1672
1673         PR c++/18803
1674         * cp-tree.h (REFERENCE_REF_P): New.
1675         (CPTI_TYPE_INFO_TYPE): Rename to ...
1676         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1677         (CPTI_TYPE_INFO_REF_TYPE): Remove.
1678         (type_info_type_node): Rename to ...
1679         (const_type_info_type_node): ... here.
1680         (type_info_ref_type): Remove.
1681         * call.c (build_user_type_conversion): Reformat.
1682         (resolve_args): Do not convert_from_reference.
1683         (build_object_call): Call convert_from_reference.
1684         (prep_operand): Do not convert_from_reference.
1685         (build_new_method_call): Likewise.
1686         * class.c (build_vfield_ref): Likewise.
1687         * cvt.c (convert_to_reference): Likewise.
1688         (convert_from_reference): Build INDIRECT_REF here, not with
1689         build_indirect_ref.
1690         (convert_force): Do not convert_from_reference.
1691         (build_expr_type_conversion): Likewise.
1692         * decl.c (grok_reference_init): Likewise.
1693         * decl2.c (delete_sanity): Likewise.
1694         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1695         * init.c (build_dtor_call): Do not convert_from_reference.
1696         * parser.c (cp_parser_template_argument): Unwrap indirected
1697         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1698         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1699         convert_from_reference, if indicated.
1700         <case CALL_EXPR>: Do not convert_from_reference.
1701         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1702         (tsubst_initializer_list): Do not convert_from_reference.
1703         * rtti.c (init_rtti_processing): Adjust node creation.
1704         (throw_bad_typeid): Use const_type_info_type_node.
1705         Do not convert_from_reference.
1706         (typeid_ok_p): Use const_type_info_type_node.
1707         (build_typeid, get_typeid): Always return type_info typed node.
1708         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1709         * semantics.c (finish_stmt_expr_expr): Do not
1710         convert_from_reference.
1711         (finish_id_expression): Convert_from_reference as appropriate.
1712         * typeck.c (decay_conversion): Do not convert_from_reference.
1713         (finish_class_member_access_expr): Likewise.
1714         (build_indirect_ref): Use POINTER_TYPE_P.
1715         (convert_arguments): Do not convert_from_reference.
1716         (build_modify_expr): Likewise.
1717         (convert_for_initialization): Likewise.
1718         * typeck2.c (build_x_arrow): Likewise.
1719
1720 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
1721
1722         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1723         field to 'objc_info'.
1724
1725 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
1726
1727         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1728
1729 2004-12-07  Roger Sayle  <roger@eyesopen.com>
1730
1731         * name-lookup.c (leave_scope): We only need to update
1732         class_binding_level when leaving a class scope.
1733
1734 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
1735
1736         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1737
1738 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1739
1740         PR c++/17011, c++/17971
1741         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1742         invalid field.
1743         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1744         error_mark_node after member substitution.
1745         * semantics.c (finish_id_expression): Call
1746         finish_non_static_data_member for non-dependent FIELD_DECL.
1747
1748 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1749
1750         PR c++/18782
1751         * decl.c (grokdeclarator): Make sure class in pointer to member is
1752         not a namespace.
1753
1754 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1755
1756         PR c++/18318
1757         * parser.c (cp_parser_new_type_id): Move array size expression
1758         checks from here ...
1759         * init.c (build_new): ... to here.
1760
1761 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1762
1763         PR c++/18758
1764         * parser.c (cp_parser_class_head): Return NULL_TREE when
1765         push_template_decl fails.  Update comment.
1766
1767 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1768
1769         PR c++/15664, c++/18276
1770         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
1771         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1772
1773 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1774
1775         PR c++/18123
1776         * parser.c (cp_parser_type_specifier): Catch template declaration
1777         of enum.
1778
1779 2004-12-01  Matt Austern  <austern@apple.com>
1780
1781         * name-lookup.c (namespace_binding): Omit alias check for global
1782         namespace.
1783
1784 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
1785
1786         PR c++/18729
1787         * parser.c (cp_parser_class_name): Check decl's type is not
1788         error_mark_node.
1789
1790         PR c++/17431
1791         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1792         derived to base conversion when checking constructor
1793         accessibility.
1794         (implicit_conversion): Pass FLAGS to standard_conversion.
1795         (check_constructir_callable): Disallow conversion functions.
1796
1797 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
1798
1799         * parser.c: Fix comment typos.
1800
1801 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
1802
1803         PR c++/18368
1804         * parser.c (cp_parser_check_for_definition_in_return_type): Take
1805         the defined type as a parameter, and inform the user about the
1806         possibility of a missing semicolon.
1807         (cp_parser_explicit_instantiation): Adjust call to
1808         cp_parser_check_for_definition_in_return_type.
1809         (cp_parser_init_declarator): Likewise.
1810         (cp_parser_member_declaration): Likewise.
1811
1812         PR c++/18674
1813         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1814         typename from comments.
1815         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1816         (TYPENAME_IS_CLASS_P): Likewise.
1817         (make_typename_type): Change prototype.
1818         * decl.c (struct_typename_info): New type.
1819         (typename_compare): Expect the second argument to be a
1820         typename_info, not a tree.
1821         (build_typename_type): Add tag_type parameter.  Do not create a
1822         new type until necessary.
1823         (make_typename_type): Add tag_type parameter.
1824         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1825         appropriate.
1826         * friend.c (make_friend_class): Adjust call to make_typename_type.
1827         * parser.c (cp_parser_make_typename_type): Likewise.
1828         (cp_parser_primary_expression): Adjust call to
1829         cp_parser_lookup_name.
1830         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1831         (cp_parser_class_or_namespace_name): Likewise.
1832         (cp_parser_postfix_expression): Adjust calls to
1833         make_typename_type.
1834         (cp_parser_mem_initializer_id): Adjust calls to
1835         cp_parser_class_name.
1836         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1837         (cp_parser_template_name): Likewise.
1838         (cp_parser_template_argument): Likewise.
1839         (cp_parser_type_name): Adjust call to cp_parser_class_name.
1840         (cp_parser_elaborated_type_specifier): Adjust calls to
1841         make_typename_type and cp_parser_lookup_name.
1842         (cp_parser_namespace_name): Likewise.
1843         (cp_parser_class_name): Replace type_p parameter with tag_type.
1844         Adjust calls to make_typename_type and cp_parser_lookup_name.
1845         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1846         (cp_parser_base_specifier): Likewise.
1847         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1848         Adjust calls to make_typename_type and lookup_qualified_name.
1849         (cp_parser_lookup_name_simple): Adjust call to
1850         cp_parser_lookup_name.
1851         (cp_parser_constructor_declarator_p): Adjust call to
1852         cp_parser_class_name.
1853         * pt.c (convert_template_argument): Adjust all to
1854         make_typename_type.
1855         (tsubst_decl): Do not pre-substitute the type of the declaration.
1856         (tsubst): Hand off declarations more quickly.  Adjust call to
1857         make_typename_type.
1858
1859         PR c++/18512
1860         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
1861
1862 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
1863
1864         PR c/7544
1865         * Make-lang.in (cp/decl2.o): Update dependencies.
1866         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
1867
1868 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1869
1870         PR c++/18652
1871         * name-lookup.c (pushtag): Change return type to tree.
1872         * cp-tree.h (pushtag): Adjust declaration.
1873         * decl.c (xref_tag, start_enum): Use return value of pushtag.
1874         * pt.c (push_template_decl_real): Return immediately if
1875         pushdecl_namespace_level returns error_mark_node.
1876
1877 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
1878
1879         * pt.c: Fix a comment typo.
1880
1881 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1882
1883         Friend class name lookup 4/n
1884         * class.c (pushclass): Don't call cxx_remember_type_decls.
1885         * cp-tree.h (clear_anon_tags): Remove declaration.
1886         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
1887         * name-lookup.c (binding_entry_free, binding_table_free): Comment
1888         out functions.
1889         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
1890         binding_table_remove_anonymous_types, cxx_remember_type_decls,
1891         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1892         lookup_tag_reverse): Remove
1893         (begin_scope, leave_scope, kept_level_p, print_binding_level):
1894         Don't use type_decls field in cp_binding_level.
1895         (maybe_process_template_type_declaration, pushtag): Set
1896         CLASSTYPE_NESTED_UTDS directly.
1897         * name-lookup.h (binding_table_remove_anonymous_types,
1898         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1899         declaration.
1900         (cp_binding_level): Remove type_decls field.
1901
1902 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
1903
1904         * typeck.c: Fix a comment typo.
1905
1906 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
1907
1908         PR c++/18445
1909         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1910         unknown_type as non matching.  Tidy up.
1911         * pt.c (build_non_dependent_expr): Do not build a
1912         NON_DEPENDENT_EXPR for a VAR_DECL.
1913
1914         PR c++/18001
1915         * cp-tree.h (lvalue_or_else): Remove declaration.
1916         * tree.c (lvalue_or_else): Remove.
1917         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1918         (build_modify_expr): Likewise.
1919
1920         PR c++/18625
1921         * decl.c (duplicate_decls): Return error_mark_node on error, as
1922         specified.
1923
1924         PR c++/18466
1925         * decl.c (grokvardecl): Keep track of whether or not a there was
1926         explicit qualification.
1927         * name-lookup.c (set_decl_namespace): Complain about explicit
1928         qualification of a name within its own namespace.
1929
1930         PR c++/18545
1931         * typeck.c (check_return_expr): Robustify.
1932
1933 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1934
1935         Friend class name lookup 3/n, PR c++/3332
1936         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1937         (lookup_type_scope): Don't deal with name from user declaration
1938         specially.
1939         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1940         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1941         pop_inner_scope.
1942
1943 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1944
1945         Friend class name lookup 2/n, PR c++/14513, c++/15410
1946         * name-lookup.c (lookup_name_real): Simplify.
1947         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
1948         lookup.
1949         * name-lookup.h (tag_scope): New enum type.
1950         (lookup_type_scope): Adjust declaration.
1951         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1952         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1953         (start_enum): Likewise.  Add assertion test that NAME is
1954         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
1955         case of error.
1956         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1957         * parser.c (cp_parser_elaborated_type_specifier,
1958         cp_parser_class_head): Adjust call to xref_tag.
1959         * pt.c (lookup_template_class, instantiate_class_template):
1960         Likewise.
1961         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1962         tinfo_base_init, emit_support_tinfos): Likewise.
1963
1964 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1965
1966         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1967
1968 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
1969
1970         PR c++/17473
1971         * name-lookup.c (supplement_binding): Do not allow typedefs to be
1972         redefined in class scope.
1973
1974         PR c++/18285
1975         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1976         redefinitions of builtin types other that "bool" or "wchar_t".
1977
1978 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1979
1980         * decl.c (cxx_init_decl_processing): Don't clear
1981         flag_inline_functions.
1982
1983 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
1984
1985         * pt.c (tsubst_function_type): Do not permit function types which
1986         return arrays or functions.
1987
1988         PR c++/18586
1989         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1990
1991         PR c++/18530
1992         * cp-tree.h (CTOR_NAME): Remove.
1993         (DTOR_NAME): Remove.
1994         * decl.c (initialize_predefined_identifiers): Add spaces to the
1995         end of constructor and destructor names.
1996
1997 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1998
1999         PR c++/8929
2000         * decl.c (start_decl): Check for invalid specialization headers.
2001
2002 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
2003
2004         PR c++/16882
2005
2006         * call.c (standard_conversion): Move check for conversions between
2007         vector pointers...
2008         * typeck.c (ptr_reasonably_similar): ... here.
2009
2010 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2011
2012         * cp-tree.h (context_as_string): Remove extern.
2013         * error.c (context_as_string): Remove.
2014
2015         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2016         * lex.c (cp_type_qual_from_rid): Remove.
2017
2018         * cp-tree.h (do_poplevel): Remove extern.
2019         (check_multiple_declarators): Likewise.
2020         * semantics.c (do_poplevel): Make static.
2021         (check_multiple_declarators): Remove.
2022
2023         * cp-tree.h (check_final_overrider): Remove extern.
2024         * search.c (check_final_overrider): Make static.
2025
2026         * cp-tree.h (build_artificial_parm): Remove extern.
2027         * decl2.c (build_artificial_parm): Make static.
2028
2029 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2030
2031         PR c++/18354
2032         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2033         Make sure the result is always a rvalue.
2034
2035 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2036
2037         * decl.c (start_preparsed_function): Call check_function_type even
2038         in templates.
2039         (require_complete_types_for_parms): Skip dependent types.
2040         (check_function_type): Likewise.
2041
2042 2004-11-16  Steven Bosscher  <stevenb@suse.de>
2043
2044         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2045         * search.c: Don't include it.
2046
2047 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
2048
2049         * cp-gimplify.c: Include pointer-set.h
2050         (cp_genericize_r): Use pointer_sets instead of a hashtable.
2051         Also instert the new statement for CLEANUP_STMT.
2052         (cp_genericize): Use pointer_sets instead of a hashtable.
2053         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2054
2055 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2056
2057         Friend class name lookup 1/n, PR c++/18471
2058         * decl.c (lookup_and_check_tag): New function.
2059         (xref_tag, start_enum): Use it.
2060         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2061         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
2062         location.
2063         * name-lookup.c (lookup_name_current_level): Rename to ...
2064         (lookup_name_innermost_nonclass_level): ... this.
2065         (lookup_type_scope): New function.
2066         * name-lookup.h (lookup_name_current_level): Rename to ...
2067         (lookup_name_innermost_nonclass_level): ... this.
2068         (lookup_type_scope): Add declaration.
2069
2070 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2071
2072         PR c++/17344
2073         * pt.c (coerce_template_parms): Only emit error message about
2074         invalid template argument when TF_ERROR.
2075
2076 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
2077
2078         PR c++/18389
2079         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
2080         error_mark_node to indicate errors.
2081
2082         PR c++/18429
2083         * parser.c (cp_parser_direct_declarator): Disallow non-constant
2084         array bounds when not inside a function.
2085
2086         PR c++/18436
2087         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2088         unqualified name resolves to a member function.
2089
2090         PR c++/18407
2091         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2092         derived class correctly.
2093
2094         * decl2.c (import_export_decl): Fix typo in comment.
2095         * tree.c (pod_type_p): Likewise.
2096
2097 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
2098
2099         * typeck.c (cxx_mark_addressable): Add braces around the first if.
2100
2101 2004-11-10  Adam Nemet  <anemet@lnxw.com>
2102
2103         PR middle-end/18160
2104         * typeck.c (cxx_mark_addressable): Issue an error if address of an
2105         explicit register variable is requested.
2106
2107 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
2108
2109         PR c++/18143
2110         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2111         (struct lang_decl_flags): Add thunk_p flag.
2112         (struct lang_decl): Remove separate fixed_offset. Place
2113         cloned_function and fixed_offset into union.
2114         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2115         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2116         (THUNK_FIXED_OFFSET): Adjust.
2117         * method.c (make_thunk): Adjust.
2118
2119 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
2120
2121         PR c++/18369
2122         * init.c (build_new_1): Handle parenthesized type-ids that name an
2123         array type.  Tidy.
2124
2125 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2126
2127         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2128         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2129         quoting in diagnostics.
2130         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2131         quoting in printf format.
2132         * decl.c (duplicate_decls, start_decl): Use %qD instead of
2133         unquoted %D.
2134
2135 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2136
2137         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2138         search.c, typeck2.c: Fix comment formatting.
2139
2140 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
2141
2142         PR tree-optimization/18184
2143         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2144         of different modes or alias-all flags as equivalent.
2145         * typeck.c (comptypes): Likewise.
2146
2147 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2148
2149         DR 49, 100
2150         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2151         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2152         TYPE_REFFN_P): Document.
2153         (fold_decl_constant_value): New prototype.
2154         * pt.c (convert_nontype_argument_function): Rewrite and extract
2155         parts into...
2156         (fold_decl_constant_value, convert_nontype_argument_function): New.
2157         (lookup_template_class): Add comment about useless double call.
2158         * mangle.c (write_expression): Strip conversions before lowering
2159         pointer to members.
2160         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2161         enum to enum conversion.
2162
2163 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
2164
2165         PR c++/18124
2166         * parser.c (cp_parser_type_parameter): Robustify.
2167
2168         PR c++/18155
2169         * parser.c (cp_parser_single_declaration): Disallow template
2170         typedefs.
2171
2172         PR c++/18177
2173         * typeck.c (build_const_cast): Use error_operand_p.
2174
2175 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
2176
2177         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2178         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2179         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2180         from cp-lang.c.
2181         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2182         from cp-lang.c.
2183         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2184
2185 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
2186
2187         PR c++/18064
2188         * search.c (check_final_overrider): Deprecate gnu covariant extension.
2189
2190 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2191
2192         Convert diagnostics to use quoting flag q 9/n
2193         * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2194         get_delta_difference):  Use new quotation style.
2195         * repo.c (reopen_repo_file_for_write): Likewise.
2196         * pt.c (do_type_instantiation): Likewise.
2197         * parser.c (cp_parser_diagnose_invalid_type_name):
2198         * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2199         * error.c (cp_print_error_function,
2200         print_instantiation_full_context): Likewise.
2201         * decl.c (define_label, grok_reference_init,
2202         maybe_deduce_size_from_array_init, revert_static_member_fn):
2203         * decl2.c (check_classfn): Likewise.
2204         * class.c (add_method, check_field_decls, layout_class_type,
2205         resolve_address_of_overloaded_function): Likewise.
2206         * call.c (build_x_va_arg, build_over_call): Likewise.
2207
2208 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2209
2210         Convert diagnostics to use quoting flag q 8/n
2211         * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2212         convert_to_reference, ocp_convert, convert_to_void
2213         cp_convert_to_pointer): Use new quotation style.
2214
2215 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
2216
2217         PR c++/15172
2218         * typeck2.c (store_init_value): Use split_nonconstant_init even
2219         for types that require construction.
2220
2221 1004-10-28  Matt Austern  <austern@apple.com>
2222
2223         PR c++/17542
2224         * cp-tree.h (class_key_or_enum_as_string): Declare.
2225         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2226         and remove static qualifier.
2227         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2228         union/enum declaration.
2229
2230 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
2231
2232         * pt.c: Fix a comment typo.
2233
2234 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
2235
2236         * typeck.c (composite_pointer_type): Remove comment about DR 195.
2237         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2238         warning when being pedantic.
2239         (build_reinterpet_cast, build_c_cast): Adjust.
2240
2241 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
2242
2243         PR c++/17695
2244         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2245         appear in a constructor/destructor that will be cloned.
2246
2247 1004-10-28  Matt Austern  <austern@apple.com>
2248
2249         PR c++/14124
2250         * decl.c (finish_enum): Handle packed attribute.
2251         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2252
2253 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
2254
2255         PR c++/17132
2256         * pt.c (instantiate_class_template): Increment
2257         processing_template_decl when substituting into a member class
2258         template.
2259
2260 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
2261
2262         PR c++/17435
2263         * call.c (convert_like_real): Fix formatting.
2264         (initialize_reference): When binding a temporary to a base class,
2265         ensure that the nominal copy made is to the derived class, not the
2266         base class.
2267
2268         PR c++/18140
2269         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2270         include ">>".
2271
2272 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2273
2274         * decl.c (bad_specifiers): Move the q after the %.
2275
2276 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2277
2278         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2279         the %.
2280
2281 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
2282
2283         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2284         * search.c (current_scope): Fix prototype.
2285
2286         PR c++/18093
2287         * search.c (current_scope): Return the innermost non-block scope,
2288         not the innermost non-block, non-namespace scope.
2289         (at_namespace_scope_p): Adjust accordingly.
2290         (dfs_accessible_post): Do not pass namespaces to is_friend.
2291         (dfs_walk_once_accessible_r): Likewise.
2292         * decl.c (grokvardecl): Adjust call to current_scope.
2293         (build_enumerator): Likewise.
2294         * parser.c (cp_parser_using_declaration): Likewise.
2295         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2296         current_scope.
2297         (cp_parser_class_head): Adjust call to current_scope.
2298         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2299         alias.
2300
2301         PR c++/18020
2302         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2303         their underlying values.
2304
2305         PR c++/18161
2306         * typeck.c (build_binary_op): Honor build_type, even when in a
2307         template.
2308
2309 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
2310
2311         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2312         padding token checking.
2313
2314 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
2315
2316         PR c++/18121
2317         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2318         layout_type as it is already done by create_array_type_for_decl.
2319
2320 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
2321
2322         PR c++/18095
2323         * parser.c (eof_token): Make const, correctly initialize rid and
2324         location fields.
2325         (struct cp_lexer): Replace buffer_end pointer with buffer_length
2326         count. Adjust.
2327         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
2328         zero it out.
2329         (cp_lexer_new_from_tokens): Adjust.
2330         (cp_lexer_grow_buffer): Remove.
2331         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2332         cp_lexer_purge_token): Add const casts.
2333
2334 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
2335
2336         PR c++/18073
2337         PR c++/10841
2338         * cp-tree.h (convert_to_base): Change prototype.
2339         (build_ptrmemfunc): Likewise.
2340         (convert_ptrmem): New function.
2341         * call.c (struct conversion): Adjust documentation for base_p.
2342         (standard_conversion): Set base_p for ck_pmem conversions as
2343         appropriate.
2344         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2345         conversions.
2346         * class.c (convert_to_base): Handle both pointers and objects.
2347         Add nonnull parameter.
2348         (build_vfield_ref): Adjust call to convert_to_base.
2349         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2350         (convert_force): Likewise.
2351         * typeck.c (build_unary_op): Likewise.
2352         (convert_ptrmem): New function.
2353         (build_static_cast_1): Use it.
2354         (build_reinterpret_cast): Allow conversions to vector types.
2355         (get_delta_difference): Add c_cast_p parameter.
2356         (build_ptrmemfunc): Likewise.  Adjust calls to
2357         get_delta_difference.
2358
2359 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
2360
2361         PR c++/13560
2362         * error.c (cp_error_at): Output the context as it might be
2363         different file as the other location.
2364
2365 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
2366
2367         * typeck.c: Fix a comment typo.
2368
2369 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2370
2371         PR c++/13495
2372         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2373         * cp-tree.h (make_unbound_class_template): Adjust prototype.
2374         * parser.c (cp_parser_lookup_name): Adjust call to
2375         make_unbound_class_template.
2376         (cp_parser_single_declaration): Handle member class of class
2377         template as template friend parsing correctly.
2378         * friend.c (is_friend): Call is_specialization_of_friend for
2379         template friend class.
2380         (make_friend_class): Handle member class of class template as
2381         template friend.
2382         * pt.c (is_specialization_of_friend): Likewise.
2383         (instantiate_class_template): Likewise.
2384         (tsubst): Adjust call to make_unbound_class_template.
2385
2386 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2387
2388         * typeck.c (composite_pointer_type): Add comment about DR 195
2389         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2390         Allow function pointer conversions that DR195 suggests.
2391         (build_reinterpret_cast, build_c_cast): Update
2392         build_reinterpret_cast_1 calls.
2393
2394 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
2395
2396         * call.c, typeck.c: Fix comment typos.
2397
2398 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2399
2400         * parser.c (cp_token_position): New typedef. Define VEC thereof.
2401         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2402         next_token and last_token cp_token_position. Make saved_tokens a
2403         VEC(cp_token_position).
2404         (eof_token): New static variable.
2405         (CP_SAVED_TOKENS_SIZE): Rename to ...
2406         (CP_SAVED_TOKEN_STACK): ... here.
2407         (cp_lexer_new_main): Adjust main lexer creation and buffer
2408         filling.
2409         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2410         to the parent buffer.  Do not append eof token.
2411         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2412         stack.
2413         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2414         (cp_lexer_token_position, cp_lexer_token_at): New.
2415         (cp_lexer_saving_tokens): Adjust. Make inline.
2416         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2417         (cp_lexer_peek_token_emit_debug_info): Fold into ...
2418         (cp_lexer_peek_token): ... here.
2419         (cp_lexer_peek_nth_token): Don't peek past EOF.
2420         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2421         EOF.
2422         (cp_lexer_purge_token): Adjust eof setting.
2423         (cp_lexer_purge_tokens_after): Likewise.
2424         (cp_lexer_save_tokens): Push next_token directly.
2425         (cp_lexer_commit_tokens): Adjust.
2426         (cp_lexer_rollback_tokens): Pop next_token directly.
2427         (cp_parser_check_for_invalid_template_id): Adjust token purging.
2428         (cp_parser_translation_unit): Do not consume the EOF.
2429         (cp_parser_nested_name_specifier_opt): Adjust token purging.
2430         (cp_parser_template_id, cp_parser_template_name): Likewise.
2431
2432 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
2433
2434         PR c++/14035
2435         * call.c (struct conversion): Add base_p.
2436         (convert_like): Add c_cast_p argument.
2437         (convert_like_with_conversion): Likewise.
2438         (build_conv): Clear base_p.
2439         (standard_conversion): Set it, for derived-to-base conversions.
2440         (convert_like_real): Add c_cast_p parameter.  Handle pointer
2441         conversions directly rather than relying on ocp_convert.
2442         (perform_direct_initialization_if_possible): Add c_cast_p
2443         parameter.
2444         * cp-tree.h (perform_direct_initialization_if_possible): Change
2445         prototype.
2446         (convert_member_func_to_ptr): New function.
2447         * typeck.c (check_for_casting_away_constness): Add diag_fn
2448         parameter.
2449         (build_static_cast_1): New function, split out from ...
2450         (build_static_cast): ... here.  Use build_static_cast_1.
2451         (build_reinterpret_cast_1): New function, split out from ...
2452         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
2453         (build_const_cast_1): New function, split out from ...
2454         (build_const_cast): ... here.  Use build_const_cast_1.
2455         (build_c_cast): Rewrite to use build_const_cast_1,
2456         build_static_cast_1, and build_reinterpret_cast_1.
2457         (convert_member_func_to_ptr): New function.
2458
2459 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
2460
2461         PR c++/18047
2462         * parser.c (enum cp_parser_prec): Give relational expressions
2463         a higher precedence than equality expressions.
2464
2465 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
2466
2467         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2468         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2469         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2470         (enum base_access): Reorganize.
2471         (accessible_base_p, accessible_p): Add consider_local_p parameter.
2472         * call.c (standard_conversion): Update comment about
2473         DERIVED_FROM_P.
2474         (enforce_access): Adjust accessible_p call.
2475         (build_over_call): Adjust accessible_base_p call.
2476         * class.c (convert_to_base): Adjust lookup_base call.
2477         (build_vtbl_ref_1): Likewise.
2478         (warn_about_ambiguous_bases): Likewise. Add early exit.
2479         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2480         * search.c (accessible_base_p): Add consider_local_p parameter.
2481         (lookup_base): Pass consider_local_p to accessible_base_p call.
2482         (friend_accessible_p): Check whether scope is a class member.
2483         Remove unnecessary class template check.
2484         (accessible_p): Add consider_local_p parameter. Use it.
2485         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2486         * tree.c (maybe_dummy_object): Likewise.
2487         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2488         (build_class_member_access_expr): Adjust lookup_base call.
2489         * typeck2.c (binfo_or_else): Likewise.
2490         * rtti.c (build_dynamic_cast_1): Access can consider friendship
2491         and current scope.
2492
2493 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2494
2495         PR c++/17743
2496         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2497
2498 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2499
2500         PR c++/10479
2501         * parser.c (cp_parser_parenthesized_expression_list): Fold
2502         non-dependent expressions in attribute lists.
2503
2504 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
2505
2506         PR c++/17042
2507         * decl.c (declare_global_var): Use the return value from pushdecl.
2508
2509         PR c++/14667
2510         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2511         type names if we have already found a valid type.
2512         (cp_parser_member_declaration): Likewise.
2513
2514         PR c++/17916
2515         * parser.c (cp_parser_member_specification_opt): Handle
2516         CPP_PRAGMA.
2517
2518 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2519
2520         * dump.c, g++spec.c, repo.c: Update copyright.
2521
2522 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2523
2524         * decl.c: Fix a comment typo.
2525
2526 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2527
2528         PR c++/16301
2529         * name-lookup.c (parse_using_directive): If we have a
2530         error_mark_node, do not set the decl namespace associations
2531         on it.
2532
2533 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
2534
2535         PR c++/17976
2536         * decl.c (cp_finish_decl): Do not call expand_static_init more
2537         than once for a single variable.
2538
2539 2004-10-14  Matt Austern  <austern@apple.com>
2540
2541         * Make-lang.in (pt.o): depends on pointer-set.h
2542         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2543         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2544         (for_each_template_parm): Convert from htab_t to pointer_set_t.
2545         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2546
2547 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2548
2549         PR c++/17661
2550         * semantics.c (finish_for_expr): Convert expression to void
2551         so that we don't create temporaries for a?b:c.
2552
2553 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
2554
2555         * search.c: Fix a comment typo.
2556
2557 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2558
2559         * class.c (dfs_modify_vtables): Simplify condition. Return
2560         dfs_skip_bases as appropriate.
2561         (modify_all_vtables): Walk in pre-order.
2562         * search.c (dfs_walk_all, dfs_walk_once_r,
2563         dfs_walk_once_accessible_r): Assert post order function never
2564         returns dfs_skip_bases.
2565
2566         * search.c (struct lookup_base_data_s): New.
2567         (lookup_base_r): Replace with ...
2568         (dfs_lookup_base): ... this.
2569         (lookup_base): Use dfs_walk_all.
2570
2571 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
2572
2573         * search.c: Fix comment typos.
2574
2575 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
2576
2577         PR c++/15786
2578         * parser.c (cp_parser_declarator): Add member_p parameter.
2579         (cp_parser_condition): Adjust calls to cp_parser_declarator.
2580         (cp_parser_explicit_instantiation): Likewise.
2581         (cp_parser_init_declarator): Likewise.
2582         (cp_parser_direct_declarator): Add member_p parameter.  Do not
2583         parse tentatively when parsing the parameters to a member.
2584         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2585         (cp_parser_parameter_declaration): Likewise.
2586         (cp_parser_member_declaration): Likewise.
2587         (cp_parser_exception_declaration): Likewise.
2588
2589         PR c++/17936
2590         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2591         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2592         for members of partial or explicit specializations.
2593
2594         PR c++/17929
2595         * decl2.c (finish_anon_union): Robustify.
2596
2597 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
2598
2599         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2600         (dcast_base_hint): ... here.
2601         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2602         * search.c (struct dcast_data_s): New.
2603         (dynamic_cast_base_recurse): Remove. Replace with ...
2604         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2605         (get_dynamic_cast_base_type): Rename to ...
2606         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
2607         (accessible_r): Remove.
2608         (dfs_accessible_post): New, broken out of accessible_r.
2609         (accessible_p): Use dfs_walk_once_accessible.
2610         (dfs_walk_once_accessible_r): New. From accessible_r.
2611         (dfs_walk_once_accessible): New. From acessible_p.
2612
2613         * cp-tree.h (SAME_BINFO_TYPE_P): New.
2614         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2615         binfo types.
2616         (convert_to_base_statically, determine_primary_bases,
2617         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2618         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2619         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2620         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2621         * init.c (expand_member_init): Likewise.
2622         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2623         binfo_via_virtual, copied_binfo, binfo_for_vbase,
2624         original_binfo): Likewise.
2625         * tree.c (copy_binfo): Likewise.
2626
2627 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
2628
2629         * semantics.c: Fix comment typos.
2630
2631 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2632
2633         PR c++/17554
2634         part of c++/17657
2635         middle-end/17703
2636         * semantics.c (maybe_cleanup_point_expr): Call
2637         fold_build_cleanup_point_expr.
2638         (maybe_cleanup_point_expr_void): New function.
2639         (add_decl_expr): Call maybe_cleanup_point_expr_void.
2640         (finish_expr_stmt): Likewise.
2641         (finish_return_stmt): Likewise.
2642         (finish_for_expr): Likewise.
2643         (finish_asm_stmt): Likewise.
2644         * typeck.c (condition_conversion): Call
2645         fold_build_cleanup_point_expr.
2646
2647 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2648
2649         PR c++/17907
2650         * semantics.c (add_decl_expr): If the decl has a size which
2651         has side effects then the decl expression needs a cleanup point.
2652
2653 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
2654
2655         PR c++/17393
2656         * decl.c (grokdeclarator): Robustify error-recovery on invalid
2657         declarations.
2658
2659 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2660
2661         Convert diagnostics to use quoting flag q 7/n
2662         * typeck.c (composite_pointer_type_r, composite_pointer_type,
2663         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2664         string_conv_p, build_class_member_access_expr,
2665         build_class_member_access_expr, lookup_destructor,
2666         finish_class_member_access_expr, build_indirect_ref,
2667         get_member_function_from_ptrfunc, build_function_call,
2668         convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2669         check_for_casting_away_constness, build_static_cast,
2670         build_reinterpret_cast, build_const_cast, build_c_cast,
2671         build_modify_expr, get_delta_difference, build_ptrmemfunc,
2672         dubious_conversion_warnings, convert_for_assignment,
2673         convert_for_initialization,
2674         maybe_warn_about_returning_address_of_local, check_return_expr):
2675         Use quoting marks.
2676
2677         * typeck2.c (error_not_base_type, readonly_error,
2678         abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2679         store_init_value, digest_init, build_x_arrow,
2680         build_m_component_ref, require_complete_eh_spec_types): Likewise.
2681
2682         * tree.c (cp_build_qualified_type_real,
2683         handle_java_interface_attribute, handle_init_priority_attribute):
2684         Likewise.
2685
2686         * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2687         finish_pseudo_destructor_expr,
2688         check_template_template_default_arg, begin_class_definition,
2689         finish_base_specifier, qualified_name_lookup_error,
2690         finish_id_expression, finish_typeof): Likewise.
2691
2692         * search.c (lookup_base, check_final_overrider,
2693         look_for_overrides_r): Likewise.
2694
2695         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2696
2697 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
2698
2699         PR c++/17867
2700         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2701         constructor.
2702
2703         PR c++/17670
2704         * init.c (build_new): Correct comments.
2705         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2706         the non-array case.
2707
2708         PR c++/17821
2709         * parser.c (cp_parser_postfix_dot_deref_expression): If the
2710         pseduo-destructor-name production does not work, fall back to the
2711         ordinary production.
2712
2713         PR c++/17826
2714         * tree.c (cp_tree_equal): Handle a BASELINK.
2715
2716         PR c++/17524
2717         * cp-tree.h (check_var_type): New function.
2718         * decl.c (check_var_type): New function, split out from ...
2719         (grokdeclarator): ... here.
2720         * pt.c (tsubst_decl): Use check_var_type.
2721
2722         PR c++/17685
2723         * decl.c (grokdeclarator): Disallow declarations of operators as
2724         non-functions.
2725
2726 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2727
2728         PR c++/17868
2729         * error.c (dump_expr): Add missing case for RDIV_EXPR.
2730
2731 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
2732
2733         * pt.c, search.c: Fix comment typos.
2734
2735 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
2736
2737         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2738         unmarkedp): Remove.
2739         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2740         * class.c (struct find_final_overrider_data): Remove most_derived,
2741         vpath_list and vpath fields.  Add path field.
2742         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2743         (dfs_find_final_overrider): Rename to ...
2744         (dfs_find_final_overrider_pre): ... here. Adjust.
2745         (dfs_find_final_overrider_post): Adjust.
2746         (dfs_find_final_overrider_q): Fold into
2747         dfs_find_final_overrider_pre.
2748         (find_final_overrider): Adjust dfs searching.
2749         (dfs_modify_vtables): Don't mark binfo here.
2750         (modify_all_vtables): Use dfs_walk_once.
2751         (build_vtt_inits): Likwise. Use dfs_walk_all.
2752         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2753         Return dfs_skip_bases as appropriate.
2754         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2755         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2756         appropriate. Don't mark binfo here.
2757         (initialize_vtbl_ptrs): Use dfs_walk_once.
2758         * search.c (struct vbase_info): Remove unused struct.
2759         (access_in_type): Use dfs_walk_once.
2760         (dfs_access_in_type): Don't mark binfo here.
2761         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2762         Fold into ...
2763         (accessible_r): ... here. New. Specialize dfs_walk_once.
2764         (accessible_p): Use accessible_r.
2765         (lookup_field_queue_p): Remove. Fold into ...
2766         (lookup_field_r): ... here. Adjust.
2767         (lookup_member): Use dfs_walk_all.
2768         (dfs_walk_real, dfs_walk): Replace with ...
2769         (dfs_walk_all, dfs_walk_once): ... these.
2770         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2771         (dfs_unmark, unmarkedp, markedp): Remove.
2772         (dfs_get_pure_virtuals): Don't mark binfo here.
2773         (get_pure_virtuals): Use dfs_walk_once.
2774         (dfs_debug_unmarked_p): Remove. Fold into ...
2775         (dfs_debug_mark): ... here.
2776         (note_debug_info_needed): Use dfs_walk_all.
2777
2778 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2779
2780         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2781         CLEANUP_POINT_EXPR to get the asm expression.
2782
2783 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
2784
2785         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2786         (DECL_MEMBER_TEMPLATE_P): New macro.
2787         (is_member_template): Remove.
2788         (class_method_index_for_fn): New function.
2789         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2790         * class.c (finish_struct_methods): Remove out-of-date comment.
2791         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2792         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2793         class_method_index_for_fn.
2794         * pt.c (is_member_template): Remove.
2795         (is_member_template_class): Likewise.
2796         (optimize_specialization_lookup_p): New function.
2797         (retrieve_specialization): Optimize lookups for members that are
2798         not member templates.
2799         (register_specialization): Adjust accordingly.
2800         (build_template_decl): Add member_template_p parameter.  Set
2801         DECL_MEMBER_TEMPLATE_P.
2802         (process_partial_specialization): Adjust call to
2803         retrieve_specialization.
2804         (push_template_decl_real): Determine whether the template is a
2805         member template.
2806         (lookup_template_class): Use retrieve_specialization.
2807         (tsubst_decl): Adjust call to retrieve_specialization.
2808         (tsubst_exception_specification): New function.
2809         (tsubst): Use it.
2810         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2811         (instantiate_template): Adjust call to retrieve_specialization.
2812         (regenerate_decl_from_template): Do not actually generate a new
2813         DECL.
2814         (instantiate_decl): Adjust call to retrieve_specialization.
2815         (class_method_index_for_fn): New method.
2816
2817 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2818
2819         * parser.c (cp_parser_asm_definition): Look passed the
2820         CLEANUP_POINT_EXPR to get the asm expression.
2821
2822 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
2823
2824         PR c++/17368
2825         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2826         also.
2827
2828 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2829
2830         Convert diagnostics to use quoting flag q 6/n
2831         * pt.c (finish_member_template_decl, check_specialization_scope,
2832         maybe_process_partial_specialization, determine_specialization,
2833         check_explicit_specialization, maybe_check_template_type,
2834         process_partial_specialization, check_default_tmpl_args,
2835         push_template_decl_real, redeclare_class_template,
2836         convert_nontype_argument, coerce_template_parms,
2837         lookup_template_class, push_tinst_level,
2838         instantiate_class_template, tsubst_arg_types,
2839         tsubst_function_type, tsubst, tsubst_qualified_id,
2840         tsubst_copy_and_build, check_instantiated_args,
2841         do_decl_instantiation, do_type_instantiation,
2842         invalid_nontype_parm_type_p, check_specialization_namespace,
2843         convert_template_argument, determine_specialization,
2844         check_template_shadow, tsubst_decl
2845         instantiate_pending_templates): Use quoting marks.
2846
2847 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2848
2849         PR c++/17829
2850         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2851         unqualified lookup finds a member function.
2852
2853 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2854
2855         Convert diagnostics to use quoting flag q 5/n
2856         * parser.c (cp_parser_name_lookup_error,
2857         cp_parser_diagnose_invalid_type_name,
2858         cp_parser_primary_expression, cp_parser_unqualified_id,
2859         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2860         cp_parser_jump_statement, cp_parser_simple_declaration,
2861         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
2862         cp_parser_type_parameter, cp_parser_template_id,
2863         cp_parser_template_name, cp_parser_direct_declarator,
2864         cp_parser_parameter_declaration_list, cp_parser_class_head,
2865         cp_parser_base_specifier, cp_parser_lookup_name,
2866         cp_parser_late_parsing_default_args,
2867         cp_parser_optional_template_keyword
2868         cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
2869         cp_parser_check_access_in_redeclaration): Use quoting marks.
2870
2871         * name-lookup.c (supplement_binding, pushdecl,
2872         check_for_out_of_scope_variable, validate_nonmember_using_decl,
2873         do_nonmember_using_decl, lookup_tag, set_decl_namespace,
2874         push_namespace, do_namespace_alias, do_using_directive,
2875         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
2876
2877         * method.c (use_thunk): Likewise.
2878
2879         * lex.c (unqualified_name_lookup_error,
2880         unqualified_fn_lookup_error): Likewise.
2881
2882 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2883
2884         Convert diagnostics to use quoting flag q 4/n
2885         * except.c (decl_is_java_type, build_throw,
2886         is_admissible_throw_operand, check_handlers_1, check_handlers):
2887         Use quoting formats.
2888         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
2889         * init.c (sort_mem_initializers, emit_mem_initializers,
2890         member_init_ok_or_else, expand_member_init, is_aggr_type,
2891         build_offset_ref, build_java_class_ref): Likewise.
2892
2893 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2894
2895         Convert diagnostics to use quoting flag q 3/n
2896         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2897         redeclaration_error_message, lookup_label, check_goto,
2898         make_typename_type, make_unbound_class_template,
2899         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
2900         grok_reference_init, layout_var_decl, maybe_commonize_var,
2901         check_for_uninitialized_const_var, reshape_init_array,
2902         reshape_init, check_initializer, cp_finish_decl,
2903         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
2904         check_static_variable_definition, compute_array_index_type,
2905         create_array_type_for_decl, check_special_function_return_type,
2906         grokdeclarator, check_default_argument, grokparms,
2907         grok_ctor_properties, grok_op_properties,
2908         check_elaborated_type_specifier, xref_tag, finish_enum,
2909         build_enumerator, check_function_type, start_preparsed_function,
2910         store_parm_decls): Use quoting formats.
2911         * decl2.c (grok_array_decl, delete_sanity, check_member_template,
2912         check_java_method, check_classfn, finish_static_data_member_decl,
2913         grokfield, grokbitfield, grok_function_init,
2914         build_anon_union_vars, coerce_new_type, coerce_delete_type,
2915         check_default_args): Likewise.
2916         * parser.c (cp_parser_decl_specifier_seq): Likewise.
2917
2918 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2919
2920         Convert diagnostics to use quoting flag q 2/n
2921         * class.c (build_base_path, add_method, alter_access,
2922         handle_using_decl, check_bases,
2923         maybe_warn_about_overly_private_class, find_final_overrider,
2924         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2925         check_bitfield_decl, check_field_decls, layout_empty_base,
2926         build_base_field, check_methods, layout_virtual_bases,
2927         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2928         resolve_address_of_overloaded_function, instantiate_type,
2929         note_name_declared_in_class): Use format flag "q" for quoting.
2930
2931 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2932
2933         Convert diagnostics to use quoting flag q 1/n
2934         * error.c (locate_error): Ignore quoting flag q.
2935         * call.c (build_user_type_conversion_1, build_operator_new_call,
2936         build_object_call, op_error, build_conditional_expr,
2937         build_new_op, build_op_delete_call, enforce_access,
2938         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2939         convert_default_arg, build_over_call, build_new_method_call,
2940         joust, perform_implicit_conversion, initialize_reference): Use the
2941         quoting flag q.
2942
2943 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
2944
2945         PR c++/17797
2946         * typeck.c (build_reinterpret_cast): Return if the inner type
2947         is error_mark_node.
2948
2949 2004-10-01  Jan Hubicka  <jh@suse.cz>
2950
2951         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2952
2953 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2954
2955         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2956         turning operator_code and fixed_offset into bitfields.
2957
2958 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
2959
2960         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2961
2962 2004-09-29  Jason Merrill  <jason@redhat.com>
2963
2964         PR tree-optimization/17697
2965         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2966
2967 2004-09-28  Jason Merrill  <jason@redhat.com>
2968
2969         PR middle-end/17525
2970         * class.c (build_base_field): Set TYPE_MODE.
2971
2972 2004-09-28  Roger Sayle  <roger@eyesopen.com>
2973
2974         PR driver/17537
2975         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2976         than -lc and -lm, may require linking against libstc++.
2977
2978 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
2979
2980         * tree.c: Fix a comment typo.
2981
2982 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
2983
2984         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2985         (struct secondary_vptr_vtt_init_data_s): New.
2986         (build_vtt_inits): Adjust dfs_walkers.
2987         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2988         secondary_vptr_vtt_init_data_s structure. Adjust.
2989         (dfs_ctor_vtable_bases_queue_p): Remove.
2990         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2991
2992         * pt.c (struct get_template_base_data_s): Remove.
2993         (get_template_base_r): Fold into get_template_base.
2994         (get_template_base): Walk base binfos directly in inheritance
2995         graph order.
2996
2997 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
2998
2999         PR c++/17642
3000         * cp-tree.h (fold_if_not_in_template): New function.
3001         * call.c (build_conditional_expr): Use fold_if_not_in_template.
3002         (build_cxx_call): Likewise.
3003         * cvt.c (convert_to_complex): Likewise.
3004         (ocp_convert): Likewise.
3005         (convert): Likewise.
3006         (convert_force): Likewise.
3007         * decl.c (compute_array_index_type): Clear
3008         processing_template_decl while folding array bounds.
3009         * pt.c (convert_nontype_argument): Clear
3010         processing_template_decl while processing non-type argument
3011         initialization.
3012         * tree.c (fold_if_not_in_template): New function.
3013         * typeck.c (build_class_member_access_expr): Use
3014         fold_if_not_in_template.
3015         (build_array_ref): Likewise.
3016         (build_binary_op): Likewise.  Do not try to optimize computations
3017         when processing templates.
3018         (cp_pointer_int_sum): Use fold_if_not_in_template.
3019         (pointer_diff): Likewise.
3020         (build_unary_op): Likewise.
3021         (build_reinterpret_cast): Likewise.
3022         (get_delta_difference): Likewise.
3023         (expand_ptrmemfunc_cst): Likewise.
3024         (dubious_conversion_warnings): Likewise.
3025
3026 2004-09-27  Matt Austern  <austern@apple.com>
3027
3028         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3029         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3030         tokens that come from headers that are implicitly extern "C".
3031         (struct cp_parser): new one-bit field, implicit_extern_c.
3032         (cp_parser_new): Set parser's implicit_extern_c to false.
3033         (cp_parser_translation_unit): Pop lang context if we were in a
3034         header that was implicitly extern "C".
3035         (cp_parser_declaration_seq_opt): Push/pop lang context as
3036         required by the token's and parser's implicit_extern_c.
3037
3038 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3039
3040         PR c++/17585
3041         * cp-tree.h (shared_member_p): Declare.
3042         * search.c (shared_member_p): Give it external linkage.
3043         * semantics.c (finish_qualified_id_expr): Use it.
3044         (finish_id_expression): Likewise.
3045
3046         PR c++/17585
3047         * semantics.c (finish_id_expression): Do not add "this->" to
3048         static member functions.
3049
3050 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
3051
3052         PR c++/17681
3053         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3054
3055         * class.c (struct count_depth_data): Remove.
3056         (dfs_depth_post, dfs_depth_q): Remove.
3057         (find_final_overrider): Use number of vbase classes as depth
3058         bound.
3059
3060         * cp-tree.h (types_overlap_p): Remove.
3061         * search.c (struct overlap_info): Remove.
3062         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3063
3064         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3065         (get_template_base_recursive): Remove. Replace with ...
3066         (get_template_base_r): ... this.
3067         (struct get_template_base_data_s): New.
3068         (get_template_base): Use get_template_base_r via dfs_walk.  Always
3069         return NULL on failure.
3070         (unify): Remove error_mark_node check from get_template_base result.
3071
3072 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
3073
3074         * parser.c (cp_parser_expression_stack): Clarify why it is
3075         an array of NUM_PREC_VALUES elements.
3076         (cp_parser_binary_expression): Clarify why we do not need to
3077         handle stack overflow.
3078
3079 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
3080
3081         PR c++/16889
3082         * search.c (lookup_field_queue_p): Correct check for hidden base.
3083
3084         * search.c (bfs_walk): Remove.
3085         (lookup_member): Use dfs_walk_real.
3086         (dfs_walk_real): Move and adjust documentation from bfs_walk.
3087
3088 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
3089
3090         * decl.c (grokfndecl): If ::main is found not to return int,
3091         correct it after issuing a diagnostic.
3092         (grokdeclarator): If the incoming type was error_mark_node, do
3093         not complain about declaring something with no type.
3094         (start_function): Change check for ::main not returning int to
3095         an assertion, as grokfndecl now catches this when the user did it.
3096         * init.c (perform_member_init, sort_mem_initializers)
3097         (emit_mem_initializers): Make most diagnostics be issued on
3098         the line of current_function_decl, not whatever the current
3099         input line is.
3100         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3101         definition and declaration with #ifdef ENABLE_CHECKING.
3102         Avoid unnecessary use of fprintf.
3103         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3104         definitions to avoid warnings.
3105         (cp_lexer_new_main): Add assertion that first token is not a
3106         padding token.
3107         (cp_lexer_new_from_token_array): Fold into ...
3108         (cp_lexer_new_from_tokens): ... here.  Add assertion that
3109         first token is not a padding token.
3110         (cp_lexer_set_source_position_from_token): Move nearer to callers.
3111         Remove unused lexer argument.
3112         (cp_lexer_peek_token): Just print debugging report (if enabled)
3113         and return lexer->next_token.
3114         (cp_lexer_skip_purged_tokens): Delete.
3115         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3116         inline, simplify bodies.
3117         (cp_lexer_peek_nth_token): Add debugging report a la
3118         cp_lexer_peek_token.
3119         (cp_lexer_consume_token): Correct commentary.  Advance over
3120         purged tokens here.  Set current source position here, from
3121         token to be returned.  Avoid unnecessary use of fprintf.
3122         (cp_lexer_purge_token): Advance next_token pointer over this and
3123         subsequent purged tokens.
3124         (cp_parser_error): Adjust source position to that of the
3125         peeked token.
3126         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3127         (cp_parser_string_literal): Remove some excessive cleverness.
3128         (cp_parser_enum_specifier): Call start_enum before consuming
3129         the opening brace.
3130         (cp_parser_member_declaration): Make the "extra semicolon"
3131         diagnostic consistently-worded with the other place this is
3132         diagnosed.  Explicitly set the diagnostic location to the
3133         location of the offending semicolon.
3134         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3135         in diagnostics.  Do not use cp_parser_require.  Set location
3136         of diagnostics about improper use of '>>' to location of
3137         offending token.
3138         (cp_parser_late_parsing_for_member):
3139         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3140         (cp_parser_late_parsing_default_args): Likewise.  Manually
3141         move some logic outside the loop.
3142
3143 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
3144
3145         PR c++/17618
3146         * cvt.c (cp_convert_to_pointer): Return early when the type is
3147         an error_mark_node.
3148
3149 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3150
3151         PR c++/13989
3152         PR c++/9844
3153         * decl.c (grokfndecl): Add new argument "attrlist", use it
3154         to call cplus_decl_attributes.
3155         (start_function): Remove call to cplus_decl_attributes.
3156         * cvt.c (ocp_convert): Add support to use type conversion
3157         function to vector type.
3158         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3159         to the parsed type.
3160
3161 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
3162
3163         PR c++/17596
3164
3165         * parser.c (cp_parser_token_tree_map_node,
3166         cp_parser_pm_expression, cp_parser_additive_expression,
3167         cp_parser_multiplicative_expression, cp_parser_shift_expression,
3168         cp_parser_relational_expression, cp_parser_equality_expression,
3169         cp_parser_and_expression, cp_parser_exclusive_or_expression,
3170         cp_parser_inclusive_or_expression,
3171         cp_parser_logical_and_expression,
3172         cp_parser_logical_or_expression): Removed.
3173         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3174         binops, binops_by_token): New.
3175         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3176         (cp_parser_new): Initialize binops_by_token.
3177         (cp_parser_binary_expression): Rewritten.
3178         (N_CP_TTYPES): New.
3179
3180 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
3181
3182         * parser.c: Fix a comment typo.
3183
3184 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
3185
3186         PR c++/17620
3187         * decl.c (xref_basetypes): Look through typedefs before checking
3188         for duplicate base.
3189
3190 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3191
3192         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3193         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3194         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3195         (init_rtti_processing): Initialize it to something realistic.
3196         (get_tinfo_decl): Adjust pushing the new decl.
3197
3198         * cp-tree.h (struct lang_type_class): Remove marked flags, add
3199         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
3200         (TYPE_MARKED_P): New.
3201         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3202         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3203         CLEAR_CLASSTYPE_MARKED_N): Remove.
3204         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3205         CLEAR_CLASSTYPE_MARKED_*): Remove.
3206         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3207         shaped and repeated base properties.
3208         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3209         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3210         class_hint_flags): Remove.
3211         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3212         CLASSTYPE_DIAMOND_SHAPED_P.
3213
3214 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
3215
3216         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3217         cp-objcp-common.h.
3218         (objcp_tsubst_copy_and_build): Reformat function signature.
3219         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3220         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3221
3222 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
3223
3224         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3225         Don't handle CPP_PRAGMA tokens specially.
3226         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
3227         purge the token; do clear token->value after processing.  Add
3228         assertion at beginning that token->value is nonzero.
3229         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3230         CPP_PRAGMA as a full statement or declaration in its own right.
3231
3232 2004-09-21  Matt Austern  <austern@apple.com>
3233
3234         PR c++/15049
3235         * decl.c (grokvardecl): Accept declarations of global variables
3236         using anonymous types.
3237
3238 2004-09-21  Roger Sayle  <roger@eyesopen.com>
3239
3240         PR c++/7503
3241         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
3242         if either operand has side-effects.
3243         * typeck.c (rationalize_conditional_expr): Assert that neither
3244         operand of MIN_EXPR or MAX_EXPR has side-effects.
3245         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
3246         Check that the "lhs" is a valid lvalue, i.e. that neither operand
3247         of a MIN_EXPR or MAX_EXPR has a side-effect.
3248
3249 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
3250
3251         * cp-tree.h (struct lang_type_header): Remove
3252         uses_multiple_inheritance field.
3253         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3254         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3255         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3256         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3257         (TYPE_CONTAINS_VPTR_P): Likewise.
3258         * call.c (add_template_candidate_real): Use
3259         CLASSTYPE_VBASECLASSES.
3260         (build_special_member_call): Likewise.
3261         * class.c (finish_struct_bits): Remove
3262         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3263         bookkeeping.
3264         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3265         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3266         bookkeeping.
3267         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3268         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3269         Likewise.
3270         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3271         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3272         bookkeeping.
3273         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3274         * decl2.c (maybe_retrofit_in_chrg): Likewise.
3275         * init.c (expand_member, push_base_cleanups): Likewise.
3276         * pt.c (instantiate_class_template): Remove
3277         TYPE_USES_MULTIPLE_INHERITANCE,
3278         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3279         bookkeeping.
3280         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3281         check.
3282         * typeck2.c (process_init_constructor): Replace some sorrys with
3283         asserts.
3284
3285 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
3286
3287         * decl.c (reshape_init_array): Initialize max_index_cst to fix
3288         bootstrap failure.
3289
3290 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
3291
3292         PR c++/17530
3293         * pt.c (tsubst): Fix parentheses to accomodate emacs.
3294         (tsubst_baselink): If we get a single function, mark it as used.
3295
3296 2004-09-20  Matt Austern <austern@apple.com>
3297             Zack Weinberg  <zack@codesourcery.com>
3298
3299         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3300         Apply lbasename to input_filename before passing to get_fileinfo.
3301         * semantics.c (begin_class_definition): Likewise.
3302         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3303         correct filename.  Rename variables to be less confusing.
3304         (handle_pragma_implementation): Likewise.  Disable "appears
3305         after file is included" diagnostic.
3306
3307         * parser.c (struct cp_token): Add in_system_header fiag.
3308         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3309         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3310         (CPP_NONE, cp_lexer_read_token): Delete.
3311         (struct cp_lexer): Remove first_token, string_tokens,
3312         main_lexer_p fields.  Clarify comments.
3313         (struct cp_token_cache): Now just a pair of pointers.
3314         (CP_LEXER_BUFFER_SIZE): New #define.
3315         (CPP_PURGED): New fake token type.
3316         (cp_lexer_new_from_token_array, cp_lexer_destroy)
3317         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3318         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3319         New functions.
3320         (cp_lexer_new_from_tokens): Now a simple wrapper around
3321         cp_lexer_new_from_token_array.
3322         (cp_lexer_set_source_position_from_token): Also update
3323         in_system_header.
3324         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3325         Don't wrap round.
3326         (cp_lexer_token_difference): Dont handle wrapping round.
3327         (cp_lexer_new_main): Enable pragma deferral and raw strings,
3328         read the entire translation unit through c_lex_with_flags into
3329         this lexer's buffer, then turn raw strings back off again.
3330         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3331         (cp_lexer_get_preprocessor_token): No need to handle not being
3332         the main lexer.  Set token->in_system_header too.
3333         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
3334         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
3335         (cp_lexer_peek_nth_token): Likewise.
3336         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3337         the other tokens down.
3338         (cp_lexer_purge_tokens_after): Likewise.
3339         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3340         about there being no tokens.
3341         (cp_lexer_print_token): Revise to give useful information on
3342         all tokens.
3343         (struct cp_parser): Add field translate_strings_p.
3344         (cp_parser_new): Initialize it.
3345         (cp_parser_translation_unit): Destroy the lexer when done.
3346         (cp_parser_parameter_declaration): Restructure saving of
3347         default arguments.
3348         (cp_parser_save_member_function_body): Likewise.
3349         (cp_parser_check_for_invalid_template_id)
3350         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3351         Adjust calls to cp_lexer_advance_token.
3352         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3353         No need to fiddle c_lex_string_translate.
3354         (cp_parser_primary_expression, cp_parser_linkage_specification)
3355         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3356         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3357         Use cp_parser_string_literal.
3358         (cp_parser_attribute_list): Save and restore
3359         parser->translate_strings_p, not c_lex_string_translate.
3360         (cp_parser_cache_group): Delete.
3361         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
3362         not take a cache argument.
3363
3364 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3365
3366         PR c++/14179
3367         * decl.c (reshape_init): Extract array handling into...
3368         (reshape_init_array): New function. Use integers instead of trees
3369         for indices. Handle out-of-range designated initializers.
3370
3371 2004-09-20  Steven Bosscher  <stevenb@suse.de>
3372
3373         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3374         to null_node.
3375
3376 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
3377
3378         * decl2.c (determine_visibility): Allow class visibility
3379         directives to override targetm.cxx.export_class_data.
3380
3381 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
3382
3383         * call.c, semantics.c: Follow spelling conventions.
3384         * class.c: Fix a comment typo.
3385
3386 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
3387
3388         PR pch/13361
3389         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3390         (handle_pragma_implementation): Likewise.
3391
3392 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3393             Zack Weinberg  <zack@codesourcery.com>
3394
3395         * cp-tree.def: Use tree_code_class enumeration constants
3396         instead of code letters.
3397         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3398         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3399         Update for new tree-class enumeration constants.
3400
3401 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
3402
3403         PR c++/16002
3404         * parser.c (cp_parser_simple_declaration): Commit to tentative
3405         parses after seeing a decl-specifier.
3406         (cp_parser_simple_declaration): Eliminate spurious message.
3407         (cp_parser_init_declarator): Adjust error message.
3408
3409         PR c++/16029
3410         * lex.c (unqualified_name_lookup_error): Mark the dummy
3411         declaration as used.
3412
3413         PR c++/17501
3414         * parser.c (cp_parser_nested_name_specifier): Do not resolve
3415         typename types if the user explicitly said "typename".
3416
3417 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
3418
3419         * error.c (dump_decl): Make sure there is lang_specific info before
3420         checking for DTOR and CTOR decls.
3421
3422 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3423
3424         * class.c (copy_virtuals): Remove.
3425         (build_primary_vtable): Use copy_list directly.
3426         (build_secondary_vtable): Likewise.
3427         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3428         (create_vtable_ptr): Likewise.
3429
3430 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
3431
3432         * search.c: Follow spelling conventions.
3433
3434 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3435
3436         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3437         VEC(tree).
3438         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3439         comments.
3440         * call.c (build_new_method_call): Don't confirm a pure virtual is
3441         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
3442         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3443         (fixup_inline_methods, finish_struct): Likewise.
3444         * decl.c (finish_method): Likewise.
3445         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3446         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3447         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3448         vector to avoid repeating the list in error messages.
3449
3450 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
3451
3452         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3453         * cp-tree.h (cxx_comdat_group): Declare.
3454         * decl.c (cxx_comdat_group): New function.
3455
3456 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3457
3458         * search.c (get_pure_virtuals): Remove unused variables.
3459
3460         * cp-tree.h (struct lang_decl_flags): Remove
3461         needs_final_overrider.
3462         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3463         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3464         * class.c (finish_struct_bits): Correct comment about
3465         CLASSTYPE_PURE_VIRTUALS.
3466         * search.c (get_pure_virtuals): Remove useless loop.
3467
3468 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
3469
3470         PR c++/17324
3471         * mangle.c (partially_mangled_name): New variable.
3472         (partially_mangled_name_len): Likewise.
3473         (save_partially_mangled_name): New function.
3474         (restore_partially_mangled_name): Likewise.
3475         (write_encoding): Save and restore partially mangled names around
3476         calls to get_mostly_instantiated_function_type.
3477         (write_unqualified_name): Likewise.
3478
3479 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3480
3481         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3482
3483 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
3484
3485         PR c++/16162
3486         * parser.c (cp_parser_id_expression): Correct value for
3487         is_declarator.
3488         (cp_parser_nested_name_specifier_opt): Look through typenames as
3489         necessary.
3490         (cp_parser_template_name): Honor check_dependency_p.
3491
3492         PR c++/16716
3493         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3494         Robustify.
3495
3496         PR c++/17327
3497         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
3498         gcc_unreacable.
3499
3500 2004-09-12  Richard Henderson  <rth@redhat.com>
3501
3502         PR c++/16254
3503         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3504         * typeck.c (condition_conversion): Likewise.
3505
3506 2004-09-11  Richard Henderson  <rth@redhat.com>
3507
3508         PR c++/17404
3509         * pt.c (cur_stmt_expr): Move from tsubst_expr.
3510         (tsubst_expr) <case STMT_EXPR>: Move ...
3511         (tsubst_copy_and_build): ... here.
3512
3513 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
3514
3515         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3516         comment explaining them moved to c-common.h.
3517         * lex.c (interface_only, interface_unknown, extract_interface_info):
3518         Delete definitions.
3519         (cxx_finish): Don't reset interface_unknown.
3520         (handle_pragma_interface): Don't set interface_only and
3521         interface_unknown; just the like-named fields in finfo.
3522         (handle_pragma_implementation): Adjust comment.
3523         * decl2.c (cp_finish_file): Don't reset interface_only and
3524         interface_unknown.
3525         * method.c (synthesize_method): Don't reset interface_unknown or
3526         call extract_interface_info.
3527         * pt.c (pop_tinst_level): Don't call extract_interface_info.
3528         * decl.c (start_cleanup_fn): Don't save or restore interface_only
3529         and interface_unknown.
3530         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3531         and use the result instead of the interface_only/interface_unknown
3532         globals.
3533         (start_preparsed_function): Likewise.
3534         * lex.c (cxx_make_type): Likewise.
3535         * semantics.c (begin_class_definition): Likewise.
3536         (expand_body): Don't call extract_interface_info.
3537
3538 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3539
3540         * decl.c (objc_mark_locals_volatile): Make description of
3541         routine more descriptive; only mark VAR_DECLs at each
3542         binding level.
3543
3544 2004-09-10  Richard Henderson  <rth@redhat.com>
3545
3546         PR c++/17386
3547         * call.c (build_vfield_ref): Move...
3548         * class.c (build_vfield_ref): ... here.  Convert datum to the
3549         primary base containing the vptr.
3550         (make_new_vtable): Simplify build_primary_vtable arguments.
3551         (finish_struct_1): Do not duplicate TYPE_VFIELD.
3552         * typeck.c (build_class_member_access_expr): Don't warn for
3553         null object access to base fields.
3554
3555 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
3556
3557         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3558         New functions, to be called from ObjC++.
3559
3560 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
3561
3562         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3563         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3564         comment typos.
3565
3566 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3567
3568         * typeck.c (build_c_cast): Preserve the cast if casting
3569         to and from an Objective-C type.
3570
3571 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
3572
3573         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3574         * typeck.c: Include c-common.h.
3575         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3576         return the result if nonnegative.
3577
3578 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
3579
3580         * decl2.c (import_export_class)
3581         * lex.c (handle_pragma_interface):
3582         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3583
3584 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3585
3586         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3587         * semantics.c: Include c-common.h.
3588         (finish_compound_stmt): Call objc_clear_super_receiver().
3589
3590 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
3591
3592         * cp-tree.h (do_poplevel): New prototype.
3593         * semantics.c (do_poplevel): Make externally visible.
3594
3595 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
3596
3597         * cp-tree.h (tree_pair_s): Define a GC'd vector.
3598         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3599         * semantics.c (deferred_access): Likewise.
3600
3601 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
3602
3603         * semantics.c (expand_body): Assert that we are not nested.
3604
3605 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
3606
3607         * decl.c (build_enumerator): Use add_double and int_fits_type_p
3608         instead of cp_build_binary_op, to avoid creating short-lived trees.
3609         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3610         lookahead instead of backtracking.  Move some code to avoid a
3611         conditional branch.
3612         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3613         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3614         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3615         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3616
3617 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3618
3619         * decl.c (grok_declarator): Remove a redundant semicolon.
3620
3621         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3622         Correct comments describing function parameters.
3623
3624 2004-09-03  Matt Austern  <austern@apple.com>
3625         Compile speed improvement.
3626         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3627         Otherwise define a stub macro that expands to nothing.
3628         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
3629         define a stub macro that expands to 0.
3630         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3631         (cp_lexer_stop_debugging): Likewise.
3632         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
3633         define a stub macro that expands to NULL.
3634         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3635         (cp_lexer_new_from_tokens): Likewise.
3636
3637 2004-09-03  Jan Hubicka  <jh@suse.cz>
3638
3639         * decl.c (finish_function): Clean out pointers we no longer need.
3640
3641 2004-09-03  Jan Beulich  <jbeulich@novell.com>
3642
3643         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3644         than "-lm".
3645
3646 2004-09-02  Paul Brook  <paul@codesourcery.com>
3647
3648         * decl2.c (determine_visibility): Only check data visibility
3649         for VAR_DECLS.
3650
3651 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
3652
3653         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3654         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3655         * decl2.c (determine_visibility): Honor
3656         TARGET_CXX_EXPORT_CLASS_DATA.
3657
3658         * class.c (key_method): Rename to ...
3659         (determine_key_method): ... this.
3660         (finish_struct_1): Adjust accordingly.
3661         * cp-tree.h (key_method): Declare.
3662         * decl2.c (maybe_emit_vtables): Determine the key method here if
3663         it has not already been done.
3664
3665 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
3666
3667         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3668         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3669         (cp/cp-decl.c): Do not depend on gtype-cp.h.
3670         (cp/cp-objcp-common.o): New target.
3671         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3672         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3673         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3674         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3675         respectively.
3676         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3677         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3678         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3679         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3680         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3681         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3682         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3683         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3684         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3685         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3686         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3687         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3688         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3689         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3690         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3691         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3692         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3693         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3694         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3695         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3696         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3697         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3698         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3699         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3700         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3701         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3702         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3703         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3704         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3705         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3706         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3707         hooks to cp-objcp-common.h.
3708         (finish_file): New function.
3709         * cp-objcp-common.c: New file.
3710         * cp-objcp-common.h: New file.
3711         * cp-tree.h (cp_finish_file): New prototype.
3712         * decl.c: Do not include gtype-cp.h.
3713         * decl2.c (finish_file): Rename to cp_finish_file.
3714
3715 2004-08-31  Richard Henderson  <rth@redhat.com>
3716
3717         PR c++/17221
3718         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3719         (tsubst_copy_and_build): ... here.
3720
3721 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
3722
3723         * cp-tree.h (initialize_artificial_var): Declare.
3724         * decl.c (initialize_artifical_var): New function.
3725         * class.c (initialize_array): Remove.
3726         (initialize_vtable): Use initialize_artificial_var.
3727         (build_vtt): Likewise.
3728         (build_ctor_vtbl_group): Likewise.
3729
3730 2004-08-30  Richard Henderson  <rth@redhat.com>
3731
3732         * class.c (build_base_path): Use build_address directly.
3733         * typeck.c (build_unary_op): Don't lower &a.b to pointer
3734         arithmetic directly.
3735         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3736         means !initializer_constant_valid_p.
3737
3738 2004-08-30  Richard Henderson  <rth@redhat.com>
3739
3740         * class.c (fixed_type_or_null): Use get_base_address before
3741         assuming an ADDR_EXPR is non-null.
3742
3743 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3744
3745         * name-lookup.c (pop_binding, pushdecl,
3746         set_identifier_type_value_with_scope, push_overloaded_decl,
3747         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3748         * parser.c (cp_parser_diagnose_invalid_type_name,
3749         cp_parser_postfix_expression, cp_parser_unary_expression,
3750         cp_parser_check_declarator_template_para): Likewise.
3751         * pt.c (push_inline_template_parms_recursive,
3752         check_explicit_specialization, convert_nontype_argument,
3753         coerce_template_template_parms, uses_template_parms,
3754         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
3755         tsubst_expr, instantiate_template,
3756         maybe_adjust_types_for_deduction, type_unification_real,
3757         resolve_overloaded_unification, template_decl_level,
3758         type_dependent_expression_p): Likewise.
3759         * search.c (lookup_base_r): Likewise.
3760         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
3761         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
3762         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
3763         * typeck.c (common_type, get_member_function_from_ptrfunc,
3764         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
3765         * typeck2.c (cxx_incomplete_type_diagnostic,
3766         split_nonconstant_init_1, store_init_value,
3767         process_init_constructor): Likewise.
3768
3769 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3770
3771         * call.c (check_dtor_name): Replace abort with gcc_assert or
3772         gcc_unreachable.
3773         (build_call, add_builtin_candidate, build_new_op,
3774         convert_like_real, build_over_call, in_charge_arg_for_name,
3775         source_type, joust): Likewise.
3776         * class.c (build_simple_base_path, get_vcall_index,
3777         finish_struct_1, instantiate_type, get_enclosing_class,
3778         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
3779         * cp-gimplify.c (cp_genericize): Likewise.
3780         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
3781         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
3782         * decl.c (poplevel, make_unbound_class_template, reshape_init,
3783         check_special_function_return_type, grokdeclarator,
3784         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
3785         finish_function): Likewise.
3786         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
3787         * error.c (dump_global_iord, dump_decl, dump_template_decl,
3788         language_to_string): Likewise.
3789         * except.c (choose_personality_routine): Likewise.
3790         * friend.c (do_friend): Likewise.
3791         * g++spec.c (lang_specific_driver): Likewise.
3792         * init.c (build_zero_init, expand_default_init, build_new_1,
3793         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
3794         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
3795         * mangle.c (add_substitution, write_unscoped_name,
3796         write_template_prefix, write_identifier,
3797         write_special_name_destructor, write_type, write_builtin_type,
3798         write_expression, write_template_param,
3799         write_java_integer_type_codes): Likewise.
3800         * method.c (implicitly_declare_fn): Likewise.
3801
3802 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
3803
3804         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
3805         (BINFO_INDIRECT_PRIMARY_P): Remove.
3806         * class.c (determine_primary_base): Rename to ...
3807         (determine_primary_bases): ... here.  Set all primary bases.
3808         (set_primary_base): Remove.
3809         (mark_primary_bases): Remove.
3810         (build_simple_base_path, walk_subobject_offsets,
3811         propagate_binfo_offsets, end_of_class): Adjust.
3812         (layout_class_type): Rename determine_primary_base call.
3813         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
3814         to type_as_string.
3815         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
3816         build_rtti_vtbl_entries): Adjust.
3817         * init.c (build_vtbl_address): Adjust.
3818
3819         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
3820
3821 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
3822
3823         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
3824         CXX_AND_OBJCXX_OBJS.
3825         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
3826         separately on the link line.
3827
3828 2004-08-28  Jason Merrill  <jason@redhat.com>
3829
3830         * decl.c (expand_static_init): Avoid bogus warnings.
3831
3832 2004-08-27  Jason Merrill  <jason@redhat.com>
3833
3834         PR c++/16851
3835         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
3836
3837         PR c++/13684
3838         * decl.c (expand_static_init): Use thread-safety API.
3839         (register_dtor_fn): Return the call, don't expand it.
3840         * tree.c (add_stmt_to_compound): New fn.
3841         (stabilize_call): Use it.
3842
3843 2004-08-27  Richard Henderson  <rth@redhat.com>
3844
3845         * cp-tree.def (OFFSETOF_EXPR): New.
3846         * parser.c (cp_parser_builtin_offsetof): Either built an
3847         OFFSETOF_EXPR, or call fold_offsetof immediately.
3848         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
3849
3850 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
3851
3852         * call.c (validate_conversion_obstack): Replace
3853         my_friendly_assert with gcc_assert or gcc_unreachable.
3854         (direct_reference_binding, merge_conversion_sequences,
3855         build_user_type_conversion_1, perform_overload_resolution,
3856         build_op_delete_call, enforce_access, call_builtin_trap,
3857         build_over_call, build_special_member_call, build_new_method_call,
3858         initialize_reference): Likewise.
3859         * class.c (build_base_path, build_primary_vtable, alter_access,
3860         check_bases, update_vtable_entry_for_fn, layout_empty_base,
3861         clone_function_decl, adjust_clone_args,
3862         type_requires_array_cookie, include_empty_classes,
3863         finish_struct_1, resolve_address_of_overloaded_function,
3864         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
3865         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
3866         accumulate_vtbl_inits, build_vtbl_initializer,
3867         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
3868         * cvt.c (build_up_reference, convert_to_reference): Likewise.
3869         * decl.c (poplevel, duplicate_decls, make_typename_type,
3870         cxx_init_decl_processing, reshape_init, check_initializer,
3871         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
3872         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
3873         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
3874         xref_basetypes, start_preparsed_function, save_function_data,
3875         finish_function, finish_method, maybe_register_incomplete_var,
3876         complete_vars): Likewise.
3877         * decl2.c (grok_array_decl, check_member_template,
3878         check_classfn, finish_static_data_member_decl, coerce_new_type,
3879         coerce_delete_type, import_export_class, decl_needed_p,
3880         determine_visibility, import_export_decl, build_cleanup,
3881         start_static_initialization_or_destructi, do_static_destruction,
3882         prune_vars_needing_no_initialization,
3883         build_offset_ref_call_from_tree): Likewise.
3884         * error.c (dump_decl, dump_expr): Likewise.
3885         * init.c (finish_init_stmts, build_zero_init,
3886         expand_virtual_init, expand_default_init, expand_aggr_init_1,
3887         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
3888         Likewise.
3889         * mangle.c (write_method_parms, write_template_args,
3890         write_expression, write_template_arg): Likewise.
3891         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3892         * name-lookup.c (pop_binding, begin_scope, leave_scope,
3893         resume_scope, push_using_decl, validate_nonmember_using_decl,
3894         is_ancestor, poplevel_class, set_inherited_value_binding_p,
3895         push_class_level_binding, do_class_using_decl, push_namespace,
3896         pop_namespace, add_using_namespace, ambiguous_decl,
3897         lookup_namespace_name, lookup_type_current_level,
3898         maybe_process_template_type_declaration): Likewise.
3899         * parser.c (cp_lexer_peek_nth_token,
3900         cp_parser_parse_and_diagnose_invalid_typ,
3901         cp_parser_translation_unit, cp_parser_template_id,
3902         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3903         * pt.c (push_access_scope, finish_member_template_decl,
3904         push_inline_template_parms_recursive, add_outermost_template_args,
3905         get_innermost_template_args, begin_explicit_instantiation,
3906         end_explicit_instantiation, retrieve_specialization,
3907         is_specialization_of, is_specialization_of_friend,
3908         register_specialization, check_explicit_specialization,
3909         comp_template_parms, process_template_parm,
3910         process_partial_specialization, convert_nontype_argument,
3911         coerce_template_template_parms, coerce_template_parms,
3912         mangle_class_name_for_template, lookup_template_function,
3913         lookup_template_class, instantiate_class_template, tsubst_decl,
3914         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3915         instantiate_template, fn_type_unification, type_unification_real,
3916         get_template_base, regenerate_decl_from_template,
3917         template_for_substitution, instantiate_decl,
3918         get_mostly_instantiated_function_type, dependent_scope_ref_p,
3919         value_dependent_expression_p, resolve_typename_type): Likewise.
3920         * repo.c (repo_emit_p): Likewise.
3921         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3922         create_tinfo_types, emit_tinfo_decl): Likewise.
3923         * search.c (lookup_base_r, lookup_base, lookup_field_1,
3924         dfs_access_in_type, build_baselink, lookup_member,
3925         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3926         * semantics.c (perform_or_defer_access_check,
3927         finish_non_static_data_member, finish_stmt_expr_expr,
3928         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3929         finish_template_template_parm, finish_member_declaration,
3930         emit_associated_thunks): Likewise.
3931         * tree.c (build_target_expr_with_type, force_target_expr,
3932         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3933         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3934         cxx_sizeof_or_alignof_type, perform_integral_promotions,
3935         build_class_member_access_expr, finish_class_member_access_expr,
3936         build_ptrmemfunc_access_expr, build_unary_op,
3937         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3938         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3939         * typeck2.c (complete_type_check_abstract,
3940         abstract_virtuals_error, process_init_constructor,
3941         add_exception_specifier): Likewise.
3942
3943 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
3944
3945         * class.c (build_vtbl_initializer): Use ssize_int.
3946         * decl.c (complete_array_type): Likewise.
3947         * method.c (finish_thunk): Likewise.
3948         * search.c (get_dynamic_base_type): Likewise.
3949
3950 2004-08-26  Richard Henderson  <rth@redhat.com>
3951
3952         * cp-tree.h (DECL_FIELD_IS_BASE): New.
3953         * class.c (build_base_field): Set it.
3954         (build_simple_base_path): Use it.
3955         (fixed_type_or_null): Don't consider base fields definitive.
3956
3957 2004-08-25  Roger Sayle  <roger@eyesopen.com>
3958
3959         PR middle-end/16693
3960         PR tree-optimization/16372
3961         * decl.c (finish_enum): Make the precision of the enumerated type
3962         the same width as the underlying integer type.
3963
3964 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
3965
3966         PR c++/17155
3967         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3968         functions.
3969
3970         * mangle.c (get_identifier_nocopy): Add cast.
3971
3972         * cp-tree.h (mangle_type): Remove.
3973         * mangle.c (globals): GTY it.
3974         (mangle_obstack): New variable.
3975         (name_obstack): Likewise.
3976         (name_base): Likewise.
3977         (write_char): Adjust accordingly.
3978         (write_chars): Likewise.
3979         (write_string): Likewise.
3980         (start_mangling): Initialize G.substitutions only one.  Add
3981         ident_p parameter.
3982         (finish_mangling): Use VARRAY_CLEAR to reclaim
3983         storage in G.substitutions.  Use obstack_finish.
3984         (init_mangle): Adjust for changes to variable names above.
3985         Initialize G.substitutions.
3986         (mangle_decl_string): Adjust call to start_mangling.
3987         (get_identifier_nocopy): New function.
3988         (mangle_decl): Use it.
3989         (mangle_type_string): Adjust call to start_mangling.
3990         (mangle_special_for_type): Likewise.
3991         (mangle_vtt_for_type): Likewise.
3992         (mangle_ctor_vtbl_for_type): Likewise.
3993         (mangle_thunk): Likewise.
3994         (mangle_guard_variable): Likewise.
3995         (mangle_ref_init_variable): Likewise.
3996
3997 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3998
3999         PR c++/14428
4000         * pt.c (redeclare_class_template): Check the type of non-type and
4001         template template parameter.
4002
4003 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4004
4005         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4006         (build_user_type_conversion_1, convert_like_real,
4007         build_java_interface_fn_ref, build_special_member_call): Likewise.
4008         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4009         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4010         * cvt.c (cp_convert_to_pointer): Likewise.
4011         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4012         * decl2.c (start_static_initialization_or_destruction,
4013         generate_ctor_or_dtor_function): Likewise.
4014         * except.c (build_throw): Likewise.
4015         * mangle.c (write_integer_cst): Likewise.
4016         * method.c (finish_thunk): Likewise.
4017         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4018         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4019         get_pseudo_ti_init): Likewise.
4020         * search.c (get_dynamic_cast_base_type): Likewise.
4021
4022 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
4023
4024         * class.c, search.c: Remove references to DWARF_DEBUG.
4025
4026 2004-08-25  Adam Nemet  <anemet@lnxw.com>
4027
4028         * repo.c (extract_string): Reset backquote after one character.
4029         (get_base_filename): Fix indentation.
4030
4031 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4032
4033         * decl.c (cxx_init_decl_processing): Adjust
4034         build_common_tree_nodes call.
4035
4036 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4037
4038         PR c++/16889
4039         * (is_subobject_of_p): Resurrect & optimize.
4040         (lookup_field_r): Use it.
4041
4042 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4043
4044         PR c++/16706
4045         * search.c (friend_accessible_p): Increment processing_template_decl
4046         when deal with TEMPLATE_DECL of SCOPE.
4047
4048 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4049
4050         PR c++/17149
4051         * semantics.c (check_accessibility_of_qualified_id): Defer check
4052         if qualifying_type is a template parameter.
4053
4054 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
4055
4056         PR c++/17163
4057         * pt.c (instantiate_decl): Do not try to apply
4058         DECL_DECLARED_INLINED_P to a VAR_DECL.
4059
4060         * search.c (build_baselink): Fix typo in comment.
4061
4062 2004-08-22 Andrew Pinski  <apinski@apple.com>
4063
4064         Revert:
4065         2004-08-22  Andrew Pinski  <apinski@apple.com>
4066         PR c++/14029
4067         * typeck.c (build_unary_op): Use &a.b if the folded lowered
4068         expression is not constant.
4069
4070 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4071
4072         * name-lookup.c (pushdecl): Rename build_type_copy call.
4073         * tree.c (cp_build_qualified_type_real,
4074         build_exception_variant, handle_java_interface_attribute): Likewise.
4075
4076 2004-08-22  Andrew Pinski  <apinski@apple.com>
4077
4078         PR c++/14029
4079         * typeck.c (build_unary_op): Use &a.b if the folded lowered
4080         expression is not constant.
4081
4082 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
4083
4084         PR c++/17121
4085         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4086
4087 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4088
4089         PR c++/17120
4090         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4091         MODOP_EXPR.
4092
4093 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4094
4095         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4096         before calling comp_template_args.
4097
4098 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4099
4100         * class.c (build_vtbl_initializer): Use build_int_cst for
4101         negative size types.
4102         * decl.c (complete_array_type): Likewise.
4103         * method.c (finish_thunk): Likewise.
4104
4105 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
4106
4107         * tree.c: Remove unused mark_local_for_remap_r.
4108
4109 2004-08-19  Eric Christopher  <echristo@redhat.com>
4110
4111         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4112         * tree.c (cxx_unsave_expr_now): Delete.
4113         (cp_unsave_r): Ditto.
4114
4115 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
4116
4117         PR c++/15890
4118         * pt.c (push_template_decl_real): Disallow template allocation
4119         functions with fewer than two parameters.
4120
4121 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4122
4123         * cp-tree.h (build_shared_int_cst): Remove.
4124         * tree.c (shared_int_cache): Remove.
4125         (build_shared_int_cst): Remove.
4126         * class.c (finish_struct_1): Use build_int_cst.
4127
4128 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4129
4130         * decl.c (finish_enum): Do not copy value node early, copy
4131         later.
4132         * lex.c (cxx_init): Force null_node to be unique.
4133
4134 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4135
4136         PR c++/17041
4137         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4138         from input for MODOP_EXPR.
4139
4140 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
4141
4142         * pt.c (dependent_template_p): Fix typo in commment.
4143
4144         PR c++/17068
4145         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4146         dependent.
4147
4148 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
4149
4150         PR c++/16246
4151         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
4152         arguments have the same type as the corresponding parameter.
4153
4154         PR c++/16215
4155         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4156         is set use it for diagnostic purposes.
4157         (cp_parser_pseudo_destructor_name): Remove special-case error
4158         message.
4159
4160         PR c++/15871
4161         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4162
4163         PR c++/16965
4164         * cp-tree.h (qualified_name_lookup_error): Add parameter.
4165         * name-lookup.c (do_class_using_decl): Restrict set of entities
4166         passed to cp_emit_debug_info_for_using more carefully.
4167         (lookup_qualified_name): Allow lookup_member to return sets of
4168         ambiguous entries.
4169         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4170         (cp_parser_primary_expression): Handle ambiguous lookups.
4171         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4172         (cp_parser_template_argument): Likewise.
4173         (cp_parser_elaborate_type_specifier): Likewise.
4174         (cp_parser_namespace_name): Likewise.
4175         (cp_parser_class_name): Likewise.
4176         (cp_parser_lookup_name_simple): Likewise.
4177         * pt.c (tsubst_qualified_id): Handle ambiguous results.
4178         (tsubst_expr): Likewise.
4179         * semantics.c (qualified_name_lookup_error): Add decl paramter.
4180         For ambiguous lookups, print candidates.
4181
4182 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4183
4184         PR c++/6749
4185         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
4186         return anything.
4187         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4188         * decl2.c (finish_file): Adjust call to
4189         instantiate_pending_templates.
4190
4191 2004-08-15  Roger Sayle  <roger@eyesopen.com>
4192
4193         * call.c (build_vfield_ref, build_call, build_conditional_expr,
4194         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4195         build_java_interface_fn_ref, build_special_member_call,
4196         build_new_method_call, initialize_reference): Replace calls to
4197         build with calls to buildN.
4198         * class.c (build_base_path, convert_to_base_statically,
4199         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4200         build_vtbl_initializer): Likewise.
4201         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4202         gimplify_if_stmt, cp_genericize_r): Likewise.
4203         * cvt.c (convert_to_void): Likewise.
4204         * decl.c (check_initializer, finish_constructor_body,
4205         finish_destructor_body): Likewise.
4206         * error.c (dump_expr): Likewise.
4207         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4208         Likewise.
4209         * init.c (perform_member_init, expand_virtual_init,
4210         expand_cleanup_for_base, build_init, expand_default_init,
4211         build_offset_ref, decl_constant_value, build_new, build_new_1,
4212         build_vec_delete_1, build_vec_init, build_delete,
4213         push_base_cleanups, build_vec_delete): Likewise.
4214         * mangle.c (write_integer_cst): Likewise.
4215         * method.c (thunk_adjust, do_build_copy_constructor,
4216         do_build_assign_ref): Likewise.
4217         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4218         unify, build_non_dependent_expr): Likewise.
4219         * rtti.c (build_headof, build_typeid, ifnonnull,
4220         build_dyanmic_cast_1, tinfo_base_init): Likewise.
4221         * semantics.c (begin_compound_stmt, finish_call_expr,
4222         finish_pseudo_destructor_expr, finish_id_expression,
4223         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4224         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4225         array_type_nelts_total, stabilize_call): Likewise.
4226         * typeck.c (decay_conversion, build_class_member_access_expr,
4227         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4228         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4229         build_x_unary_op, build_unary_op, unary_complex_lvalue,
4230         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4231         check_return_expr): Likewise.
4232         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4233         split_nonconstant_init, store_init_value, build_m_component_ref):
4234         Likewise.
4235
4236 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4237
4238         * call.c (convert_class_to_reference,
4239         build_user_type_conversion_1, convert_like_real,
4240         build_java_interface_fn_ref, build_special_member_call): Use
4241         build_int_cst.
4242         * class.c (build_vtbl_initializer): Likewise.
4243         * cp-gimplify.c (cp_gimplify_expr): Likewise.
4244         * cvt.c (cp_convert_to_pointer): Likewise.
4245         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4246         * decl2.c (start_static_initialization_or_destruction,
4247         generate_ctor_or_dtor_function): Likewise.
4248         * except.c (build_throw): Likewise.
4249         * lex.c (cxx_init): Likewise.
4250         * mangle.c (write_integer_cst): Likewise.
4251         * rtti.c (build_headof, get_tinfo_decl_dynamic,
4252         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4253         get_pseudo_ti_init): Likewise.
4254         * search.c (get_dynamic_cast_base_type): Likewise.
4255         * tree.c (build_shared_int_cst): Likewise.
4256
4257 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
4258
4259         PR c++/16273
4260         * class.c (count_depth_data): New type.
4261         (dfs_depth_post): New function.
4262         (dfs_depth_q): Likewise.
4263         (find_final_overrider_data_s): Change type of vpath.
4264         Add vpath_list.
4265         (dfs_find_final_overrider_1): New function.
4266         (dfs_find_final_overrider): Use it.
4267         (dfs_find_final_overrider_q): Adjust use of vpath.
4268         (dfs_find_final_overrider_post): Likewise.
4269         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
4270         vpath_list.
4271
4272 2004-08-12 Jan Beulich <jbeulich@novell.com>
4273
4274         * parser.c (cp_parser_asm_definition): Properly consume scope operator
4275         tokens preceding the clobbers. Don't check for scope operator
4276         following inputs. Simplify inputs handling to match that now used for
4277         clobbers.
4278
4279 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4280
4281         PR c++/16698
4282         * except.c (build_throw): Allocate cleanup_type and the function
4283         for __cxa_throw separately.
4284
4285         PR c++/16853
4286         * call.c (standard_conversion): Do not accept conversions between
4287         pointers to members if the class types are unrelated.
4288
4289         PR c++/16618
4290         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4291         char &" instead of just "char &".
4292
4293         PR c++/16870
4294         * pt.c (tsubst): Just return the unknown_type_node.
4295
4296 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
4297
4298         PR c++/16964
4299         * parser.c (cp_parser_class_specifier): Robustify.
4300
4301         PR c++/16904
4302         * pt.c (tsubst_copy_and_build): Complain about invalid
4303         qualification.
4304
4305         PR c++/16929
4306         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4307         current_class_ref while tsubsting.
4308
4309 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
4310
4311         PR c++/16971
4312         * parser.c (cp_parser_init_declarator): Robustify.
4313
4314 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
4315
4316         * typeck2.c (process_init_constructor): Guard the missing field warning
4317         with warn_missing_field_initializers rather than extra_warnings.
4318
4319 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
4320
4321         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4322
4323 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
4324
4325         * decl.c (start_preparsed_function): Move determine_visibility
4326         call.
4327         * decl2.c (determine_visibility): Incorporate dllexport testing.
4328
4329 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
4330
4331         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4332         means that libstdc++ is needed.
4333
4334 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4335
4336         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4337
4338 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
4339
4340         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4341         than passing it as a parameter to rest_of_decl_compilation.
4342         * decl2.c (grokfield): Use set_user_assembler_name.
4343
4344 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4345
4346         * decl.c (complete_array_type): Don't gratuitously copy
4347         maxindex. Its type is always set.
4348
4349 2004-08-04  Paul Brook  <paul@codesourcery.com>
4350
4351         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4352         * cp-tree.h (struct language_function): Rename x_dtor_label to
4353         x_cdtor_label.
4354         (dtor_label): Rename ...
4355         (cdtor_label): ... to this.
4356         * decl.c (begin_constructor_body): Remove.
4357         (check_special_function_return_type): Maybe change the return type.
4358         (grokdeclarator): Pass the class type.
4359         (start_preparsed_function): Constructors may need a return label.
4360         (finish_constructor_body, finish_destructor_body): Set the return
4361         value.
4362         (begin_function_body): Don't call begin_constructor_body.
4363         (finish_function): Don't warn for constructors or destructors.
4364         (implicitly_declare_fn): Maybe change the return type.
4365         * optimize.c: Include target.h.
4366         (maybe_clone_body): Remap the function result.
4367         * semantics.c: Include target.h.
4368         (finish_return_stmt): Maybe jump to return label for constructors.
4369
4370 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
4371
4372         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4373         (check_field_decls): Or here.
4374         (check_methods): Or here.
4375         (initialize_array): Don't mess with DECL_CONTEXT.
4376         * cp-tree.h (start_decl): Adjust prototype.
4377         (determine_visibility): New function.
4378         * decl.c (duplicate_decls): Remove checks for hidden "operator
4379         new".
4380         (build_library_fn_1): Give all library functions default
4381         visibility.
4382         (start_decl): Add pop_scope_p parameter.  Tidy.
4383         (cp_finish_decl): Do not pop scopes here.  Call
4384         determine_visibility for variable definitions.
4385         (start_preparsed_function): Call determine_visibility.
4386         * decl2.c (determine_visibility): New function.
4387         * method.c (use_thunk): Fix formatting.
4388         * parser.c (cp_parser_condition): Adjust calls to start_decl.
4389         (cp_parser_init_declarator): Likewise.
4390         * pt.c (instantiate_decl): Always call pop_nested_class.
4391         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4392         (tinfo_base_init): Likewise.
4393
4394 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
4395
4396         PR c++/16707
4397         * name-lookup.c (validate_nonmember_using_decl): Robustify.
4398
4399 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
4400
4401         PR c++/16224
4402         * name-lookup.c (decl_namespace): Remove.
4403         (current_decl_namespace): Use decl_namespace_context instead of
4404         decl_namespace.
4405         (push_decl_namespace): Likewise.
4406         (arg_assoc_class): Likewise.
4407         (arg_assoc_type): Likewise.
4408         * pt.c (check_specialization_namespace): New function.
4409         (maybe_process_partial_specialization): Use it.
4410         (register_specialization): Likewise.
4411
4412         PR c++/16489
4413         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4414         * call.c (null_ptr_cst_p): Handle variables with constant
4415         initializers.
4416         * pt.c (convert_nontype_argument): Use
4417         DECL_INTEGRAL_CONSTANT_VAR_P.
4418         * semantics.c (finish_id_expression): Likewise.
4419
4420         PR c++/16529
4421         * decl.c (duplicate_decls): Reject duplicate namespace
4422         declarations.
4423
4424         PR c++/16810
4425         * typeck.c (build_ptrmemfunc): Loosen assertion.
4426
4427 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4428
4429         * call.c (z_candidate::template_decl): Rename from template.
4430         (add_template_candidate_real): Adjust member reference.
4431         (joust): Likewise.
4432
4433 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
4434
4435         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4436         (lang_decl_flags): Narrow the width of "languages".  Add
4437         repo_available_p.
4438         (DECL_NEEDED_P): Remove.
4439         (FOR_EACH_CLONE): New macro.
4440         (DECL_REPO_AVAILABLE_P): Likewise.
4441         (DECL_TINFO_P): Likewise.
4442         (set_linkage_according_to_type): Declare.
4443         (import_export_vtable): Remove.
4444         (import_export_tinfo): Likewise.
4445         (mark_needed): New function.
4446         (decl_needed_p): Likewise.
4447         (note_vauge_linkage_fn): Likewise.
4448         (init_repo): Change prototype.
4449         (repo_template_used): Remove.
4450         (repo_template_instantiated): Likewise.
4451         (repo_emit_p): New function.
4452         (repo_export_class_p): Likewise.
4453         (no_linkage_check): Change prototype.
4454         * class.c (set_linkage_according_to_type): New function.
4455         (build_vtable): Use it.  Do not call import_export_vtable.  Set
4456         DECL_IGNORED_P if appropriate.
4457         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4458         (make_rtL_for_nonlocal_decls): Check for template instantiations
4459         explicitly.
4460         (grokfndecl): Adjust call to no_linkage_check.
4461         (set_linkage_for_static_data_member): New function.
4462         (grokvardecl): Use it.  Adjust call to no_linkage_check.
4463         (grokdeclarator): Use set_linkage_for_static_data_member.
4464         * decl2.c (note_vague_linkage_fn): New function.
4465         (note_vague_linkage_var): Likewise.
4466         (finish_static_data_member_decl): Use it.
4467         (import_export_vtable): Remove.
4468         (import_export_class): Use repo_export_class_p.
4469         (var_finalized_p): Simplify.
4470         (maybe_emit_vtables): Simplify.
4471         (mark_needed): New function.
4472         (decl_needed_p): Likewise.
4473         (import_export_decl): Add documentation and consistency checks.
4474         Use repo_emit_p.  Handle virtual tables and RTTI information
4475         here.
4476         (import_export_tinfo): Remove.
4477         (write_out_vars): Call import_export_decl.
4478         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4479         whenever one is.
4480         (finish_file): Use decl_needed_p.  Do not call import_export_decl
4481         for undefined static data members.  Do not warn about undefined
4482         inlines when using a repository.
4483         (mark_used): Use note_vague_linkage_fn.  Always defer template
4484         instantiations.
4485         * lex.c (cxx_init): Adjust call to init_repo.  Always set
4486         flag_unit_at_a-time.
4487         * method.c (synthesize_method): Remove unncessary
4488         import_export_decl call.
4489         (implicitly_declare_fn): Use set_linkage_according_to_type.
4490         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4491         * pt.c (instantiate_class_template): Don't redundantly add classes
4492         to keyed_classes.  Don't call repo_template_used.
4493         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4494         templates with internal linkage.
4495         (check_instantiated_args): Adjust call to no_linkage_check.
4496         (instantiate_template): Use FOR_EACH_CLONE.
4497         (mark_definable): New function.
4498         (mark_decl_instantiated): Use it.
4499         (do_decl_instantiation): Adjust tests for explicit instantiation
4500         after "extern template".
4501         (instantiate_class_member): Do not use repo_template_instantiated.
4502         (do_type_instantiation): Simplify.
4503         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
4504         Simplify.
4505         * repo.c (repo_get_id): Remove.
4506         (original_repo): Remove.
4507         (IDENTIFIER_REPO_USED): Remove.
4508         (IDENTIFIER_REPO_CHOSEN): Remove.
4509         Remove all #if 0'd code.
4510         (repo_template_used): Remove.
4511         (repo_template_instantiated): Remove.
4512         (temporary_obstack_initialized_p): New variable.
4513         (init_repo): Register with lang_post_pch_load.  Avoid creating
4514         identifiers unnecessarily.  Don't use original_repo.  Close the
4515         file here.
4516         (reopen_repo_file_for_write): Not here.
4517         (finish_repo): Always write out a new repository file.
4518         (repo_emit_p): New function.
4519         (repo_export_class_p): Likewise.
4520         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4521         (involves_incomplete_p): New function.
4522         (tinfo_base_init): Use it.
4523         (ptr_initializer): Remove non_public_ptr parameter.
4524         (ptm_initializer): Likewise.
4525         (get_pseudo_ti_init): Likewise.
4526         (unemitted_tinfo_decl_p): Remove.
4527         (emit_tinfo_decl): Use import_export_decl.
4528         * semantics.c (expand_body): Move updates of static_ctors and
4529         static_dtors to ...
4530         (expand_or_defer_fn): ... here.
4531         * tree.c (no_linkage_check): Add relaxed_p parameter.
4532
4533 2004-07-28  Eric Christopher  <echristo@redhat.com>
4534
4535         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4536
4537 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
4538
4539         * cp-tree.h (struct tree_pair_s): New.
4540         (typedef tree_pair_p): New.
4541         (DEF_VEC_O(tree_pair_s)): New.
4542         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4543         (CLASSTYPE_VCALL_INDICES): Update documentation.
4544         * class.c (get_vcall_index): Adjust.
4545         (add_vcall_offset): Adjust.
4546
4547 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
4548
4549         * pt.c, typeck.c: Remove spurious carriage returns.
4550
4551 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4552
4553         PR c++/14429
4554         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4555         when the type of ARG is not dependent.
4556
4557 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
4558
4559         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4560         (lang_specific_driver): If the C++ or math library options don't
4561         start with '-l', don't count them as added libraries.
4562
4563 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
4564
4565         * decl.c (xref_basetypes): Adjust base access vector creation.
4566         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4567         access accesses.
4568         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4569
4570 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
4571             Brian Ryner  <bryner@brianryner.com>
4572
4573         PR c++/15000
4574         PR c++/9283
4575         * class.c (check_field_decls): Apply hidden visibility if
4576         -fvisibility-inlines-hidden and inlined unless otherwise specified
4577         (build_vtable): Set vtable visibility to class visibility.
4578         (check_field_decls): Default static member visibility to class
4579         visibility.
4580         (check_methods): Default method visibility to class visibility.
4581         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4582         CLASSTYPE_VISIBILITY_SPECIFIED macro.
4583         * decl.c (duplicate_decls): New logic for merging definition decls
4584         with declaration decls. Added ignore & warning when non default
4585         applied to global operator new or delete.
4586         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4587         wherever VISIBILITY was changed
4588         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4589         visibility.
4590         (tinfo_base_init): Set typeinfo name visibility to class visibility.
4591
4592 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4593
4594         * decl.c: Rename all identifiers named `class' to `cl'.
4595         * cp-tree.h: Likewise.
4596
4597 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4598
4599         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4600         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4601         * name-lookup.c (binding_entry_make): Use GGC_NEW.
4602         (binding_table_construct): Use GGC_CNEWVEC.
4603         (binding_table_new): Use GGC_NEW.
4604         (cxx_binding_make): Likewise.
4605         (begin_scope): Likewise.
4606         (push_to_top_level): Use GCC_CNEW.
4607         * parser.c (cp_token_cache_new): Likewise.
4608         (cp_token_cache_push_token): Likewise.
4609         (cp_lexer_new_main): Likewise.
4610         (cp_lexer_new_from_tokens): Likewise.
4611         (cp_parser_context_new): Likewise.
4612         (cp_parser_new): Likewise.
4613         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4614         * lex.c (cxx_make_type): Use GGC_CNEW.
4615         (retrofit_lang_decl): Use GGC_NEWVAR.
4616         (cxx_dup_lang_specific_decl): Likewise.
4617         (copy_lang_type): Likewise.
4618         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4619         (save_function_data): Likewise.
4620         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4621         (cxx_push_function_context): Likewise.
4622
4623 2004-07-25  Richard Henderson  <rth@redhat.com>
4624
4625         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4626         DECL_IGNORED_P on RESULT_DECL.
4627         * semantics.c (finalize_nrv): Copy them too.
4628
4629 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
4630
4631         * search.c (lookup_conversion_operator): Avoid two loops.
4632         (add_conversions): Remove.
4633         (check_hidden_convs, split_conversions,
4634         lookup_conversions_r):  New.
4635         (lookup_conversions): Use lookup_conversions_r.
4636
4637 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
4638
4639         * pt.c (get_template_base): Check type is completable.
4640
4641 2004-07-21  Eric Christopher  <echristo@redhat.com>
4642
4643         * decl.c (poplevel): Inline unused variable checking.
4644         Change formatting.
4645
4646 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
4647
4648         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4649         integer vectors.
4650
4651 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4652
4653         PR c++/14497
4654         * pt.c (check_explicit_specialization): Remove extension to accept
4655         specializations without template headers. Fall-through to normal
4656         processing.
4657
4658 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4659
4660         PR c++/509
4661         * pt.c (determine_specialization): New parameter template_count.
4662         Disambiguate between member templates and member functions counting
4663         the template headers.
4664         (check_explicit_specialization): Update caller.
4665         (tsubst_friend_function): Likewise.
4666
4667 2004-07-20  Steven Bosscher  <stevenb@suse.de>
4668
4669         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4670         * cp-tree.h (tinst_level_t): New tree type.
4671         (union lang_tree_node): Handle it.
4672         (TINST_LOCATION): New accessor macro.
4673         (make_tinst_level): New prototype.
4674         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4675         * decl.c (cp_tree_node_structure): Likewise.
4676         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4677         (print_instantiation_partial_context): Likewise.
4678         * pt.c (pop_tinst_level): Likewise.
4679          (push_tinst_level): Use make_tinst_level.
4680         * tree.c (make_tinst_level): New function.
4681         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4682
4683 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
4684
4685         * parser.c (cp_parser_simple_type_specifier): Fix typo.
4686
4687         PR c++/16637
4688         * parser.c (cp_parser_simple_type_specifier): Do not record usage
4689         of globally-qualified names.
4690
4691 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4692
4693         PR c++/16175
4694         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4695         cv qualifier.
4696
4697 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4698
4699         PR c++/16623
4700         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4701         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4702         * class.c (add_implicitly_declared_members): Use
4703         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4704         * method.c (lazily_declare_fn): Clear
4705         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4706         * search.c (lookup_fnfields_1): Check it.
4707
4708 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4709
4710         * cp-tree.h (vec_binfo_member): Remove.
4711         * tree.c (vec_binfo_member): Remove.
4712
4713         * cp-tree.h (struct lang_type_class): Remove vfields field.
4714         (CLASSTYPE_VFIELDS): Remove.
4715         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4716         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4717         handling.
4718         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4719         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4720         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4721
4722 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4723
4724         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4725         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4726         Moved to common.
4727         (BINFO_LANG_SLOTS): Remove.
4728         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4729         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4730         * class.c (check_bases): Adjust BINFO accessors.
4731         (determine_primary_base, finish_struct_bits,
4732         maybe_warn_about_overly_private_class, warn_hidden,
4733         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4734         warn_about_ambiguous_bases, get_vfield_name,
4735         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4736         add_vcall_offset_vtbl_entries_r): Likewise.
4737         * dump.c (cp_dump_tree): Likewise.
4738         * init.c (sort_mem_initializers, expand_member_init, build_delete,
4739         push_base_cleanups): Likewise.
4740         * method.c (do_build_copy_constructor, do_build_assign_ref,
4741         synthesize_exception_spec): Likewise.
4742         name-lookup.c (arg_assoc_class): Likewise.
4743         * pt.c (instantiate_class_template,
4744         get_template_base_recursive): Likewise.
4745         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4746         * typeck2.c (process_init_constructor): Likewise.
4747         * search.c (lookup_base_r, dynamic_cast_base_recurse,
4748         dfs_access_in_type, dfs_walk_real, look_for_overrides,
4749         types_overlap_p, copied_binfo, original_binfo): Likewise.
4750         (binfo_for_vtable): Remove
4751
4752 2004-07-20  Steven Bosscher  <stevenb@suse.de>
4753
4754         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
4755         thunk_alias, and the access and virtual_offset fields.
4756         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
4757         * decl.c (finish_case_label): Update c_add_case_node call.
4758
4759 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4760
4761         Revert patch for PR c++/16623.
4762
4763 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
4764
4765         * except.c: Remove two spurious carriage returns.
4766
4767 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
4768
4769         PR c++/16623
4770         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4771         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4772         * class.c (add_implicitly_declared_members): Use
4773         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4774         * method.c (lazily_declare_fn): Clear
4775         CLASSTYPE_LAZY_ASSIGNMENT_OP.
4776         * search.c (lookup_fnfields_1): Check it.
4777
4778 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
4779
4780         * class.c (add_method): Delay adding the slot until the end.
4781         (determine_primary_base): Adjust VEC_iterate invokation.
4782         (resort_type_method_vec, finish_struct_methods, warn_hidden,
4783         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
4784         build_vtbl_initializer): Likewise.
4785         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
4786         build_vbase_delete): Likewise.
4787         * method.c (do_build_copy_constructor): Likewise.
4788         * name-lookup.c (new_class_binding, print_binding_level,
4789         poplevel_class, store_class_bindings, push_to_top_level,
4790         pop_from_top_level): Likewise.
4791         * pt.c (check_explicit_specialization): Likewise.
4792         * search.c (lookup_conversion_operator, lookup_fnfields_1,
4793         get_pure_virtuals, add_conversions, dfs_check_overlap,
4794         binfo_for_vbase): Likewise.
4795
4796 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4797
4798         PR c++/12170
4799         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
4800         innermost set of template arguments during deduction.  Simplify.
4801
4802 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
4803
4804         * typeck.c (build_modify_expr, build_x_modify_expr): Set
4805         TREE_NO_WARNING on assignments with an operator other than '='.
4806
4807 2004-07-10  Steven Bosscher  <stevenb@suse.de>
4808             Joseph S. Myers  <jsm@polyomino.org.uk>
4809
4810         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
4811         * decl2.c (grokfield): Don't check current_class_depth via
4812         unused TREE_COMPLEXITY.
4813         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
4814         to avoid the missing parentheses warning.
4815         Don't set C_SET_EXP_ORIGINAL_CODE.
4816
4817 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
4818
4819         * tree.c (no_linkage_helper): Remove.
4820         (no_linkage_check): Don't use walk_tree_without_duplicates.
4821
4822         * mangle.c (write_expression): Issue a sorry for zero-operand
4823         functional casts.
4824
4825 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4826
4827         PR c++/13092
4828         * init.c (build_offset_ref): Build SCOPE_REF with non-null
4829         TREE_TYPE for non-dependent names.
4830         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
4831         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
4832         unknown_type_node as its TREE_TYPE.
4833         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
4834         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
4835         (dump_expr) <SCOPE_REF case>: Likewise.
4836
4837 2004-07-17  Jason Merrill  <jason@redhat.com>
4838
4839         PR c++/16115
4840         * call.c (type_passed_as): Make the invisible reference type
4841         __restrict.
4842         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
4843         cp_genericize_r.  Handle invisible reference lowering.
4844         (is_invisiref_parm): New fn.
4845         (cp_genericize): Adjust the types of invisible reference parms.
4846         Don't repeat the walk for clones.
4847         * decl.c (store_parm_decls): Don't generate any code for clones.
4848
4849 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4850
4851         * cp-tree.h (builtin_function): Declare.
4852
4853 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
4854
4855         * class.c (finish_struct_methods): Remove unncessary code.
4856         (add_implicitly_declared_members): Create declarations for default
4857         constructors and copy constructors lazily.
4858         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
4859         lazy_copy_ctor.
4860         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
4861         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
4862         * decl2.c (check_classfn): Robustify.
4863         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
4864         (locate_ctor): Handle lazy default constructors.
4865         (locate_copy): Handle lazy copy constructors.
4866         (implicitly_declare_fn): Make sure we're looking at the
4867         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
4868         set TYPE_HAS_CONSTRUCTOR.
4869         (lazily_declare_fn): New function.
4870         * name-lookup.c (constructor_name_full): Simplify.
4871         * search.c (lookup_fnfields_1): Lazily create methods, as
4872         necessary.
4873         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
4874
4875 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4876
4877         * cp-tree.h (struct lang_type): Don't have three GTY options on a
4878         single bit GTY desc.
4879
4880 2004-07-16  Richard Henderson  <rth@redhat.com>
4881
4882         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
4883         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
4884         * tree.c (cp_copy_res_decl_for_inlining): Remove.
4885
4886 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
4887
4888         * class.c (finish_struct_bits): Use for loop.
4889         (propagate_binfo_offsets): Do primary binfo outside of loop.
4890
4891         PR c++/16583
4892         * dump.c (cp_dump_tree): Don't dump the bases if there's no
4893         binfo.
4894
4895         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
4896
4897 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
4898
4899         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
4900         has_abstract_assign_ref.  Make methods a VEC(tree) *.
4901         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
4902         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
4903         (CLASSTYPE_DESTRUCTORS): Likewise.
4904         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
4905         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4906         (add_method): Change prototoype.
4907         * class.c (add_method): Remove error_p parameter.  Adjust for
4908         changes to CLASSTYPE_METHOD_VEC.
4909         (handle_using_decl): Adjust call to add_method.
4910         (maybe_warn_about_overly_private_class): Adjust for
4911         changes to CLASSTYPE_METHOD_VEC.
4912         (resort_type_method_vec): Likewise.
4913         (finish_struct_methods): Likewise.
4914         (check_for_override): Likewise.
4915         (warn_hidden): Likewise.
4916         (add_implicitly_declared_members): Defer creation of assignment
4917         operators.  Adjust call to add_method.
4918         (clone_function_decl): Adjust call to add_method.
4919         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
4920         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4921         * decl.c (grok_special_member_properties): Don't set
4922         TYPE_HAS_ABSTRACT_ASSIGN_REF.
4923         * decl2.c (check_classfn): Adjust for
4924         changes to CLASSTYPE_METHOD_VEC.
4925         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4926         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4927         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4928         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
4929         cp_finish_decl.
4930         * pt.c (check_explicit_specialization): Adjust for
4931         changes to CLASSTYPE_METHOD_VEC.
4932         (instantiate_class_template): Do not set
4933         TYPE_HAS_ABSTRACT_ASSIGN_REF.
4934         * ptree.c (cxx_print_type): Don't try to print
4935         CLASSTYPE_METHOD_VEC.
4936         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4937         * search.c (lookup_field_r): Adjust for
4938         changes to CLASSTYPE_METHOD_VEC.
4939         (lookup_fnfields): Likewise.
4940         (lookup_conversion_operator): Likewise.
4941         (lookup_fnfields_1): Likewise.  Create assignment operators
4942         lazily.
4943         (look_for_overrides_here): Adjust for
4944         changes to CLASSTYPE_METHOD_VEC.
4945         (add_conversions): Likewise.
4946         * semantics.c (finish_member_declaration): Adjust call to add_method.
4947
4948 2004-07-15  Jason Merrill  <jason@redhat.com>
4949
4950         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4951         references and pointers are compatible.
4952
4953 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
4954
4955         * decl.c (xref_basetypes): Refactor.
4956         * tree.c (copy_base_binfos): Replace with ...
4957         (copy_binfo): ... this. Deep copy the given binfo, (not the just
4958         bases of the given base).
4959         * cp-tree.h (copy_base_binfo): Remove.
4960         (copy_binfo): Declare.
4961
4962 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
4963
4964         * name-lookup.c (set_inherited_value_binding_p): Add class_type
4965         parameter.
4966         (get_class_binding): Adjust.
4967         (push_class_level_binding): Don't use set_inherited_value_binding_p.
4968
4969 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
4970
4971         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4972         * decl.c (xref_basetypes): Set it here.
4973
4974         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4975         Don't check for incomplete base.
4976         (get_vfield_name): Simplify while loop.
4977         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4978
4979 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
4980
4981         * lex.c (cxx_make_type): Remove call to get_pointer_type.
4982
4983         * cp-tree.h (IDENTIFIER_VALUE): Remove.
4984         (BINFO_PUSHDECLS_MARKED): Likewise.
4985         (maybe_inject_for_scope_var): Likewise.
4986         (push_class_decls): Likewise.
4987         * name-lookup.h (push_class_binding): Remove.
4988         (innermost_non_namespace_value): New function.
4989         (outer_binding): Likewise.
4990         * class.c (add_method): Push bindings before adding to
4991         TYPE_METHODS.
4992         (restore_class_cache): Do not restore class_shadowed.
4993         (pushclass): Do not add USING_DECLs.  Do not call
4994         push_class_decls.
4995         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
4996         * decl.c (pushdecl): Use outer_binding.
4997         (poplevel): Set the scope for an out-of-scope for-loop declaration
4998         appropriately.
4999         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5000         * name-lookup.c (new_class_binding): New function.
5001         (push_binding): Use it.
5002         (pushdecl): Use innermost_non_namespace_value.
5003         (maybe_inject_for_scope_var): Remove.
5004         (push_class_binding): Remove.
5005         (set_inherited_value_binding_p): New function.
5006         (get_class_binding): New function.
5007         (push_class_level_binding): Assert that the current_class_type is
5008         being defined.
5009         (outer_binding): New function.
5010         (innermost_non_namespace_value): Likewise.
5011         (lookup_name_real): Use outer_binding.
5012         (lookup_name_current_level): Ignore out-of-scope variables.
5013         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5014         (lookup_template_class): Likewise.
5015         * search.c (dfs_push_type_decls): Remove.
5016         (dfs_push_decls): Likewise.
5017         (setup_class_bindings): Likewise.
5018         (lookup_field_1): Handle USING_DECLs from dependent scopes.
5019         (marked_pushdecls_p): Remove.
5020         (unmarked_pushdecls_p): Remove.
5021         (marked_identifiers): Remove.
5022         (setup_class_bindings): Remove.
5023         (dfs_push_type_decls): Remove.
5024         (dfs_push_decls): Remove.
5025         (push_class_decls): Remove.
5026
5027 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
5028
5029         PR c++/16518
5030         PR c++/16337
5031         * decl.c (grokvardecl): Make declspecs parameter const.
5032         (grokdeclarator): Likewise.  Adjust accordingly.
5033         * decl.h (grokdeclarator): Adjust declaration.
5034         * parser.c (cp_parser_init_declarator): Do not clear
5035         decl_specifiers->attributes.
5036
5037         * cp-tree.h (lang_identifier): Remove class_value.
5038         (IDENTIFIER_CLASS_VALUE): Remove.
5039         (pop_class_decls): Likewise.
5040         (init_search_processing): Likewise.
5041         * class.c (handle_using_decl): Use lookup_member, not
5042         IDENTIFIER_CLASS_VALUE.
5043         (restore_class_cache): New function, split out from ...
5044         (pushclass): ... here.  Do not call clear_identifier_class_values.
5045         (invalidate_class_lookup_cache): Do not clear
5046         IDENTIFIER_CLASS_VALUE.
5047         (popclass): Do not call pop_class_decls.
5048         (maybe_note_name_used_in_class): Do not save names looked up after
5049         the class is complete.  Use lookup_member, not
5050         IDENTIFIER_CLASS_VALUE.
5051         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5052         * decl.c (cxx_init_decl_processing): Do not call
5053         init_search_processing.
5054         * method.c (do_build_copy_constructor): Remove unnecessary code.
5055         (do_build_assign_ref): Likewise.
5056         * name-lookup.c (pushdecl): Use lookup_member, not
5057         IDENTIFIER_CLASS_VALUE.
5058         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5059         type_shadowed list.
5060         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5061         (push_class_binding): Do not set it.
5062         (clear_identifier_class_values): Remove.
5063         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5064         (store_binding): Do not save it.
5065         (pop_from_top_level): Do not restore it.
5066         * name-lookup.h (cxx_saved_binding): Remove class_value.
5067         (clear_identifier_class_values): Remove.
5068         * ptree.c (cxx_print_identifier): Do not print
5069         IDENTIFIER_CLASS_VALUE.
5070         * search.c (search_obstack): Remove.
5071         (push_stack_level): Remove.
5072         (pop_stack_level): Remove.
5073         (search_level): Remove.
5074         (search_stack): Remove.
5075         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5076         (setup_class_bindings): Use IDENTIFIER_MARKED, not
5077         IDENTIFIER_CLASS_VALUE.
5078         (marked_identifiers): New variable.
5079         (push_class_decls): Clear IDENTIFIER_MARKED.
5080         (pop_class_decls): Don't call pop_search_level.
5081         (init_search_processing): Remove.
5082
5083 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
5084
5085         * cp-tree.h (get_aggr_typedef): Remove.
5086         * init.c (get_aggr_typedef): Likewise.
5087
5088         * name-lookup.c (push_class_level_binding): Simplify.
5089
5090 2004-07-12  Andrew Pinski  <apinski@apple.com>
5091
5092         PR c++/16475
5093         Revert:
5094         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5095                 PR c++/16276
5096                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5097                 is not public.
5098
5099 2004-07-12  Eric Christopher  <echristo@redhat.com>
5100
5101         * parser.c (cp_parser_class_head): Remove unused variable.
5102
5103 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5104
5105         * decl.c (grok_op_properties): Reject [de-]allocation functions
5106         declared in a namespace, or declared as static.
5107
5108 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
5109
5110         * cp-tree.h (make_binfo): Remove.
5111         * decl.c (xref_basetypes): Use make_tree_binfo directly.
5112         * tree.h (copy_base_binfos): Likewise.
5113         (make_binfo): Remove.
5114
5115         * call.c (build_user_type_conversion_1, build_new_op,
5116         check_constructor_callable, build_temp,
5117         perform_direct_initialization_of_possible): Pass type directly to
5118         lookup_fnfields & build_special_member_call.
5119         (build_special_member_call): Accept a type, and complete it.
5120         * class.c (finish_stuct_bits): Copy the BINFOs here.
5121         * cvt.c (ocp_convert): Pass type directly to
5122         build_special_member_call.
5123         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5124         (xref_basetypes): Allocate the binfo here. Adjust.
5125         * init.c (build_init, build_new_1): Pass type directly to
5126         build_special_member_call.
5127         * lex.c (cxx_make_type): Do not allocate binfo here.
5128         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5129         * parser.c (cp_parser_class_head): Always call xref_basetypes.
5130         * pt.c (instantiate_class_template): Likewise. Inhibit access
5131         checking for template friends.
5132         * ptree.c (cxx_print_type): Adjust record printing.
5133         * search.c (lookup_base): When taking a type, complete it before
5134         looking for a binfo.
5135         (lookup_member): Delay completing a type.
5136         (push_class_decls): Don't walk an incomplete type.
5137         (lookup_conversions): Likewise.
5138         * semantics.c (finish_stmt_expr_expr): Pass type directly to
5139         build_special_member_call.
5140         * tree.c (copy_base_binfos): Adjust.
5141         (make_binfo): Likewise.
5142         * typeck.c (build_modify_expr): Pass type directly to
5143         build_special_member_call.
5144         * typeck2.c (process_init_constructor): Check a binfo exists.
5145         (build_m_component_ref): Allow accessing an incomplete type.
5146         (build_functional_cast): Pass type directly to
5147         build_special_member_call.
5148
5149 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5150
5151         PR c++/2204
5152         * config-lang.in (gtfiles): Add typeck2.c.
5153         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5154         gt-cp-typeck2.h.
5155         * cp-tree.h: Declare complete_type_check_abstract.
5156         * typeck2.c (pat_calc_hash, pat_compare,
5157         complete_type_check_abstract): New functions.
5158         (abstract_virtuals_error): If the type is abstract, register the
5159         declaration within abstract_pending_vars for further checks.
5160         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5161         * decl.c (cp_finish_decl): Do not strip array types.
5162         (create_array_type_for_decl): Check for abstractness of the element
5163         type.
5164         (complete_vars): Call complete_type_check_abstract.
5165         * class.c (finish_struct): Prepare a list of virtual functions for
5166         template types, and call complete_vars on it to check for abstractness.
5167
5168 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
5169
5170         PR tree-optimization/14107
5171         * decl.c (finish_function): Remove temporary band-aid.
5172
5173 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
5174
5175         * call.c (build_operator_new_call): Avoid using push_to_top_level.
5176         (build_new_op): Adjust call to lookup_function_nonclass.
5177         * name-lookup.c (identifier_type_value): Adjust call to
5178         lookup_name_real.
5179         (lookup_name_real): Add block_p parameter.
5180         (lookup_name_nonclass): Adjust call to lookup_name_real.
5181         (lookup_function_nonclass): Likewise.
5182         (lookup_name): Likewise.
5183         * name-lookup.h (lookup_name_real): Change prototype.
5184         (lookup_name_nonclass): Likewise.
5185         * parser.c (cp_parser_lookup_name): Likewise.
5186
5187         * cp-tree.h (saved_scope): Make old_bindings a vector.
5188         (unuse_fields): Remove.
5189         * name-lookup.h (cxx_saved_binding): Define it.
5190         * class.c (pushclass): Don't use unuse_fields.
5191         * name-lookup.c (cxx_saved_binding_make): Remove.
5192         (store_binding): Add new bindings to a vector, using an
5193         accumulator style, rather than adding them to a list.
5194         (store_bindings): Adjust accordingly.
5195         (store_class_bindings): Likewise.
5196         (push_to_top_level): Likewise.
5197         (pop_from_top_level): Likewise.
5198         * optimize.c (maybe_clone_body): Must push_to_top_level and
5199         pop_from_top_level calls outside of loop.
5200         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5201         calls here from cp_parser_late_parsing_default_args.
5202         (cp_parser_save_default_args): Record the class type in which the
5203         function is declared.
5204         (cp_parser_late_parsing_default_args): Do not call
5205         push_nested_class/pop_nested_class.
5206         * search.c (dfs_unuse_fields): Remove.
5207         (unuse_fields): Remove.
5208
5209 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5210
5211         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5212         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5213         * cp-tree.h (poplevel): Declare.
5214         (set_block): Remove.
5215         * decl.c (set_block): Remove.
5216
5217 2004-07-10  Mike Stump  <mrs@apple.com>
5218
5219         * decl2.c (import_export_class): Never export/import vtables
5220         with inline key functions.
5221
5222 2004-07-09  Steven Bosscher  <stevenb@suse.de>
5223
5224         * typeck.c (c_expand_asm_operands): Remove.
5225
5226 2004-07-09  Mike Stump  <mrs@apple.com>
5227
5228         * typeck.c (build_class_member_access_expr): Skip null deref
5229         warning when we don't dereference it.
5230
5231 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5232
5233         PR c++/8211
5234         PR c++/16165
5235         * class.c (check_field_decls): Improve -Weffc++ warning: do not
5236         warn for pointers to functions/members, or for classes without
5237         destructors.
5238
5239 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
5240
5241         * name-lookup.h (struct cp_binding_level): Update documentation
5242         for class_shadowed.
5243
5244 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5245
5246         PR c++/16169
5247         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5248         returning CALL_EXPR, and non-reference return type.
5249
5250 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
5251
5252         * name-lookup.c (push_binding): Use VEC_reserve.
5253
5254 2004-07-08  Richard Henderson  <rth@redhat.com>
5255
5256         * cp-tree.h (expand_eh_spec_block): Remove.
5257
5258 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
5259
5260         * cp-tree.h (saved_scope): Remove x_previous_class_type and
5261         x_previous_class_values; add x_previous_class_level.
5262         (previous_class_type): Remove.
5263         (previous_class_values): Remove.
5264         (previous_class_level): New macro.
5265         * class.c (pushclass): Restore the identifier cache more
5266         expeditiously.
5267         (invalidate_class_lookup_cache): Use vector for class_shadowed and
5268         previous_class_values.
5269         * decl.c (poplevel): Likewise.
5270         * name-lookup.c (cxx_binding_init): New function.
5271         (cxx_binding_make): Use it.
5272         (push_binding): For a binding in a class level, use a vector of
5273         cp_class_binding nodes.
5274         (push_binding_level): New function.
5275         (begin_scope): Use it.
5276         (leave_scope): Do not put class binding levels on the free list.
5277         (print_binding_level): Adjust for the fact that class_shadowed is
5278         a vector.
5279         (poplevel_class): Likewise.
5280         (clear_identifier_class_values): Likewise.
5281         (push_class_level_binding): Likewise.
5282         (set_class_shadows): Remove.
5283         (store_binding): New function.
5284         (store_class_bindings): New function.
5285         (push_to_top_level): Use store_class_bindings as appropriate.
5286         (pop_from_top_level): Use previous_class_level, not
5287         previous_class_type.
5288         * name-lookup.h (cp_class_binding): New type.
5289         (cp_binding_level): Use a vector object for class_shadowed.
5290         (push_binding_level): Declare.
5291         (set_class_shadows): Remove.
5292
5293 2004-07-07  Andrew Pinski  <apinski@apple.com>
5294
5295         * class.c (instantiate_type): BUFFER_REF is dead.
5296         * lex.c (init_operators): IN_EXPR is dead.
5297
5298 2004-07-07  Jason Merrill  <jason@redhat.com>
5299
5300         PR c++/16334
5301         * call.c (build_new_op): Give overload warnings for built-in
5302         candidates.
5303
5304 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
5305
5306         PR c++/16276
5307         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5308         is not public.
5309
5310 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5311
5312         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5313         * class.c (build_primary_vtable, check_bases,
5314         determine_primary_base, finish_struct_bits,
5315         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5316         get_basefndecls, warn_hidden, walk_subobject_offsets,
5317         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5318         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5319         finish_struct_1, get_vfield_name, contains_empty_class_p,
5320         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5321         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5322         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5323         BINFO macros.
5324         * decl.c (xref_basetypes): Likewise.
5325         * dump.c (cp_dump_tree): Likewise.
5326         * error.c (dump_expr): Likewise.
5327         * init.c (sort_mem_initializers, expand_member_init,
5328         push_base_cleanups): Likewise.
5329         * method.c (do_build_copy_constructor, do_build_assign_reg,
5330         synthesize_exception_spec): Likewise.
5331         * name-lookup.c (arg_assoc_class): Likewise.
5332         * pt.c (instantiate_class_template, tsubst,
5333         get_template_base_recursive): Likewise.
5334         * ptree.c (cxx_print_type): Likewise.
5335         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5336         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5337         dfs_access_in_type, access_in_type, lookup_field_queue_p,
5338         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5339         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5340         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5341         binfo_for_vtable, copied_binfo, original_binfo): Likewise
5342         * tree.c (copy_base_binfos, make_binfo): Likewise.
5343         * typeck.c (commmon_base_type): Likewise
5344         * typeck2.c (process_init_constructor): Likewise
5345
5346 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
5347
5348         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5349
5350 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5351
5352         PR c++/3671
5353         * pt.c (convert_nontype_argument): Disallow conversions between
5354         different enumeration types.
5355
5356 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5357
5358         * cp-tree.h (BINFO_MARKED): Remove.
5359         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5360         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5361         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5362         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5363         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5364         (mark_primary_bases, determine_primary_base, base_derived_from,
5365         dfs_find_final_overrider, dfs_find_final_overrider_q,
5366         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5367         dfs_modify_vtables, walk_subobject_offsets,
5368         layout_nonempty_base_or_field, build_base_field,
5369         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5370         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5371         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5372         build_ctor_vtbl_group, accumulate_vtble_inits,
5373         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5374         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5375         add_vcall_offset_vtbl_entries_1): Likewise.
5376         * decl.c (xref_basetypes): Incomming virtual base indicated by
5377         TREE_TYPE. Adjust.
5378         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5379         * init.c (finish_init_stmts, sort_mem_initializers,
5380         emit_mem_initializers, build_vtble_address, expand_member_init,
5381         push_base_cleanups): Likewise.
5382         * method.c (do_build_copy_constructor): Likewise.
5383         * pt.c (instantiate_class_template,
5384         get_template_base_recursive): Likewise.
5385         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5386         get_pseudo_ti_desc): Likewise.
5387         * search.c (lookup_base_r, dynamic_cast_base_recurse,
5388         binfo_from_vbase, binfo_via_virtual, copied_binfo,
5389         original_binfo): Likewise.
5390         * semantics.c (finish_base_specifier): Virtualness is indicated
5391         by TREE_TYPE.
5392         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5393
5394 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
5395
5396         Revert:
5397         2004-06-24  Jason Merrill  <jason@redhat.com>
5398         PR c++/16115
5399         * decl.c (grokparms): Give the PARM_DECL reference type if the
5400         parameter is passed by invisible reference.
5401
5402 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5403
5404         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5405         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5406         * pt.c (check_instantiated_args, unify): Likewise.
5407
5408 2004-07-05  Phil Edwards  <phil@codesourcery.com>
5409
5410         * Make-lang.in (check-c++, lang_checks):  Add some comments.
5411
5412 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5413
5414         * cp-mudflap.c: Delete file.
5415         * Makefile.in: Remove all references to cp-mudflap.o.
5416
5417 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
5418
5419         * decl.c (cxx_init_decl_processing): Call
5420         build_common_tree_nodes before creating the global NAMESPACE_DECL.
5421
5422 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5423
5424         PR c++/2518
5425         * call.c (build_operator_new_call): Look only at global scope.
5426
5427 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5428
5429         * call.c (enforce_access): Expect TREE_BINFO.
5430         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5431         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5432         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5433         Adjust.
5434         (BINFO_LANG_ELTS): Remove.
5435         (BINFO_LANG_SLOTS): New.
5436         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5437         (CLASSTYPE_TEMPLATE_INFO): Adjust.
5438         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5439         * search.c (lookup_member): Check TREE_BINFO.
5440         * semantics.c (perform_or_defer_access_check): Likewise.
5441         (check_accessibility_of_qualified_id): Check
5442         deferred_access_no_check.
5443         * tree.c (make_binfo): Use make_tree_binfo.
5444
5445 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
5446
5447         * method.c (implicitly_declare_fn): Set linkage of generated
5448         functions.
5449
5450 2004-07-04  Richard Henderson  <rth@redhat.com>
5451
5452         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5453
5454 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
5455
5456         PR c++/3761
5457         * name-lookup.c (push_class_level_binding): Don't pass a
5458         TREE_LIST of ambiguous names to check_template_shadow as it
5459         only handles declarations. Instead, pull the declaration
5460         out and pass that.
5461
5462 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5463
5464         PR c++/14971
5465         * pt.c (check_explicit_specialization): Clarify error message.
5466
5467 2004-07-02  Richard Henderson  <rth@redhat.com>
5468
5469         * tree.c (cp_unsave_r): Update remap_save_expr call.
5470
5471 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
5472
5473         PR c++/16240
5474         * mangle.c (write_template_arg): Correct mangling.
5475
5476         PR c++/16297
5477         * decl.c (grokdeclarator): Robustify.
5478
5479 2004-07-01  Richard Henderson  <rth@redhat.com>
5480
5481         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5482         * method.c (synthesize_method): Don't clear_last_expr.
5483         * name-lookup.c (maybe_push_cleanup_level): Likewise.
5484
5485 2004-07-01  Nick Clifton  <nickc@redhat.com>
5486
5487         * decl2.c (import_export_class): Invoke the
5488         import_export_class field in the gcc_target structure if it is not
5489         empty.
5490
5491 2004-06-30  Richard Henderson  (rth@redhat.com>
5492
5493         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5494         * method.c (use_thunk): Likewise.
5495
5496 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5497
5498         * call.c (build_over_call), typeck.c (build_function_call): Call
5499         check_function_arguments instead of check_function_format.
5500
5501 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
5502
5503         * call.c (build_over_call), typeck.c (build_function_call): Update
5504         calls to check_function_format.
5505
5506 2004-06-30  Richard Henderson  <rth@redhat.com>
5507
5508         * call.c (build_over_call): Use __builtin_memcpy for copying
5509         CLASS_AS_BASE rather than funny casting.
5510
5511 2004-06-30  Richard Henderson  <rth@redhat.com>
5512
5513         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5514         TYPE_SIZE_UNIT of full_type.
5515
5516 2004-06-30  Per Bothner  <per@bothner.com>
5517
5518         Conditionally compile support for --enable-mapped_location.
5519         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
5520         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
5521         adjustments - which I don't understand.
5522         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
5523         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
5524         (print_instantiation_partial_context):  Use expand_location.
5525         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
5526         * name-lookup.c:  Likewise.
5527         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
5528         * name-lookup.c:  Use input_line macro.
5529         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
5530         (cp_parser_statement):  Rename locaal variable statement_locus to
5531         statement_location and use SET_EXPR_LOCATION macro.
5532         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
5533         * tree.c (cp_walk_subtrees):  Likewise.
5534
5535 2004-06-29  Per Bothner  <per@bothner.com>
5536
5537         * tree.c (build_min_nt, build_min, build_min_non_dep):
5538         Don't set TREE_COMPLEXITY from input_line.
5539
5540 2004-06-29  Paul Brook  <paul@codesourcery.com>
5541
5542         * init.c: Include target.h.
5543         (get_cookie_size): Remove and replace with target hook.
5544         Update callers.
5545         (build_new_1): Store the element size in the cookie.
5546
5547 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
5548
5549         PR c++/16260
5550         * parser.c (cp_parser_template_declaration_after_export): Disable
5551         access checks here ...
5552         (cp_parser_class_specifier): ... not here.
5553
5554 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5555
5556         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5557         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5558         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5559         TREE_CHECK macro.
5560
5561 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5562
5563         * cp-tree.h (struct deferred_access): Move to ...
5564         * semantics.c (struct deferred_access): ... here. Adjust.
5565         (deferred_access_stack): Make a VEC(deferred_access),
5566         (deferred_access_free_list): Remove.
5567         (deferred_access_no_check): New.
5568         (push_deferring_access_checks, resume_deferring_access_checks,
5569         stop_deferring_access_checks, pop_deferring_access_checks,
5570         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5571         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5572
5573 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5574
5575         PR c++/16174
5576         * call.c (build_temp): Declare.
5577         (check_constructor_callable): New.
5578         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5579         CONSTRUCTOR_CALLABLE.
5580         (convert_like_real, initialize_reference): Use
5581         check_constructor_callable.
5582         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5583         (LOOKUP_*): Renumber.
5584
5585 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5586
5587         * friend.c (add_friend): Only perform access checks when context
5588         is a class.
5589         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5590         * parser.c (cp_parser_class_specifier): Disable access checks here
5591         when parsing the body of a templated class.
5592         * semantics.c (perform_or_defer_access_checks): Reorder to allow
5593         NULL binfos when not checking access.
5594
5595 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
5596
5597         Use vector API for vbase list.
5598         * cp-tree.h: Include vec.h
5599         (DEF_VEC_P (tree)): New type.
5600         (struct lang_type_class): Change vbase's member type.
5601         (binfo_for_vbase): Declare.
5602         * class.c (determine_primary_base, base_derived_from,
5603         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5604         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5605         build_vtbl_initializer): Adjust.
5606         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5607         vbases.
5608         * init.c (sort_mem_initializers, expand_member_init,
5609         push_base_cleanups): Adjust.
5610         * method.c (do_build_copy_constructor): Adjust.
5611         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5612         (binfo_for_vbase): New.
5613         * tree.c (copy_base_binfos): Adjust.
5614
5615 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
5616
5617         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5618
5619 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5620
5621         PR c++/14123
5622         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5623         paranthesis in case of pointers to array members.
5624         * error.c (dump_type_prefix): Likewise.
5625         (dump_type_suffix): Maybe issue a whitespace when printing
5626         ARRAY_TYPE.
5627
5628 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
5629
5630         PR c++/16193
5631         * parser.c (cp_parser_set_decl_spec_type): Refine test for
5632         redefinition of built-in types.
5633
5634 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5635
5636         * error.c (pp_template_argument_list_start): Remove.
5637         (pp_template_argument_list_end): Likewise.
5638         (pp_separate_with_comma): Use pp_cxx_separate_with.
5639         (reinit_global_formatting_buffer): Remove.
5640         (pp_non_consecutive_character): Likewise.
5641         (dump_scope): Use pp_cxx_colon_colon.
5642         (dump_template_parameter): Use pp_cxx_identifier,
5643         pp_cxx_tree_identifier and pp_cxx_whitespace.
5644         (dump_templat_bindings): Replace use of pp_string with sequence
5645         of pp_cxx_whitespace and pp_equal.
5646         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5647         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
5648         padding here.
5649         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5650         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
5651         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5652         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5653         pp_cxx_right_bracket, pp_cxx_identifier throughout,
5654         (dump_decl): Likewise.
5655         (dump_template_decl): Likewise.
5656         (dump_function_decl): Likewise.  Set padding as appropriate.
5657         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5658         pp_cxx_right_paren.
5659         (dump_exception_spec): Likewise.
5660         (dump_function_name): Use pp_cxx_tree_identifier and
5661         pp_cxx_identifier.
5662         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5663         pp_cxx_end_template_argument_list.
5664         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5665         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5666         pp_cxx_whitespace throughout.
5667         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5668         pp_cxx_right_paren.
5669         (dump_unary_op): Likewise.
5670         (reinit_cxx_pp): New function.
5671         (type_as_string); Use it.
5672         (expr_as_string): Likewise.
5673         (decl_as_string); Likewise.
5674         (context_as_string): Likewise.
5675         (lang_decl_name): Likewise.
5676         (decl_to_string): Likewise.
5677         (expr_to_string): Likewise.
5678         (parm_to_string): Likewise.
5679         (type_to_string): Likewise.
5680         (args_to_string): Likewise.
5681         (cv_to_string): Likewise.
5682
5683 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
5684
5685         * cp-tree.h (cp_cv_quals): New type.
5686         (cp_declarator): Use it instead of "tree" as appropriate.
5687         (grok_method_quals): Adjust prototype.
5688         (grokclassfn): Likewise.
5689         (do_friend): Likewise.
5690         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5691         (grokdeclarator): Likewise.
5692         * decl2.c (grok_method_quals): Likewise.
5693         (grokclassfn): Likewise.
5694         * friend.c (do_friend): Likewise.
5695         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5696         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5697         (make_pointer_declarator): Likewise.
5698         (make_reference_declarator): Likewise.
5699         (make_ptrmem_declarator): Likewise.
5700         (cp_parser_ptr_operator): Likewise.
5701         (cp_parser_cv_qualifier_seq_opt): Likewise.
5702         (cp_parser_cv_qualifier_opt): Remove.
5703         (cp_parser_new_declarator_opt): Adjust call to
5704         cp_parser_ptr_operator.
5705         (cp_parser_conversion_declaration_opt): Likewise.
5706         (cp_parser_declarator): Use cp_cv_quals, not tree.
5707         (cp_parser_direct_declarator): Likewise.
5708
5709 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5710
5711         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5712         Rename DECL_STMT to DECL_EXPR.
5713         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5714         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5715         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5716
5717 2004-06-26  Jan Hubicka  <jh@suse.cz>
5718
5719         PR C++/14865
5720         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
5721         reachability analysis.
5722
5723 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
5724
5725         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5726         2004-06-23 change.
5727
5728 2004-06-25  Paul Brook  <paul@codesourcery.com>
5729
5730         * decl2.c (get_guard): Call targetm.cxx.guard_type.
5731         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5732
5733 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
5734
5735         * decl.c (grokdeclarator): Restore error messages about __thread.
5736         * parser.c (cp_parser_decl_specifier_seq): Likewise.
5737
5738 2004-06-24  Jason Merrill  <jason@redhat.com>
5739
5740         PR c++/16115
5741         * decl.c (grokparms): Give the PARM_DECL reference type if the
5742         parameter is passed by invisible reference.
5743
5744 2004-06-24  Andreas Schwab  <schwab@suse.de>
5745
5746         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5747
5748 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
5749
5750         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
5751         (cp/decl.o): Likewise.
5752         (cp/decl2.o): Likewise.
5753         (cp/pt.o): Likewise.
5754         (cp/semantics.o): Likewise.
5755         * config-lang.in (gtfiles): Do not reference cp/lex.h.
5756         * class.c: Do not include lex.h.
5757         (add_implicitly_declared_members): Do not use
5758         adding_implicit_members.
5759         (check_bases_and_members): Do not talk about grok_x_components.
5760         * cp/cp-tree.h (adding_implicit_members): Remove.
5761         (cp_storage_class): New type.
5762         (cp_decl_spec): Likewise.
5763         (cp_decl_specifier_seq): Likewise.
5764         (cp_parameter_declarator): Use it for the decl_specifiers field.
5765         (check_tag_decl): Adjust prototype.
5766         (shadow_tag): Likewise.
5767         (groktypename): Likewise.
5768         (start_decl): Likewise.
5769         (start_function): Likewise.
5770         (start_method): Likewise.
5771         (grok_x_components): Remove.
5772         (grokfield): Adjust prototype.
5773         (grokbitfield): Likewise.
5774         (finish_member_class_template): Remove.
5775         * decl.c: Do not include lex.h.
5776         (adding_implicit_members): Do not define.
5777         (check_tag_decl): Do not use trees to represent decl-specifiers.
5778         (shadow_tag): Likewise.
5779         (groktypename): Likewise.
5780         (start_decl): Likewise.
5781         (grokvardecl): Likewise.
5782         (grokdeclarator): Likewise.
5783         (grokparms): Likewise.
5784         (start_function): Likewise.
5785         (start_method): Likewise.
5786         * decl.h (grokdeclarator): Adjust prototype.
5787         * decl2.c: Do not include lex.h.
5788         (grok_x_components): Remove.
5789         (grokfield): Do not use trees to represent decl-specifiers.
5790         (grokbitfield): Likewise.
5791         * lex.c: Do not include lex.h.
5792         * lex.h: Remove.
5793         * parser.c: Include target.h.
5794         (clear_decl_specs): New function.
5795         (cp_parser_translation_unit): Do not use trees to represent
5796         decl-specifiers.
5797         (cp_parser_postfix_expression): Likewise.
5798         (cp_parser_new_type_id): Likewise.
5799         (cp_parser_condition): Likewise.
5800         (cp_parser_simple_declaration): Likewise.
5801         (cp_parser_decl_specifier_seq): Likewise.
5802         (cp_parser_function_specifier_opt): Likewise.
5803         (cp_parser_conversion_type_id): Likewise.
5804         (cp_parser_template_parameter): Likewise.
5805         (cp_parser_explicit_instantiation): Likewise.
5806         (cp_parser_type_specifier): Likewise.
5807         (cp_parser_simple_type_specifier): Likewise.
5808         (cp_parser_init_declarator): Likewise.
5809         (cp_parser_type_id): Likewise.
5810         (cp_parser_type_specifier_seq): Likewise.
5811         (cp_parser_parameter_declaration): Likewise.
5812         (cp_parser_member_declaration): Likewise.
5813         (cp_parser_exception_declaration): Likewise.
5814         (cp_parser_function_definition_from_specifiers_and_declarator):
5815         Likewise.
5816         (cp_parser_single_declaration): Likewise.
5817         (cp_parser_save_member_function_body): Likewise.
5818         (cp_parser_friend_p): Likewise.
5819         (cp_parser_set_storage_class): New function.
5820         (cp_parser_set_decl_spec_type): Likewise.
5821         * pt.c: Do not include lex.h.
5822         * semantics.c: Likewise.
5823         (finish_member_class_template): Remove.
5824
5825 2004-06-23  Roger Sayle  <roger@eyesopen.com>
5826
5827         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
5828         longer take both "args" and "convert_args" as arguments.
5829         (build_op_delete_call): Update call to build_cxx_call.
5830         (build_over_call): Likewise, update call to build_cxx_call.
5831         * cp-tree.h (build_cxx_call): Update funtion prototype.
5832         * typeck.c (build_function_call): Don't call expand_tree_builtin.
5833         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
5834         (throw_bad_typeid): Likewise.
5835         (build_dynamic_cast_1): Likewise.
5836
5837 2004-06-22  Richard Henderson  <rth@redhat.com>
5838
5839         * class.c (build_vfn_ref): Take a pointer not object.  Build
5840         an OBJ_TYPE_REF.
5841         (cp_fold_obj_type_ref): New.
5842         * call.c (build_over_call): Update build_vfn_ref call.
5843         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
5844         * cp-tree.h (cp_fold_obj_type_ref): Declare.
5845
5846 2004-06-21  Jason Merrill  <jason@redhat.com>
5847
5848         PR c++/16112
5849         * cp-gimplify.c (cp_gimplify_init_expr): Look through
5850         CLEANUP_POINT_EXPR.
5851
5852 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
5853
5854         * cp-tree.def (NEW_EXPR): Add a fourth slot.
5855         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
5856         (TREE_PARMLIST): Likewise.
5857         (CALL_DECLARATOR_PARMS): Likewise.
5858         (CALL_DECLARATOR_QUALS): Likewise.
5859         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5860         (cp_declarator_kind): New type.
5861         (cp_parameter_declarator): Likewise.
5862         (cp_declarator): Likewise.
5863         (cp_error_declarator): Likewise.
5864         (no_parameters): Likewise.
5865         (groktypename): Change prototype.
5866         (start_decl): Likewise.
5867         (start_handler_parms): Likewise.
5868         (get_scope_of_declarator): Likewise.
5869         (start_function): Likewise.
5870         (start_preparsed_function): New function.
5871         (start_function): Change prototype.
5872         (start_method): Likewise.
5873         (grokfield): Likewise.
5874         (grokbitfield): Likewise.
5875         (build_new): Likewise.
5876         (make_pointer_declarator): Remove.
5877         (make_reference_declarator): Likewise.
5878         (make_call_declarator): Likewise.
5879         (set_quals_and_spec): Likewise.
5880         (process_template_parm): Change prototype.
5881         (begin_function_definition): Remove.
5882         (finish_parmlist): Remove.
5883         * decl.c (groktypename): Do not use trees to represent
5884         declarators.
5885         (start_decl): Likewise.
5886         (start_handler_parms): Remove.
5887         (get_scope_of_declarator): Reimplement.
5888         (grokdeclarator): Do not use trees to represent declarators.
5889         (grokparms): Likewise.
5890         (start_function): Likewise.
5891         (start_method): Likewise.
5892         (build_void_list_mode): Do not use TREE_PARMLIST.
5893         * decl.h (grokdeclarator): Change prototype.
5894         * decl2.c (grok_method_quals): Robustify.
5895         (grok_x_components): Do not use trees to represent declarators.
5896         (grokfield): Likewise.
5897         (grokbitfield): Likewise.
5898         (start_objects): Build FUNCTION_DECLs, not declarators.
5899         (start_static_storage_duration_function): Likewise.
5900         * init.c (build_new): Simplify.
5901         * lex.c (make_pointer_declarator): Remove.
5902         (make_reference_declarator): Likewise.
5903         (make_call_declarator): Likewise.
5904         (set_quals_and_spec): Likewise.
5905         * method.c (use_thunk): Use start_preparsed_function.
5906         (synthesize_method): Likewise.
5907         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
5908         * optimize.c (maybe_clone_body): Use start_preparsed_function.
5909         * parser.c (cp_error_declarator): New variable.
5910         (declarator_obstack): Likewise.
5911         (alloc_declarator): New function.
5912         (make_declarator): Likewise.
5913         (make_id_declarator): Likewise.
5914         (make_pointer_declarator): Likewise.
5915         (make_reference_declarator): Likewise.
5916         (make_ptrmem_declarator): Likewise.
5917         (make_call_declarator): Likewise.
5918         (make_array_declarator): Likewise.
5919         (no_parameters): New variable.
5920         (make_parameter_declarator): Likewise.
5921         (cp_parser_check_for_definition_in_return_type): Do not use trees
5922         to represent declarators.
5923         (cp_parser_translation_unit): Likewise.
5924         (cp_parser_new_expression): Likewise.
5925         (cp_parser_new_type_id): Likewise.
5926         (cp_parser_new_declarator_opt): Likewise.
5927         (cp_parser_direct_new_declarator): Likewise.
5928         (cp_parser_condition): Likewise.
5929         (cp_parser_declaration_statement): Likewise.
5930         (cp_parser_declaration): Likewise.
5931         (cp_parser_conversion_type_id): Likewise.
5932         (cp_parser_conversion_declarator_opt): Likewise.
5933         (cp_parser_template_parameter_list): Likewise.
5934         (cp_parser_template_parameter): Likewise.
5935         (cp_parser_explicit_instantiation): Likewise.
5936         (cp_parser_init_declarator): Likewise.
5937         (cp_parser_declarator): Likewise.
5938         (cp_parser_direct_declarator): Likewise.
5939         (cp_parser_type_id): Likewise.
5940         (cp_parser_parameter_declaration_clause): Likewise.
5941         (cp_parser_parameter_declaration_list): Likewise.
5942         (cp_parser_parameter_declaration): Likewise.
5943         (cp_parser_member_declaration): Likewise.
5944         (cp_parser_exception_declaration): Likewise.
5945         (cp_parser_check_declarator_template_parameters): Likewise.
5946         (cp_parser_function_definition_from_specifiers_and_declarator):
5947         Likewise.
5948         (cp_parser_save_member_function_body): Likewise.
5949         * pt.c (process_template_parm): Add is_non_type parameter.
5950         (convert_template_argument): Adjust call to groktypename.
5951         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5952         (tsubst): Do not expect declarators.
5953         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5954         argument.
5955         (instantiate_decl): Use start_preparsed_function.
5956         * semantics.c (begin_function_definition): Remove.
5957         (finish_parmlist): Remove.
5958         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5959         declarators.
5960
5961 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5962
5963         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5964         (build_new_method_call): Likewise.
5965         * decl.c (local_variable_p_walkfn): Don't walk into types.
5966         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5967         (build_anon_union_vars): Add new operand for COMPONENT_REF.
5968         * init.c (buld_new): Add new operand for ARRAY_REF.
5969         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5970         (do_build_assign_ref): Likewise.
5971         * parser.c (cp_parser_direct_new_declarator): Add new operands
5972         for ARRAY_REF.
5973         (cp_parser_direct_declarator): Likewise.
5974         * pt.c (tsubst): Likewise.
5975         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5976         for COMPONENT_REF.
5977         * semantics.c (finish_non_static_data_member): Add new operand
5978         for COMPONENT_REF.
5979         * typeck.c (build_class_member_access_expr): Likewise.
5980         (build_class_member_access_expr, finish_class_member_access_expr):
5981         Likewise.
5982         (build_ptrmemfunc_access_expr): Likewise.
5983         (build_array_ref): Add new operands for ARRAY_REF.
5984         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5985         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5986
5987 2004-06-21  Richard Henderson  <rth@redhat.com>
5988
5989         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5990         * parser.c (cp_parser_jump_statement): Update commentary.
5991         * pt.c (tsubst_expr): Use RETURN_EXPR.
5992         * semantics.c (finish_return_stmt): Likewise.
5993         (finalize_nrv_r): Likewise.
5994         * typeck.c, typeck2.c: Update file start commentary.
5995
5996 2004-06-21  Richard Henderson  <rth@redhat.com>
5997
5998         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
5999
6000 2004-06-20  Richard Henderson  <rth@redhat.com>
6001
6002         * cp-tree.h (add_decl_stmt): Declare.
6003         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6004         * semantics.c (maybe_cleanup_point_expr): New.
6005         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6006         finish_for_expr, finish_switch_cond): Use it.
6007         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
6008
6009 2004-06-20  Richard Henderson  <rth@redhat.com>
6010
6011         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6012         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6013         (cp_gimplify_expr): Call it.
6014         (gimplify_cleanup_stmt): Move from c-gimplify.c.
6015         (cp_genericize): New.
6016         * decl.c (finish_function): Call it.
6017         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6018         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6019         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6020         (cp_genericize): Declare.
6021         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6022         * dump.c (cp_dump_tree): Likewise.
6023         * semantics.c (push_cleanup): Move from c-semantics.c.
6024
6025 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
6026
6027         * cp-lang.c (has_c_linkage): Implement.
6028
6029         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6030         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6031         (builtin_function_1): Don't call make_decl_rtl.
6032         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6033         (grokvardecl): Don't call mangle_decl.
6034         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6035         DECL_ASSEMBLER_NAME.
6036         * method.c (set_mangled_name_for_decl): Delete.
6037         * name-lookup.c (pushdecl): When a local extern shadows a
6038         file-scope declaration of the same object, give both DECLs the
6039         same DECL_UID.
6040         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6041         on DECL_ASSEMBLER_NAME.
6042
6043 2004-06-19  Richard Henderson  <rth@redhat.com>
6044
6045         * cp-gimplify.c: Remove unnecessary prototypes.
6046         (cp_gimplify_stmt): Merge into ...
6047         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
6048         stmts_are_full_exprs_p frobbing.
6049         * cp-tree.h (cp_gimplify_stmt): Remove.
6050         * pt.c (tsubst_expr): Merge prep_stmt and unify.
6051         * tree.c (init_tree): Don't set lang_gimplify_stmt.
6052
6053 2004-06-18  Richard Henderson  <rth@redhat.com>
6054
6055         PR c++/16034
6056         * semantics.c (begin_cond): New.
6057         (finish_cond): Rewrite to handle template DECL_STMTs specially.
6058         Assume that non-template decls go land before the conditional.
6059         (simplify_loop_decl_cond): Likewise.
6060         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6061         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6062         begin_switch_stmt, finish_switch_cond): Update to match.
6063
6064 2004-06-17  Jason Merrill  <jason@redhat.com>
6065
6066         PR c++/16015
6067         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6068         (finish_stmt_expr_expr): Update type after conversions.
6069         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6070         Handle void initializer.
6071         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6072
6073 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
6074
6075         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6076         * cp-tree.h (defer_fn): Delete.
6077         * decl2.c (defer_fn): Delete.
6078         (finish_file): Simplify deferred_fns loops; check that
6079         only used inline functions get into deferred_fns.
6080         (mark_used): Inline previous contents of defer_fn.
6081
6082 2004-06-16  Richard Henderson  <rth@redhat.com>
6083
6084         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6085         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6086         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6087         of CTOR_INITIALIZER ...
6088         (pp_cxx_statement): ... here.
6089         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6090         (finish_function): Use alloc_stmt_list to zap entire function.
6091         * parser.c (cp_parser_compound_statement): Update commentary.
6092         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6093         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6094         (finish_stmt_expr): Don't look through COMPOUND_STMT.
6095
6096 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
6097
6098         * pt.c (mark_decl_instantiated): Don't call defer_fn.
6099
6100 2004-06-16  Richard Henderson  <rth@redhat.com>
6101
6102         * parser.c (cp_parser_labeled_statement): Update commentary.
6103         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6104         * tree.c (mark_local_for_remap_r): Likewise.
6105
6106 2004-06-16  Richard Henderson  <rth@redhat.com>
6107
6108         * parser.c (cp_parser_asm_definition): Update commentary.
6109         * pt.c (tsubst_expr): Use ASM_EXPR.
6110         * semantics.c (finish_asm_stmt): Likewise.
6111
6112 2004-06-16  Richard Henderson  <rth@redhat.com>
6113
6114         * decl.c (finish_destructor_body): Use LABEL_EXPR.
6115         * parser.c (cp_parser_statement): Update commentary.
6116         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6117         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6118         * tree.c (mark_local_for_remap_r): Likewise.
6119
6120 2004-06-16  Richard Henderson  <rth@redhat.com>
6121
6122         PR c++/16012
6123         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6124         statement in FOR_INIT_STMT for templates.
6125
6126 2004-06-15  Richard Henderson  <rth@redhat.com>
6127
6128         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6129         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6130         (genericize_try_block): Use gimplify_stmt.
6131         (genericize_catch_block, genericize_eh_spec_block): Likewise.
6132         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6133         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6134         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6135         (cp_tree_chain_matters_p): Remove.
6136         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6137         (COMPOUND_STMT_BODY_BLOCK): New.
6138         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6139         (EXPR_STMT_STMT_EXPR_RESULT): New.
6140         (building_stmt_tree): Check cur_stmt_list.
6141         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6142         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6143         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6144         (cp_finish_decl): Use push_cleanup.
6145         (start_function, finish_function): Use statement lists.
6146         (finish_stmt): Do nothing.
6147         * except.c (begin_eh_spec_block): Use statement lists.
6148         (check_handlers_1, check_handlers): Likewise.
6149         * init.c (construct_virtual_base): Don't add extra compound stmts.
6150         (build_vec_init): Likewise.
6151         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6152         * name-lookup.h (struct cp_binding_level): Add statement_list.
6153         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6154         (cp_parser_labeled_statement, cp_parser_expression_statement,
6155         cp_parser_statement_seq_opt): Likewise.
6156         (cp_parser_compound_statement): Likewise.  Take bool for try block.
6157         (cp_parser_selection_statement): Tidy if processing.
6158         (cp_parser_already_scoped_statement): Rewrite to do what it says.
6159         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6160         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
6161         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6162         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6163         (finish_cond): New, rewritten from FINISH_COND.
6164         (simplify_loop_decl_cond): New.
6165         (finish_expr_stmt): Avoid nested EXPR_STMTs.
6166         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6167         begin_else_clause, finish_else_clause, finish_if_stmt,
6168         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6169         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6170         finish_for_cond, finish_for_stmt, begin_switch_stmt,
6171         finish_switch_cond, finish_switch_stmt, begin_try_block,
6172         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6173         finish_handler_sequence, finish_function_handler_sequence,
6174         begin_handler, finish_handler_parms, finish_handler,
6175         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6176         using statement lists.
6177         (begin_compound_stmt): Replace has_no_scope argument with flags.
6178         Update all callers.  Use statement lists.
6179         (finish_compound_stmt): Likewise.
6180         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6181         (current_scope_stmt_stack): Remove.
6182         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6183         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6184         Rewrite with statement lists.
6185
6186 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
6187
6188         * parser.c: Change all assignments of c_lex_string_translate
6189         to true and false to 1 and 0.
6190         (cp_lexer_read_token): Convert type of the translated string.
6191         (cp_parser_skip_to_closing_parentheses): Preserve original
6192         value of c_lex_string_translate, and set it to -1 while
6193         running.
6194         (cp_parser_cache_group): Likewise.
6195         (cp_parser_cache_group_1): Renamed.
6196         (cp_parser_asm_operand_list): Remove redundant setting of
6197         c_lex_string_translate.
6198         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6199         Handle chained strings.
6200
6201 2004-06-12  Andrew Pinski  <apinski@apple.com>
6202
6203         PR c++/14639
6204         Revert:
6205         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6206
6207                 * cp-tree.h: Fix typo.
6208
6209                 * cp-tree.h: Include cgraph.h
6210                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6211                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6212
6213 2004-06-12  Jason Merrill  <jason@redhat.com>
6214
6215         PR tree-optimization/14107
6216         * decl.c (finish_function): Warn about no return in all functions.
6217
6218 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
6219
6220         * cp-tree.h (struct language_function): Remove cannot_inline.
6221         * decl.c (save_function_data): cannot_inline is no more.
6222         (cxx_push_function_context): Likewise.
6223         * decl2.c (start_objects, start_static_storage_duration_function):
6224         Reset DECL_INLINE, set DECL_UNINLINABLE.
6225
6226 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6227
6228         PR c++/15967
6229         * search.c (lookup_field): Propagate the ambiguity list.
6230         (lookup_fnfields): Likewise.
6231
6232 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6233
6234         PR c++/15947
6235         * parser.c (cp_parser_template_name): Ctors/dtors never need a
6236         template keyword to disambiguate.
6237
6238 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
6239
6240         PR c++/15096
6241         * decl.c (grokdeclarator): Ignore pointer-to-members when
6242         computing template depth.
6243
6244         PR c++/14930
6245         * name-lookup.c (pushtag): Do not try to put class declarations in
6246         explicit specialization scopes.
6247
6248 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
6249
6250         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6251
6252 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
6253
6254         PR c++/15862
6255         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6256         bindings for undeclared built-ins.
6257
6258 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6259
6260         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6261         appear at the correct location.
6262
6263 2004-06-10  Jason Merrill  <jason@redhat.com>
6264
6265         PR c++/15875
6266         Revert:
6267         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6268         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6269         TREE_TYPE for non-dependent names.
6270         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6271         unknown_type_node as its TREE_TYPE.
6272         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6273         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6274         (dump_expr) <SCOPE_REF case>: Likewise.
6275
6276 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
6277
6278         PR c++/15227
6279         * parser.c (cp_parser_direct_declarator): Robustify.
6280
6281         PR c++/15877
6282         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6283         constants in non-dependent contexts.
6284
6285         PR c++/14211
6286         PR c++/15076
6287         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6288         necessary.
6289
6290 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
6291
6292         PR c++/14791
6293         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6294         specially.
6295
6296 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
6297
6298         Revert:
6299         PR c++/15815
6300         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6301         * lex.c (handle_pragma_interface): Deprecate.
6302         (handle_pragma_implementation): Likewise.
6303
6304 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
6305
6306         * g++spec.c (lang_specific_driver): Remove check for -lm
6307         and -lmath when check it see if it was the math library.
6308
6309 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6310
6311         PR c++/7841
6312         * parser.c (cp_parser_direct_declarator): Reject constructor named
6313         as qualified template-id.
6314
6315 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6316
6317         PR c++/15815
6318         * lex.c (handle_pragma_interface): Deprecate.
6319         (handle_pragma_implementation): Likewise.
6320
6321 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
6322
6323         PR c++/15766
6324         * parser.c (cp_parser_iteration_statement): Fix typo in error
6325         message.
6326
6327         PR c++/14777
6328         * pt.c (tsubst_default_argument): Do not defer access checks
6329         while substituting into the default argument.
6330
6331         PR c++/15554
6332         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6333         constant in a non-dependent context.
6334
6335         PR c++/15057
6336         * except.c (build_throw): Ensure that temp_expr has been
6337         initialized.
6338
6339 2004-06-06  Roger Sayle  <roger@eyesopen.com>
6340
6341         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6342
6343 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6344
6345         PR c++/15503
6346         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6347         'typename', and accept 'template'.
6348
6349 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
6350             Jan Hubicka  <jh@suse.cz>
6351
6352         PR c++/14639
6353         * method.c (use_think): Do not mark thunk as referenced.
6354
6355 2004-06-03  Matt Austern  <austern@apple.com>
6356
6357         PR c++/15428
6358         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6359         is nonzero, and if we see a noninline definition of a key method,
6360         make the vtables nonweak.
6361
6362 2004-06-02  Matt Austern  <austern@apple.com>
6363
6364         * cp-tree.h (instantiate_decl): new boolean parameter,
6365         undefined_ok. Current behavior is equivalent to its being 0.
6366         * decl2.c (mark_used): Add new argument when calling instantiate_decl
6367         * pt.c (mark_decl_instantiated): Unconditionally make
6368         instantiations explicit unconditionally
6369         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6370         since mark_decl_instantiated now does it.
6371         (instantiate_class_member): New.  Instantiate a member of an
6372         explicitly instantiated class template.
6373         (do_type_instantiation): Explicitly instantiate members of an
6374         explicitly instantiated class template.
6375         (instantiate_decl): if undefined_ok is nonzero, and if we're
6376         trying to explicitly instantiated a template with no definition,
6377         change it to an implicit instantiation.
6378         (instantiate_pending_templates): Add new argument to instantiate_decl.
6379         * tree.c (cp_cannot_inline_tree_fn): Likewise.
6380
6381 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
6382
6383         * cp-tree.h: Fix typo.
6384
6385         * cp-tree.h: Include cgraph.h
6386         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6387         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6388
6389 2004-06-01  Jason Merrill  <jason@redhat.com>
6390
6391         PR c++/15142
6392         * call.c (call_builtin_trap): Remove type parm.
6393         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6394         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6395
6396 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6397
6398         PR c++/13092
6399         * init.c (build_offset_ref): Build SCOPE_REF with non-null
6400         TREE_TYPE for non-dependent names.
6401         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6402         unknown_type_node as its TREE_TYPE.
6403         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6404         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6405         (dump_expr) <SCOPE_REF case>: Likewise.
6406
6407 2004-06-01  Richard Henderson  <rth@redhat.com>
6408             Andrew Pinski  <pinskia@physics.uc.edu>
6409
6410         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6411         * parser.c (struct cp_parser): Remove in_offsetof.
6412         (cp_parser_new): Don't set it.
6413         (cp_parser_unary_expression): Don't check it.
6414         (cp_parser_postfix_open_square_expression): Split out from ...
6415         (cp_parser_postfix_expression): ... here.
6416         (cp_parser_postfix_dot_deref_expression): Likewise.
6417         (cp_parser_builtin_offsetof): New.
6418         (cp_parser_primary_expression): Use it.
6419
6420 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6421
6422         PR c++/14932
6423         * parser.c (cp_parser_postfix_expression): Allow subscript
6424         operator in offsetof.
6425
6426 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
6427
6428         PR c++/15701
6429         * friend.c (add_friend): Do not try to perform access checks for
6430         functions from dependent classes.
6431
6432 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6433
6434         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6435         (pp_cxx_begin_template_argument_list): Turn into a function.
6436         (pp_cxx_end_template_argument_list): Likewise.
6437         (pp_cxx_separate_with): Define.
6438         (pp_cxx_unqualified_id): Tidy.
6439         (pp_cxx_primary_expression): Likewise.
6440         (pp_cxx_postfix_expression): Likewise.
6441         (pp_cxx_expression): Likewise.
6442         (pp_cxx_simple_type_specifier): Likewise.
6443         (pp_cxx_type_specifier_seq): Likewise.
6444         (pp_cxx_parameter_declaration_clause): Likewise.
6445         (pp_cxx_exception_specification): Likewise.
6446         (pp_cxx_direct_declarator): Likewise.
6447         (pp_cxx_type_id): Likewise.
6448         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6449         cxx-pretty-print.c.
6450         (pp_cxx_left_paren): Likewise.
6451         (pp_cxx_right_paren): Likewise.
6452         (pp_cxx_left_brace): Likewise.
6453         (pp_cxx_right_brace): Likewise.
6454         (pp_cxx_left_bracket): Likewise.
6455         (pp_cxx_right_bracket): Likewise.
6456         (pp_cxx_dot): Likewise.
6457         (pp_cxx_identifier): Likewise.
6458         (pp_cxx_tree_identifier): Likewise.
6459         (pp_cxx_ampersand): New macro.
6460         (pp_cxx_star): Likewise.
6461         (pp_cxx_arrow): Likewise.
6462         (pp_cxx_semicolon): Likewise.
6463         (pp_cxx_complement): Likewise.
6464         (pp_cxx_begin_template_argument_list): Declaree.
6465         (pp_cxx_end_template_argument_list): Likewise.
6466         (pp_cxx_colon_colon): likewise.
6467
6468 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
6469
6470         * parser.c (cp_parser_simple_type_specifier): Explicitly test
6471         against NULL_TREE.
6472
6473 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
6474
6475         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6476         typeck.c: Fix comment formatting.
6477
6478 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
6479
6480         * cp-lang.c (cp_expand_decl): Remove.
6481         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6482
6483 2004-05-30  Andreas Jaeger  <aj@suse.de>
6484
6485         * lang-specs.h: Add missing initializers for .ii.
6486
6487 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
6488
6489         * decl.c (cp_make_fname_decl): Free return value from
6490         fname_as_string.
6491
6492 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6493
6494         PR c++/15083
6495         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6496         even in a templat.e
6497         * init.c (build_new): Likewise.
6498
6499         PR c++/15640
6500         * name-lookup.c (arg_assoc): Robustify.
6501
6502         PR c++/15471
6503         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6504         when determining the scope to use for a pointer to member.
6505         (lookup_anon_field): Give it external linkage.
6506         * cp-tree.h (lookup_anon_field): Declare it.
6507         * expr.c (cplus_expand_constant): Use it.
6508
6509 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
6510
6511         PR c++/14668
6512         * parser.c (cp_parser_simple_type_specifier): Call
6513         maybe_note_name_used_in_class.
6514
6515 2004-05-28  Tom Marshall  <tmarshall@real.com>
6516
6517         PR c++/15214
6518         * class.c (finish_struct_1): Warn only if the dtor is non-private or
6519         the class has friends.
6520
6521 2004-05-27  Adam Nemet  <anemet@lnxw.com>
6522
6523         PR c++/12883
6524         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6525         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6526
6527 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
6528
6529         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6530         if it might be needed.
6531         * pt.c (mark_decl_instantiated): Only call defer_fn if
6532         the function actually needs processing in finish_file.
6533         * decl2.c (finish_file): Add check that elements in
6534         deferred_fns_used are really needed there.  Remove unnecessary
6535         test of DECL_SAVED_TREE.
6536
6537 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6538
6539         * Make-lang.in: No need to specify $(LIBCPP).
6540
6541 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6542
6543         PR c++/15044
6544         * parser.c (cp_parser_class_head): Robustify.
6545
6546         PR c++/15317
6547         * parser.c (cp_parser_decl_specifier_seq): Correct error in
6548         comment.
6549         (cp_parser_constructor_declarator_p): Treat attributes
6550         as decl-specifiers.
6551
6552         PR c++/15329
6553         * typeck.c (build_unary_op): Do not attempt to resolve casts to
6554         base classes in templates.
6555
6556 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6557
6558         PR c++/15165
6559         * pt.c (instantiate_template): Robustify.
6560
6561 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6562
6563         PR c++/15025
6564         * decl.c (xref_tag): Issue errors about redeclaring template
6565         classes as non-template classes.
6566
6567 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
6568
6569         PR c++/14821
6570         * name-lookup.c (supplement_binding): Allow redefinitions of
6571         namespace aliases.
6572
6573         PR c++/14883
6574         * parser.c (cp_parser_template_argument): Robustify.
6575
6576 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6577
6578         * class.c (alter_access): Use %E format specifier to print an
6579         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
6580         (push_lang_context): Likewise.
6581         * decl.c (lookup_label): Likewise.
6582         (grokdeclarator): Likewise.
6583         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6584         * pt.c (do_type_instantiation): Likewise.
6585         * tree.c (handle_java_interface_attribute): Likewise.
6586         (handle_com_interface_attribute): Likewise.
6587         (handle_init_priority_attribute): Likewise.
6588
6589 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6590
6591         PR c++/15285
6592         PR c++/15299
6593         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6594         recognized as overloaded functions.
6595
6596 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
6597
6598         PR c++/15507
6599         * class.c (layout_nonempty_base_or_field): Do not try to avoid
6600         layout conflicts for unions.
6601
6602         PR c++/15542
6603         * typeck.c (build_x_unary_op): Instantiate template class
6604         specializations before looking for "operator &".
6605
6606         PR c++/15427
6607         * typeck.c (complete_type): Layout non-dependent array types, even
6608         in templates.
6609
6610         PR c++/15287
6611         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6612         template.
6613
6614 2004-05-22  Roger Sayle  <roger@eyesopen.com>
6615
6616         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6617         returning when TREE_TYPE is error_mark_node.
6618         * typeck.c (require_complete_type): Return error_mark_node if
6619         value's type is an error_mark_node.
6620
6621 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
6622
6623         * optimize.c (calls_setjmp_r): Remove.
6624         (calls_setjmp_p): Remove.
6625         * cp-tree.c (calls_setjmp_p): Remove.
6626         * decl.c (finish_function): Do not call calls_setjmp_p.
6627
6628 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
6629
6630         * decl.c (cp_finish_decl): Use mark_decl_referenced.
6631         * decl2.c (maybe_make_one_only): Likewise.
6632         * method.c (use_thunk): Likewise.
6633
6634 2004-05-18  Jason Merrill  <jason@redhat.com>
6635
6636         * class.c (build_base_path): Tidy a bit.
6637
6638 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
6639
6640         * name-lookup.c (struct scope_binding): New.
6641         (EMPTY_SCOPE_BINDING): New.
6642         (lookup_using_namespace): Take a scope_binding instead of a
6643         cxx_binding.
6644         (qualified_lookup_using_namespace): Likewise.
6645         (cxx_binding_clear): Delete.
6646         (do_nonmember_using_decl): Use a scope_binding instead of a
6647         cxx_binding.
6648         (lookup_tag): Don't call select_decl.
6649         (ambiguous_decl): Don't return anything (and change callers to match).
6650         Take a scope_binding as the second parameter.
6651         (lookup_namespace_name): Use a scope_binding instead of a
6652         cxx_binding.
6653         (unqualified_namespace_lookup): Likewise.
6654         (lookup_qualified_name): Likewise.
6655         (select_decl): Take a scope_binding instead of a cxx_binding.
6656         Use macros rather than hand-coding tests for type-ness.
6657
6658 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6659
6660         * cp-gimplify.c: Rename from cp-simplify.c.
6661         * Make-lang.in, optimize.c: Update.
6662
6663 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6664
6665         Merge from tree-ssa-20020619-branch.  See
6666         ChangeLog.tree-ssa for details.
6667
6668         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6669         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6670         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6671         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6672         Merged.
6673         * cp-mudflap.c: New file.
6674         * cp-simplify.c:: New file.
6675
6676 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6677
6678         PR c++/14389
6679         * decl2.c (check_classfn): For member templates, compare also the
6680         template parameters to match the declaration.
6681         * cp-tree.h: Adjust declaration of check_classfn.
6682         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6683         * friend.c (do_friend): Likewise.
6684         * pt.c (tsubst_friend_function): Likewise.
6685
6686 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
6687
6688         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6689         Instead, dig into the representation type to find the array bound.
6690
6691 2004-04-30  Jason Merrill  <jason@redhat.com>
6692
6693         Refer to base members using COMPONENT_REFs where possible.
6694         * class.c (build_simple_base_path): New fn.
6695         (build_base_path): Use it for non-virtual base references.
6696         (layout_class_type): Change base fields to their real type
6697         after layout is done.
6698         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6699         * cp-lang.c (cxx_get_alias_set): Use it.
6700
6701 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
6702
6703         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6704         comment typos.
6705
6706 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6707
6708         PR c++/15064
6709         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6710         used in integral constant expressions.
6711
6712 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
6713
6714         * init.c (build_aggr_init): Fix accidental use of C99 construct in
6715         previous change.
6716
6717         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6718         braced initializer.
6719         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6720         * decl.c (reshape_init): Use it.
6721         * init.c (perform_member_init): Remove redundant condition.
6722         (build_aggr_init): Adjust to handle brace-enclosed initializers
6723         correctly.
6724         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6725
6726         * parser.c (cp_parser_initializer_clause): Do not set
6727         TREE_HAS_CONSTRUCTOR on the initializer.
6728         * rtti.c (tinfo_base_init): Likewise.
6729         (generic_initializer): Likewise.
6730         (ptr_initializer): Likewise.
6731         (ptm_initializer): Likewise.
6732         (class_initializer): Likewise.
6733         (get_pseudo_ti_init): Likewise.
6734         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6735
6736 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
6737
6738         * name-lookup.c (anonymous_namespace_name): Make static.
6739
6740 2004-04-19  Roger Sayle  <roger@eyesopen.com>
6741
6742         PR middle-end/14531
6743         * class.c (build_base_path): Call fold whilst building the NULL
6744         pointer check expression trees.
6745
6746 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6747
6748         * init.c (build_new_1): Don't use type size argument for Java
6749         _Jv_AllocObject call.
6750
6751 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
6752
6753         * method.c (make_alias_for_thunk): Remove preprocessor guard on
6754         declaration and definition.
6755
6756 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
6757
6758         PR c++/14808
6759         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
6760         than ASM_OUTPUT_DEF.
6761
6762 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6763
6764         * decl2.c (mark_used): Don't segfault if cfun != NULL but
6765         current_function_decl == NULL.
6766
6767 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
6768
6769         PR c++/3518
6770         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
6771         level.
6772
6773 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6774
6775         * init.c (decl_constant_value): Don't look at DECL_INITIAL
6776         of PARM_DECL.
6777         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
6778         or TREE_SIDE_EFFECTS of a type.
6779
6780 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
6781
6782         PR c++/14007
6783         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
6784         cv-qualifier unification.
6785         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
6786
6787 2004-04-02  Jan Hubicka  <jh@suse.cz>
6788
6789         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
6790         * cp-tree.h (cp_update_decl_after_saving): Declare.
6791         * tree.c (cp_update_decl_after_saving): Define.
6792
6793 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
6794
6795         PR c++/14803
6796         * typeck.c (get_delta_difference): Call fold before returning the
6797         value.
6798
6799 2004-04-01  Richard Henderson  <rth@redhat.com>
6800
6801         PR c++/14804
6802         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
6803         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
6804
6805 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
6806
6807         PR c++/14810
6808         * name-lookup.c (maybe_push_cleanup_level): Robustify.
6809
6810 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6811
6812         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
6813
6814 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6815
6816         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
6817         * class.c (check_bitfield_decl): Likewise.
6818         * cvt.c (type_promotes_to): Likewise.
6819         * decl.c (finish_enum): Likewise.
6820         * mangle.c (write_builtin_type): Likewise.
6821         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
6822         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
6823         (build_binary_op): Likewise.
6824
6825 2004-03-31  Jan Hubicka  <jh@suse.cz>
6826
6827         * tree.h (optimize_function): Kill prototype.
6828         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
6829         * semantics.c (expand_body): Kill.
6830
6831 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
6832
6833         PR c++/14724
6834         * decl.c (start_decl_1): Do not decide whether or not to create a
6835         new cleanup level until after the type has been completed.
6836
6837         PR c++/14763
6838         * pt.c (tsubst_default_argument): Clear current_function_decl.
6839
6840 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6841
6842         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
6843
6844 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
6845
6846         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
6847         is null, just print the literal name and return.
6848
6849 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
6850
6851         * cxx-pretty-print.c: Fix comment typos.
6852
6853 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
6854
6855         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
6856         Update copyright.
6857
6858 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
6859
6860         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
6861         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
6862         target hook.
6863
6864 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
6865
6866         PR 12267, 12391, 12560, 13129, 14114, 14133
6867         * cp-lang.c (c_reset_state): Delete.
6868         (push_file_scope, pop_file_scope): New stubs.
6869         * parser.c (c_parse_file): Call sorry() here if called more than once.
6870
6871 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6872
6873         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
6874         for INTEGER_CST.
6875
6876 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6877
6878         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
6879
6880 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6881
6882         * error.c (enum pad): Remove.
6883         (dump_qualifiers): Likewise.
6884         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
6885         (dump_aggr_type): Likewise.
6886         (dump_type_suffix): Likewise.
6887         (dump_simple_decl): Likewise.
6888         (dump_function_decl): Likewise.
6889         (cv_to_string): Likewise.
6890         (dump_type_prefix): Likewise.  Adjust return void.
6891         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
6892         cxx_pretty_print.h.
6893         (pp_cxx_template_keyword_if_needed): Document.
6894         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
6895         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
6896         MUST_NOT_THROW_EXPR.
6897
6898 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
6899
6900         PR c++/14616
6901         * decl.c (cp_finish_decl): Compute the size of arrays declared in
6902         templates, if their type is non-dependent.
6903
6904 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
6905
6906         * call.c (build_op_delete_call): Do not forget the placement
6907         arguments when iterating through mutiple delete operators.
6908
6909         * cp-tree.h (svaed_scope): Remove last_parms.
6910         (NEW_DELETE_OPNAME_P): New macro.
6911         (last_function_parms): Remove.
6912         (do_friend): Adjust prototype.
6913         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
6914         using last_function_parms.
6915         (grokfndecl): Take the PARM_DECLs as an argument, rather than
6916         using last_function_parms.
6917         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
6918         for class-specific operator new and operator delete.
6919         (grok_op_properties): Do not look for allocation functions with
6920         METHOD_TYPEs.
6921         (start_function): Use DECL_ARGUMENTS instead of
6922         last_function_parms.
6923         * decl.h (last_function_parms): Do not declare.
6924         * decl2.c (grokclassfn): Do not use last_function_parms.
6925         * friend.c (do_friend): Remove parmdecls parameter.
6926         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6927         (pop_from_top_level): Do not restore it.
6928         * pt.c (check_explicit_specialization): Do not adjust
6929         last_function_parms.
6930
6931         * name-lookup.c (do_local_using_decl): Create a local binding for
6932         types brought in via using declarations.
6933
6934         * name-lookup.c (lookup_arg_dependent): Handle block-scope
6935         function declarations correctly.
6936
6937         * semantics.c (finish_id_expression): Correct handling of
6938         conversion operators to dependent types.
6939
6940         * typeck.c (lookup_destructor): Allow the use of destructors from
6941         base classes.
6942
6943 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6944
6945         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6946         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6947         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6948         the field is named TEMPLATE_TYPE_PARM_INDEX.
6949
6950 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6951
6952         PR c++/14545
6953         * parser.c (cp_parser_functional_cast): A cast to anything
6954         but integral or enumaration type is not an integral constant
6955         expression.
6956         * pt.c (value_dependent_expression_p): Handle cast expressions
6957         without operands (such as "int()").
6958
6959 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
6960
6961         * semantics.c (finish_pseudo_destructor_expr): Allow differing
6962         cv-qualification between the type named by the
6963         pseudo-destructor-name and the object-type.
6964
6965         * search.c (accessible_base_p): Handle non-proper bases.
6966
6967         * name-lookup.c (do_nonmember_using_decl): If a using declaration
6968         refers to a single overloaded function, set the type of the
6969         function.
6970         * tree.c (lvalue_type): Simplify.
6971         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6972         unknown type.
6973         (build_unary_op): Handle OVERLOADs with known types.
6974
6975         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6976         function templates.
6977
6978         * parser.c (cp_parser_postfix_expression): Handle the use of
6979         "typename" in non-dependent contexts.  Convert appropriately when
6980         when using a qualified name after "->" or ".".
6981
6982         * call.c (conditional_conversion): Honor the requirement that some
6983         conversions refer to the original object.
6984
6985 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
6986
6987         * call.c (build_conditional_expr): Do not call force_rvalue for
6988         operands of void_type when the conditional expression itself has
6989         void type.
6990         * name-lookup.c (pushdecl): Don't consider a declaration of a
6991         function named "main" to be an overload of a type named "main".
6992         * parser.c (cp_parser_template_name): Perform name lookup when the
6993         template name is proceeded by "template" if the qualifying scope
6994         is non-dependent.
6995         * typeck.c (composite_pointer_type_r): Correctly handle
6996         pointer-to-member types.
6997         (build_const_cast): Likewise.
6998
6999 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7000
7001         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7002         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7003         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7004         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7005         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7006         (TYPEOF_TYPE_EXPR): New macro.
7007         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7008         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7009         * pt.c (tsubst): Likewise.
7010         * semantics.c (finish_typeof): Likewise.
7011         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7012         and TEMPLATE_TYPE_PARM.
7013         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7014         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7015
7016 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
7017
7018         PR c++/14586
7019         * cp-tree.h (build_new_op): Change prototype.
7020         (build_x_binary_op): Likewise.
7021         * call.c (build_new_op): Add overloaded_p parameter.
7022         * decl2.c (grok_array_decl): Adjust call to build_new_op.
7023         * parser.c (cp_parser_binary_expression): Note that uses of
7024         overloaded operators prevents an expression from being considered
7025         an integral constant.
7026         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7027         build_x_binary_op.
7028         * semantics.c (finish_call_expr): Likewise.
7029         * typeck.c (rationalize_conditional_expr): Likewise.
7030         (build_x_indirect_ref): Likewise.
7031         (build_x_binary_op): Likewise.
7032         (build_x_unary_op): Likewise.
7033         (build_x_compound_expr): Likewise.
7034         (build_modify_expr): Likewise.
7035         * typeck2.c (build_x_arrow): Likewise.
7036
7037 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
7038
7039         * cp-lang.c, ptree.c: Update copyright.
7040
7041 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
7042
7043         PR c++/14550
7044         * parser.c (cp_parser_non_integral_constant_expression): Encode
7045         more of the idiom that surrounded calls to this function within
7046         the function itself
7047         (cp_parser_primary_expression): Adjust accordingly.
7048         (cp_parser_postfix_expression): Likewise.
7049         (cp_parser_unary_expression): Likewise.
7050         (cp_parser_cast_expression): Likewise.
7051         (cp_parser_assignment_expression): Likewise.
7052         (cp_parser_expression): Likewise.
7053         (cp_parser_new_expression): Note that new-expressions are not
7054         allowed in integral constant expressions.
7055         (cp_parser_delete_expression): Likewise.
7056
7057 2004-03-12  Matt Austern  <austern@apple.com>
7058
7059         * decl2.c (maybe_make_one_only): Look at
7060         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7061         to make an explicit instantiation weak.
7062         * method.c (use_thunk): Make sure we call comdat_linkage
7063         when appropriate.
7064         * pt.c (do_type_instantiation): On systems where weak symbols
7065         don't go in a static archive's TOC, explicit instantiation of a
7066         class must imply *explicit* instantiation of its memeber.
7067
7068 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
7069
7070         * call.c, cp-tree.h, pt.c: Fix comment typos.
7071
7072 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
7073
7074         PR c++/14510
7075         * decl.c (xref_tag): Disregard non-type declarations when
7076         looking up a tagged type.
7077
7078 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
7079
7080         PR c++/14397
7081         * call.c (convert_like_real): Build a const qualified temporary,
7082         when testing ctor access.
7083
7084 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7085
7086         * call.c (initialize_reference): Fix typo.
7087
7088 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7089
7090         PR c++/14409
7091         * pt.c (determine_specialization): For member templates, match also
7092         constness.
7093
7094         PR c++/14448
7095         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7096         non-dependent.
7097         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7098
7099 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7100
7101         PR c++/14230
7102         * call.c (initialize_reference): Handle initializers that are
7103         class-member access expressions applies to rvalues.
7104
7105 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
7106
7107         PR c++/14432
7108         * name-lookup.c (supplement_binding): Ignore functions that are
7109         marked DECL_ANTICIPATED.
7110
7111 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7112
7113         PR c++/14401
7114         * class.c (check_field_decls): Complain about non-static data
7115         members of reference type in unions.  Propagate
7116         CLASSTYPE_REF_FIELDS_NEED_INIT and
7117         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7118         data members.
7119         * init.c (perform_member_init): Complain about mbmers with const
7120         type that are not explicitly initialized.
7121
7122 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
7123
7124         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7125         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7126         (lang_identifier): Remove implicit_decl and error_locus.
7127         (IDENTIFIER_IMPLICIT_DECL): Remove.
7128         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7129         (IDENTIFIER_ERROR_LOCUS): Likewise.
7130         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7131         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7132         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7133         (implicitly_declare): Remove.
7134         * decl.c (warn_extern_redeclared_static): Remove check of
7135         IDENTIFIER_IMPLICIT_DECL.
7136         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7137         (implicitly_declare): Remove.
7138         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7139         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7140         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7141         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7142         in the innermost scope, rather than at namespace scope.
7143         * name-lookup.c (push_local_binding): Give it external linkage.
7144         (pushdecl): Remove dead code.
7145         * name-lookup.h (push_local_binding): Declare it.
7146         * ptree.c (cxx_print_identifier): Don't print
7147         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7148         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7149         not IDENTIFIER_ERROR_LOCUS.
7150         * typeck.c (build_function_call): Remove dead code.
7151
7152 2004-03-08  Jason Merrill  <jason@redhat.com>
7153
7154         PR c++/13170
7155         * decl.c (xref_tag): Remove attribute handling.
7156         * cp-tree.h: Adjust prototype.
7157         * decl.c, parser.c, rtti.c: Adjust callers.
7158         * parser.c (cp_parser_class_head): Pass back attributes in the
7159         class head.
7160         (cp_parser_class_specifier): Adjust.
7161
7162 2004-03-08  Matt Austern  <austern@apple.com>
7163
7164         PR debug/14079
7165         * name-lookup.c (add_decl_to_level): Add extern variables, as well
7166         as static, to static_decls array.
7167
7168 2004-03-05  Jason Merrill  <jason@redhat.com>
7169
7170         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7171
7172 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
7173
7174         * decl.c (grokfndecl): Update old incorrect comment.
7175         (grokvardecl): Diagnose C++ variables of type with no linkage.
7176
7177 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7178
7179         PR c++/14369
7180         * pt.c (build_non_dependent_expr): Do not create a
7181         NON_DEPENDENT_EXPR for a THROW_EXPR.
7182
7183 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7184
7185         PR c++/14369
7186         * error.c (dump_expr): Handle THROW_EXPR.
7187
7188 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7189
7190         PR c++/14360
7191         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7192         lookup if ordinary name-lookup finds a non-function.
7193         * pt.c (tsubst_copy_and_build): Likewise.
7194
7195         PR c++/14361
7196         * parser.c (cp_parser_late_parsing_default_args): Check that there
7197         are no extra tokens after the end of the default-argument
7198         expression.
7199
7200 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
7201
7202         PR c++/14324
7203         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7204         having C++ linkage for name-mangling purposes.
7205
7206         PR c++/14260
7207         * parser.c (cp_parser_direct_declarator): Recognize constructor
7208         declarators that use a template-id to name the class being
7209         constructed.
7210
7211         PR c++/14337
7212         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7213         (tsubst_expr): Do not call tsubst_copy, even when
7214         processing_template_decl.
7215
7216 2004-03-01  Jeff Law  <law@redhat.com>
7217
7218         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7219         the proper type.
7220
7221 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7222
7223         PR c++/14138
7224         * name-lookup.h (push_scope): Change prototype.
7225         * name-lookup.c (push_scope): Do not reenter the current class
7226         scope.
7227         * decl.c (grokfndecl): Check return code from push_scope before
7228         calling pop_scope.
7229         * decl2.c (check_classfn): Likewise.
7230         * parser.c (cp_parser_conversion_function_id): Likewise.
7231         (cp_parser_init_declarator): Likewise.
7232         (cp_parser_direct_declarator): Likewise.
7233         (cp_parser_class_specifier): Likewise.
7234         (cp_parser_class_head): Likewise.
7235         (cp_parser_lookup_name): Likewise.
7236         (cp_parser_constructor_declarator_p): Likewise.
7237         * pt.c (instantiate_class_template): Likewise.
7238         (resolve_typename_type): Likewise.
7239
7240 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
7241
7242         PR c++/14267
7243         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7244         extension.
7245
7246         PR debug/12103
7247         * class.c (update_vtable_entry_for_fn): Do not go through
7248         covariance machinery if the type returned by an overrider is the
7249         same as the original.
7250
7251 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
7252
7253         * call.c: Fix a comment typo.
7254
7255 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
7256
7257         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7258
7259 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
7260
7261         PR c++/14278
7262         * parser.c (cp_parser_parameter_declaration_list): Commit
7263         to fewer tentative parses.
7264
7265 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7266
7267         PR c++/14284
7268         * pt.c (dependent_type_p_r): A template template parameter is a
7269         dependent type.
7270
7271 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7272
7273         PR c++/14246
7274         * mangle.c (write_template_arg_literal): Don't rely on identity for
7275         boolean constants.
7276
7277 2004-02-24  Jason Merrill  <jason@redhat.com>
7278
7279         * tree.c (build_exception_variant): Use check_qualified_type.
7280
7281 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
7282             Kazu Hirata  <kazu@cs.umass.edu>
7283
7284         * decl.c (cxx_init_decl_processing): Don't check
7285         flag_writable_strings.
7286
7287 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
7288
7289         PR c++/14156
7290         * typeck.c (maybe_warn_about_returning_address_of_location):
7291         Change check for VAR_DECL to use DECL_P instead.
7292
7293 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7294
7295         PR c++/14250
7296         * cvt.c (build_expr_type_conversion): Type must be complete before
7297         looking up for conversions.
7298
7299 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7300
7301         PR c++/14143
7302         * name-lookup.c (arg_assoc_class): Don't look into template
7303         arguments if it is not a primary template.
7304
7305 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7306
7307         PR c++/12007
7308         * method.c (use_thunk): Always clone function argument tree.
7309
7310 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
7311
7312         PR c++/14199
7313         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7314
7315         PR c++/14173
7316         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7317         for all type variants.
7318
7319 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
7320
7321         PR c++/13927
7322         * decl.c (duplicate_decls): Return error_mark_node for invalid
7323         redeclarations.
7324         * name-lookup.c (push_namespace): Ignore the return value from
7325         pushdecl.
7326         * pt.c (push_template_decl_real): Robustify.
7327
7328         PR c++/14186
7329         * name-lookup.c (push_class_level_binding): Do not complain about
7330         adding a binding for a member whose name is the same as the
7331         enclosing class if the member is located in a base class of the
7332         current class.
7333
7334 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7335
7336         PR c++/14181
7337         * parser.c (cp_parser_new_expression): Parse an ill-formed
7338         direct-new-declarator after a parenthesized type-id to emit good
7339         diagnostic.
7340
7341 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
7342
7343         * cp-tree.def, cvt.c: Update copyright.
7344
7345 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
7346
7347         PR c++/11326
7348         * cp-tree.h (abi_version_at_least): Remove.
7349         * mangle.c: Include flags.h.
7350
7351 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
7352
7353         PR c++/13971
7354         * call.c (build_conditional_expr): Handle conversions between
7355         class types which result in differently cv-qualified type
7356         variants.
7357
7358         PR c++/14086
7359         * class.c (delete_duplicate_fields_1): Remove.
7360         (delete_duplicate_fields): Likewise.
7361         (finish_struct_anon): Remove check for members with the same name
7362         as their enclosing class.
7363         (check_field_decls): Do not call duplicate_fields.
7364         * decl.c (grokdeclarator): Remove check for static data members
7365         with the same name as their enclosing class.
7366         * name-lookup.c (push_class_level_binding): Check for members with
7367         the same name as their enclosing class.
7368
7369 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7370
7371         PR c++/14085
7372         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7373
7374 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7375
7376         PR c++/13635
7377         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7378         has full set of arguments.
7379
7380 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7381
7382         PR c++/13927
7383         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7384
7385 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
7386
7387         PR c++/14122
7388         * cp-tree.h (delete_sanity): Change prototype.
7389         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7390         Remove dead code.  Adjust code to warn about deleting an array.
7391         * typekc.c (decay_conversion): Use build_address and build_nop.
7392
7393         PR c++/14108
7394         * search.c (accessible_p): Do not check access in thunks.
7395
7396         PR c++/14083
7397         * call.c (build_conditional_expr): Call force_rvalue on the
7398         non-void operand in the case that one result is a throw-expression
7399         and the other is not.
7400
7401 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
7402
7403         PR c++/9851
7404         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7405         the type name and look ahead for ::~, and bail out early with a
7406         better error message if the parse is going to fail.
7407
7408 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
7409
7410         * call.c (conversion_kind): New type.
7411         (conversion_rank): Likewise.
7412         (conversion): Likewise.
7413         (CONVERSION_RANK): New macro.
7414         (conversion_obstack): New variable.
7415         (obstack_initialized): Likewise.
7416         (z_candidate): Change type of convs and second_conv.
7417         (candidate_warning): New type.
7418         (IDENTITY_RANK): Remove.
7419         (EXACT_RANK): Likewise.
7420         (PROMO_RANK): Likewise.
7421         (STD_RANK): Likewise.
7422         (PBOOL_RANK): Likewise.
7423         (USER_RANK): Likewise.
7424         (ELLIPSIS_RANK): Likewise.
7425         (BAD_RANK): Likewise.
7426         (ICS_RANK): Likewise.
7427         (ICS_STD_RANK): Likewise.
7428         (ICS_USER_FLAG): Likewise.
7429         (ICS_ELLIPSIS_FLAG): Likewise.
7430         (ICS_THIS_FLAG): Likewise.
7431         (ICS_BAD_FLAG): Likewise.
7432         (NEED_TEMPORARY_P): Likewise.
7433         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7434         (USER_CONV_CAND): Likewise.
7435         (USER_CONV_FN): Likewise.
7436         (conversion_obstack_alloc): New function.
7437         (alloc_conversion): Likewise.
7438         (validate_conversion_obstack): Likewise.
7439         (alloc_conversions): Likewise.
7440         (build_conv): Adjust to deal with new conversion data structures.
7441         (build_identity_conv): New function.
7442         (build_ambiguous_conv): Likewise.
7443         (standard_conversion): Adjust to deal with new conversion data
7444         structures.
7445         (convert_class_to_reference): Likewise.
7446         (direct_reference_binding): Likewise.
7447         (reference_binding): Likewise.
7448         (implicit_conversion): Likewise.
7449         (add_candidate): Likewise.
7450         (add_function_candidate): Likewise.
7451         (add_conv_candidate): Likewise.
7452         (build_builtin_candidate): Likewise.
7453         (print_z_candidate): Likewise.
7454         (merge_conversion_sequences): Likewise.
7455         (build_user_type_conversion_1): Likewise.
7456         (build_user_type_conversion): Likewise.
7457         (build_new_function_call): Likewise.
7458         (build_object_call): Likewise.
7459         (conditional_conversion): Likewise.
7460         (build_conditional_expr): Likewise.
7461         (build_new_op): Likewise.
7462         (build_op_delete_call): Likewise.
7463         (convert_like_real): Likewise.
7464         (build_over_call): Likewise.
7465         (build_new_method_call): Likewise.
7466         (is_subseq): Likewise.
7467         (maybe_handle_implicit_object): Likewise.
7468         (maybe_handle_ref_bind): Likewise.
7469         (compare_ics): Likewise.
7470         (source_type): Likewise.
7471         (add_warning): Likewise.
7472         (joust): Likewise.
7473         (can_convert_arg): Likewise.
7474         (can_convert_arg_bad): Likewise.
7475         (perform_implicit_conversion): Likewise.
7476         (perform_direct_initialization_if_possible): Likewise.
7477         (initialize_reference): Likewise.
7478         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7479         * cp-tree.def (WRAPPER): Likewise.
7480         (IDENTITY_CONV): Remove.
7481         (LVALUE_CONV): Likewise.
7482         (QUAL_CONV): Likewise.
7483         (STD_CONV): Likewise.
7484         (PTR_CONV): Likewise.
7485         (PMEM_CONV): Likewise.
7486         (BASE_CONV): Likewise.
7487         (REF_BIND): Likewise.
7488         (USER_CONV): Likewise.
7489         (AMBIG_CONV): Likewise.
7490         (RVALUE_CONV): Likewise.
7491         * cp-tree.h (tree_wrapper): Remove.
7492         (WRAPPER_ZC): Remove.
7493         (lang_tree_node): Remove wrapper.
7494         (LOOKUP_SPECULATIVELY): Remove.
7495         (build_op_delete_call): Adjust prototype.
7496         (validate_conversion_obstack): Declare.
7497         (build_zc_wrapper): Remove.
7498         * cvt.c (convert_to_reference): Remove dead code.
7499         (ocp_convert): Likewise.
7500         * decl.c (redeclaration_error_message): Correct handling of
7501         templates.
7502         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7503         (cp_tree_node_structure): Remove WRAPPER case.
7504         * decl2.c (finish_file): Call validate_conversion_obstack.
7505         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7506         (build_op_delete_call): Likewise.
7507         (build_x_delete): Likewise.
7508         (build_delete): Adjust call to build_op_delete_call.
7509         * pt.c (tsubst_friend_declaration): Adjust code to determine
7510         whether or not a friend template is a definition.
7511         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7512         * tree.c (build_zc_wrapper): Remove.
7513
7514 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
7515
7516         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7517         * cp-tree.h: Don't declare cxx_builtin_type_decls.
7518         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7519         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7520
7521 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
7522
7523         * typeck.c (lookup_destructor): Fix typo in error message.
7524
7525 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
7526
7527         * call.c, parser.c, tree.c: Fix comment typos.
7528
7529 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7530
7531         Bug 13856
7532         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7533         * decl.c (duplicate_decls, start_function): Likewise.
7534
7535 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
7536
7537         * name-lookup.c (pushdecl): Issue shadow warnings directly.
7538         * parser.c (free_parser_stacks): Delete.
7539
7540 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
7541
7542         * rtti.c: Update copyright.
7543
7544 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7545
7546         PR c++/14033
7547         * decl.c (require_complete_types_for_parms): Do not insert
7548         error_mark_node in the parameter list.
7549
7550 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7551
7552         PR c++/14028
7553         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7554         error when terminator can not be found.
7555
7556 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
7557
7558         Make-lang.in (po-generated):  Delete.
7559
7560 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
7561
7562         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7563         targetm.calls.promote_prototypes.
7564
7565 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7566
7567         PR middle-end/13750
7568         Revert:
7569         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7570         PR pch/13361
7571         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7572         (handle_pragma_implementation): Likewise.
7573
7574 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
7575
7576         PR c++/13714
7577         * typeck.c (lookup_destructor): Tweak error message.
7578
7579 2004-02-05  Jan Hubicka  <jh@suse.cz>
7580
7581         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
7582         functions.
7583
7584 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7585
7586         PR c++/14008
7587         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7588         code, only emits the diagnostic now. Added lookup of the identifier
7589         and support for qualified ids.
7590         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7591         Parse an (invalid) type name as id-expression within a declarator.
7592         (cp_parser_simple_declaration): Use it.
7593         (cp_parser_member_declaration): Likewise.
7594         (cp_parser_make_typename_type): New function. Handle errors through
7595         cp_parser_diagnose_invalid_typename.
7596         (cp_parser_elaborated_type_specifier): Use it.
7597
7598 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7599
7600         PR c++/13932
7601         * call.c (convert_like_real): Use "converting" rather than
7602         "argument" as the descriptive keyword to
7603         dubious_conversion_warnings.
7604         * typeck.c (convert_for_assignment): Do not call
7605         dubious_conversion_warnings.
7606
7607 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7608
7609         PR c++/13086
7610         * init.c (build_delete): Emit a more informative error message in
7611         case of an incomplete type, and on the correct source line.
7612
7613 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
7614
7615         * error.c, search.c: Update copyright.
7616
7617 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7618
7619         PR c++/9941
7620         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7621         linkage for the typeinfo name string.
7622
7623 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7624
7625         PR c++/13969
7626         * cp-tree.h (fold_non_dependent_expr): New function.
7627         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7628         (cp_parser_template_argument): Use fold_non_dependent_expr.
7629         (cp_parser_direct_declarator): Likewise.
7630         * pt.c (fold_non_dependent_expr): New function.
7631         (convert_nontype_argument): Use it.
7632         (tsubst_qualified_id): Simplify.
7633         (tsubst_copy_and_build): Likewise.
7634
7635 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
7636
7637         * decl.c (cxx_push_function_context): Do not set
7638         current_function_is_thunk.
7639         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7640         actual function.
7641
7642 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7643
7644         PR c++/13997
7645         * pt.c (more_specialized_class): Increase processing_template_decl
7646         while partial ordering.
7647
7648 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7649
7650         PR c++/13925
7651         * decl.c (start_function): Do not call pushdecl for any
7652         instantiation or specialization of a primary template.
7653
7654 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7655
7656         PR c++/13950
7657         * parser.c (cp_parser_class_name): Robustify.
7658
7659         PR c++/13970
7660         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7661
7662         PR c++/14002
7663         * semantics.c (finish_id_expression): Do not return an
7664         IDENTIFIER_NODE when lookup finds a PARM_DECL.
7665
7666 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
7667
7668         PR c++/13978
7669         * pt.c (build_non_dependent_expr): Do not build
7670         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7671
7672         PR c++/13968
7673         * semantics.c (finish_id_expression): Do not return an
7674         IDENTIFIER_NODE when lookup finds a VAR_DECL.
7675
7676         PR c++/13975
7677         * parser.c (cp_parser_simple_declaration): When skipping to the
7678         end of the statement swallow the terminating semicolon.
7679
7680 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
7681
7682         PR c++/13113
7683         * init.c (build_offset_ref): Improve error recovery for invalid
7684         uses of non-static member functions.
7685
7686         PR c++/13854
7687         * cp-tree.h (cp_build_type_attribute_variant): New function.
7688         * class.c (build_clone): Use cp_build_type_attribute_variant.
7689         * decl.c (duplicate_decls): Likewise.
7690         * pt.c (copy_default_args_to_explicit_spec): Likewise.
7691         (tsubst_function_type): Likewise.
7692         * tree.c (build_exception_variant): Check attributes before
7693         concluding that two types are the same.
7694         (cp_build_type-attribute_variant): New method.
7695         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7696
7697         PR c++/13907
7698         * call.c (convert_class_to_reference): Keep better track of
7699         pedantically invalid user-defined conversions.
7700
7701 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7702
7703         PR c++/13957
7704         * pt.c (tsubst_qualified_id): Improved error message when a type
7705         is expected but not found.
7706
7707 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
7708
7709         * class.c: Fix comment typos.
7710         * decl.c: Likewise.
7711         * error.c: Likewise.
7712         * parser.c: Likewise.
7713         * pt.c: Likewise.
7714         * search.c: Likewise.
7715         * typeck.c: Likewise.
7716
7717 2004-01-30  Richard Henderson  <rth@redhat.com>
7718
7719         PR c++/13693
7720         * method.c (use_thunk): Don't force_target_expr for void thunks.
7721         * tree.c (build_target_expr_with_type): Assert non-void type.
7722         (force_target_expr): Likewise.
7723
7724 2004-01-30  Michael Matz  <matz@suse.de>
7725
7726         * parser.c (cp_parser_labeled_statement): Accept case ranges.
7727
7728 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7729
7730         DR206
7731         PR c++/13813
7732         * decl.c (grokdeclarator): Check immediatly type completeness for
7733         non-dependent types.
7734
7735 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7736
7737         PR c++/13683
7738         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7739         a sizeof expression.block
7740
7741 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
7742
7743         PR c++/13883
7744         * mangle.c (write_encoding): Correct encoding of member template
7745         constructors.
7746
7747 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7748
7749         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7750         template name as it was `<::' (digraph typo).
7751         (cp_parser_nth_token_starts_template_argument_list_p): New function.
7752         (cp_parser_id_expression): Use it.
7753         (cp_parser_nested_name_specifier_opt): Likewise.
7754         (cp_parser_template_name): Likewise.
7755         (cp_parser_class_name): Likewise.
7756         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
7757
7758 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
7759
7760         PR c++/13791
7761         * typeck.c (merge_types): Do not merge attributes into
7762         TYPENAME_TYPEs.
7763
7764         PR c++/13736
7765         * parser.c (cp_parser_direct_declarator): Do not prevent
7766         backtracking inside a parenthesized declarator.
7767         (cp_parser_parameter_declaration): Fix typo in comment.
7768
7769 2004-01-28  Jan Hubicka  <jh@suse.cz>
7770
7771         * semantics.c (expand_body)  Do emit_associated_thunks before
7772         expansion.
7773
7774 2004-01-27  Devang Patel  <dpatel@apple.com>
7775
7776         * name-lookup.c: Include "debug.h"
7777         (do_namespace_alias): Invoke debug_hooks to emit debug info
7778         for namespace alias.
7779         (do_local_using_decl): Invoke debug_hooks to emit debug info
7780         for using decl.
7781         (do_class_using_decl): Same.
7782         (do_toplevel_using_decl): Same.
7783         (do_using_directive): Same.
7784         (cp_emit_debug_info_for_using): New function.
7785         * Make-lang.in (cp/parser.o): Depend on debug.h
7786         (cp/name-lookup.o): Same.
7787
7788 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7789
7790         * cp-tree.h (language_function, lang_type_header): Use
7791         BOOL_BITFIELD.
7792         * name-lookup.h (cp_binding_level): Likewise.
7793
7794 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
7795
7796         PR c++/13663
7797         * semantics.c (finish_for_expr): Check for unresolved overloaded
7798         functions.
7799
7800         * class.c (add_method): Just check processing_template_decl to
7801         determine whether or not we are within a template.
7802         * decl2.c (maybe_retrofit_in_chrg): Likewise.
7803         * init.c (decl_constant_value): Check the type of the declaration,
7804         not TREE_READONLY.
7805         * name-lookup.c (maybe_push_to_top_level): Rename to ...
7806         (push_to_top_level): ... this.
7807         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
7808         * pt.c (push_template_decl_real): Reorder condition for speed.
7809         (convert_template_argument): Use dependency-checking functions in
7810         place of uses_template_parms.
7811         (lookup_template_class): Avoid calling uses_template_parms more
7812         than once.
7813         (uses_template_parms): Reimplement, using dependency-checking
7814         functions.
7815         (instantiate_class_template): Use push_to_top_level, not
7816         maybe_push_to_top_level.
7817         (type_unification_real): Simplify.
7818         (type_dependent_expression_p): Handle OFFSET_REFs and
7819         TEMPLATE_DECLs.
7820         (any_dependent_template_arguments_p): Handle multiple levels of
7821         template argument.
7822         * semantics.c (expand_or_defer_fn): Do not check
7823         uses_template_parms for template instantiations.
7824         * typeck.c (comptypes): Avoid calling cp_type_quals.
7825
7826 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
7827
7828         PR c++/13833
7829         * call.c (build_over_call): Do not convert arguments when
7830         processing a template.
7831         * pt.c (build_non_dependent_expr): Do not build a
7832         NON_DEPENDENT_EXPR for arithmetic constants.
7833
7834 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7835
7836         PR c++/13810
7837         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
7838         returns a TYPE_DECL. no further lookup is required.
7839         * semantics.c (check_template_template_default_arg): A TYPE_DECL
7840         is invalid. Rework to give better diagnostics.
7841
7842 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7843
7844         PR c++/13797
7845         * pt.c (instantiate_class_template): Add an error_mark_node
7846         check.
7847         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
7848
7849 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
7850
7851         PR c++/13701
7852         * decl.c (finish_function): Move the call to
7853         finish_fname_decls below the call to
7854         finish_eh_spec_block.
7855
7856 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
7857
7858         * optimize.c, typeck2.c: Update copyright.
7859
7860 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
7861
7862         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
7863         init.c, mangle.c, typeck.c: Update copyright.
7864
7865 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
7866
7867         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
7868
7869 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
7870
7871         * Make-lang.in: Replace $(docdir) with doc.
7872         (c++.info, c++.srcinfo): Dummy entry.
7873         (c++.man, c++.srcman): New rules.
7874         (c++.install-man): Revamp rule.
7875
7876 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
7877
7878         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
7879         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
7880         immediate $(shell) instead of deferred backquote.
7881
7882 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
7883
7884         PR c++/13651
7885         * parser.c (cp_parser_postfix_expression): When encountering
7886         incomplete type on left-hand side of "->" or ".", treat the entire
7887         expression as erroneous.
7888
7889         PR c++/13592
7890         * call.c (build_field_call): Remove.
7891         (n_build_method_call): Likewise.
7892         (build_method_call): Likewise.
7893         (build_new_method_call): Do not call build_field_call.
7894         * class.c (n_build_method_call): Remove.
7895         (print_class_statistics): Do not print it.
7896         * cp-tree.h (build_method_call): Remove declaration.
7897         (finish_object_call_expr): Likewise.
7898         (build_new_1): Do not use build_method_call.
7899         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
7900         when the function appearing on the right-hand-side of "." or "->"
7901         is not actually a function.
7902         * pt.c (tsubst_copy_and_build): Likewise.
7903         * semantics.c (finish_object_call_expr): Remove.
7904
7905 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
7906
7907         PR c++/13710
7908         * pt.c (tsubst): Use finish_typeof.
7909
7910 2004-01-18  Jason Merrill  <jason@redhat.com>
7911
7912         PR c++/11725
7913         * except.c (build_throw): In a template, set
7914         current_function_returns_abnormally.
7915
7916 2004-01-17  Fred Fish  <fnf@intrinsity.com>
7917
7918         PR c++/11895
7919         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
7920         except don't call array_type_nelts() with a VECTOR_TYPE.
7921
7922 2004-01-16  Jan Hubicka  <jh@suse.cz>
7923
7924         * mangle.c (write_mangled_name): Remove inline modifier.
7925
7926 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
7927
7928         PR c++/13574
7929         * decl.c (compute_array_index_type): Fix grammar in comment.
7930         * init.c (build_zero_init): Handle zero-sized arrays correctly.
7931
7932         PR c++/13178
7933         * call.c (name_as_c_string): Print conversion operator names
7934         correctly.
7935
7936         PR c++/13478
7937         * call.c (initialize_reference): Pass -1 for inner parameter to
7938         convert_like_real.
7939
7940 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7941
7942         PR c++/13407
7943         * parser.c (cp_parser_base_specifier): Check for an invalid
7944         keyword `typename' and emit an user-friendly error message.
7945
7946 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7947
7948         PR pch/13361
7949         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7950         (handle_pragma_implementation): Likewise.
7951
7952 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7953
7954         PR c++/9259
7955         * typeck.c (build_class_member_access_expr): Allow to access members
7956         of the currently open class.
7957         (finish_class_member_access_expr): Likewise.
7958
7959 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
7960
7961         PR c++/13659
7962         * name-lookup.c (validate_nonmember_using_decl): Take scope and
7963         name by value, instead of computing them.
7964         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7965         arguments.  Pass them to validate_nonmember_using_decl.
7966         * name-lookup.h (do_local_using_decl): Adjust.
7967         (do_toplevel_using_decl): Likewise.
7968         * parser.c (cp_parser_using_declaration): Likewise.
7969         * pt.c (tsubst_expr): Likewise.
7970
7971 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
7972
7973         PR c++/13594
7974         PR c++/13658
7975         * name-lookup.c (qualified_lookup_using_namespace): Search
7976         strongly-associated namespaces first, and only then try other
7977         namespaces.
7978
7979 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
7980
7981         * Make-lang.in (c++.srcextra): Dummy entry.
7982
7983 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7984
7985         PR c++/8856
7986         * parser.c (cp_parser_template_name): Don't try to parse a
7987         conversion-function-id, as it cannot be a template-name.
7988         (cp_parser_simple_type_specifier): Check for invalid template-ids
7989         even after a built-in type.
7990
7991 2004-01-14  Jan Hubicka  <jh@suse.cz>
7992
7993         PR c++/12850
7994         * pt.c (instantiate_decl):  Do not increase function_depth.
7995
7996 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
7997
7998         PR c++/9021
7999         PR c++/11005
8000         * parser.c (cp_parser_elaborated_type_specifier): Warn about
8001         attributes and discard.
8002         * decl.c (xref_tag): Don't overwite existing attributes with
8003         NULL_TREE.
8004
8005 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8006
8007         PR c++/12335
8008         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8009         is no destructor while looking up a BIT_NOT_EXPR.
8010
8011 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
8012
8013         * cxxfilt.c: Remove unused file.
8014
8015 2004-01-14  Jan Hubicka  <jh@suse.cz>
8016
8017         Partial fix to PR c++/12850
8018         * decl2.c (mark_used): Do not proactively instantiate templates
8019         when compiling in unit-at-a-time or not optimizing.
8020         * optimize.c (maybe_clone_body): Do not increase function depth.
8021
8022 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8023
8024         PR c++/13474
8025         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8026
8027 2004-01-12  Steven Bosscher  <stevenb@suse.de>
8028
8029         PR c++/13558
8030         * parser.c (cp_parser_member_declaration): Any non-type is also
8031         not a class or a function.
8032
8033 2004-01-12  Jason Merrill  <jason@redhat.com>
8034
8035         PR c++/12815
8036         * class.c (build_base_path): Do not mark vtable references as
8037         TREE_CONSTANT.
8038         (build_vtbl_ref_1): Likewise.
8039
8040 2004-01-12  Richard Henderson  <rth@redhat.com>
8041
8042         PR opt/10776
8043         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8044         (store_init_value): Use it.
8045         * decl.c (check_initializer): Expect full initialization code
8046         from store_init_value.
8047         * init.c (expand_aggr_init_1): Likewise.
8048         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8049
8050 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
8051
8052         * class.c (layout_class_type): For non-POD class types, also copy
8053         the DECL_SIZE and DECL_MODE of fields to the base class type.
8054
8055 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8056
8057         PR c++/13289
8058         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8059         calling regenerate_decl_from_template.
8060
8061 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
8062
8063         PR c++/4100
8064         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8065         decl-specifier occurring along with a class definition.
8066
8067 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
8068
8069         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8070         clauses to comments describing declares_class_or_enum.
8071         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8072         false.
8073
8074 2004-01-12  Jan Hubicka  <jh@suse.cz>
8075
8076         * pt.c (for_each_template_parm): Do not check for duplicates.
8077         (for_each_template_parm): Use walk_tree duplicate checking code.
8078
8079 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
8080
8081         PR c++/3478
8082         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8083         is error_mark_node, don't add any more decl_specs.
8084         (cp_parser_init_declarator): After committing to a declaration, if
8085         the decl_specifiers start with error_mark_node, issue an error and
8086         change the type to "int".
8087
8088 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
8089
8090         PR bootstrap/7817
8091         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8092
8093 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8094
8095         DR 337
8096         PR c++/9256
8097         * pt.c (tsubst): Substitution must fail if we are attempting to
8098         create an array with element type that is an abstract class type.
8099         * decl.c (cp_finish_decl): Strip pointers and array types recursively
8100         before calling abstract_virtuals_error.
8101
8102 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
8103
8104         * name-lookup.c (qualified_lookup_using_namespace): Consider
8105         strong using directives even if we've already found a binding.
8106
8107 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
8108
8109         * cp-tree.h (cxx_expand_expr): Change prototype.
8110         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8111
8112 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
8113
8114         PR c++/12573
8115         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8116         looking into them recursively. They can be there because of the
8117         new __offsetof__ extension.
8118
8119 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
8120
8121         * parser.c (cp_parser_save_member_function_body): Mark the
8122         definition static.
8123
8124 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
8125
8126         PR c++/13057
8127         * class.c (build_clone): Copy type attributes from the original
8128         function to the clone.
8129
8130         PR c++/12815
8131         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8132         references as constant.
8133
8134         PR c++/12132
8135         * parser.c (cp_parser_explicit_instantiation): Improve error
8136         recovery.
8137         (cp_parser_require): Improve indication of the error location.
8138
8139         PR c++/13451
8140         * parser.c (cp_parser_class_head): Reorder logic to check for
8141         invalid qualification.
8142
8143 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8144
8145         PR c++/13157
8146         * name-lookup.c (lookup_using_namespace): Remove spacesp
8147         parameter.
8148         (unqualified_namespace_lookup): Likewise.
8149         (lookup_qualified_name): Adjust accordingly.
8150         (lookup_name_real): Likewise.
8151         (lookup_arg_dependent): Do not eliminate the namespace of the
8152         functions found by unqualified name lookup unless that is the
8153         current namespace.
8154
8155 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
8156
8157         * semantics.c (push_deferring_access_checks): Fix format.
8158         (resume_deferring_access_checks): Likewise.
8159         (stop_deferring_access_checks): Likewise.
8160         (pop_deferring_access_checks): Likewise.
8161         (get_deferred_access_checks): Likewise.
8162         (pop_to_parent_deferring_access_checks): Likewise.
8163         (perform_deferred_access_checks): Likewise.
8164         (perform_or_defer_access_check): Likewise.
8165
8166 2004-01-04  Richard Henderson  <rth@redhat.com>
8167
8168         * call.c (build_over_call): Don't create a save_expr of an
8169         aggregate, but rather its address.
8170
8171 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
8172
8173         PR c++/13529
8174         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8175         an offsetof expression.
8176
8177         * parser.c (cp_parser_parameter_declaration): Fix comment.
8178
8179         PR c++/12226
8180         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8181         (reference_binding): Set it when appropriate.
8182         (build_temp): New function, split out from ...
8183         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
8184         (initialize_reference): Likewise.
8185
8186         PR c++/13536
8187         * parser.c (cp_parser): Add in_type_id_in_expr_p.
8188         (cp_parser_new): Initialize it.
8189         (cp_parser_postfix_expression): Set it.
8190         (cp_parser_sizeof_operand): Likewise.
8191         (cp_parser_parameteR_declaration): Do not commit early to tenative
8192         parsers when in_type_id_in_expr_p is set.
8193
8194 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8195
8196         PR c++/13094
8197         * parser.c (cp_parser_template_argument): Don't call
8198         make_unbound_class_template directly.
8199         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8200         UNBOUND_CLASS_TEMPLATE tree node.
8201
8202 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
8203
8204         PR target/12729
8205         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8206
8207 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8208
8209         PR c++/13520
8210         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8211         (DECL_FUNCTION_TEMPLATE_P): Use it.
8212         (DECL_CLASS_TEMPLATE_P): Likewise.
8213         * parser.c (cp_parser_lookup_name): Add is_template parameter.
8214         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8215         (cp_parser_template_name): Likewise.
8216         (cp_parser_elaborated_type_specifier): Likewise.
8217         (cp_parser_namespace_name): Likewise.
8218         (cp_parser_class_name): Likewise.
8219         (cp_parser_lookup_name_simple): Likewise.
8220
8221 See ChangeLog.3 for earlier changes.