OSDN Git Service

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