OSDN Git Service

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