OSDN Git Service

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