OSDN Git Service

* class.c (layout_class_type): Do not issue C++ ABI warnings
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
2
3         * class.c (layout_class_type): Do not issue C++ ABI warnings
4         for ObjC structs.
5         * decl.c (objc_mark_locals_volatile): Streamline by calling
6         objc_volatilize_decl().
7         * parser.c (cp_parser_objc_message_expression): Allow simple
8         type specifiers (instead of merely type names) as message
9         receivers.
10         * pt.c (template_args_equal): Do not call objc_comptypes().
11         * typeck.c (composite_pointer_type): If both pointers are
12         ObjC-esque, arbitrarily choose the first; do not call
13         objc_comptypes().
14         (comptypes): Do not call objc_comptypes().
15         (convert_for_assignment): Call objc_compare_types().
16         (comp_ptr_ttypes_real): Call objc_type_quals_match() before
17         concluding that types do not match.
18
19 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
20
21         PR C++/21645
22         * optimize.c (update_cloned_parm): Copy the TYPE also from the
23         original one.
24
25 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
26
27         PR c++/21495
28         * decl.c (grokdeclarator): Fix "storage class specified for"
29         error reporting.
30
31 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
32
33         * parser.c: Fix comment typos.
34
35 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
36
37         * Make-lang.in (cc1plus-dummy): New.
38         (cc1plus-checksum.c): New.
39         (cc1plus-checksum.o): New.
40         (cc1plus): Add cc1plus-checksum.o.
41
42 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
43
44         PR C++/19664
45         * decl2.c (determine_visibility): Don't set visibility to
46         hidden if it has been set explicitly by user.
47
48 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
49             Mike Stump  <mrs@apple.com>
50
51         Yet more Objective-C++...
52         
53         * cp-objcp-common.h (cxx_get_alias_set): Move from
54         here...
55         (cxx_warn_unused_global_decl): Likewise.
56         (cp_expr_size): Likewise.
57         (cp_tree_size): Likewise.
58         (cp_var_mod_type_p): Likewise.
59         (cxx_initialize_diagnostics): Likewise.
60         (cxx_types_compatible_p): Likewise.
61         * cp-tree.h: to here.
62         (do_poplevel): Add.
63         * lex.c (D_OBJC): Add.
64         (init_reswords): Add.
65         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
66         * parser.c: Add c-common.h include.
67         * pt.c: Add c-common.h and cp-objcp-common.h includes.
68         (template_args_equal): Use objc_comptypes as well.
69         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
70         * semantics.c (do_poplevel): Remove static.
71
72         * decl.c (objc_mark_locals_volatile): Don't change decls that are
73         already ok.
74         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
75         Objective C++ early enough.
76         * lex.c (struct resword reswords): Add Objective-C++ support.
77         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
78         (cp_parser_objc_message_receiver): Add.
79         (cp_parser_objc_message_args): Likewise.
80         (cp_parser_objc_message_expression): Likewise.
81         (cp_parser_objc_encode_expression): Likewise.
82         (cp_parser_objc_defs_expression): Likewise.
83         (cp_parser_objc_protocol_expression): Likewise.
84         (cp_parser_objc_selector_expression): Likewise.
85         (cp_parser_objc_expression): Likewise.
86         (cp_parser_objc_visibility_spec): Likewise.
87         (cp_parser_objc_method_type): Likewise.
88         (cp_parser_objc_protocol_qualifiers): Likewise.
89         (cp_parser_objc_typename): Likewise.
90         (cp_parser_objc_selector_p): Likewise.
91         (cp_parser_objc_selector): Likewise.
92         (cp_parser_objc_method_keyword_params): Likewise.
93         (cp_parser_objc_method_tail_params_opt): Likewise.
94         (cp_parser_objc_interstitial_code): Likewise.
95         (cp_parser_objc_method_signature): Likewise.
96         (cp_parser_objc_method_prototype_list): Likewise.
97         (cp_parser_objc_method_definition_list): Likewise.
98         (cp_parser_objc_class_ivars): Likewise.
99         (cp_parser_objc_identifier_list): Likewise.
100         (cp_parser_objc_alias_declaration): Likewise.
101         (cp_parser_objc_class_declaration): Likewise.
102         (cp_parser_objc_protocol_declaration): Likewise.
103         (cp_parser_objc_protocol_refs_opt): Likewise.
104         (cp_parser_objc_superclass_or_category): Likewise.
105         (cp_parser_objc_class_interface): Likewise.
106         (cp_parser_objc_class_implementation): Likewise.
107         (cp_parser_objc_end_implementation): Likewise.
108         (cp_parser_objc_declaration): Likewise.
109         (cp_parser_objc_try_catch_finally_statement): Likewise.
110         (cp_parser_objc_synchronized_statement): Likewise.
111         (cp_parser_objc_throw_statement): Likewise.
112         (cp_parser_objc_statement): Likewise.
113         (cp_parser_primary_expression): Add Objective-C++.
114         (cp_parser_statement): Likewise.
115         (cp_parser_declaration): Likewise.
116         (cp_parser_simple_type_specifier): Likewise.
117         (cp_parser_type_name): Likewise.
118         (cp_parser_parameter_declaration_list): Likewise.
119         (cp_parser_member_declaration) Likewise.
120         * tree.c: Include debug.h.
121         * typeck.c (composite_pointer_type): Add Objective-C++ support.
122         (finish_class_member_access_expr): Likewise.
123         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
124         (build_modify_expr): Allow objc to generate write barriers.
125
126         * Make-lang.in (cp/tree.o): Add debug.h.
127         * tree.c (lvalue_p_1, case CONST_DECL): Add.
128
129 2005-05-18  Jan Hubicka  <jh@suse.cz>
130
131         * method.c: Include tree-pass.h
132         (use_thunk): Lower body before expanding.
133
134 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
135
136         PR c++/21454
137         * decl.c (maybe_deduce_size_from_array_init): Call
138         cp_apply_type_quals_to_decl after completing array type.
139
140 2005-05-16  Richard Henderson  <rth@redhat.com>
141
142         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
143         (build_library_fn): ... here.
144
145 2005-05-12  Ian Lance Taylor  <ian@airs.com>
146
147         * cp-tree.h (cp_stmt_codes): Don't define.
148         (statement_code_p): Declare.
149         (STATEMENT_CODE_P): Define.
150         * lex.c (statement_code_p): Define.
151         (cxx_init): Use actual codes in stmt_codes initializer, not
152         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
153         than using INIT_STATEMENT_CODES.
154
155 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
156
157         * typeck.c (build_unary_op): Do not resort to address arithmetic
158         when taking the address of a COMPONENT_REF.
159         
160 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
161
162         * class.c (vtbl_init_data_s): Change the type of fns to
163         VEC(tree,gc)*.
164         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
165         Use VEC instead of VARRAY.
166
167 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
168
169         * mangle.c: Remove a reference to the MIPS -mint64 option.
170
171 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
172
173         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
174         VARRAY.
175         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
176         * name-lookup.h (cp_binding_level): Change the type of
177         static_decls to VEC(tree,gc)*.
178
179         * mangle.c (globals): Change the type of substitutions to
180         VEC(tree,gc)*.
181         (dump_substitution_candidates, add_substitution,
182         find_substitution, finish_mangling, init_mangle): Use VEC
183         instead of VARRAY.
184
185 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
186
187         * decl2.c (spew_debug): Remove.
188
189         * decl2.c (ssdf_decls, start_static_storage_duration_function,
190         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
191
192         * decl2.c (pending_statics, note_vague_linkage_var,
193         cp_finish_file): Use VEC instead of VARRAY.
194         (pending_statics_used): Remove.
195
196 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
197
198         * decl2.c (deferred_fns, note_vague_linkage_fn,
199         cp_finish_file): Use VEC instead of VARRAY.
200
201 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
202
203         PR c++/21352
204         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
205
206 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
207
208         * pt.c: Fix a comment typo.
209
210 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
211
212         * cp-tree.h (language_function): Change the type of
213         x_local_names to VEC.
214         * decl.c (push_local_name): Adjust uses of local_names.
215
216 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
217
218         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
219
220 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
221
222         * class.c (local_classes, init_class_processing): Use VEC
223         instead of VARRAY.
224         * cp-tree.h (local_classes): Likewise.
225         * mangle.c (discriminator_for_local_entity): Likewise.
226         * name-lookup.c (pushtag): Likewise.
227
228         * class.c (current_lang_depth, push_lang_context,
229         pop_lang_context): Use VEC instead of VARRAY.
230         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
231         VARRAY.
232         * name-lookup.c (push_to_top_level): Use VEC instead of
233         VARRAY.
234
235 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
236
237         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
238         for BUILT_IN_MD built-ins.
239
240 2005-05-02  Michael Matz  <matz@suse.de>
241
242         PR c++/19542
243         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
244         common frontend.
245         (null_node): Remove.
246         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
247
248 2005-04-25  Ian Lance Taylor  <ian@airs.com>
249
250         * cp-tree.def: Add EXPR_STMT.
251         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
252         (EXPR_STMT_EXPR): Define.
253         * cp-gimplify.c: Include "flags.h".
254         (gimplify_expr_stmt): New static function.
255         (cp_gimplify_expr): Handle EXPR_STMT.
256         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
257         rather than pp_expression.
258         (pp_cxx_statement): Handle EXPR_STMT.
259         * dump.c (cp_dump_tree): Handle EXPR_STMT.
260         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
261         initializer.
262
263 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
264
265         PR C++/21188
266         * rtti.c (ifnonnull): Cast the zero comparison operand
267         to the correct type.
268
269 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
270
271         PR middle-end/20991
272         * class.c: Include cgraph.h.
273         (cp_fold_obj_type_ref): Set node->local.vtable_method.
274         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
275
276 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
277
278         * mangle.c (write_builtin_type): Handle integer types which are
279         not one of the shared integer type nodes and emit a "vendor
280         extended builtin type" with an encoding in the form of "u5int96".
281
282 2005-04-24  Ian Lance Taylor  <ian@airs.com>
283
284         * cp-tree.def (USING_STMT): Change class to tcc_statement.
285         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
286         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
287         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
288
289 2005-04-23  DJ Delorie  <dj@redhat.com>
290
291         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
292         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
293         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
294         callers.
295
296 2005-04-22  Per Bothner  <per@bothner.com>
297
298         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
299         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
300
301 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
302
303         PR c++/21087
304         * name-lookup.c (push_overloaded_decl): Do not overload with
305         non-duplicate anticipated built-in.
306
307 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
308
309         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
310         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
311
312 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
313
314         * cp-tree.h: Adjust for new VEC API.
315         Define VEC(tree_pair_s,gc).
316         (struct save_scope): Adjust.
317         (struct lang_type_class): Adjust.
318         (unemitted_tinfo_decls): Adjust.
319         * class.c (add_method, resort_type_method_vec,
320         finish_struct_methods, struct find_final_overrider_data,
321         dfs_find_final_overrider_pre, find_final_overrider,
322         get_vcall_index, warn_hidden, walk_subobject_offsets,
323         check_methods, fixup_inline_methods, end_of_class,
324         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
325         add_vcall_offset): Adjust.
326         * decl.c (xref_basetypes, finish_method): Adjust.
327         * decl2.c (check_classfn): Adjust.
328         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
329         * method.c (do_build_copy_constructor): Adjust.
330         * name-lookup.c (new_class_binding, store_binding, 
331         store_bindings, store_class_bindings): Adjust.
332         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
333         VEC(cp_class_binding,gc).
334         (struct cp_binding_level): Adjust.
335         * parser.c: Define VEC(cp_token_position,heap).
336         (struct cp_lexer): Adjust.
337         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
338         cp_lexer_save_tokens): Adjust.
339         * pt.c (retrieve_specialization,
340         check_explicit_specialization): Adjust.
341         * rtti.c (unemitted_tinfo_decls): Adjust.
342         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
343         get_pseudo_ti_desc): Adjust.
344         * search.c (dfs_access_in_type, lookup_conversion_operator,
345         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
346         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
347         * semantics.c: Define VEC(deferred_access,gc).
348         (push_deferring_access_checks): Adjust.
349         * typeck2.c (abstract_virtuals_error): Adjust.
350
351 2005-04-20  Ian Lance Taylor  <ian@airs.com>
352
353         * cp-tree.def: Add STMT_EXPR.
354         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
355         (STMT_EXPR_STMT): Define.
356         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
357         STMT_EXPR.
358         (pp_cxx_expression): Likewise.
359         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
360         * dump.c (cp_dump_tree): Handle STMT_EXPR.
361
362 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
363
364         * decl.c (expand_static_init): Call build2 and build3 instead
365         of build.
366
367         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
368
369 2005-04-17  Ian Lance Taylor  <ian@airs.com>
370
371         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
372         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
373         ARROW_EXPR.
374         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
375         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
376         ALIGNOF_EXPR.
377         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
378         c_sizeof_or_alignof_type for change in parameter type.
379
380 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
381
382         PR c++/21025
383         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
384         which sizeof/alignof is dependent, rather than just whether we are
385         processing_template_decl.
386         
387 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
388
389         * cp-tree.h (LOOKUP_GLOBAL): Remove.
390         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
391         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
392         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
393         their values.
394
395 2005-04-15  Richard Henderson  <rth@redhat.com>
396
397         PR middle-end/14311
398         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
399
400 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
401
402         * cp-tree.h (lang_type_class): Remove redefined.  Move
403         java_interface into where redefined was.  Increment the width
404         of dummy.
405         (TYPE_REDEFINED): Remove.
406
407 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
408
409         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
410         CLASSTYPE_TEMPLATE_LEVEL): Remove.
411
412 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
413
414         * decl2.c (determine_visibility): Don't use export_class_data.
415         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
416         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY. 
417
418 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
419
420         * cp-tree.h (cxx_alignof): Remove.
421
422         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
423
424         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
425         CONV_STATIC_CAST): Remove.
426
427         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
428
429         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
430
431         * cp-tree.h (cp_deprecated): Remove.
432
433 2005-04-08  Ian Lance Taylor  <ian@airs.com>
434
435         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
436         CONTINUE_STMT, SWITCH_STMT.
437         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
438         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
439         (WHILE_COND, WHILE_BODY): Define.
440         (DO_COND, DO_BODY): Define.
441         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
442         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
443         * cp-gimplify.c (enum bc_t): Define.
444         (struct cp_gimplify_ctx, ctxp): Define.
445         (push_context, pop_context): New static functions.
446         (begin_bc_block, finish_bc_block): New static functions.
447         (build_bc_goto): New static function.
448         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
449         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
450         (gimplify_switch_stmt): Likewise.
451         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
452         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
453         (cp_genericize): Call push_context and pop_context.
454         * semantics.c (finish_break_stmt): Just call build_stmt
455         (BREAK_STMT) rather than build_break_stmt.
456         (finish_continue_stmt): Corresponding change.
457         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
458         parameters.
459         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
460         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
461         * dump.c (cp_dump_tree): Likewise.
462
463 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
464
465         PR c++/20905
466         * parser.c (cp_parser_type_specifier_seq): Add is_condition
467         parameter.
468         (cp_parser_new_type_id): Pass it.
469         (cp_parser_condition): Likewise.
470         (cp_parser_conversion_type_id): Likewise.
471         (cp_parser_type_id): Likewise.
472         (cp_parser_type_specifier_seq): In a condition, do not allow
473         invalid type-specifier combinations.
474         (cp_parser_exception_declaration): Adjust call to
475         cp_parser_type_specifier_seq. 
476
477         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
478         * cp-tree.h (struct tinst_level): Add in_system_header_p.
479         (TINST_IN_SYSTEM_HEADER_P): New macro.
480         (make_tinst_level): Remove.
481         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
482         the instantiated class.
483         (push_tinst_level): Do not use make_tinst_level.  Set
484         TINST_IN_SYSTEM_HEADER_P.
485         (pop_tinst_level): Likewise.
486         (instantiate_class_template): Set in_system_header.
487         (instantiate_pending_templates): Likewise.
488         * tree.c (make_tinst_level): Remove.
489
490 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
491
492         * decl.c (start_decl): Apply pending #pragma weak regardless of
493         scope.
494
495 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
496
497         PR c++/20212
498         * pt.c (regenerate_decl_from_template): Copy attributes for
499         parameters from the pattern to the instantiation.
500
501 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
502
503         PR c++/20734
504         * cp-tree.def (OFFSET_REF): Correct comments.
505         * init.c (build_offset_ref): Remove misleading comment.
506         * typeck.c (build_unary_op): Handle pointer-to-member creation
507         here, rather than ...
508         (unary_complex_lvalue): ... here.
509
510 2005-04-06  Jason Merrill  <jason@redhat.com>
511
512         PR c++/19312
513         * tree.c (stabilize_init): Don't bother trying to stabilize
514         something with no side-effects.
515
516 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
517
518         PR c++/20763
519         * decl.c (grokdeclarator): Correct attribute handling.
520
521 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
522
523         PR c++/19159
524         * decl2.c (import_export_decl): Use non-COMDAT external linkage
525         for virtual tables, typeinfo, etc. that will be emitted in only
526         one translation unit on systems without weak symbols.
527
528 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
529
530         PR c++/20679
531         * parser.c (cp_parser_template_name): Fix thinko.
532
533 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
534
535         PR c++/20746
536         * method.c (use_thunk): Protect covariant pointer return
537         adjustments from NULL pointers.
538
539 2005-04-04  Jan Hubicka  <jh@suse.cz>
540
541         * decl2.c (finish_objects): Revert my previous patch.
542         (cp_finish_file): Likewise.
543
544 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
545
546         * pt.c: Fix comment typos.
547
548 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
549
550         PR c++/20723
551         * pt.c (more_specialized_fn): Member functions are unordered wrt
552         non-members.  Conversion operators are unordered wrt other
553         functions.
554
555 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
556
557         * call.c (add_template_candidates_real): Remove length parameter
558         from fn_type_unification call.
559         * class.c (resolve_address_of_overloaded_function): Likewise
560         * cp-tree.h (fn_type_unification): Remove length parameter.
561         * pt.c (get_bindings_overload): Remove.
562         (get_bindings_real): Rename to ...
563         (get_bindings): ... here.  Remove length and strict
564         parameters. Change return type flag to boolean.  Remove original
565         forwarding function.
566         (determine_specialization): Adjust get_bindings call.
567         (fn_type_unification): Remove length parameter.  Adjust.
568         (type_unification_real): Remove length parameter.  Adjust.
569         (resolve_overloaded_unification): Adjust get_bindings call.
570         (try_one_overload): Simplify confusing cascaded if control flow.
571         (unify): Remove length paramter from type_unification_real call.
572         (most_specialized_instantiation): Adjust get_bindings calls.
573         (most_specialized): Likewise.
574
575 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
576
577         PR c++/19203, implement DR 214
578         * call.c (joust): Use more_specialized_fn.
579         * cp-tree.h (DEDUCE_ORDER): Remove.
580         (more_specialized): Replace with ...
581         (more_specialized_fn): ... this.
582         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
583         case.
584         (type_unification_real): Remove DEDUCE_ORDER case.
585         (more_specialized): Replace with ...
586         (more_specialized_fn): ... this.  Implement DR 214.
587         (most_specialized_instantiation): Use get_bindings_real directly.
588
589 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
590
591         PR c++/18644
592         * call.c (build_new_op): Remove check for -Wsynth.
593
594 2005-03-31  Jan Hubicka  <jh@suse.cz>
595
596         * decl2.c (finish_objects): Mark ctor as needed.
597         (cp_finish_file): Output variables only in nonunit-at-a-time.
598
599 2005-03-29  Richard Henderson  <rth@redhat.com>
600
601         PR c/20519
602         * decl.c (cp_complete_array_type): Rename from complete_array_type.
603         Use the new complete_array_type in c-common.c.  Update all callers.
604         * cp-tree.h (cp_complete_array_type): Update to match.
605
606 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
607
608         * typeck.c (build_static_cast_1): Allow scalar_cast between
609         any integral, floating, or enumeration type.
610
611 2005-03-24  Steven Bosscher  <stevenb@suse.de>
612
613         * typeck.c (comptypes): First determine if the types are compatible
614         from a target-independent point of view.  Check target attributes
615         last.
616
617         * class.c (build_base_path):
618         (build_vbase_offset_vtbl_entries):
619         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
620         * error.c (dump_expr): Likewise.
621         * init.c (build_zero_init, expand_cleanup_for_base,
622         build_vec_delete_1): Likewise.
623         * mangle.c (write_integer_cst): Likewise.
624         * method.c (thunk_adjust): Likewise.
625         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
626         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
627         * typeck.c (build_ptrmemfunc_access_expr,
628         (get_member_function_from_ptrfunc): Likewise.
629
630 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
631
632         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
633
634 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
635
636         * cp-tree.h (perform_integral_promotions): Remove.
637         (default_conversion): Add.
638
639 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
640
641         * parser.c (cp_parser_warn_min_max): New function.
642         (cp_parser_binary_expression): Use it.
643         (cp_parser_assignment_operator_opt): Likewise.
644         (cp_parser_operator): Likewise.
645
646 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
647
648         PR c++/19980
649         * decl.c (start_preparsed_function): Robustify.
650
651 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
652
653         PR c++/20499
654         * parser.c (cp_parser_class_head): Return NULL_TREE when
655         encountering a redefinition.
656
657 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
658
659         PR c++/20465
660         PR c++/20381
661         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
662         template.
663
664 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
665
666         PR c++/20461
667         PR c++/20536
668         * init.c (emit_mem_initializers): Don't crash on undefined
669         types.
670
671 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
672
673         PR c++/20147
674         * semantics.c (finish_stmt_expr_expr): Return immediately
675         if error_operand_p (expr).
676
677 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
678
679         * cp-tree.h (lvalue_or_else, lvalue_p): New.
680         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
681
682 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
683
684         PR c++/20240
685         * decl.c (decls_match): Compare context of VAR_DECL.
686
687 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
688
689         PR c++/20333
690         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
691         Check the return value of cp_parser_nested_name_specifier.
692
693 2005-03-18  Dale Johannesen <dalej@apple.com>
694
695         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
696
697 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
698
699         PR c++/20463
700         * parser.c (cp_parser_diagnose_invalid_type_name):
701         Check TYPE_BINFO (current_class_type) before attempting
702         to emit inform messages.
703
704 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
705
706         PR c++/19966
707         * cp-tree.h (grok_op_properties): Change return type to void.
708         * decl.c (grok_op_properties): Return early - don't check the
709         arity - in case of a static member or an operator that cannot
710         be non-member; tidy a bit.
711
712 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
713
714         PR c++/20186
715         * pt.c (contains_dependent_cast_p): Remove.
716         (fold_non_dependent_expr): Don't use it.
717         (value_dependent_expression_p): Use a switch statement.
718         reference_exprs can be dependent.
719
720 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
721
722         PR c++/4403
723         PR c++/9783, DR433
724         * name-lookup.c (pushtag): Skip template parameter scope when
725         scope is ts_global.  Don't push tag into template parameter
726         scope.
727         * pt.c (instantiate_class_template): Reorder friend class
728         template substitution to handle non-dependent friend class
729         that hasn't been previously declared.
730
731 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
732
733         Friend class name lookup 5/n
734         PR c++/1016
735         * cp-tree.h (pushtag): Adjust declaration.
736         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
737         lookup_name fails.
738         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
739         (start_enum): Adjust call to pushtag.
740         * name-lookup.c (ambiguous_decl): Ignore hidden names.
741         (qualify_lookup): Change return type to bool.
742         (hidden_name_p): New function.
743         (lookup_namespace_name, unqualified_namespace_lookup,
744         lookup_name_real): Use it.
745         (lookup_type_scope): Update comments.
746         (maybe_process_template_type_declaration): Change parameter name
747         from globalize to is_friend.
748         (pushtag): Change globalize parameter of type int to tag_scope.
749         Hide name if introduced by friend declaration.
750         * name-lookup.h (hidden_name_p): Add declaration.
751         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
752         here.
753         * pt.c (push_template_decl_real): Make hidden class template
754         visible.
755         (lookup_template_class, instantiate_class_template): Adjust call
756         to pushtag.
757         * semantics.c (begin_class_definition): Likewise.
758         * rtti.c (init_rtti_processing, build_dynamic_cast_1, 
759         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
760         ts_global.
761
762 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
763
764         PR c++/20157
765         * pt.c (determine_specialization): Reject non-specializations. 
766
767 2005-03-11  Per Bothner  <per@bothner.com>
768
769         * cp-tree.h (struct cp_declarator): New id_loc field.
770         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
771         location using c_lex_with_flags, instead of input_location.
772         (cp_parser_direct_declarator): Set declarator's id_loc from
773         cp_token's id_loc.
774
775 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
776
777         PR c++/18384, c++/18327
778         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
779         and index.  Convert max_index to size_type_node if it isn't
780         host_integerp (, 1).
781
782 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
783
784         PR c++/20208
785         * pt.c (tsubst_decl): Apply array-to-pointer and
786         function-to-pointer conversions to function arguments.
787         (regenerate_decl_from_template): Likewise.
788
789 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
790
791         PR c++/16859    
792         * decl.c (complete_array_type): In pedantic mode, return
793         3 for an empty initializer list as the initializer for an
794         array of unknown bound (8.5.1/4).
795         (maybe_deduce_size_from_array_init): Fix final test to use
796         the above.
797
798 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
799
800         PR c++/20186
801         * pt.c (contains_dependent_cast_p): New.
802         (fold_non_dependent_expr): Call it.
803
804 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
805
806         PR c++/20142
807         * cp-tree.h (target_type): Remove.
808         * decl.c (layout_var_decl): Remove #if 0'd code.
809         (cp_finish_decl): Remove dead code.
810         * init.c (build_vec_init): When determining whether or not the
811         element type has an asignment operator, look through all array
812         dimensions. 
813         * typeck.c (target_type): Remove.
814
815 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
816
817         * class.c (finish_struct_1): Do not warn about non-virtual
818         destructors in Java classes.
819
820 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
821
822         PR c++/19311
823         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
824         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
825         for OFFSET_TYPE.
826         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
827         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
828         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
829         template.
830
831 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
832
833         * name-lookup.c (push_overloaded_decl): Don't error if the new
834         decl matches the old one.
835         * decl.c (redeclaration_error_message): Likewise.
836
837 2005-03-01  Per Bothner  <per@bothner.com>
838
839         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
840         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
841
842 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
843
844         PR c++/20232
845         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
846         covariancy. 
847
848         * cp-tree.g (THUNK_TARGET): Expand comment.
849         * method.c (use_thunk): Make sure we also use the target, if that
850         is a thunk.
851
852 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
853
854         PR c++/20206
855         * decl.c (cxx_comdat_group): Put thunks for
856         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
857         comdat group as the thunk target.
858
859 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
860
861         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
862         parser.c: Fix comment typo(s).
863
864 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
865
866         PR c++/20175
867         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
868         initializes a char/wchar_t array.
869
870 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
871
872         PR c++/19878
873         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
874         with internal linkage.
875
876 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
877
878         * decl.c (grokvardecl): Don't exempt anonymous types from having
879         linkage for variables that have linkage other than "C".
880
881 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
882
883         * cp-objcp-common.h, error.c: Update copyright.
884
885 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
886
887         PR c++/20073
888         * decl.c (start_decl_1): Don't clear TREE_READONLY.
889         (cp_finish_decl): Likewise.
890         (complete_vars): Call cp_apply_type_quals_to_decl.
891         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
892         cases where that's not valid.
893
894         PR c++/19991
895         * init.c (integral_constant_value): Iterate if the value of a decl
896         is itself a constant.
897
898         PR c++/20152
899         * parser.c (cp_parser_class_head): Check for redefintions here.
900         * semantics.c (begin_class_definition): Not here.
901         
902         PR c++/20153
903         * decl2.c (build_anon_union_vars): Add type parameter.
904         (finish_anon_union): Pass it.
905
906         PR c++/20148
907         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
908         Handle STATEMENT_LIST.
909
910         PR c++/19883
911         * parser.c (cp_parser_direct_declarator): Always complain about
912         non-constant array bounds when in a function scope.
913         * semantics.c (finish_id_expression): Do not mark dependent names
914         as non-constant. 
915
916 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
917         
918         PR c++/19076
919         PR c++/6628
920         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
921         * decl.c (grokdeclarator): Pedwarn about qualifying a function
922         type. 
923         Add qualifiers when declaring a typedef of a function type.
924         Member function pointers pick up the qualifiers of the typedef
925         used to declare them.
926         Don't complain about creating cv-qualified function types.
927         Complain about qualified function typedefs that are used to
928         declare non-static member functions or free functions.
929         Use cp_apply_type_quals_to_decl.
930         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
931         (grokclassfn): Use cp_apply_type_quals_to_decl.
932         * error.c (dump_type_suffix): Print qualifiers for function
933         types. 
934         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
935         (tsubst): When substituting a function type into a member
936         pointer type, pass along the qualifiers.
937         (unify): Unify member pointers to member function pointers.
938         * tree.c (cp_build_qualified_type_real): Function types may be
939         qualified. This includes restrict qualifiers.
940         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
941         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
942         added to function types.
943
944 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
945
946         PR 18785
947         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
948         c_common_to_target_charset.  Delete bogus comment.
949
950 2005-02-18  Richard Henderson  <rth@redhat.com>
951
952         PR libstdc++/10606
953         * except.c (do_get_exception_ptr): New.
954         (expand_start_catch_block): Use it.
955
956 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
957
958         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
959         if type is not error_mark_node.
960
961 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
962
963         PR c++/19508
964         * decl2.c (grokfield): Do not apply attributes to template parameters
965         as they are ignored by tsubst anyway.
966
967 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
968
969         PR c++/19813
970         * decl.c (start_decl_1): Clear TREE_READONLY flag if
971         its type has TYPE_NEEDS_CONSTRUCTING.
972         (complete_vars): Likewise.
973
974 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
975
976         PR c++/20028
977         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
978         template along with TYPE_SIZE.
979
980         PR c++/20022
981         * semantics.c (perform_deferred_access_checks): Use
982         get_deferred_access_checks to get the top of the stack.
983
984 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
985
986         PR c++/17788
987         * class.c (add_implicitly_declared_members, check_field_decl)
988         (check_field_decls, check_bases): Remove arguments, tests and
989         assignments of cant_have_default_ctor-related variables.
990
991 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
992
993         * decl2.c (mark_used): Set the source location of the used decl to
994         the current input location here...
995         * method.c (synthesize_method): ... not here.  Set input_location
996         from the decl instead.
997
998 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
999
1000         PR c++/19608
1001         * parser.c (cp_parser_late_parsing_for_member): Use
1002         current_function_decl as scope to push to and from.
1003
1004         PR c++/19884
1005         * pt.c (check_explicit_specialization): Make sure namespace
1006         binding lookup found an overloaded function.
1007         (lookup_template_function): Just assert FNS is an overloaded
1008         function.
1009
1010         PR c++/19895
1011         * decl.c (grokdeclarator): Check for error mark node in ptrmem
1012         construction.
1013
1014 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
1015
1016         PR c++/17816
1017         * decl.c (redeclaration_error_message): Report redefinition of
1018         pure virtual function.
1019
1020 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1021
1022         PR c++/19891
1023         * class.c (build_simple_base_path): Build the component_ref
1024         directly.
1025         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1026         rather than using lookup_base.
1027         * search.c (dfs_walk_once): Add non-recursive assert check.
1028         * typeck.c (build_class_member_access_expr): It is possible for
1029         the member type to be both const and volatile.
1030
1031 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1032
1033         PR c++/14479
1034         PR c++/19487
1035         * pt.c (maybe_check_template_type): Remove.
1036         * cp-tree.h (maybe_check_template_type): Remove prototype.
1037         * name-lookup.c (maybe_process_template_type_declaration): Don't
1038         use maybe_check_template_type.
1039
1040 2005-02-11  Richard Henderson  <rth@redhat.com>
1041
1042         PR c++/19632
1043         * pt.c (get_mostly_instantiated_function_type): Save and restore
1044         flag_access_control instead of push/pop_access_scope.
1045
1046 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
1047
1048         PR c++/19755
1049         * decl.c (reshape_init): Issue warnings about missing braces.
1050
1051 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
1052
1053         * cp-tree.def, except.c, ptree.c: Update copyright.
1054
1055 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
1056
1057         PR c++/19811
1058         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1059         attempting name lookup.
1060
1061         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1062
1063         PR c++/19787
1064         * call.c (initialize_reference): Robustify.
1065
1066         PR ++/19732
1067         * decl.c (grokdeclarator): Check for invalid use of destructor
1068         names.
1069
1070         PR c++/19762
1071         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1072         names with invalid types.
1073
1074         PR c++/19826
1075         * parser.c (cp_parser_direct_declarator): Allow type-dependent
1076         expressions as array bounds.
1077
1078         PR c++/19739
1079         * parser.c (cp_parser_attributes_list): Allow empty lists.
1080
1081 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
1082
1083         PR c++/19733
1084         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1085         (check_bases): Give warnings about a base class with a
1086         non-virtual destructor, even if it is implicit.
1087         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1088         (maybe_warn_about_overly_private_class): Don't use
1089         TYPE_HAS_DESTRUCTOR.
1090         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1091         (check_for_override): Give it external linkage.
1092         (add_implicitly_declared_members): Generate destructors lazily.
1093         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1094         TYPE_HAS_DESTRUCTOR.
1095         (check_bases_and_members): Call check_methods before
1096         check_field_decls.
1097         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1098         TYPE_HAS_DESTRUCTOR.
1099         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1100         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1101         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1102         (lang_type_class): Add lazy_destructor.
1103         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1104         (CLASSTYPE_DESTRUCTORS): Robustify.
1105         (TYPE_HAS_DESTRUCTOR): Remove.
1106         (check_for_override): Declare.
1107         (build_vbase_delete): Remove.
1108         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1109         expressions.
1110         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1111         * except.c (dtor_nothrow): Lazily create destructors if necessary.
1112         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1113         * init.c (build_delete): Lazily create destructors, if necessary.
1114         (build_vbase_delete): Remove.
1115         * method.c (locate_dtor): Simplify.
1116         (implicitly_declare_fn): Add support for destructors.
1117         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1118         necessary.
1119         * pt.c (check_explicit_specialization): Don't use
1120         TYPE_HAS_DESTRUCTOR.
1121         (instantiate_class_template): Likewise.
1122         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1123         * rtti.c (emit_support_tinfos): Robustify.
1124         * search.c (lookup_fnfields_1): Lazily create destructors.
1125         * typeck.c (build_class_member_access_expr): Remove
1126         PSEUDO_DTOR_EXPR handling.
1127         (lookup_destructor): Likewise.
1128
1129 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
1130
1131         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1132         copyright.
1133
1134 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
1135
1136         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1137         on boolean variables.
1138         (cp_lexer_stop_debugging): Likewise.
1139
1140 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1141
1142         PR c++/17401
1143         * parser.c (cp_parser_pure_specifier): Emit a specific error
1144         message with an invalid pure specifier.
1145         * decl2.c (grok_function_init): Remove.
1146         (grokfield): An initializer for a method is a always a pure
1147         specifier.
1148
1149 2005-02-02  Matt Austern  <austern@apple.com>
1150
1151         PR c++/19628
1152         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1153         * parser.c (cp_parser_postfix_expression): Accept function call in
1154         constant expression if builtin_valid_in_constant_expr_p is true
1155         for that function.
1156         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1157         * semantics.c (finish_id_expression): Accept function call in constant
1158         expression if builtin_valid_in_constant_expr_p is true for that
1159         function.
1160         * tree.c (builtin_valid_in_constant_expr_p): New.
1161
1162 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1163
1164         PR c++/17413
1165         * pt.c (check_instantiated_args): Improve error message.
1166         Fix logic when to print its second part.
1167
1168 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1169
1170         * cp-tree.h (complete_type_or_else): Remove macro.
1171         (complete_type_or_diagnostic): Rename to complete_type_or_else
1172         and remove last argument.
1173         * typeck.c (complete_type_or_diagnostic): Rename to
1174         complete_type_or_else and remove last argument.
1175
1176 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1177
1178         * cp-tree.h (commonparms): Remove prototype.
1179         (convert_arguments): Likewise.
1180         (PFN_FROM_PTRMEMFUNC): Remove.
1181         * typeck.c (commonparms): Make static.
1182         (convert_arguments): Add prototype. Make static.
1183         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1184
1185 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1186
1187         * parser.c (cp_parser_primary_expression): Don't complain about
1188         floating-point literals in integral constant expressions when
1189         !pedantic.
1190
1191 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
1192
1193         * parser.c (cp_parser_template_id): Revert comment patch too.
1194
1195         PR c++/18757
1196         PR c++/19366
1197         PR c++/19499
1198         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1199         Issue an error when creating the template id.
1200         * pt.c (fn_type_unification): Return early if the explicit
1201         template arg list is an error_mark_node.
1202
1203 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1204
1205         * decl.c (build_enumerator): Do not issue duplicate error messages
1206         about invalid enumeration constants.
1207         * parser.c (cp_parser_non_integral_constant_expression): Always
1208         set parser->non_integral_constant_expression_p.
1209         (cp_parser_primary_expression): Add cast_p parameter.  Issue
1210         errors about invalid uses of floating-point literals in
1211         cast-expressions.
1212         (cp_parser_postfix_expression): Add cast_p parameter.
1213         (cp_parser_open_square_expression): Pass it.
1214         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1215         (cp_parser_unary_expression): Likewise.
1216         (cp_parser_new_placement): Pass it.
1217         (cp_parser_direct_new_declarator): Likewise.
1218         (cp_parser_new_initializer): Likewise.
1219         (cp_parser_cast_expression): Add cast_p parameter.
1220         (cp_parser_binary_expression): Likewise.
1221         (cp_parser_question_colon_clause): Likewise.
1222         (cp_parser_assignment_expression): Likewise.
1223         (cp_parser_expression): Likewise.
1224         (cp_parser_constant_expression): If an integral constant
1225         expression is invalid, return error_mark_node.
1226         (cp_parser_expression_statement): Pass cast_p.
1227         (cp_parser_condition): Likewise.
1228         (cp_parser_iteration_statement): Likewise.
1229         (cp_parser_jump_statement): Likewise.
1230         (cp_parser_mem_initializer): Likewise.
1231         (cp_parser_template_argument): Likewise.
1232         (cp_parser_parameter_declaration): Likewise.
1233         (cp_parser_initializer): Likewise.
1234         (cp_parser_throw_expression): Likewise.
1235         (cp_parser_attribute_list): Likewise.
1236         (cp_parser_simple_cast_expression): Likewise.
1237         (cp_parser_functional_cast): Likewise.
1238         (cp_parser_late_parsing_default_args): Likewise.
1239         (cp_parser_sizeof_operand): Save/restore
1240         non_integral_constant_expression_p.
1241
1242 2005-01-31  Mike Stump  <mrs@apple.com>
1243
1244         * parser.c (cp_lexer_new_main): Get the first token, first, before
1245         doing anything.
1246
1247 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1248
1249         * decl.c (start_decl): Add missing parentheses.
1250
1251 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
1252
1253         PR c++/19555
1254         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1255         * decl.c (duplicate_decls): Do not discard
1256         DECL_IMPLICIT_INSTANTIATION when merging declarations.
1257         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1258         variables that do not have DECL_USE_TEMPLATE.
1259
1260         PR c++/19395
1261         * decl.c (grokdeclarator): Refactor code so that qualified names
1262         are never allowed as the declarator in a typedef.
1263
1264         PR c++/19367
1265         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1266         builtin declarations.
1267
1268         PR c++/19457
1269         * call.c (convert_like_real): Inline call to
1270         dubious_conversion_warnings here.
1271         * cp-tree.h (dubious_conversion_warnings): Remove.
1272         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1273         setting TREE_NEGATED_INT.
1274         * typeck.c (dubious_conversion_warnings): Remove.
1275
1276         PR c++/19349
1277         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1278         memory.
1279
1280 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
1281
1282         PR c++/19253
1283         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1284         tentative parses.
1285
1286         PR c++/19667
1287         * pt.c (redeclare_class_template): Robustify.
1288
1289 2005-01-27  Steven Bosscher  <stevenb@suse.de>
1290
1291         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1292         instead of SWITCH_EXPR ones.
1293         * pt.c (tsubst_expr): Likewise.
1294         * semantics.c (begin_switch_stmt, finish_switch_cond,
1295         finish_switch_stmt): Likewise.
1296
1297 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
1298
1299         PR c++/18370
1300         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1301
1302 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
1303
1304         * class.c (abort_fndecl_addr): New variable.
1305         (build_vtbl_initializer): If we have a pure virtual function
1306         share the abort function's address.
1307         Include gt-cp-class.h at the end.
1308         * config-lang.in (gtfiles): Add cp/class.c.
1309
1310 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1311
1312         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1313         (pp_cxx_function_definition): Make static.
1314         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1315         (pp_cxx_function_definition): Likewise.
1316
1317 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1318
1319         * name-lookup.c (print_binding_level): Make static.
1320         (constructor_name_full): Make static inline.
1321         (current_decl_namespace): Make static.
1322         * name-lookup.h (constructor_name_full): Remove prototype.
1323         (print_binding_level): Likewise.
1324         (current_decl_namespace): Likewise.
1325
1326 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1327
1328         * decl.h (debug_bindings_indentation): Remove.
1329
1330 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
1331
1332         * typeck.c: Fix a comment typo.
1333
1334 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1335
1336         PR c++/19208
1337         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1338         at least once.
1339         (tsubst): Use fold_decl_constant_value in place of a bare call to
1340         integral_constant_value.
1341
1342 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
1343
1344         * typeck.c (more_qualified_p): Remove.
1345         * cp-tree.h: Remove the corresponding prototype.
1346
1347 2005-01-19  Matt Austern  <austern@apple.com>
1348
1349         * typeck.c (comptypes): Handle return code from objc_comptypes
1350         correctly.
1351
1352 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
1353
1354         * cp-tree.h, name-lookup.h: Remove unused prototypes.
1355
1356 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1357
1358         PR c++/19375
1359         * semantics.c (finish_id_expression): Disable access checking for
1360         already lookuped FIELD_DECL.
1361
1362 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1363
1364         * decl.c (delete_block): Remove.
1365         * cp-tree.h: Remove the corresponding prototype.
1366
1367         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1368         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1369         Remove.
1370         * cp-tree.h: Remove the corresponding prototypes.
1371
1372         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1373         cp_update_decl_after_saving, name_p): Remove.
1374         * cp-tree.h: Remove the corresponding prototypes.
1375
1376 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
1377
1378         PR c/19472
1379         * semantics.c (finish_asm_stmt): Strip nops off
1380         input memory operands.
1381
1382 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1383
1384         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1385         typeck2.c: Update copyright.
1386
1387 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
1388
1389         * class.c (get_enclosing_class): Remove.
1390         * cp-tree.h: Remove the corresponding prototypes.
1391
1392         * cvt.c (convert_lvalue): Remove.
1393         * cp-tree.h: Remove the corresponding prototype.
1394
1395         * pt.c (tinst_for_decl): Remove.
1396         * cp-tree.h: Remove the corresponding prototypes.
1397
1398         * tree.c (hash_chainon): Remove.
1399         * cp-tree.h: Remove the corresponding prototypes.
1400
1401 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
1402
1403         PR c++/19263
1404         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1405         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1406
1407 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1408
1409         * Make-lang.in (cp-warn): Don't append $(WERROR).
1410
1411 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
1412
1413         * cp-tree.h: Fix a comment typo.
1414
1415 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
1416
1417         PR c++/19298
1418         * pt.c (tsubst_qualified_id): Call convert_from_reference.
1419
1420 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
1421
1422         PR c++/19244
1423         * class.c (add_implicitly_declared_members): Remove dead code.
1424         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
1425         DECL_CONSTRUCTOR_P.
1426         (grokdeclarator): Adjust calls to grokfndecl.
1427         * method.c (implicitly_declare_fn): Improve documentation.
1428         * parser.c (cp_parser_direct_declarator): Do not consider a
1429         function to be a constructor if the containing class was
1430         originally anonymous.
1431
1432 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1433
1434         PR c++/17154
1435         * search.c (lookup_field_1): Handle using declaration in
1436         class template partial specialization.
1437
1438 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1439
1440         PR c++/19258
1441         * pt.c (push_access_scope): Handle friend defined in class.
1442         (pop_access_scope): Likewise.
1443
1444 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1445
1446         PR c++/19270
1447         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1448         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1449         array-new handling code.  Use build_x_binary_op.
1450
1451 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
1452
1453         PR c++/19030
1454         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1455         * name-lookup.h (push_scope): Return pushed scope, not flag.
1456         * name-lookup.c (push_scope): Return scope that should be popped,
1457         not a flag.
1458         * decl.c (start_decl): Adjust.
1459         (grokfndecl): Adjust scope push and pop.
1460         * decl2.c (check_classfn): Likewise.
1461         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1462         cp_parser_init_declarator, cp_parser_direct_declarator,
1463         cp_parser_class_specifier, cp_parser_class_head,
1464         cp_parser_lookup_name,
1465         cp_parser_constructor_declarator_p): Likewise.
1466         * pt.c (instantiate_class_template,
1467         resolve_typename_type): Likewise.
1468
1469 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
1470
1471         PR c++/14136
1472         * parser.c (cp_parser_unqualified_id): Do not issue error message
1473         for typedef-name as destructor declarator when performing an
1474         uncommitted tentative parse.
1475
1476 2005-01-01  Steven Bosscher  <stevenb@suse.de>
1477
1478         PR middle-end/17544
1479         * decl.c (finish_function): Fix comment.  Annotate the compiler
1480         generated return with the current file name and line 0.
1481
1482 2004-12-31  Richard Henderson  <rth@redhat.com>
1483
1484         PR middle-end/17799
1485         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1486         * class.c (build_vtable): Don't conditionallize setting it
1487         based on DWARF2_DEBUG.
1488         (layout_class_type): Set DECL_IGNORED_P.
1489         * decl2.c (get_guard): Likewise.
1490         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1491         * tree.c (build_local_temp): Likewise.
1492
1493 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
1494
1495         * cp-tree.h (cp_declarator): Split "name" field into
1496         qualifying_scope and unqualified_name.
1497         * decl.c (get_scope_of_declarator): Adjust accordingly.
1498         (grokdeclarator): Likewise.
1499         * decl2.c (grokfield): Likewise, and adjust call to
1500         do_class_using_decl.
1501         * name-lookup.c (do_class_using_decl): Split "decl" into
1502         "scope" and "name".  Remove unnecessary code.
1503         * name-lookup.h (do_class_using_decl): Adjust declaration.
1504         * parser.c (make_id_declarator): Split "id" into qualifying_scope
1505         and unqualified_name.
1506         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1507         (cp_parser_direct_declarator): Adjust to handle the fact that
1508         cp_parser_declarator_id no longer returns a SCOPE_REF.
1509         (cp_parser_direct_declarator): Likewise.
1510         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1511         names.
1512         (cp_parser_member_declaration): Adjust call to make_id_declarator.
1513         (cp_parser_check_declarator_template_parameters): Do not expect a
1514         SCOPE_REF.
1515
1516         * decl.c (duplicate_decls): Call ggc_free on declarations we will
1517         not be needing any longer.
1518
1519         PR c++/19190
1520         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1521
1522 2004-12-28  Richard Henderson  <rth@redhat.com>
1523
1524         PR inline-asm/15740
1525         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
1526         constraints.  Mark memory inputs addressable.
1527
1528 2004-12-27  Jason Merrill  <jason@redhat.com>
1529
1530         * decl.c (expand_static_init): Don't use shortcut if
1531         targetm.relaxed_ordering.
1532
1533 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
1534
1535         PR c++/19149
1536         * decl.c (check_tag_decl): Robustify.
1537
1538 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
1539
1540         PR c++/17595
1541         * parser.c (cp_parser_error): Issue better messages about
1542         #pragma in locations where it is not permitted.
1543
1544         PR c++/17413
1545         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1546
1547         * cvt.c (convert_to_void): Fix typo in comment.
1548
1549 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
1550
1551         PR c++/18962
1552         * pt.c (check_explicit_specialization): Use the argument list from
1553         the definition in a template function specialization definition.
1554
1555 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1556
1557         PR c++/18733
1558         * pt.c (check_explicit_specialization): Use special logic to validate
1559         befriended specializations.
1560
1561 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
1562
1563         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1564
1565         PR c++/18464
1566         * call.c (build_this): In templates, do not bother with
1567         build_unary_op.
1568         * typeck.c (unary_complex_lvalue): In a template, always refuse
1569         simplifications.
1570
1571         PR c++/18492
1572         * cp-gimplify.c (cp_genericize): Relax assertion.
1573
1574         PR c++/11224
1575         * cvt.c (convert_to_void): Warn about unused values.
1576
1577         PR c++/18257
1578         * rtti.c (emit_support_tinfos): On systems without weak symbols,
1579         emit the runtime library type-info objects as non-COMDAT.
1580
1581 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
1582
1583         PR c++/18378
1584         * call.c (convert_like_real): Do not permit the use of a copy
1585         constructor to copy a packed field.
1586
1587         PR c++/19063
1588         * decl.c (grokdeclarator): Return error_mark_node, not
1589         void_type_node, to indicate errors.
1590         * parser.c (cp_parser_template_parameter_list): Robustify.
1591         (cp_parser_template_parameter): Likewise.
1592
1593         PR c++/19034
1594         * tree.c (cp_tree_equal): Handle OVERLOAD.
1595
1596 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1597
1598         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1599         * name-lookup.c (pushdecl_class_level): Likewise.
1600
1601 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1602
1603         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1604
1605 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
1606
1607         PR c++/18984
1608         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1609         check to see if contains the pointer.  Insert the statement before
1610         returning.
1611
1612 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
1613
1614         PR c++/14075
1615         * decl.c (check_initializer): Check string initializer of array is
1616         not parenthesized.
1617         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1618         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1619         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1620
1621         * cp-tree.def (TEMPLATE_TYPE_PARM,
1622         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1623         for better code efficiency.
1624         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1625         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1626         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1627         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1628         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1629         TYPE_PTROBV_P): Likewise.
1630
1631         PR c++/18975
1632         * method.c (do_build_copy_constructor): Refactor. Don't const
1633         qualify a mutable field.
1634         (do_build_assign_ref): Likewise.
1635
1636 2004-12-20  Matt Austern <austern@apple.com>
1637
1638         PR c++/19044
1639         * decl.c (make_rtl_for_nonlocal_decl): Use
1640         set_builtin_user_assembler_name.
1641
1642 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
1643
1644         * cp-tree.h (note_decl_for_pch): New function.
1645         * class.c (build_clone): Call note_decl_for_pch.
1646         * semantics.c (finish_member_declaration): Likewise.
1647         (note_decl_for_pch): New function.
1648
1649 2004-12-17  Steven Bosscher  <stevenb@suse.de>
1650
1651         * init.c (build_zero_init): max_index is the number of
1652         elements, minus 1.
1653
1654 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
1655
1656         PR c++/18721
1657         * class.c (add_method): Do not push conversion operators into a
1658         binding level.
1659
1660         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1661         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1662
1663 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
1664
1665         PR c++/18905
1666         * cp-tree.h (integral_constant_value): Declare.
1667         * call.c (null_ptr_cst_p): Use integral_constant_value, not
1668         decl_constant_value.
1669         (convert_like_real): Likewise.
1670         * class.c (check_bitfield_decl): Likewise.
1671         * cvt.c (ocp_convert): Likewise.
1672         (convert): Remove unnecessary decl_constant_value call.
1673         * decl.c (compute_array_index_type): Use integral_constant_value,
1674         not decl_constant_value.
1675         (build_enumerator): Likewise.
1676         * decl2.c (grokfield): Likewise.
1677         * init.c (decl_constant_value): Simplify.
1678         (integral_constant_value): New.
1679         * pt.c (fold_decl_constant_value): Use integral_constant_value,
1680         remove subsequent check.
1681         (tsubst): Use integral_constant_value, not decl_constant_value.
1682         (tsubst_copy, unify): Likewise.
1683         * typeck.c (decay_conversion): Likewise.
1684         (build_compound_expr): Remove unnecessary decl_constant_value
1685         calls.
1686         (build_static_cast_1, build_reinterpret_cast_1):
1687         (convert_for_assignment): Remove comment about not calling
1688         decl_constant_value.
1689
1690 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1691
1692         PR c++/18825
1693         * pt.c (instantiate_class_template): Set input_location for
1694         friend function.
1695         (tsubst_friend_function): Don't set input_location here.
1696         Make sure the context is complete if necessary.
1697
1698 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
1699
1700         PR c++/18981
1701         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1702         flag setting.
1703
1704 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1705
1706         PR c++/18738
1707         * decl.c (make_typename_type): Do not handle namespace-scoped
1708         names here.
1709         (tag_name): Handle typename_type.
1710         (check_elaborated_type_specifier): Handle typenames.
1711         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1712         comment.
1713         (cp_parser_elaborated_type_specifier): Use
1714         cp_parser_diagnose_invalid_type_name.
1715
1716 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
1717
1718         PR c++/18965
1719         * init.c (build_zero_init): If the max_index is 0, there is no
1720         need to create a RANGE_EXPR.
1721
1722 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
1723
1724         PR c++/18793
1725         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1726
1727 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
1728
1729         PR c++/18949
1730         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1731         REFERENCE_REF_P is dereferencing a reference type.
1732         * typeck.c (build_static_cast): Convert from reference even in a
1733         template.
1734         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1735
1736 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1737
1738         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1739         (cp_parser_name_lookup_error): Use it.
1740         (cp_parser_check_for_invalid_template_id): Likewise.
1741         (cp_parser_skip_to_closing_parenthesis): Likewise.
1742         (cp_parser_nested_name_specifier_opt): Likewise.
1743         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1744         (cp_parser_parameter_declaration_list): Likewise.
1745         (cp_parser_parameter_declaration): Likewise.
1746         (cp_parser_template_name): Let cp_parser_simulate_error perform
1747         the checking.
1748         (cp_parser_committed_to_tentative_parse): Remove.
1749
1750 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
1751
1752         PR c++/18968
1753         * class.c (build_base_path): Convert the zero constant to the correct
1754         type when comparing.
1755
1756 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
1757
1758         PR c++/18925
1759         * class.c (layout_class_type): Determine the visibility of static
1760         data members.
1761
1762 2004-12-12  Roger Sayle  <roger@eyesopen.com>
1763
1764         PR middle-end/12454
1765         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1766         condition is a constant and the unexecuted clause is empty.
1767
1768 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1769
1770         PR c++/18731
1771         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1772
1773 2004-12-09  Matt Austern  <austern@apple.com>
1774
1775         PR c++/18514
1776         * name-lookup.c (do_nonmember_using_decl): A real function
1777         declaration takes precedence over an anticipated declaration.
1778
1779 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1780
1781         * parser.c (cp_parser_member_declaration): Fix comment typo.
1782
1783 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
1784
1785         PR c++/18757
1786         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1787         if parsing failed.
1788
1789 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1790
1791         PR c++/18073
1792         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1793
1794 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1795
1796         PR c++/16681
1797         * init.c (build_zero_init): Build a RANGE_EXPR for an array
1798         initializer.
1799
1800 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
1801
1802         * typeck.c: Remove DOS line endings.
1803
1804 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1805
1806         PR c++/18100
1807         * decl.c (lookup_and_check_tag): Diagnose nested class with
1808         the same name as enclosing class.
1809
1810 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
1811
1812         PR c++/18803
1813         * cp-tree.h (REFERENCE_REF_P): New.
1814         (CPTI_TYPE_INFO_TYPE): Rename to ...
1815         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1816         (CPTI_TYPE_INFO_REF_TYPE): Remove.
1817         (type_info_type_node): Rename to ...
1818         (const_type_info_type_node): ... here.
1819         (type_info_ref_type): Remove.
1820         * call.c (build_user_type_conversion): Reformat.
1821         (resolve_args): Do not convert_from_reference.
1822         (build_object_call): Call convert_from_reference.
1823         (prep_operand): Do not convert_from_reference.
1824         (build_new_method_call): Likewise.
1825         * class.c (build_vfield_ref): Likewise.
1826         * cvt.c (convert_to_reference): Likewise.
1827         (convert_from_reference): Build INDIRECT_REF here, not with
1828         build_indirect_ref.
1829         (convert_force): Do not convert_from_reference.
1830         (build_expr_type_conversion): Likewise.
1831         * decl.c (grok_reference_init): Likewise.
1832         * decl2.c (delete_sanity): Likewise.
1833         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1834         * init.c (build_dtor_call): Do not convert_from_reference.
1835         * parser.c (cp_parser_template_argument): Unwrap indirected
1836         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1837         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1838         convert_from_reference, if indicated.
1839         <case CALL_EXPR>: Do not convert_from_reference.
1840         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1841         (tsubst_initializer_list): Do not convert_from_reference.
1842         * rtti.c (init_rtti_processing): Adjust node creation.
1843         (throw_bad_typeid): Use const_type_info_type_node.
1844         Do not convert_from_reference.
1845         (typeid_ok_p): Use const_type_info_type_node.
1846         (build_typeid, get_typeid): Always return type_info typed node.
1847         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1848         * semantics.c (finish_stmt_expr_expr): Do not
1849         convert_from_reference.
1850         (finish_id_expression): Convert_from_reference as appropriate.
1851         * typeck.c (decay_conversion): Do not convert_from_reference.
1852         (finish_class_member_access_expr): Likewise.
1853         (build_indirect_ref): Use POINTER_TYPE_P.
1854         (convert_arguments): Do not convert_from_reference.
1855         (build_modify_expr): Likewise.
1856         (convert_for_initialization): Likewise.
1857         * typeck2.c (build_x_arrow): Likewise.
1858
1859 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
1860
1861         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1862         field to 'objc_info'.
1863
1864 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
1865
1866         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1867
1868 2004-12-07  Roger Sayle  <roger@eyesopen.com>
1869
1870         * name-lookup.c (leave_scope): We only need to update
1871         class_binding_level when leaving a class scope.
1872
1873 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
1874
1875         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1876
1877 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1878
1879         PR c++/17011, c++/17971
1880         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1881         invalid field.
1882         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1883         error_mark_node after member substitution.
1884         * semantics.c (finish_id_expression): Call
1885         finish_non_static_data_member for non-dependent FIELD_DECL.
1886
1887 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1888
1889         PR c++/18782
1890         * decl.c (grokdeclarator): Make sure class in pointer to member is
1891         not a namespace.
1892
1893 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1894
1895         PR c++/18318
1896         * parser.c (cp_parser_new_type_id): Move array size expression
1897         checks from here ...
1898         * init.c (build_new): ... to here.
1899
1900 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
1901
1902         PR c++/18758
1903         * parser.c (cp_parser_class_head): Return NULL_TREE when
1904         push_template_decl fails.  Update comment.
1905
1906 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1907
1908         PR c++/15664, c++/18276
1909         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
1910         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
1911
1912 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1913
1914         PR c++/18123
1915         * parser.c (cp_parser_type_specifier): Catch template declaration
1916         of enum.
1917
1918 2004-12-01  Matt Austern  <austern@apple.com>
1919
1920         * name-lookup.c (namespace_binding): Omit alias check for global
1921         namespace.
1922
1923 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
1924
1925         PR c++/18729
1926         * parser.c (cp_parser_class_name): Check decl's type is not
1927         error_mark_node.
1928
1929         PR c++/17431
1930         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
1931         derived to base conversion when checking constructor
1932         accessibility.
1933         (implicit_conversion): Pass FLAGS to standard_conversion.
1934         (check_constructir_callable): Disallow conversion functions.
1935
1936 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
1937
1938         * parser.c: Fix comment typos.
1939
1940 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
1941
1942         PR c++/18368
1943         * parser.c (cp_parser_check_for_definition_in_return_type): Take
1944         the defined type as a parameter, and inform the user about the
1945         possibility of a missing semicolon.
1946         (cp_parser_explicit_instantiation): Adjust call to
1947         cp_parser_check_for_definition_in_return_type.
1948         (cp_parser_init_declarator): Likewise.
1949         (cp_parser_member_declaration): Likewise.
1950
1951         PR c++/18674
1952         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
1953         typename from comments.
1954         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
1955         (TYPENAME_IS_CLASS_P): Likewise.
1956         (make_typename_type): Change prototype.
1957         * decl.c (struct_typename_info): New type.
1958         (typename_compare): Expect the second argument to be a
1959         typename_info, not a tree.
1960         (build_typename_type): Add tag_type parameter.  Do not create a
1961         new type until necessary.
1962         (make_typename_type): Add tag_type parameter.
1963         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
1964         appropriate.
1965         * friend.c (make_friend_class): Adjust call to make_typename_type.
1966         * parser.c (cp_parser_make_typename_type): Likewise.
1967         (cp_parser_primary_expression): Adjust call to
1968         cp_parser_lookup_name.
1969         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
1970         (cp_parser_class_or_namespace_name): Likewise.
1971         (cp_parser_postfix_expression): Adjust calls to
1972         make_typename_type.
1973         (cp_parser_mem_initializer_id): Adjust calls to
1974         cp_parser_class_name.
1975         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
1976         (cp_parser_template_name): Likewise.
1977         (cp_parser_template_argument): Likewise.
1978         (cp_parser_type_name): Adjust call to cp_parser_class_name.
1979         (cp_parser_elaborated_type_specifier): Adjust calls to
1980         make_typename_type and cp_parser_lookup_name.
1981         (cp_parser_namespace_name): Likewise.
1982         (cp_parser_class_name): Replace type_p parameter with tag_type.
1983         Adjust calls to make_typename_type and cp_parser_lookup_name.
1984         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
1985         (cp_parser_base_specifier): Likewise.
1986         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
1987         Adjust calls to make_typename_type and lookup_qualified_name.
1988         (cp_parser_lookup_name_simple): Adjust call to
1989         cp_parser_lookup_name.
1990         (cp_parser_constructor_declarator_p): Adjust call to
1991         cp_parser_class_name.
1992         * pt.c (convert_template_argument): Adjust all to
1993         make_typename_type.
1994         (tsubst_decl): Do not pre-substitute the type of the declaration.
1995         (tsubst): Hand off declarations more quickly.  Adjust call to
1996         make_typename_type.
1997
1998         PR c++/18512
1999         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
2000
2001 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
2002
2003         PR c/7544
2004         * Make-lang.in (cp/decl2.o): Update dependencies.
2005         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
2006
2007 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2008
2009         PR c++/18652
2010         * name-lookup.c (pushtag): Change return type to tree.
2011         * cp-tree.h (pushtag): Adjust declaration.
2012         * decl.c (xref_tag, start_enum): Use return value of pushtag.
2013         * pt.c (push_template_decl_real): Return immediately if
2014         pushdecl_namespace_level returns error_mark_node.
2015
2016 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2017
2018         * pt.c: Fix a comment typo.
2019
2020 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2021
2022         Friend class name lookup 4/n
2023         * class.c (pushclass): Don't call cxx_remember_type_decls.
2024         * cp-tree.h (clear_anon_tags): Remove declaration.
2025         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2026         * name-lookup.c (binding_entry_free, binding_table_free): Comment
2027         out functions.
2028         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2029         binding_table_remove_anonymous_types, cxx_remember_type_decls,
2030         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2031         lookup_tag_reverse): Remove
2032         (begin_scope, leave_scope, kept_level_p, print_binding_level):
2033         Don't use type_decls field in cp_binding_level.
2034         (maybe_process_template_type_declaration, pushtag): Set
2035         CLASSTYPE_NESTED_UTDS directly.
2036         * name-lookup.h (binding_table_remove_anonymous_types,
2037         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2038         declaration.
2039         (cp_binding_level): Remove type_decls field.
2040
2041 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
2042
2043         * typeck.c: Fix a comment typo.
2044
2045 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
2046
2047         PR c++/18445
2048         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2049         unknown_type as non matching.  Tidy up.
2050         * pt.c (build_non_dependent_expr): Do not build a
2051         NON_DEPENDENT_EXPR for a VAR_DECL.
2052
2053         PR c++/18001
2054         * cp-tree.h (lvalue_or_else): Remove declaration.
2055         * tree.c (lvalue_or_else): Remove.
2056         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2057         (build_modify_expr): Likewise.
2058
2059         PR c++/18625
2060         * decl.c (duplicate_decls): Return error_mark_node on error, as
2061         specified.
2062
2063         PR c++/18466
2064         * decl.c (grokvardecl): Keep track of whether or not a there was
2065         explicit qualification.
2066         * name-lookup.c (set_decl_namespace): Complain about explicit
2067         qualification of a name within its own namespace.
2068
2069         PR c++/18545
2070         * typeck.c (check_return_expr): Robustify.
2071
2072 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2073
2074         Friend class name lookup 3/n, PR c++/3332
2075         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2076         (lookup_type_scope): Don't deal with name from user declaration
2077         specially.
2078         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2079         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2080         pop_inner_scope.
2081
2082 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2083
2084         Friend class name lookup 2/n, PR c++/14513, c++/15410
2085         * name-lookup.c (lookup_name_real): Simplify.
2086         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
2087         lookup.
2088         * name-lookup.h (tag_scope): New enum type.
2089         (lookup_type_scope): Adjust declaration.
2090         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2091         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2092         (start_enum): Likewise.  Add assertion test that NAME is
2093         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
2094         case of error.
2095         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2096         * parser.c (cp_parser_elaborated_type_specifier,
2097         cp_parser_class_head): Adjust call to xref_tag.
2098         * pt.c (lookup_template_class, instantiate_class_template):
2099         Likewise.
2100         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2101         tinfo_base_init, emit_support_tinfos): Likewise.
2102
2103 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2104
2105         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2106
2107 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
2108
2109         PR c++/17473
2110         * name-lookup.c (supplement_binding): Do not allow typedefs to be
2111         redefined in class scope.
2112
2113         PR c++/18285
2114         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2115         redefinitions of builtin types other that "bool" or "wchar_t".
2116
2117 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2118
2119         * decl.c (cxx_init_decl_processing): Don't clear
2120         flag_inline_functions.
2121
2122 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
2123
2124         * pt.c (tsubst_function_type): Do not permit function types which
2125         return arrays or functions.
2126
2127         PR c++/18586
2128         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2129
2130         PR c++/18530
2131         * cp-tree.h (CTOR_NAME): Remove.
2132         (DTOR_NAME): Remove.
2133         * decl.c (initialize_predefined_identifiers): Add spaces to the
2134         end of constructor and destructor names.
2135
2136 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2137
2138         PR c++/8929
2139         * decl.c (start_decl): Check for invalid specialization headers.
2140
2141 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
2142
2143         PR c++/16882
2144
2145         * call.c (standard_conversion): Move check for conversions between
2146         vector pointers...
2147         * typeck.c (ptr_reasonably_similar): ... here.
2148
2149 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2150
2151         * cp-tree.h (context_as_string): Remove extern.
2152         * error.c (context_as_string): Remove.
2153
2154         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2155         * lex.c (cp_type_qual_from_rid): Remove.
2156
2157         * cp-tree.h (do_poplevel): Remove extern.
2158         (check_multiple_declarators): Likewise.
2159         * semantics.c (do_poplevel): Make static.
2160         (check_multiple_declarators): Remove.
2161
2162         * cp-tree.h (check_final_overrider): Remove extern.
2163         * search.c (check_final_overrider): Make static.
2164
2165         * cp-tree.h (build_artificial_parm): Remove extern.
2166         * decl2.c (build_artificial_parm): Make static.
2167
2168 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2169
2170         PR c++/18354
2171         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2172         Make sure the result is always a rvalue.
2173
2174 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2175
2176         * decl.c (start_preparsed_function): Call check_function_type even
2177         in templates.
2178         (require_complete_types_for_parms): Skip dependent types.
2179         (check_function_type): Likewise.
2180
2181 2004-11-16  Steven Bosscher  <stevenb@suse.de>
2182
2183         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2184         * search.c: Don't include it.
2185
2186 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
2187
2188         * cp-gimplify.c: Include pointer-set.h
2189         (cp_genericize_r): Use pointer_sets instead of a hashtable.
2190         Also instert the new statement for CLEANUP_STMT.
2191         (cp_genericize): Use pointer_sets instead of a hashtable.
2192         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2193
2194 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2195
2196         Friend class name lookup 1/n, PR c++/18471
2197         * decl.c (lookup_and_check_tag): New function.
2198         (xref_tag, start_enum): Use it.
2199         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2200         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
2201         location.
2202         * name-lookup.c (lookup_name_current_level): Rename to ...
2203         (lookup_name_innermost_nonclass_level): ... this.
2204         (lookup_type_scope): New function.
2205         * name-lookup.h (lookup_name_current_level): Rename to ...
2206         (lookup_name_innermost_nonclass_level): ... this.
2207         (lookup_type_scope): Add declaration.
2208
2209 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2210
2211         PR c++/17344
2212         * pt.c (coerce_template_parms): Only emit error message about
2213         invalid template argument when TF_ERROR.
2214
2215 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
2216
2217         PR c++/18389
2218         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
2219         error_mark_node to indicate errors.
2220
2221         PR c++/18429
2222         * parser.c (cp_parser_direct_declarator): Disallow non-constant
2223         array bounds when not inside a function.
2224
2225         PR c++/18436
2226         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2227         unqualified name resolves to a member function.
2228
2229         PR c++/18407
2230         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2231         derived class correctly.
2232
2233         * decl2.c (import_export_decl): Fix typo in comment.
2234         * tree.c (pod_type_p): Likewise.
2235
2236 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
2237
2238         * typeck.c (cxx_mark_addressable): Add braces around the first if.
2239
2240 2004-11-10  Adam Nemet  <anemet@lnxw.com>
2241
2242         PR middle-end/18160
2243         * typeck.c (cxx_mark_addressable): Issue an error if address of an
2244         explicit register variable is requested.
2245
2246 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
2247
2248         PR c++/18143
2249         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2250         (struct lang_decl_flags): Add thunk_p flag.
2251         (struct lang_decl): Remove separate fixed_offset. Place
2252         cloned_function and fixed_offset into union.
2253         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2254         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2255         (THUNK_FIXED_OFFSET): Adjust.
2256         * method.c (make_thunk): Adjust.
2257
2258 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
2259
2260         PR c++/18369
2261         * init.c (build_new_1): Handle parenthesized type-ids that name an
2262         array type.  Tidy.
2263
2264 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2265
2266         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2267         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2268         quoting in diagnostics.
2269         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2270         quoting in printf format.
2271         * decl.c (duplicate_decls, start_decl): Use %qD instead of
2272         unquoted %D.
2273
2274 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2275
2276         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2277         search.c, typeck2.c: Fix comment formatting.
2278
2279 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
2280
2281         PR tree-optimization/18184
2282         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2283         of different modes or alias-all flags as equivalent.
2284         * typeck.c (comptypes): Likewise.
2285
2286 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2287
2288         DR 49, 100
2289         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2290         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2291         TYPE_REFFN_P): Document.
2292         (fold_decl_constant_value): New prototype.
2293         * pt.c (convert_nontype_argument_function): Rewrite and extract
2294         parts into...
2295         (fold_decl_constant_value, convert_nontype_argument_function): New.
2296         (lookup_template_class): Add comment about useless double call.
2297         * mangle.c (write_expression): Strip conversions before lowering
2298         pointer to members.
2299         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2300         enum to enum conversion.
2301
2302 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
2303
2304         PR c++/18124
2305         * parser.c (cp_parser_type_parameter): Robustify.
2306
2307         PR c++/18155
2308         * parser.c (cp_parser_single_declaration): Disallow template
2309         typedefs.
2310
2311         PR c++/18177
2312         * typeck.c (build_const_cast): Use error_operand_p.
2313
2314 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
2315
2316         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2317         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2318         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2319         from cp-lang.c.
2320         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2321         from cp-lang.c.
2322         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2323
2324 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
2325
2326         PR c++/18064
2327         * search.c (check_final_overrider): Deprecate gnu covariant extension.
2328
2329 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2330
2331         Convert diagnostics to use quoting flag q 9/n
2332         * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2333         get_delta_difference):  Use new quotation style.
2334         * repo.c (reopen_repo_file_for_write): Likewise.
2335         * pt.c (do_type_instantiation): Likewise.
2336         * parser.c (cp_parser_diagnose_invalid_type_name):
2337         * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2338         * error.c (cp_print_error_function,
2339         print_instantiation_full_context): Likewise.
2340         * decl.c (define_label, grok_reference_init,
2341         maybe_deduce_size_from_array_init, revert_static_member_fn):
2342         * decl2.c (check_classfn): Likewise.
2343         * class.c (add_method, check_field_decls, layout_class_type,
2344         resolve_address_of_overloaded_function): Likewise.
2345         * call.c (build_x_va_arg, build_over_call): Likewise.
2346
2347 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2348
2349         Convert diagnostics to use quoting flag q 8/n
2350         * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2351         convert_to_reference, ocp_convert, convert_to_void
2352         cp_convert_to_pointer): Use new quotation style.
2353
2354 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
2355
2356         PR c++/15172
2357         * typeck2.c (store_init_value): Use split_nonconstant_init even
2358         for types that require construction.
2359
2360 1004-10-28  Matt Austern  <austern@apple.com>
2361
2362         PR c++/17542
2363         * cp-tree.h (class_key_or_enum_as_string): Declare.
2364         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2365         and remove static qualifier.
2366         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2367         union/enum declaration.
2368
2369 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
2370
2371         * pt.c: Fix a comment typo.
2372
2373 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
2374
2375         * typeck.c (composite_pointer_type): Remove comment about DR 195.
2376         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2377         warning when being pedantic.
2378         (build_reinterpet_cast, build_c_cast): Adjust.
2379
2380 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
2381
2382         PR c++/17695
2383         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2384         appear in a constructor/destructor that will be cloned.
2385
2386 1004-10-28  Matt Austern  <austern@apple.com>
2387
2388         PR c++/14124
2389         * decl.c (finish_enum): Handle packed attribute.
2390         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2391
2392 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
2393
2394         PR c++/17132
2395         * pt.c (instantiate_class_template): Increment
2396         processing_template_decl when substituting into a member class
2397         template.
2398
2399 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
2400
2401         PR c++/17435
2402         * call.c (convert_like_real): Fix formatting.
2403         (initialize_reference): When binding a temporary to a base class,
2404         ensure that the nominal copy made is to the derived class, not the
2405         base class.
2406
2407         PR c++/18140
2408         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2409         include ">>".
2410
2411 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2412
2413         * decl.c (bad_specifiers): Move the q after the %.
2414
2415 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2416
2417         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2418         the %.
2419
2420 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
2421
2422         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2423         * search.c (current_scope): Fix prototype.
2424
2425         PR c++/18093
2426         * search.c (current_scope): Return the innermost non-block scope,
2427         not the innermost non-block, non-namespace scope.
2428         (at_namespace_scope_p): Adjust accordingly.
2429         (dfs_accessible_post): Do not pass namespaces to is_friend.
2430         (dfs_walk_once_accessible_r): Likewise.
2431         * decl.c (grokvardecl): Adjust call to current_scope.
2432         (build_enumerator): Likewise.
2433         * parser.c (cp_parser_using_declaration): Likewise.
2434         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2435         current_scope.
2436         (cp_parser_class_head): Adjust call to current_scope.
2437         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2438         alias.
2439
2440         PR c++/18020
2441         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2442         their underlying values.
2443
2444         PR c++/18161
2445         * typeck.c (build_binary_op): Honor build_type, even when in a
2446         template.
2447
2448 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
2449
2450         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2451         padding token checking.
2452
2453 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
2454
2455         PR c++/18121
2456         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2457         layout_type as it is already done by create_array_type_for_decl.
2458
2459 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
2460
2461         PR c++/18095
2462         * parser.c (eof_token): Make const, correctly initialize rid and
2463         location fields.
2464         (struct cp_lexer): Replace buffer_end pointer with buffer_length
2465         count. Adjust.
2466         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
2467         zero it out.
2468         (cp_lexer_new_from_tokens): Adjust.
2469         (cp_lexer_grow_buffer): Remove.
2470         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2471         cp_lexer_purge_token): Add const casts.
2472
2473 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
2474
2475         PR c++/18073
2476         PR c++/10841
2477         * cp-tree.h (convert_to_base): Change prototype.
2478         (build_ptrmemfunc): Likewise.
2479         (convert_ptrmem): New function.
2480         * call.c (struct conversion): Adjust documentation for base_p.
2481         (standard_conversion): Set base_p for ck_pmem conversions as
2482         appropriate.
2483         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2484         conversions.
2485         * class.c (convert_to_base): Handle both pointers and objects.
2486         Add nonnull parameter.
2487         (build_vfield_ref): Adjust call to convert_to_base.
2488         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2489         (convert_force): Likewise.
2490         * typeck.c (build_unary_op): Likewise.
2491         (convert_ptrmem): New function.
2492         (build_static_cast_1): Use it.
2493         (build_reinterpret_cast): Allow conversions to vector types.
2494         (get_delta_difference): Add c_cast_p parameter.
2495         (build_ptrmemfunc): Likewise.  Adjust calls to
2496         get_delta_difference.
2497
2498 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
2499
2500         PR c++/13560
2501         * error.c (cp_error_at): Output the context as it might be
2502         different file as the other location.
2503
2504 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
2505
2506         * typeck.c: Fix a comment typo.
2507
2508 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2509
2510         PR c++/13495
2511         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2512         * cp-tree.h (make_unbound_class_template): Adjust prototype.
2513         * parser.c (cp_parser_lookup_name): Adjust call to
2514         make_unbound_class_template.
2515         (cp_parser_single_declaration): Handle member class of class
2516         template as template friend parsing correctly.
2517         * friend.c (is_friend): Call is_specialization_of_friend for
2518         template friend class.
2519         (make_friend_class): Handle member class of class template as
2520         template friend.
2521         * pt.c (is_specialization_of_friend): Likewise.
2522         (instantiate_class_template): Likewise.
2523         (tsubst): Adjust call to make_unbound_class_template.
2524
2525 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2526
2527         * typeck.c (composite_pointer_type): Add comment about DR 195
2528         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2529         Allow function pointer conversions that DR195 suggests.
2530         (build_reinterpret_cast, build_c_cast): Update
2531         build_reinterpret_cast_1 calls.
2532
2533 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
2534
2535         * call.c, typeck.c: Fix comment typos.
2536
2537 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
2538
2539         * parser.c (cp_token_position): New typedef. Define VEC thereof.
2540         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2541         next_token and last_token cp_token_position. Make saved_tokens a
2542         VEC(cp_token_position).
2543         (eof_token): New static variable.
2544         (CP_SAVED_TOKENS_SIZE): Rename to ...
2545         (CP_SAVED_TOKEN_STACK): ... here.
2546         (cp_lexer_new_main): Adjust main lexer creation and buffer
2547         filling.
2548         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2549         to the parent buffer.  Do not append eof token.
2550         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2551         stack.
2552         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2553         (cp_lexer_token_position, cp_lexer_token_at): New.
2554         (cp_lexer_saving_tokens): Adjust. Make inline.
2555         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2556         (cp_lexer_peek_token_emit_debug_info): Fold into ...
2557         (cp_lexer_peek_token): ... here.
2558         (cp_lexer_peek_nth_token): Don't peek past EOF.
2559         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2560         EOF.
2561         (cp_lexer_purge_token): Adjust eof setting.
2562         (cp_lexer_purge_tokens_after): Likewise.
2563         (cp_lexer_save_tokens): Push next_token directly.
2564         (cp_lexer_commit_tokens): Adjust.
2565         (cp_lexer_rollback_tokens): Pop next_token directly.
2566         (cp_parser_check_for_invalid_template_id): Adjust token purging.
2567         (cp_parser_translation_unit): Do not consume the EOF.
2568         (cp_parser_nested_name_specifier_opt): Adjust token purging.
2569         (cp_parser_template_id, cp_parser_template_name): Likewise.
2570
2571 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
2572
2573         PR c++/14035
2574         * call.c (struct conversion): Add base_p.
2575         (convert_like): Add c_cast_p argument.
2576         (convert_like_with_conversion): Likewise.
2577         (build_conv): Clear base_p.
2578         (standard_conversion): Set it, for derived-to-base conversions.
2579         (convert_like_real): Add c_cast_p parameter.  Handle pointer
2580         conversions directly rather than relying on ocp_convert.
2581         (perform_direct_initialization_if_possible): Add c_cast_p
2582         parameter.
2583         * cp-tree.h (perform_direct_initialization_if_possible): Change
2584         prototype.
2585         (convert_member_func_to_ptr): New function.
2586         * typeck.c (check_for_casting_away_constness): Add diag_fn
2587         parameter.
2588         (build_static_cast_1): New function, split out from ...
2589         (build_static_cast): ... here.  Use build_static_cast_1.
2590         (build_reinterpret_cast_1): New function, split out from ...
2591         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
2592         (build_const_cast_1): New function, split out from ...
2593         (build_const_cast): ... here.  Use build_const_cast_1.
2594         (build_c_cast): Rewrite to use build_const_cast_1,
2595         build_static_cast_1, and build_reinterpret_cast_1.
2596         (convert_member_func_to_ptr): New function.
2597
2598 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
2599
2600         PR c++/18047
2601         * parser.c (enum cp_parser_prec): Give relational expressions
2602         a higher precedence than equality expressions.
2603
2604 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
2605
2606         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2607         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2608         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2609         (enum base_access): Reorganize.
2610         (accessible_base_p, accessible_p): Add consider_local_p parameter.
2611         * call.c (standard_conversion): Update comment about
2612         DERIVED_FROM_P.
2613         (enforce_access): Adjust accessible_p call.
2614         (build_over_call): Adjust accessible_base_p call.
2615         * class.c (convert_to_base): Adjust lookup_base call.
2616         (build_vtbl_ref_1): Likewise.
2617         (warn_about_ambiguous_bases): Likewise. Add early exit.
2618         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2619         * search.c (accessible_base_p): Add consider_local_p parameter.
2620         (lookup_base): Pass consider_local_p to accessible_base_p call.
2621         (friend_accessible_p): Check whether scope is a class member.
2622         Remove unnecessary class template check.
2623         (accessible_p): Add consider_local_p parameter. Use it.
2624         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2625         * tree.c (maybe_dummy_object): Likewise.
2626         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2627         (build_class_member_access_expr): Adjust lookup_base call.
2628         * typeck2.c (binfo_or_else): Likewise.
2629         * rtti.c (build_dynamic_cast_1): Access can consider friendship
2630         and current scope.
2631
2632 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2633
2634         PR c++/17743
2635         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2636
2637 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2638
2639         PR c++/10479
2640         * parser.c (cp_parser_parenthesized_expression_list): Fold
2641         non-dependent expressions in attribute lists.
2642
2643 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
2644
2645         PR c++/17042
2646         * decl.c (declare_global_var): Use the return value from pushdecl.
2647
2648         PR c++/14667
2649         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2650         type names if we have already found a valid type.
2651         (cp_parser_member_declaration): Likewise.
2652
2653         PR c++/17916
2654         * parser.c (cp_parser_member_specification_opt): Handle
2655         CPP_PRAGMA.
2656
2657 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2658
2659         * dump.c, g++spec.c, repo.c: Update copyright.
2660
2661 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2662
2663         * decl.c: Fix a comment typo.
2664
2665 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2666
2667         PR c++/16301
2668         * name-lookup.c (parse_using_directive): If we have a
2669         error_mark_node, do not set the decl namespace associations
2670         on it.
2671
2672 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
2673
2674         PR c++/17976
2675         * decl.c (cp_finish_decl): Do not call expand_static_init more
2676         than once for a single variable.
2677
2678 2004-10-14  Matt Austern  <austern@apple.com>
2679
2680         * Make-lang.in (pt.o): depends on pointer-set.h
2681         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2682         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2683         (for_each_template_parm): Convert from htab_t to pointer_set_t.
2684         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2685
2686 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
2687
2688         PR c++/17661
2689         * semantics.c (finish_for_expr): Convert expression to void
2690         so that we don't create temporaries for a?b:c.
2691
2692 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
2693
2694         * search.c: Fix a comment typo.
2695
2696 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2697
2698         * class.c (dfs_modify_vtables): Simplify condition. Return
2699         dfs_skip_bases as appropriate.
2700         (modify_all_vtables): Walk in pre-order.
2701         * search.c (dfs_walk_all, dfs_walk_once_r,
2702         dfs_walk_once_accessible_r): Assert post order function never
2703         returns dfs_skip_bases.
2704
2705         * search.c (struct lookup_base_data_s): New.
2706         (lookup_base_r): Replace with ...
2707         (dfs_lookup_base): ... this.
2708         (lookup_base): Use dfs_walk_all.
2709
2710 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
2711
2712         * search.c: Fix comment typos.
2713
2714 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
2715
2716         PR c++/15786
2717         * parser.c (cp_parser_declarator): Add member_p parameter.
2718         (cp_parser_condition): Adjust calls to cp_parser_declarator.
2719         (cp_parser_explicit_instantiation): Likewise.
2720         (cp_parser_init_declarator): Likewise.
2721         (cp_parser_direct_declarator): Add member_p parameter.  Do not
2722         parse tentatively when parsing the parameters to a member.
2723         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2724         (cp_parser_parameter_declaration): Likewise.
2725         (cp_parser_member_declaration): Likewise.
2726         (cp_parser_exception_declaration): Likewise.
2727
2728         PR c++/17936
2729         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2730         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2731         for members of partial or explicit specializations.
2732
2733         PR c++/17929
2734         * decl2.c (finish_anon_union): Robustify.
2735
2736 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
2737
2738         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2739         (dcast_base_hint): ... here.
2740         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2741         * search.c (struct dcast_data_s): New.
2742         (dynamic_cast_base_recurse): Remove. Replace with ...
2743         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2744         (get_dynamic_cast_base_type): Rename to ...
2745         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
2746         (accessible_r): Remove.
2747         (dfs_accessible_post): New, broken out of accessible_r.
2748         (accessible_p): Use dfs_walk_once_accessible.
2749         (dfs_walk_once_accessible_r): New. From accessible_r.
2750         (dfs_walk_once_accessible): New. From acessible_p.
2751
2752         * cp-tree.h (SAME_BINFO_TYPE_P): New.
2753         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2754         binfo types.
2755         (convert_to_base_statically, determine_primary_bases,
2756         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2757         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2758         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2759         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2760         * init.c (expand_member_init): Likewise.
2761         * search.c (lookup_base_r, dynamic_cast_base_recurse,
2762         binfo_via_virtual, copied_binfo, binfo_for_vbase,
2763         original_binfo): Likewise.
2764         * tree.c (copy_binfo): Likewise.
2765
2766 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
2767
2768         * semantics.c: Fix comment typos.
2769
2770 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2771
2772         PR c++/17554
2773         part of c++/17657
2774         middle-end/17703
2775         * semantics.c (maybe_cleanup_point_expr): Call
2776         fold_build_cleanup_point_expr.
2777         (maybe_cleanup_point_expr_void): New function.
2778         (add_decl_expr): Call maybe_cleanup_point_expr_void.
2779         (finish_expr_stmt): Likewise.
2780         (finish_return_stmt): Likewise.
2781         (finish_for_expr): Likewise.
2782         (finish_asm_stmt): Likewise.
2783         * typeck.c (condition_conversion): Call
2784         fold_build_cleanup_point_expr.
2785
2786 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
2787
2788         PR c++/17907
2789         * semantics.c (add_decl_expr): If the decl has a size which
2790         has side effects then the decl expression needs a cleanup point.
2791
2792 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
2793
2794         PR c++/17393
2795         * decl.c (grokdeclarator): Robustify error-recovery on invalid
2796         declarations.
2797
2798 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2799
2800         Convert diagnostics to use quoting flag q 7/n
2801         * typeck.c (composite_pointer_type_r, composite_pointer_type,
2802         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2803         string_conv_p, build_class_member_access_expr,
2804         build_class_member_access_expr, lookup_destructor,
2805         finish_class_member_access_expr, build_indirect_ref,
2806         get_member_function_from_ptrfunc, build_function_call,
2807         convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2808         check_for_casting_away_constness, build_static_cast,
2809         build_reinterpret_cast, build_const_cast, build_c_cast,
2810         build_modify_expr, get_delta_difference, build_ptrmemfunc,
2811         dubious_conversion_warnings, convert_for_assignment,
2812         convert_for_initialization,
2813         maybe_warn_about_returning_address_of_local, check_return_expr):
2814         Use quoting marks.
2815
2816         * typeck2.c (error_not_base_type, readonly_error,
2817         abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2818         store_init_value, digest_init, build_x_arrow,
2819         build_m_component_ref, require_complete_eh_spec_types): Likewise.
2820
2821         * tree.c (cp_build_qualified_type_real,
2822         handle_java_interface_attribute, handle_init_priority_attribute):
2823         Likewise.
2824
2825         * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2826         finish_pseudo_destructor_expr,
2827         check_template_template_default_arg, begin_class_definition,
2828         finish_base_specifier, qualified_name_lookup_error,
2829         finish_id_expression, finish_typeof): Likewise.
2830
2831         * search.c (lookup_base, check_final_overrider,
2832         look_for_overrides_r): Likewise.
2833
2834         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2835
2836 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
2837
2838         PR c++/17867
2839         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2840         constructor.
2841
2842         PR c++/17670
2843         * init.c (build_new): Correct comments.
2844         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2845         the non-array case.
2846
2847         PR c++/17821
2848         * parser.c (cp_parser_postfix_dot_deref_expression): If the
2849         pseduo-destructor-name production does not work, fall back to the
2850         ordinary production.
2851
2852         PR c++/17826
2853         * tree.c (cp_tree_equal): Handle a BASELINK.
2854
2855         PR c++/17524
2856         * cp-tree.h (check_var_type): New function.
2857         * decl.c (check_var_type): New function, split out from ...
2858         (grokdeclarator): ... here.
2859         * pt.c (tsubst_decl): Use check_var_type.
2860
2861         PR c++/17685
2862         * decl.c (grokdeclarator): Disallow declarations of operators as
2863         non-functions.
2864
2865 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2866
2867         PR c++/17868
2868         * error.c (dump_expr): Add missing case for RDIV_EXPR.
2869
2870 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
2871
2872         * pt.c, search.c: Fix comment typos.
2873
2874 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
2875
2876         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2877         unmarkedp): Remove.
2878         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2879         * class.c (struct find_final_overrider_data): Remove most_derived,
2880         vpath_list and vpath fields.  Add path field.
2881         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2882         (dfs_find_final_overrider): Rename to ...
2883         (dfs_find_final_overrider_pre): ... here. Adjust.
2884         (dfs_find_final_overrider_post): Adjust.
2885         (dfs_find_final_overrider_q): Fold into
2886         dfs_find_final_overrider_pre.
2887         (find_final_overrider): Adjust dfs searching.
2888         (dfs_modify_vtables): Don't mark binfo here.
2889         (modify_all_vtables): Use dfs_walk_once.
2890         (build_vtt_inits): Likwise. Use dfs_walk_all.
2891         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
2892         Return dfs_skip_bases as appropriate.
2893         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
2894         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
2895         appropriate. Don't mark binfo here.
2896         (initialize_vtbl_ptrs): Use dfs_walk_once.
2897         * search.c (struct vbase_info): Remove unused struct.
2898         (access_in_type): Use dfs_walk_once.
2899         (dfs_access_in_type): Don't mark binfo here.
2900         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
2901         Fold into ...
2902         (accessible_r): ... here. New. Specialize dfs_walk_once.
2903         (accessible_p): Use accessible_r.
2904         (lookup_field_queue_p): Remove. Fold into ...
2905         (lookup_field_r): ... here. Adjust.
2906         (lookup_member): Use dfs_walk_all.
2907         (dfs_walk_real, dfs_walk): Replace with ...
2908         (dfs_walk_all, dfs_walk_once): ... these.
2909         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
2910         (dfs_unmark, unmarkedp, markedp): Remove.
2911         (dfs_get_pure_virtuals): Don't mark binfo here.
2912         (get_pure_virtuals): Use dfs_walk_once.
2913         (dfs_debug_unmarked_p): Remove. Fold into ...
2914         (dfs_debug_mark): ... here.
2915         (note_debug_info_needed): Use dfs_walk_all.
2916
2917 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2918
2919         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
2920         CLEANUP_POINT_EXPR to get the asm expression.
2921
2922 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
2923
2924         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
2925         (DECL_MEMBER_TEMPLATE_P): New macro.
2926         (is_member_template): Remove.
2927         (class_method_index_for_fn): New function.
2928         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
2929         * class.c (finish_struct_methods): Remove out-of-date comment.
2930         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
2931         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
2932         class_method_index_for_fn.
2933         * pt.c (is_member_template): Remove.
2934         (is_member_template_class): Likewise.
2935         (optimize_specialization_lookup_p): New function.
2936         (retrieve_specialization): Optimize lookups for members that are
2937         not member templates.
2938         (register_specialization): Adjust accordingly.
2939         (build_template_decl): Add member_template_p parameter.  Set
2940         DECL_MEMBER_TEMPLATE_P.
2941         (process_partial_specialization): Adjust call to
2942         retrieve_specialization.
2943         (push_template_decl_real): Determine whether the template is a
2944         member template.
2945         (lookup_template_class): Use retrieve_specialization.
2946         (tsubst_decl): Adjust call to retrieve_specialization.
2947         (tsubst_exception_specification): New function.
2948         (tsubst): Use it.
2949         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
2950         (instantiate_template): Adjust call to retrieve_specialization.
2951         (regenerate_decl_from_template): Do not actually generate a new
2952         DECL.
2953         (instantiate_decl): Adjust call to retrieve_specialization.
2954         (class_method_index_for_fn): New method.
2955
2956 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
2957
2958         * parser.c (cp_parser_asm_definition): Look passed the
2959         CLEANUP_POINT_EXPR to get the asm expression.
2960
2961 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
2962
2963         PR c++/17368
2964         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
2965         also.
2966
2967 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2968
2969         Convert diagnostics to use quoting flag q 6/n
2970         * pt.c (finish_member_template_decl, check_specialization_scope,
2971         maybe_process_partial_specialization, determine_specialization,
2972         check_explicit_specialization, maybe_check_template_type,
2973         process_partial_specialization, check_default_tmpl_args,
2974         push_template_decl_real, redeclare_class_template,
2975         convert_nontype_argument, coerce_template_parms,
2976         lookup_template_class, push_tinst_level,
2977         instantiate_class_template, tsubst_arg_types,
2978         tsubst_function_type, tsubst, tsubst_qualified_id,
2979         tsubst_copy_and_build, check_instantiated_args,
2980         do_decl_instantiation, do_type_instantiation,
2981         invalid_nontype_parm_type_p, check_specialization_namespace,
2982         convert_template_argument, determine_specialization,
2983         check_template_shadow, tsubst_decl
2984         instantiate_pending_templates): Use quoting marks.
2985
2986 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
2987
2988         PR c++/17829
2989         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
2990         unqualified lookup finds a member function.
2991
2992 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2993
2994         Convert diagnostics to use quoting flag q 5/n
2995         * parser.c (cp_parser_name_lookup_error,
2996         cp_parser_diagnose_invalid_type_name,
2997         cp_parser_primary_expression, cp_parser_unqualified_id,
2998         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
2999         cp_parser_jump_statement, cp_parser_simple_declaration,
3000         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
3001         cp_parser_type_parameter, cp_parser_template_id,
3002         cp_parser_template_name, cp_parser_direct_declarator,
3003         cp_parser_parameter_declaration_list, cp_parser_class_head,
3004         cp_parser_base_specifier, cp_parser_lookup_name,
3005         cp_parser_late_parsing_default_args,
3006         cp_parser_optional_template_keyword
3007         cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
3008         cp_parser_check_access_in_redeclaration): Use quoting marks.
3009
3010         * name-lookup.c (supplement_binding, pushdecl,
3011         check_for_out_of_scope_variable, validate_nonmember_using_decl,
3012         do_nonmember_using_decl, lookup_tag, set_decl_namespace,
3013         push_namespace, do_namespace_alias, do_using_directive,
3014         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
3015
3016         * method.c (use_thunk): Likewise.
3017
3018         * lex.c (unqualified_name_lookup_error,
3019         unqualified_fn_lookup_error): Likewise.
3020
3021 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3022
3023         Convert diagnostics to use quoting flag q 4/n
3024         * except.c (decl_is_java_type, build_throw,
3025         is_admissible_throw_operand, check_handlers_1, check_handlers):
3026         Use quoting formats.
3027         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3028         * init.c (sort_mem_initializers, emit_mem_initializers,
3029         member_init_ok_or_else, expand_member_init, is_aggr_type,
3030         build_offset_ref, build_java_class_ref): Likewise.
3031
3032 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3033
3034         Convert diagnostics to use quoting flag q 3/n
3035         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3036         redeclaration_error_message, lookup_label, check_goto,
3037         make_typename_type, make_unbound_class_template,
3038         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3039         grok_reference_init, layout_var_decl, maybe_commonize_var,
3040         check_for_uninitialized_const_var, reshape_init_array,
3041         reshape_init, check_initializer, cp_finish_decl,
3042         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3043         check_static_variable_definition, compute_array_index_type,
3044         create_array_type_for_decl, check_special_function_return_type,
3045         grokdeclarator, check_default_argument, grokparms,
3046         grok_ctor_properties, grok_op_properties,
3047         check_elaborated_type_specifier, xref_tag, finish_enum,
3048         build_enumerator, check_function_type, start_preparsed_function,
3049         store_parm_decls): Use quoting formats.
3050         * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3051         check_java_method, check_classfn, finish_static_data_member_decl,
3052         grokfield, grokbitfield, grok_function_init,
3053         build_anon_union_vars, coerce_new_type, coerce_delete_type,
3054         check_default_args): Likewise.
3055         * parser.c (cp_parser_decl_specifier_seq): Likewise.
3056
3057 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3058
3059         Convert diagnostics to use quoting flag q 2/n
3060         * class.c (build_base_path, add_method, alter_access,
3061         handle_using_decl, check_bases,
3062         maybe_warn_about_overly_private_class, find_final_overrider,
3063         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3064         check_bitfield_decl, check_field_decls, layout_empty_base,
3065         build_base_field, check_methods, layout_virtual_bases,
3066         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3067         resolve_address_of_overloaded_function, instantiate_type,
3068         note_name_declared_in_class): Use format flag "q" for quoting.
3069
3070 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3071
3072         Convert diagnostics to use quoting flag q 1/n
3073         * error.c (locate_error): Ignore quoting flag q.
3074         * call.c (build_user_type_conversion_1, build_operator_new_call,
3075         build_object_call, op_error, build_conditional_expr,
3076         build_new_op, build_op_delete_call, enforce_access,
3077         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3078         convert_default_arg, build_over_call, build_new_method_call,
3079         joust, perform_implicit_conversion, initialize_reference): Use the
3080         quoting flag q.
3081
3082 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
3083
3084         PR c++/17797
3085         * typeck.c (build_reinterpret_cast): Return if the inner type
3086         is error_mark_node.
3087
3088 2004-10-01  Jan Hubicka  <jh@suse.cz>
3089
3090         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3091
3092 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3093
3094         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3095         turning operator_code and fixed_offset into bitfields.
3096
3097 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
3098
3099         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3100
3101 2004-09-29  Jason Merrill  <jason@redhat.com>
3102
3103         PR tree-optimization/17697
3104         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3105
3106 2004-09-28  Jason Merrill  <jason@redhat.com>
3107
3108         PR middle-end/17525
3109         * class.c (build_base_field): Set TYPE_MODE.
3110
3111 2004-09-28  Roger Sayle  <roger@eyesopen.com>
3112
3113         PR driver/17537
3114         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3115         than -lc and -lm, may require linking against libstc++.
3116
3117 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
3118
3119         * tree.c: Fix a comment typo.
3120
3121 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
3122
3123         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3124         (struct secondary_vptr_vtt_init_data_s): New.
3125         (build_vtt_inits): Adjust dfs_walkers.
3126         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3127         secondary_vptr_vtt_init_data_s structure. Adjust.
3128         (dfs_ctor_vtable_bases_queue_p): Remove.
3129         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3130
3131         * pt.c (struct get_template_base_data_s): Remove.
3132         (get_template_base_r): Fold into get_template_base.
3133         (get_template_base): Walk base binfos directly in inheritance
3134         graph order.
3135
3136 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3137
3138         PR c++/17642
3139         * cp-tree.h (fold_if_not_in_template): New function.
3140         * call.c (build_conditional_expr): Use fold_if_not_in_template.
3141         (build_cxx_call): Likewise.
3142         * cvt.c (convert_to_complex): Likewise.
3143         (ocp_convert): Likewise.
3144         (convert): Likewise.
3145         (convert_force): Likewise.
3146         * decl.c (compute_array_index_type): Clear
3147         processing_template_decl while folding array bounds.
3148         * pt.c (convert_nontype_argument): Clear
3149         processing_template_decl while processing non-type argument
3150         initialization.
3151         * tree.c (fold_if_not_in_template): New function.
3152         * typeck.c (build_class_member_access_expr): Use
3153         fold_if_not_in_template.
3154         (build_array_ref): Likewise.
3155         (build_binary_op): Likewise.  Do not try to optimize computations
3156         when processing templates.
3157         (cp_pointer_int_sum): Use fold_if_not_in_template.
3158         (pointer_diff): Likewise.
3159         (build_unary_op): Likewise.
3160         (build_reinterpret_cast): Likewise.
3161         (get_delta_difference): Likewise.
3162         (expand_ptrmemfunc_cst): Likewise.
3163         (dubious_conversion_warnings): Likewise.
3164
3165 2004-09-27  Matt Austern  <austern@apple.com>
3166
3167         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3168         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3169         tokens that come from headers that are implicitly extern "C".
3170         (struct cp_parser): new one-bit field, implicit_extern_c.
3171         (cp_parser_new): Set parser's implicit_extern_c to false.
3172         (cp_parser_translation_unit): Pop lang context if we were in a
3173         header that was implicitly extern "C".
3174         (cp_parser_declaration_seq_opt): Push/pop lang context as
3175         required by the token's and parser's implicit_extern_c.
3176
3177 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
3178
3179         PR c++/17585
3180         * cp-tree.h (shared_member_p): Declare.
3181         * search.c (shared_member_p): Give it external linkage.
3182         * semantics.c (finish_qualified_id_expr): Use it.
3183         (finish_id_expression): Likewise.
3184
3185         PR c++/17585
3186         * semantics.c (finish_id_expression): Do not add "this->" to
3187         static member functions.
3188
3189 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
3190
3191         PR c++/17681
3192         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3193
3194         * class.c (struct count_depth_data): Remove.
3195         (dfs_depth_post, dfs_depth_q): Remove.
3196         (find_final_overrider): Use number of vbase classes as depth
3197         bound.
3198
3199         * cp-tree.h (types_overlap_p): Remove.
3200         * search.c (struct overlap_info): Remove.
3201         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3202
3203         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3204         (get_template_base_recursive): Remove. Replace with ...
3205         (get_template_base_r): ... this.
3206         (struct get_template_base_data_s): New.
3207         (get_template_base): Use get_template_base_r via dfs_walk.  Always
3208         return NULL on failure.
3209         (unify): Remove error_mark_node check from get_template_base result.
3210
3211 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
3212
3213         * parser.c (cp_parser_expression_stack): Clarify why it is
3214         an array of NUM_PREC_VALUES elements.
3215         (cp_parser_binary_expression): Clarify why we do not need to
3216         handle stack overflow.
3217
3218 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
3219
3220         PR c++/16889
3221         * search.c (lookup_field_queue_p): Correct check for hidden base.
3222
3223         * search.c (bfs_walk): Remove.
3224         (lookup_member): Use dfs_walk_real.
3225         (dfs_walk_real): Move and adjust documentation from bfs_walk.
3226
3227 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
3228
3229         * decl.c (grokfndecl): If ::main is found not to return int,
3230         correct it after issuing a diagnostic.
3231         (grokdeclarator): If the incoming type was error_mark_node, do
3232         not complain about declaring something with no type.
3233         (start_function): Change check for ::main not returning int to
3234         an assertion, as grokfndecl now catches this when the user did it.
3235         * init.c (perform_member_init, sort_mem_initializers)
3236         (emit_mem_initializers): Make most diagnostics be issued on
3237         the line of current_function_decl, not whatever the current
3238         input line is.
3239         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3240         definition and declaration with #ifdef ENABLE_CHECKING.
3241         Avoid unnecessary use of fprintf.
3242         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3243         definitions to avoid warnings.
3244         (cp_lexer_new_main): Add assertion that first token is not a
3245         padding token.
3246         (cp_lexer_new_from_token_array): Fold into ...
3247         (cp_lexer_new_from_tokens): ... here.  Add assertion that
3248         first token is not a padding token.
3249         (cp_lexer_set_source_position_from_token): Move nearer to callers.
3250         Remove unused lexer argument.
3251         (cp_lexer_peek_token): Just print debugging report (if enabled)
3252         and return lexer->next_token.
3253         (cp_lexer_skip_purged_tokens): Delete.
3254         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3255         inline, simplify bodies.
3256         (cp_lexer_peek_nth_token): Add debugging report a la
3257         cp_lexer_peek_token.
3258         (cp_lexer_consume_token): Correct commentary.  Advance over
3259         purged tokens here.  Set current source position here, from
3260         token to be returned.  Avoid unnecessary use of fprintf.
3261         (cp_lexer_purge_token): Advance next_token pointer over this and
3262         subsequent purged tokens.
3263         (cp_parser_error): Adjust source position to that of the
3264         peeked token.
3265         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3266         (cp_parser_string_literal): Remove some excessive cleverness.
3267         (cp_parser_enum_specifier): Call start_enum before consuming
3268         the opening brace.
3269         (cp_parser_member_declaration): Make the "extra semicolon"
3270         diagnostic consistently-worded with the other place this is
3271         diagnosed.  Explicitly set the diagnostic location to the
3272         location of the offending semicolon.
3273         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3274         in diagnostics.  Do not use cp_parser_require.  Set location
3275         of diagnostics about improper use of '>>' to location of
3276         offending token.
3277         (cp_parser_late_parsing_for_member):
3278         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3279         (cp_parser_late_parsing_default_args): Likewise.  Manually
3280         move some logic outside the loop.
3281
3282 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
3283
3284         PR c++/17618
3285         * cvt.c (cp_convert_to_pointer): Return early when the type is
3286         an error_mark_node.
3287
3288 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3289
3290         PR c++/13989
3291         PR c++/9844
3292         * decl.c (grokfndecl): Add new argument "attrlist", use it
3293         to call cplus_decl_attributes.
3294         (start_function): Remove call to cplus_decl_attributes.
3295         * cvt.c (ocp_convert): Add support to use type conversion
3296         function to vector type.
3297         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3298         to the parsed type.
3299
3300 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
3301
3302         PR c++/17596
3303
3304         * parser.c (cp_parser_token_tree_map_node,
3305         cp_parser_pm_expression, cp_parser_additive_expression,
3306         cp_parser_multiplicative_expression, cp_parser_shift_expression,
3307         cp_parser_relational_expression, cp_parser_equality_expression,
3308         cp_parser_and_expression, cp_parser_exclusive_or_expression,
3309         cp_parser_inclusive_or_expression,
3310         cp_parser_logical_and_expression,
3311         cp_parser_logical_or_expression): Removed.
3312         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3313         binops, binops_by_token): New.
3314         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3315         (cp_parser_new): Initialize binops_by_token.
3316         (cp_parser_binary_expression): Rewritten.
3317         (N_CP_TTYPES): New.
3318
3319 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
3320
3321         * parser.c: Fix a comment typo.
3322
3323 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
3324
3325         PR c++/17620
3326         * decl.c (xref_basetypes): Look through typedefs before checking
3327         for duplicate base.
3328
3329 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3330
3331         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3332         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3333         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3334         (init_rtti_processing): Initialize it to something realistic.
3335         (get_tinfo_decl): Adjust pushing the new decl.
3336
3337         * cp-tree.h (struct lang_type_class): Remove marked flags, add
3338         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
3339         (TYPE_MARKED_P): New.
3340         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3341         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3342         CLEAR_CLASSTYPE_MARKED_N): Remove.
3343         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3344         CLEAR_CLASSTYPE_MARKED_*): Remove.
3345         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3346         shaped and repeated base properties.
3347         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3348         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3349         class_hint_flags): Remove.
3350         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3351         CLASSTYPE_DIAMOND_SHAPED_P.
3352
3353 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
3354
3355         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3356         cp-objcp-common.h.
3357         (objcp_tsubst_copy_and_build): Reformat function signature.
3358         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3359         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3360
3361 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
3362
3363         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3364         Don't handle CPP_PRAGMA tokens specially.
3365         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
3366         purge the token; do clear token->value after processing.  Add
3367         assertion at beginning that token->value is nonzero.
3368         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3369         CPP_PRAGMA as a full statement or declaration in its own right.
3370
3371 2004-09-21  Matt Austern  <austern@apple.com>
3372
3373         PR c++/15049
3374         * decl.c (grokvardecl): Accept declarations of global variables
3375         using anonymous types.
3376
3377 2004-09-21  Roger Sayle  <roger@eyesopen.com>
3378
3379         PR c++/7503
3380         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
3381         if either operand has side-effects.
3382         * typeck.c (rationalize_conditional_expr): Assert that neither
3383         operand of MIN_EXPR or MAX_EXPR has side-effects.
3384         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
3385         Check that the "lhs" is a valid lvalue, i.e. that neither operand
3386         of a MIN_EXPR or MAX_EXPR has a side-effect.
3387
3388 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
3389
3390         * cp-tree.h (struct lang_type_header): Remove
3391         uses_multiple_inheritance field.
3392         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3393         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3394         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3395         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3396         (TYPE_CONTAINS_VPTR_P): Likewise.
3397         * call.c (add_template_candidate_real): Use
3398         CLASSTYPE_VBASECLASSES.
3399         (build_special_member_call): Likewise.
3400         * class.c (finish_struct_bits): Remove
3401         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3402         bookkeeping.
3403         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3404         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3405         bookkeeping.
3406         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3407         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3408         Likewise.
3409         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3410         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3411         bookkeeping.
3412         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3413         * decl2.c (maybe_retrofit_in_chrg): Likewise.
3414         * init.c (expand_member, push_base_cleanups): Likewise.
3415         * pt.c (instantiate_class_template): Remove
3416         TYPE_USES_MULTIPLE_INHERITANCE,
3417         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3418         bookkeeping.
3419         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3420         check.
3421         * typeck2.c (process_init_constructor): Replace some sorrys with
3422         asserts.
3423
3424 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
3425
3426         * decl.c (reshape_init_array): Initialize max_index_cst to fix
3427         bootstrap failure.
3428
3429 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
3430
3431         PR c++/17530
3432         * pt.c (tsubst): Fix parentheses to accomodate emacs.
3433         (tsubst_baselink): If we get a single function, mark it as used.
3434
3435 2004-09-20  Matt Austern <austern@apple.com>
3436             Zack Weinberg  <zack@codesourcery.com>
3437
3438         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3439         Apply lbasename to input_filename before passing to get_fileinfo.
3440         * semantics.c (begin_class_definition): Likewise.
3441         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3442         correct filename.  Rename variables to be less confusing.
3443         (handle_pragma_implementation): Likewise.  Disable "appears
3444         after file is included" diagnostic.
3445
3446         * parser.c (struct cp_token): Add in_system_header fiag.
3447         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3448         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3449         (CPP_NONE, cp_lexer_read_token): Delete.
3450         (struct cp_lexer): Remove first_token, string_tokens,
3451         main_lexer_p fields.  Clarify comments.
3452         (struct cp_token_cache): Now just a pair of pointers.
3453         (CP_LEXER_BUFFER_SIZE): New #define.