OSDN Git Service

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