OSDN Git Service

b60b6deaf3763160e23cf139949e09e2100af28f
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2
3         PR c++/14479
4         PR c++/19487
5         * pt.c (maybe_check_template_type): Remove.
6         * cp-tree.h (maybe_check_template_type): Remove prototype.
7         * name-lookup.c (maybe_process_template_type_declaration): Don't
8         use maybe_check_template_type.
9
10 2005-02-11  Richard Henderson  <rth@redhat.com>
11
12         PR c++/19632
13         * pt.c (get_mostly_instantiated_function_type): Save and restore
14         flag_access_control instead of push/pop_access_scope.
15
16 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
17
18         PR c++/19755
19         * decl.c (reshape_init): Issue warnings about missing braces.
20
21 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
22
23         * cp-tree.def, except.c, ptree.c: Update copyright.
24
25 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
26
27         PR c++/19811
28         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
29         attempting name lookup.
30
31         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
32
33         PR c++/19787
34         * call.c (initialize_reference): Robustify.
35
36         PR ++/19732
37         * decl.c (grokdeclarator): Check for invalid use of destructor
38         names.
39
40         PR c++/19762
41         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
42         names with invalid types.
43
44         PR c++/19826
45         * parser.c (cp_parser_direct_declarator): Allow type-dependent
46         expressions as array bounds.
47
48         PR c++/19739
49         * parser.c (cp_parser_attributes_list): Allow empty lists.
50
51 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
52
53         PR c++/19733
54         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
55         (check_bases): Give warnings about a base class with a
56         non-virtual destructor, even if it is implicit.
57         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
58         (maybe_warn_about_overly_private_class): Don't use
59         TYPE_HAS_DESTRUCTOR.
60         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
61         (check_for_override): Give it external linkage.
62         (add_implicitly_declared_members): Generate destructors lazily.
63         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
64         TYPE_HAS_DESTRUCTOR.
65         (check_bases_and_members): Call check_methods before
66         check_field_decls.
67         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
68         TYPE_HAS_DESTRUCTOR.
69         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
70         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
71         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
72         (lang_type_class): Add lazy_destructor.
73         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
74         (CLASSTYPE_DESTRUCTORS): Robustify.
75         (TYPE_HAS_DESTRUCTOR): Remove.
76         (check_for_override): Declare.
77         (build_vbase_delete): Remove.
78         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
79         expressions.
80         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
81         * except.c (dtor_nothrow): Lazily create destructors if necessary.
82         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
83         * init.c (build_delete): Lazily create destructors, if necessary.
84         (build_vbase_delete): Remove.
85         * method.c (locate_dtor): Simplify.
86         (implicitly_declare_fn): Add support for destructors.
87         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
88         necessary.
89         * pt.c (check_explicit_specialization): Don't use
90         TYPE_HAS_DESTRUCTOR.
91         (instantiate_class_template): Likewise.
92         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
93         * rtti.c (emit_support_tinfos): Robustify.
94         * search.c (lookup_fnfields_1): Lazily create destructors.
95         * typeck.c (build_class_member_access_expr): Remove
96         PSEUDO_DTOR_EXPR handling.
97         (lookup_destructor): Likewise.
98
99 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
100
101         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
102         copyright.
103
104 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
105
106         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
107         on boolean variables.
108         (cp_lexer_stop_debugging): Likewise.
109
110 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
111
112         PR c++/17401
113         * parser.c (cp_parser_pure_specifier): Emit a specific error
114         message with an invalid pure specifier.
115         * decl2.c (grok_function_init): Remove.
116         (grokfield): An initializer for a method is a always a pure
117         specifier.
118
119 2005-02-02  Matt Austern  <austern@apple.com>
120
121         PR c++/19628
122         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
123         * parser.c (cp_parser_postfix_expression): Accept function call in
124         constant expression if builtin_valid_in_constant_expr_p is true
125         for that function. 
126         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
127         * semantics.c (finish_id_expression): Accept function call in constant
128         expression if builtin_valid_in_constant_expr_p is true for that
129         function. 
130         * tree.c (builtin_valid_in_constant_expr_p): New.
131         
132 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
133
134         PR c++/17413
135         * pt.c (check_instantiated_args): Improve error message.
136         Fix logic when to print its second part.
137
138 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
139
140         * cp-tree.h (complete_type_or_else): Remove macro.
141         (complete_type_or_diagnostic): Rename to complete_type_or_else
142         and remove last argument.
143         * typeck.c (complete_type_or_diagnostic): Rename to
144         complete_type_or_else and remove last argument.
145
146 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
147
148         * cp-tree.h (commonparms): Remove prototype.
149         (convert_arguments): Likewise.
150         (PFN_FROM_PTRMEMFUNC): Remove.
151         * typeck.c (commonparms): Make static.
152         (convert_arguments): Add prototype. Make static.
153         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
154
155 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
156
157         * parser.c (cp_parser_primary_expression): Don't complain about
158         floating-point literals in integral constant expressions when
159         !pedantic.
160
161 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
162
163         * parser.c (cp_parser_template_id): Revert comment patch too.
164         
165         PR c++/18757
166         PR c++/19366
167         PR c++/19499
168         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
169         Issue an error when creating the template id.
170         * pt.c (fn_type_unification): Return early if the explicit
171         template arg list is an error_mark_node.
172
173 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
174
175         * decl.c (build_enumerator): Do not issue duplicate error messages
176         about invalid enumeration constants.
177         * parser.c (cp_parser_non_integral_constant_expression): Always
178         set parser->non_integral_constant_expression_p.
179         (cp_parser_primary_expression): Add cast_p parameter.  Issue
180         errors about invalid uses of floating-point literals in
181         cast-expressions.
182         (cp_parser_postfix_expression): Add cast_p parameter.
183         (cp_parser_open_square_expression): Pass it.
184         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
185         (cp_parser_unary_expression): Likewise.
186         (cp_parser_new_placement): Pass it.
187         (cp_parser_direct_new_declarator): Likewise.
188         (cp_parser_new_initializer): Likewise.
189         (cp_parser_cast_expression): Add cast_p parameter.
190         (cp_parser_binary_expression): Likewise.
191         (cp_parser_question_colon_clause): Likewise.
192         (cp_parser_assignment_expression): Likewise.
193         (cp_parser_expression): Likewise.
194         (cp_parser_constant_expression): If an integral constant
195         expression is invalid, return error_mark_node.
196         (cp_parser_expression_statement): Pass cast_p.
197         (cp_parser_condition): Likewise.
198         (cp_parser_iteration_statement): Likewise.
199         (cp_parser_jump_statement): Likewise.
200         (cp_parser_mem_initializer): Likewise.
201         (cp_parser_template_argument): Likewise.
202         (cp_parser_parameter_declaration): Likewise.
203         (cp_parser_initializer): Likewise.
204         (cp_parser_throw_expression): Likewise.
205         (cp_parser_attribute_list): Likewise.
206         (cp_parser_simple_cast_expression): Likewise.
207         (cp_parser_functional_cast): Likewise.
208         (cp_parser_late_parsing_default_args): Likewise.
209         (cp_parser_sizeof_operand): Save/restore
210         non_integral_constant_expression_p.
211
212 2005-01-31  Mike Stump  <mrs@apple.com>
213
214         * parser.c (cp_lexer_new_main): Get the first token, first, before
215         doing anything.
216
217 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
218
219         * decl.c (start_decl): Add missing parentheses.
220
221 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
222
223         PR c++/19555
224         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
225         * decl.c (duplicate_decls): Do not discard
226         DECL_IMPLICIT_INSTANTIATION when merging declarations.
227         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
228         variables that do not have DECL_USE_TEMPLATE.
229
230         PR c++/19395
231         * decl.c (grokdeclarator): Refactor code so that qualified names
232         are never allowed as the declarator in a typedef.
233
234         PR c++/19367
235         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
236         builtin declarations.
237
238         PR c++/19457
239         * call.c (convert_like_real): Inline call to
240         dubious_conversion_warnings here.
241         * cp-tree.h (dubious_conversion_warnings): Remove.
242         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
243         setting TREE_NEGATED_INT.
244         * typeck.c (dubious_conversion_warnings): Remove.
245
246         PR c++/19349
247         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
248         memory. 
249
250 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
251
252         PR c++/19253
253         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
254         tentative parses.
255
256         PR c++/19667
257         * pt.c (redeclare_class_template): Robustify.
258
259 2005-01-27  Steven Bosscher  <stevenb@suse.de>
260
261         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
262         instead of SWITCH_EXPR ones.
263         * pt.c (tsubst_expr): Likewise.
264         * semantics.c (begin_switch_stmt, finish_switch_cond,
265         finish_switch_stmt): Likewise.
266
267 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
268
269         PR c++/18370
270         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
271
272 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
273
274         * class.c (abort_fndecl_addr): New variable.
275         (build_vtbl_initializer): If we have a pure virtual function
276         share the abort function's address.
277         Include gt-cp-class.h at the end.
278         * config-lang.in (gtfiles): Add cp/class.c.
279
280 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
281
282         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
283         (pp_cxx_function_definition): Make static.
284         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
285         (pp_cxx_function_definition): Likewise.
286
287 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
288
289         * name-lookup.c (print_binding_level): Make static.
290         (constructor_name_full): Make static inline.
291         (current_decl_namespace): Make static.
292         * name-lookup.h (constructor_name_full): Remove prototype.
293         (print_binding_level): Likewise.
294         (current_decl_namespace): Likewise.
295
296 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
297
298         * decl.h (debug_bindings_indentation): Remove.
299
300 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
301
302         * typeck.c: Fix a comment typo.
303
304 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
305
306         PR c++/19208
307         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
308         at least once.
309         (tsubst): Use fold_decl_constant_value in place of a bare call to
310         integral_constant_value.
311
312 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
313
314         * typeck.c (more_qualified_p): Remove.
315         * cp-tree.h: Remove the corresponding prototype.
316
317 2005-01-19  Matt Austern  <austern@apple.com>
318
319         * typeck.c (comptypes): Handle return code from objc_comptypes
320         correctly.
321         
322 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
323
324         * cp-tree.h, name-lookup.h: Remove unused prototypes.
325
326 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
327
328         PR c++/19375
329         * semantics.c (finish_id_expression): Disable access checking for
330         already lookuped FIELD_DECL.
331
332 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
333
334         * decl.c (delete_block): Remove.
335         * cp-tree.h: Remove the corresponding prototype.
336
337         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
338         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
339         Remove.
340         * cp-tree.h: Remove the corresponding prototypes.
341
342         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
343         cp_update_decl_after_saving, name_p): Remove.
344         * cp-tree.h: Remove the corresponding prototypes.
345
346 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
347
348         PR c/19472
349         * semantics.c (finish_asm_stmt): Strip nops off
350         input memory operands.
351
352 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
353
354         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
355         typeck2.c: Update copyright.
356
357 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
358
359         * class.c (get_enclosing_class): Remove.
360         * cp-tree.h: Remove the corresponding prototypes.
361
362         * cvt.c (convert_lvalue): Remove.
363         * cp-tree.h: Remove the corresponding prototype.
364
365         * pt.c (tinst_for_decl): Remove.
366         * cp-tree.h: Remove the corresponding prototypes.
367
368         * tree.c (hash_chainon): Remove.
369         * cp-tree.h: Remove the corresponding prototypes.
370
371 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
372
373         PR c++/19263
374         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
375         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
376
377 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
378
379         * Make-lang.in (cp-warn): Don't append $(WERROR).
380
381 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
382
383         * cp-tree.h: Fix a comment typo.
384
385 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
386
387         PR c++/19298
388         * pt.c (tsubst_qualified_id): Call convert_from_reference.
389
390 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
391
392         PR c++/19244
393         * class.c (add_implicitly_declared_members): Remove dead code.
394         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
395         DECL_CONSTRUCTOR_P.
396         (grokdeclarator): Adjust calls to grokfndecl.
397         * method.c (implicitly_declare_fn): Improve documentation.
398         * parser.c (cp_parser_direct_declarator): Do not consider a
399         function to be a constructor if the containing class was
400         originally anonymous.
401
402 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
403
404         PR c++/17154
405         * search.c (lookup_field_1): Handle using declaration in
406         class template partial specialization.
407
408 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
409
410         PR c++/19258
411         * pt.c (push_access_scope): Handle friend defined in class.
412         (pop_access_scope): Likewise.
413
414 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
415
416         PR c++/19270
417         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
418         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
419         array-new handling code.  Use build_x_binary_op.
420
421 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
422
423         PR c++/19030
424         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
425         * name-lookup.h (push_scope): Return pushed scope, not flag.
426         * name-lookup.c (push_scope): Return scope that should be popped,
427         not a flag.
428         * decl.c (start_decl): Adjust.
429         (grokfndecl): Adjust scope push and pop.
430         * decl2.c (check_classfn): Likewise.
431         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
432         cp_parser_init_declarator, cp_parser_direct_declarator,
433         cp_parser_class_specifier, cp_parser_class_head,
434         cp_parser_lookup_name,
435         cp_parser_constructor_declarator_p): Likewise.
436         * pt.c (instantiate_class_template,
437         resolve_typename_type): Likewise.
438
439 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aaachen.de>
440
441         PR c++/14136
442         * parser.c (cp_parser_unqualified_id): Do not issue error message
443         for typedef-name as destructor declarator when performing an
444         uncommitted tentative parse.
445
446 2005-01-01  Steven Bosscher  <stevenb@suse.de>
447
448         PR middle-end/17544
449         * decl.c (finish_function): Fix comment.  Annotate the compiler
450         generated return with the current file name and line 0.
451
452 2004-12-31  Richard Henderson  <rth@redhat.com>
453
454         PR middle-end/17799
455         * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
456         * class.c (build_vtable): Don't conditionallize setting it
457         based on DWARF2_DEBUG.
458         (layout_class_type): Set DECL_IGNORED_P.
459         * decl2.c (get_guard): Likewise.
460         * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
461         * tree.c (build_local_temp): Likewise.
462
463 2004-12-30  Mark Mitchell  <mark@codesourcery.com>
464
465         * cp-tree.h (cp_declarator): Split "name" field into
466         qualifying_scope and unqualified_name.
467         * decl.c (get_scope_of_declarator): Adjust accordingly.
468         (grokdeclarator): Likewise.
469         * decl2.c (grokfield): Likewise, and adjust call to
470         do_class_using_decl.
471         * name-lookup.c (do_class_using_decl): Split "decl" into
472         "scope" and "name".  Remove unnecessary code.
473         * name-lookup.h (do_class_using_decl): Adjust declaration.
474         * parser.c (make_id_declarator): Split "id" into qualifying_scope
475         and unqualified_name.
476         (cp_parser_using_declaration): Adjust call to do_class_using_decl.
477         (cp_parser_direct_declarator): Adjust to handle the fact that
478         cp_parser_declarator_id no longer returns a SCOPE_REF.
479         (cp_parser_direct_declarator): Likewise.
480         (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
481         names.
482         (cp_parser_member_declaration): Adjust call to make_id_declarator.
483         (cp_parser_check_declarator_template_parameters): Do not expect a
484         SCOPE_REF. 
485         
486         * decl.c (duplicate_decls): Call ggc_free on declarations we will
487         not be needing any longer.
488
489         PR c++/19190
490         * cvt.c (convert_to_void): Do not use STRIP_NOPs.
491
492 2004-12-28  Richard Henderson  <rth@redhat.com>
493
494         PR inline-asm/15740
495         * semantics.c (finish_asm_stmt): Resolve asm names.  Validate input
496         constraints.  Mark memory inputs addressable.
497
498 2004-12-27  Jason Merrill  <jason@redhat.com>
499
500         * decl.c (expand_static_init): Don't use shortcut if
501         targetm.relaxed_ordering.
502
503 2004-12-27  Mark Mitchell  <mark@codesourcery.com>
504
505         PR c++/19149
506         * decl.c (check_tag_decl): Robustify.
507
508 2004-12-23  Mark Mitchell  <mark@codesourcery.com>
509
510         PR c++/17595
511         * parser.c (cp_parser_error): Issue better messages about
512         #pragma in locations where it is not permitted.
513
514         PR c++/17413
515         * pt.c (check_instantiated_args): Remove bogus SFINAE code.
516
517         * cvt.c (convert_to_void): Fix typo in comment.
518
519 2004-12-23  Alexandre Oliva  <aoliva@redhat.com>
520
521         PR c++/18962
522         * pt.c (check_explicit_specialization): Use the argument list from
523         the definition in a template function specialization definition.
524
525 2004-12-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
526
527         PR c++/18733
528         * pt.c (check_explicit_specialization): Use special logic to validate
529         befriended specializations.
530
531 2004-12-22  Mark Mitchell  <mark@codesourcery.com>
532
533         * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
534
535         PR c++/18464
536         * call.c (build_this): In templates, do not bother with
537         build_unary_op.
538         * typeck.c (unary_complex_lvalue): In a template, always refuse
539         simplifications. 
540
541         PR c++/18492
542         * cp-gimplify.c (cp_genericize): Relax assertion.
543
544         PR c++/11224
545         * cvt.c (convert_to_void): Warn about unused values.
546
547         PR c++/18257
548         * rtti.c (emit_support_tinfos): On systems without weak symbols,
549         emit the runtime library type-info objects as non-COMDAT. 
550
551 2004-12-21  Mark Mitchell  <mark@codesourcery.com>
552
553         PR c++/18378
554         * call.c (convert_like_real): Do not permit the use of a copy
555         constructor to copy a packed field.
556
557         PR c++/19063
558         * decl.c (grokdeclarator): Return error_mark_node, not
559         void_type_node, to indicate errors.
560         * parser.c (cp_parser_template_parameter_list): Robustify.
561         (cp_parser_template_parameter): Likewise.
562
563         PR c++/19034
564         * tree.c (cp_tree_equal): Handle OVERLOAD.
565
566 2004-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
567
568         * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
569         * name-lookup.c (pushdecl_class_level): Likewise.
570
571 2004-12-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
572
573         * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
574
575 2004-12-21  Andrew Pinski  <pinskia@physics.uc.edu>
576
577         PR c++/18984
578         * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
579         check to see if contains the pointer.  Insert the statement before
580         returning.
581
582 2004-12-21  Nathan Sidwell  <nathan@codesourcery.com>
583
584         PR c++/14075
585         * decl.c (check_initializer): Check string initializer of array is
586         not parenthesized.
587         * cp-tree.h (PAREN_STRING_LITERAL_P): New.
588         * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
589         * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
590
591         * cp-tree.def (TEMPLATE_TYPE_PARM,
592         BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder 
593         for better code efficiency.
594         * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
595         (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
596         (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
597         INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
598         CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
599         TYPE_PTROBV_P): Likewise. 
600
601         PR c++/18975
602         * method.c (do_build_copy_constructor): Refactor. Don't const
603         qualify a mutable field.
604         (do_build_assign_ref): Likewise.
605
606 2004-12-20  Matt Austern <austern@apple.com>
607
608         PR c++/19044
609         * decl.c (make_rtl_for_nonlocal_decl): Use
610         set_builtin_user_assembler_name.
611         
612 2004-12-19  Mark Mitchell  <mark@codesourcery.com>
613
614         * cp-tree.h (note_decl_for_pch): New function.
615         * class.c (build_clone): Call note_decl_for_pch.
616         * semantics.c (finish_member_declaration): Likewise.
617         (note_decl_for_pch): New function.
618
619 2004-12-17  Steven Bosscher  <stevenb@suse.de>
620
621         * init.c (build_zero_init): max_index is the number of
622         elements, minus 1.
623
624 2004-12-17  Nathan Sidwell  <nathan@codesourcery.com>
625
626         PR c++/18721
627         * class.c (add_method): Do not push conversion operators into a
628         binding level.
629
630         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
631         * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
632
633 2004-12-16  Nathan Sidwell  <nathan@codesourcery.com>
634
635         PR c++/18905
636         * cp-tree.h (integral_constant_value): Declare.
637         * call.c (null_ptr_cst_p): Use integral_constant_value, not
638         decl_constant_value.
639         (convert_like_real): Likewise.
640         * class.c (check_bitfield_decl): Likewise.
641         * cvt.c (ocp_convert): Likewise.
642         (convert): Remove unnecessary decl_constant_value call.
643         * decl.c (compute_array_index_type): Use integral_constant_value,
644         not decl_constant_value.
645         (build_enumerator): Likewise.
646         * decl2.c (grokfield): Likewise.
647         * init.c (decl_constant_value): Simplify.
648         (integral_constant_value): New.
649         * pt.c (fold_decl_constant_value): Use integral_constant_value,
650         remove subsequent check.
651         (tsubst): Use integral_constant_value, not decl_constant_value.
652         (tsubst_copy, unify): Likewise.
653         * typeck.c (decay_conversion): Likewise.
654         (build_compound_expr): Remove unnecessary decl_constant_value
655         calls.
656         (build_static_cast_1, build_reinterpret_cast_1):
657         (convert_for_assignment): Remove comment about not calling
658         decl_constant_value.
659
660 2004-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
661
662         PR c++/18825
663         * pt.c (instantiate_class_template): Set input_location for
664         friend function.
665         (tsubst_friend_function): Don't set input_location here.
666         Make sure the context is complete if necessary.
667
668 2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>
669
670         PR c++/18981
671         * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
672         flag setting.
673
674 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
675
676         PR c++/18738
677         * decl.c (make_typename_type): Do not handle namespace-scoped
678         names here.
679         (tag_name): Handle typename_type.
680         (check_elaborated_type_specifier): Handle typenames.
681         * parser.c (cp_parser_diagnose_invalid_type_name): Improve
682         comment.
683         (cp_parser_elaborated_type_specifier): Use
684         cp_parser_diagnose_invalid_type_name.
685
686 2004-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
687
688         PR c++/18965
689         * init.c (build_zero_init): If the max_index is 0, there is no
690         need to create a RANGE_EXPR.
691
692 2004-12-14  Mark Mitchell  <mark@codesourcery.com>
693
694         PR c++/18793
695         * cp-objcp-common.c (cp_expr_size): Loosen assertion.
696
697 2004-12-14  Nathan Sidwell  <nathan@codesourcery.com>
698
699         PR c++/18949
700         * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
701         REFERENCE_REF_P is dereferencing a reference type.
702         * typeck.c (build_static_cast): Convert from reference even in a
703         template.
704         (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
705
706 2004-12-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
707
708         * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
709         (cp_parser_name_lookup_error): Use it.
710         (cp_parser_check_for_invalid_template_id): Likewise.
711         (cp_parser_skip_to_closing_parenthesis): Likewise.
712         (cp_parser_nested_name_specifier_opt): Likewise.
713         (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
714         (cp_parser_parameter_declaration_list): Likewise.
715         (cp_parser_parameter_declaration): Likewise.
716         (cp_parser_template_name): Let cp_parser_simulate_error perform
717         the checking.
718         (cp_parser_committed_to_tentative_parse): Remove.
719
720 2004-12-13  Andrew Pinski  <pinskia@physics.uc.edu>
721
722         PR c++/18968
723         * class.c (build_base_path): Convert the zero constant to the correct
724         type when comparing.
725
726 2004-12-13  Mark Mitchell  <mark@codesourcery.com>
727
728         PR c++/18925
729         * class.c (layout_class_type): Determine the visibility of static
730         data members.
731
732 2004-12-12  Roger Sayle  <roger@eyesopen.com>
733
734         PR middle-end/12454
735         * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
736         condition is a constant and the unexecuted clause is empty.
737
738 2004-12-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
739
740         PR c++/18731
741         * parser.c (cp_parser_class_head): Reject typedef-name in class head.
742
743 2004-12-09  Matt Austern  <austern@apple.com>
744
745         PR c++/18514
746         * name-lookup.c (do_nonmember_using_decl): A real function
747         declaration takes precedence over an anticipated declaration.
748         
749 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
750
751         * parser.c (cp_parser_member_declaration): Fix comment typo.
752
753 2004-12-09  Alexandre Oliva  <aoliva@redhat.com>
754
755         PR c++/18757
756         * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
757         if parsing failed.
758
759 2004-12-09  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
760
761         PR c++/18073
762         * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
763
764 2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>
765
766         PR c++/16681
767         * init.c (build_zero_init): Build a RANGE_EXPR for an array
768         initializer.
769
770 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
771
772         * typeck.c: Remove DOS line endings.
773
774 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
775
776         PR c++/18100
777         * decl.c (lookup_and_check_tag): Diagnose nested class with 
778         the same name as enclosing class.
779
780 2004-12-08  Nathan Sidwell  <nathan@codesourcery.com>
781
782         PR c++/18803
783         * cp-tree.h (REFERENCE_REF_P): New.
784         (CPTI_TYPE_INFO_TYPE): Rename to ...
785         (CPTI_CONST_TYPE_INFO_TYPE): ... here.
786         (CPTI_TYPE_INFO_REF_TYPE): Remove.
787         (type_info_type_node): Rename to ...
788         (const_type_info_type_node): ... here.
789         (type_info_ref_type): Remove.
790         * call.c (build_user_type_conversion): Reformat.
791         (resolve_args): Do not convert_from_reference.
792         (build_object_call): Call convert_from_reference.
793         (prep_operand): Do not convert_from_reference.
794         (build_new_method_call): Likewise.
795         * class.c (build_vfield_ref): Likewise.
796         * cvt.c (convert_to_reference): Likewise.
797         (convert_from_reference): Build INDIRECT_REF here, not with
798         build_indirect_ref.
799         (convert_force): Do not convert_from_reference.
800         (build_expr_type_conversion): Likewise.
801         * decl.c (grok_reference_init): Likewise.
802         * decl2.c (delete_sanity): Likewise.
803         * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
804         * init.c (build_dtor_call): Do not convert_from_reference.
805         * parser.c (cp_parser_template_argument): Unwrap indirected
806         reference. Allow TEMPLATE_PARM_INDEX as an object parm.
807         * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
808         convert_from_reference, if indicated.
809         <case CALL_EXPR>: Do not convert_from_reference.
810         <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
811         (tsubst_initializer_list): Do not convert_from_reference.
812         * rtti.c (init_rtti_processing): Adjust node creation.
813         (throw_bad_typeid): Use const_type_info_type_node.
814         Do not convert_from_reference.
815         (typeid_ok_p): Use const_type_info_type_node.
816         (build_typeid, get_typeid): Always return type_info typed node.
817         (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
818         * semantics.c (finish_stmt_expr_expr): Do not
819         convert_from_reference.
820         (finish_id_expression): Convert_from_reference as appropriate.
821         * typeck.c (decay_conversion): Do not convert_from_reference.
822         (finish_class_member_access_expr): Likewise.
823         (build_indirect_ref): Use POINTER_TYPE_P.
824         (convert_arguments): Do not convert_from_reference.
825         (build_modify_expr): Likewise.
826         (convert_for_initialization): Likewise.
827         * typeck2.c (build_x_arrow): Likewise.
828
829 2004-12-07  Ziemowit Laski  <zlaski@apple.com>
830
831         * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
832         field to 'objc_info'.
833
834 2004-12-07  Kazu Hirata  <kazu@cs.umass.edu>
835
836         * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
837
838 2004-12-07  Roger Sayle  <roger@eyesopen.com>
839
840         * name-lookup.c (leave_scope): We only need to update
841         class_binding_level when leaving a class scope.
842
843 2004-12-06  Ziemowit Laski  <zlaski@apple.com>
844
845         * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
846
847 2004-12-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
848
849         PR c++/17011, c++/17971
850         * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
851         invalid field.
852         (tsubst_copy_and_build) <COMPONENT_REF case>: Check
853         error_mark_node after member substitution.
854         * semantics.c (finish_id_expression): Call
855         finish_non_static_data_member for non-dependent FIELD_DECL.
856
857 2004-12-03  Nathan Sidwell  <nathan@codesourcery.com>
858
859         PR c++/18782
860         * decl.c (grokdeclarator): Make sure class in pointer to member is
861         not a namespace.
862
863 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
864
865         PR c++/18318
866         * parser.c (cp_parser_new_type_id): Move array size expression
867         checks from here ...
868         * init.c (build_new): ... to here.
869
870 2004-12-02  Nathan Sidwell  <nathan@codesourcery.com>
871
872         PR c++/18758
873         * parser.c (cp_parser_class_head): Return NULL_TREE when
874         push_template_decl fails.  Update comment.
875
876 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
877
878         PR c++/15664, c++/18276
879         * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize.  Correctly
880         tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
881
882 2004-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
883
884         PR c++/18123
885         * parser.c (cp_parser_type_specifier): Catch template declaration
886         of enum.
887
888 2004-12-01  Matt Austern  <austern@apple.com>
889
890         * name-lookup.c (namespace_binding): Omit alias check for global
891         namespace.
892
893 2004-12-01  Nathan Sidwell  <nathan@codesourcery.com>
894
895         PR c++/18729
896         * parser.c (cp_parser_class_name): Check decl's type is not
897         error_mark_node.
898
899         PR c++/17431
900         * call.c (standard_conversion): Add FLAGS parameter. Do not allow
901         derived to base conversion when checking constructor
902         accessibility.
903         (implicit_conversion): Pass FLAGS to standard_conversion.
904         (check_constructir_callable): Disallow conversion functions.
905
906 2004-11-30  Kazu Hirata  <kazu@cs.umass.edu>
907
908         * parser.c: Fix comment typos.
909
910 2004-11-27  Mark Mitchell  <mark@codesourcery.com>
911
912         PR c++/18368
913         * parser.c (cp_parser_check_for_definition_in_return_type): Take
914         the defined type as a parameter, and inform the user about the
915         possibility of a missing semicolon.
916         (cp_parser_explicit_instantiation): Adjust call to
917         cp_parser_check_for_definition_in_return_type.
918         (cp_parser_init_declarator): Likewise.
919         (cp_parser_member_declaration): Likewise.
920
921         PR c++/18674
922         * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
923         typename from comments.
924         * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
925         (TYPENAME_IS_CLASS_P): Likewise.
926         (make_typename_type): Change prototype.
927         * decl.c (struct_typename_info): New type.
928         (typename_compare): Expect the second argument to be a
929         typename_info, not a tree.
930         (build_typename_type): Add tag_type parameter.  Do not create a
931         new type until necessary.
932         (make_typename_type): Add tag_type parameter.
933         * error.c (TYPENAME_TYPE): Print tags other than "typename" if
934         appropriate.
935         * friend.c (make_friend_class): Adjust call to make_typename_type.
936         * parser.c (cp_parser_make_typename_type): Likewise.
937         (cp_parser_primary_expression): Adjust call to
938         cp_parser_lookup_name.
939         (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
940         (cp_parser_class_or_namespace_name): Likewise.
941         (cp_parser_postfix_expression): Adjust calls to
942         make_typename_type.
943         (cp_parser_mem_initializer_id): Adjust calls to
944         cp_parser_class_name.
945         (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
946         (cp_parser_template_name): Likewise.
947         (cp_parser_template_argument): Likewise.
948         (cp_parser_type_name): Adjust call to cp_parser_class_name.
949         (cp_parser_elaborated_type_specifier): Adjust calls to
950         make_typename_type and cp_parser_lookup_name.
951         (cp_parser_namespace_name): Likewise.
952         (cp_parser_class_name): Replace type_p parameter with tag_type.
953         Adjust calls to make_typename_type and cp_parser_lookup_name.
954         (cp_parser_class_head): Adjust calls to cp_parser_class_name.
955         (cp_parser_base_specifier): Likewise.
956         (cp_parser_lookup_name): Replace is_type parameter with tag_type.
957         Adjust calls to make_typename_type and lookup_qualified_name.
958         (cp_parser_lookup_name_simple): Adjust call to
959         cp_parser_lookup_name.
960         (cp_parser_constructor_declarator_p): Adjust call to
961         cp_parser_class_name.
962         * pt.c (convert_template_argument): Adjust all to
963         make_typename_type.
964         (tsubst_decl): Do not pre-substitute the type of the declaration.
965         (tsubst): Hand off declarations more quickly.  Adjust call to
966         make_typename_type. 
967
968         PR c++/18512
969         * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
970
971 2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
972
973         PR c/7544
974         * Make-lang.in (cp/decl2.o): Update dependencies.
975         * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
976
977 2004-11-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
978
979         PR c++/18652
980         * name-lookup.c (pushtag): Change return type to tree.
981         * cp-tree.h (pushtag): Adjust declaration.
982         * decl.c (xref_tag, start_enum): Use return value of pushtag.
983         * pt.c (push_template_decl_real): Return immediately if
984         pushdecl_namespace_level returns error_mark_node.
985
986 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
987
988         * pt.c: Fix a comment typo.
989
990 2004-11-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
991
992         Friend class name lookup 4/n
993         * class.c (pushclass): Don't call cxx_remember_type_decls.
994         * cp-tree.h (clear_anon_tags): Remove declaration.
995         * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
996         * name-lookup.c (binding_entry_free, binding_table_free): Comment
997         out functions.
998         (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
999         binding_table_remove_anonymous_types, cxx_remember_type_decls,
1000         bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
1001         lookup_tag_reverse): Remove
1002         (begin_scope, leave_scope, kept_level_p, print_binding_level):
1003         Don't use type_decls field in cp_binding_level.
1004         (maybe_process_template_type_declaration, pushtag): Set
1005         CLASSTYPE_NESTED_UTDS directly.
1006         * name-lookup.h (binding_table_remove_anonymous_types,
1007         cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
1008         declaration.
1009         (cp_binding_level): Remove type_decls field.
1010
1011 2004-11-26  Kazu Hirata  <kazu@cs.umass.edu>
1012
1013         * typeck.c: Fix a comment typo.
1014
1015 2004-11-25  Mark Mitchell  <mark@codesourcery.com>
1016
1017         PR c++/18445
1018         * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
1019         unknown_type as non matching.  Tidy up.
1020         * pt.c (build_non_dependent_expr): Do not build a
1021         NON_DEPENDENT_EXPR for a VAR_DECL.
1022
1023         PR c++/18001
1024         * cp-tree.h (lvalue_or_else): Remove declaration.
1025         * tree.c (lvalue_or_else): Remove.
1026         * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
1027         (build_modify_expr): Likewise.
1028
1029         PR c++/18625
1030         * decl.c (duplicate_decls): Return error_mark_node on error, as
1031         specified.
1032
1033         PR c++/18466
1034         * decl.c (grokvardecl): Keep track of whether or not a there was
1035         explicit qualification.
1036         * name-lookup.c (set_decl_namespace): Complain about explicit
1037         qualification of a name within its own namespace.
1038
1039         PR c++/18545
1040         * typeck.c (check_return_expr): Robustify.
1041
1042 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1043
1044         Friend class name lookup 3/n, PR c++/3332
1045         * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
1046         (lookup_type_scope): Don't deal with name from user declaration
1047         specially.
1048         * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
1049         * parser.c (cp_parser_class_specifier): Use push_inner_scope and
1050         pop_inner_scope.
1051
1052 2004-11-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1053
1054         Friend class name lookup 2/n, PR c++/14513, c++/15410
1055         * name-lookup.c (lookup_name_real): Simplify.
1056         (lookup_type_scope): Add SCOPE parameter.  Handle friend class
1057         lookup.
1058         * name-lookup.h (tag_scope): New enum type.
1059         (lookup_type_scope): Adjust declaration.
1060         * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
1061         Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
1062         (start_enum): Likewise.  Add assertion test that NAME is 
1063         IDENTIFIER_NODE.  Use anonymous name for dummy ENUMERAL_TYPE in
1064         case of error.
1065         * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
1066         * parser.c (cp_parser_elaborated_type_specifier,
1067         cp_parser_class_head): Adjust call to xref_tag.
1068         * pt.c (lookup_template_class, instantiate_class_template):
1069         Likewise.
1070         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
1071         tinfo_base_init, emit_support_tinfos): Likewise.
1072
1073 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1074
1075         * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
1076
1077 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
1078
1079         PR c++/17473
1080         * name-lookup.c (supplement_binding): Do not allow typedefs to be
1081         redefined in class scope.
1082
1083         PR c++/18285
1084         * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
1085         redefinitions of builtin types other that "bool" or "wchar_t".
1086
1087 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1088
1089         * decl.c (cxx_init_decl_processing): Don't clear
1090         flag_inline_functions.
1091
1092 2004-11-24  Mark Mitchell  <mark@codesourcery.com>
1093
1094         * pt.c (tsubst_function_type): Do not permit function types which
1095         return arrays or functions.
1096
1097         PR c++/18586
1098         * parser.c (cp_parser_init_declarator): Do not pop scope twice.
1099
1100         PR c++/18530
1101         * cp-tree.h (CTOR_NAME): Remove.
1102         (DTOR_NAME): Remove.
1103         * decl.c (initialize_predefined_identifiers): Add spaces to the
1104         end of constructor and destructor names.
1105
1106 2004-11-24  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1107
1108         PR c++/8929
1109         * decl.c (start_decl): Check for invalid specialization headers.
1110
1111 2004-11-24  Paolo Bonzini  <bonzini@gnu.org>
1112
1113         PR c++/16882
1114
1115         * call.c (standard_conversion): Move check for conversions between
1116         vector pointers...
1117         * typeck.c (ptr_reasonably_similar): ... here.
1118
1119 2004-11-23  Ben Elliston  <bje@au.ibm.com>
1120
1121         * cp-tree.h (context_as_string): Remove extern.
1122         * error.c (context_as_string): Remove.
1123
1124         * cp-tree.h (cp_type_qual_from_rid): Remove extern.
1125         * lex.c (cp_type_qual_from_rid): Remove.
1126
1127         * cp-tree.h (do_poplevel): Remove extern.
1128         (check_multiple_declarators): Likewise.
1129         * semantics.c (do_poplevel): Make static.
1130         (check_multiple_declarators): Remove.
1131
1132         * cp-tree.h (check_final_overrider): Remove extern.
1133         * search.c (check_final_overrider): Make static.
1134
1135         * cp-tree.h (build_artificial_parm): Remove extern.
1136         * decl2.c (build_artificial_parm): Make static.
1137
1138 2004-11-22  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1139
1140         PR c++/18354
1141         * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
1142         Make sure the result is always a rvalue.
1143
1144 2004-11-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1145
1146         * decl.c (start_preparsed_function): Call check_function_type even
1147         in templates.
1148         (require_complete_types_for_parms): Skip dependent types.
1149         (check_function_type): Likewise.
1150
1151 2004-11-16  Steven Bosscher  <stevenb@suse.de>
1152
1153         * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
1154         * search.c: Don't include it.
1155
1156 2004-11-15  Andrew Pinski  <pinskia@physics.uc.edu>
1157
1158         * cp-gimplify.c: Include pointer-set.h
1159         (cp_genericize_r): Use pointer_sets instead of a hashtable.
1160         Also instert the new statement for CLEANUP_STMT.
1161         (cp_genericize): Use pointer_sets instead of a hashtable.
1162         * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
1163
1164 2004-11-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1165
1166         Friend class name lookup 1/n, PR c++/18471
1167         * decl.c (lookup_and_check_tag): New function.
1168         (xref_tag, start_enum): Use it.
1169         (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
1170         before !DECL_IMPLICIT_TYPEDEF_P.  Also display previously declared
1171         location.
1172         * name-lookup.c (lookup_name_current_level): Rename to ...
1173         (lookup_name_innermost_nonclass_level): ... this.
1174         (lookup_type_scope): New function.
1175         * name-lookup.h (lookup_name_current_level): Rename to ...
1176         (lookup_name_innermost_nonclass_level): ... this.
1177         (lookup_type_scope): Add declaration.
1178
1179 2004-11-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1180
1181         PR c++/17344
1182         * pt.c (coerce_template_parms): Only emit error message about
1183         invalid template argument when TF_ERROR.
1184
1185 2004-11-12  Mark Mitchell  <mark@codesourcery.com>
1186
1187         PR c++/18389
1188         * decl.c (start_decl): Make sure to set *pop_scope_p.  Return
1189         error_mark_node to indicate errors.
1190
1191         PR c++/18429
1192         * parser.c (cp_parser_direct_declarator): Disallow non-constant
1193         array bounds when not inside a function.
1194
1195         PR c++/18436
1196         * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
1197         unqualified name resolves to a member function.
1198
1199         PR c++/18407
1200         * pt.c (tsubst_copy_and_build): Handle qualified names used from a
1201         derived class correctly.
1202         
1203         * decl2.c (import_export_decl): Fix typo in comment.
1204         * tree.c (pod_type_p): Likewise.
1205
1206 2004-11-10  Andrew Pinski  <pinskia@physics.uc.edu>
1207
1208         * typeck.c (cxx_mark_addressable): Add braces around the first if.
1209
1210 2004-11-10  Adam Nemet  <anemet@lnxw.com>
1211
1212         PR middle-end/18160  
1213         * typeck.c (cxx_mark_addressable): Issue an error if address of an
1214         explicit register variable is requested.
1215
1216 2004-11-10  Nathan Sidwell  <nathan@codesourcery.com>
1217
1218         PR c++/18143
1219         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
1220         (struct lang_decl_flags): Add thunk_p flag.
1221         (struct lang_decl): Remove separate fixed_offset. Place
1222         cloned_function and fixed_offset into union.
1223         (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
1224         (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
1225         (THUNK_FIXED_OFFSET): Adjust.
1226         * method.c (make_thunk): Adjust.
1227
1228 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
1229
1230         PR c++/18369
1231         * init.c (build_new_1): Handle parenthesized type-ids that name an
1232         array type.  Tidy.
1233
1234 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
1235
1236         * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
1237         pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
1238         quoting in diagnostics.
1239         * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
1240         quoting in printf format.
1241         * decl.c (duplicate_decls, start_decl): Use %qD instead of
1242         unquoted %D.
1243
1244 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
1245
1246         * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
1247         search.c, typeck2.c: Fix comment formatting.
1248
1249 2004-11-04  Ulrich Weigand  <uweigand@de.ibm.com>
1250         
1251         PR tree-optimization/18184
1252         * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
1253         of different modes or alias-all flags as equivalent.
1254         * typeck.c (comptypes): Likewise.
1255
1256 2004-11-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1257
1258         DR 49, 100
1259         * cp-tree.h (TYPE_REF_OBJ_P): New macro.
1260         (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
1261         TYPE_REFFN_P): Document.
1262         (fold_decl_constant_value): New prototype.
1263         * pt.c (convert_nontype_argument_function): Rewrite and extract
1264         parts into...
1265         (fold_decl_constant_value, convert_nontype_argument_function): New.
1266         (lookup_template_class): Add comment about useless double call.
1267         * mangle.c (write_expression): Strip conversions before lowering
1268         pointer to members.
1269         * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
1270         enum to enum conversion.
1271
1272 2004-11-02  Mark Mitchell  <mark@codesourcery.com>
1273
1274         PR c++/18124
1275         * parser.c (cp_parser_type_parameter): Robustify.
1276
1277         PR c++/18155
1278         * parser.c (cp_parser_single_declaration): Disallow template
1279         typedefs.
1280
1281         PR c++/18177
1282         * typeck.c (build_const_cast): Use error_operand_p.
1283
1284 2004-11-02  Ziemowit Laski  <zlaski@apple.com>
1285
1286         * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
1287         (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
1288         * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
1289         from cp-lang.c.
1290         * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
1291         from cp-lang.c.
1292         (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
1293
1294 2004-11-01  Nathan Sidwell  <nathan@codesourcery.com>
1295
1296         PR c++/18064
1297         * search.c (check_final_overrider): Deprecate gnu covariant extension.
1298
1299 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1300
1301         Convert diagnostics to use quoting flag q 9/n
1302         * typeck.c (build_x_unary_op, convert_member_func_to_ptr, 
1303         get_delta_difference):  Use new quotation style.
1304         * repo.c (reopen_repo_file_for_write): Likewise.
1305         * pt.c (do_type_instantiation): Likewise.
1306         * parser.c (cp_parser_diagnose_invalid_type_name): 
1307         * name-lookup.c (push_overloaded_decl, set_decl_namespace): 
1308         * error.c (cp_print_error_function,
1309         print_instantiation_full_context): Likewise.
1310         * decl.c (define_label, grok_reference_init, 
1311         maybe_deduce_size_from_array_init, revert_static_member_fn): 
1312         * decl2.c (check_classfn): Likewise.
1313         * class.c (add_method, check_field_decls, layout_class_type, 
1314         resolve_address_of_overloaded_function): Likewise.
1315         * call.c (build_x_va_arg, build_over_call): Likewise.
1316
1317 2004-10-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1318
1319         Convert diagnostics to use quoting flag q 8/n
1320         * cvt.c (cp_convert_to_pointer, warn_ref_binding, 
1321         convert_to_reference, ocp_convert, convert_to_void 
1322         cp_convert_to_pointer): Use new quotation style.
1323
1324 2004-10-31  Mark Mitchell  <mark@codesourcery.com>
1325
1326         PR c++/15172
1327         * typeck2.c (store_init_value): Use split_nonconstant_init even
1328         for types that require construction.
1329         
1330 1004-10-28  Matt Austern  <austern@apple.com>
1331
1332         PR c++/17542
1333         * cp-tree.h (class_key_or_enum_as_string): Declare.
1334         * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
1335         and remove static qualifier.
1336         * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
1337         union/enum declaration.
1338         
1339 2004-10-29  Kazu Hirata  <kazu@cs.umass.edu>
1340
1341         * pt.c: Fix a comment typo.
1342
1343 2004-10-28  Nathan Sidwell  <nathan@codesourcery.com>
1344
1345         * typeck.c (composite_pointer_type): Remove comment about DR 195.
1346         (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
1347         warning when being pedantic.
1348         (build_reinterpet_cast, build_c_cast): Adjust.
1349
1350 2004-10-29  Mark Mitchell  <mark@codesourcery.com>
1351
1352         PR c++/17695
1353         * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
1354         appear in a constructor/destructor that will be cloned.
1355
1356 1004-10-28  Matt Austern  <austern@apple.com>
1357
1358         PR c++/14124
1359         * decl.c (finish_enum): Handle packed attribute.
1360         * parser.c (cp_parser_enum_specifier): Process trailing attributes.
1361         
1362 2004-10-28  Mark Mitchell  <mark@codesourcery.com>
1363
1364         PR c++/17132
1365         * pt.c (instantiate_class_template): Increment
1366         processing_template_decl when substituting into a member class
1367         template.
1368
1369 2004-10-27  Mark Mitchell  <mark@codesourcery.com>
1370
1371         PR c++/17435
1372         * call.c (convert_like_real): Fix formatting.
1373         (initialize_reference): When binding a temporary to a base class,
1374         ensure that the nominal copy made is to the derived class, not the
1375         base class.
1376
1377         PR c++/18140
1378         * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
1379         include ">>".
1380
1381 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1382
1383         * decl.c (bad_specifiers): Move the q after the %.
1384
1385 2004-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
1386
1387         * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
1388         the %.
1389
1390 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
1391
1392         * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
1393         * search.c (current_scope): Fix prototype.
1394
1395         PR c++/18093
1396         * search.c (current_scope): Return the innermost non-block scope,
1397         not the innermost non-block, non-namespace scope.
1398         (at_namespace_scope_p): Adjust accordingly.
1399         (dfs_accessible_post): Do not pass namespaces to is_friend.
1400         (dfs_walk_once_accessible_r): Likewise.
1401         * decl.c (grokvardecl): Adjust call to current_scope.
1402         (build_enumerator): Likewise.
1403         * parser.c (cp_parser_using_declaration): Likewise.
1404         (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
1405         current_scope.
1406         (cp_parser_class_head): Adjust call to current_scope.
1407         * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
1408         alias.
1409
1410         PR c++/18020
1411         * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
1412         their underlying values.
1413
1414         PR c++/18161
1415         * typeck.c (build_binary_op): Honor build_type, even when in a
1416         template.
1417
1418 2004-10-26  Nathan Sidwell  <nathan@codesourcery.com>
1419
1420         * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
1421         padding token checking.
1422
1423 2004-10-25  Andrew Pinski  <pinskia@physics.uc.edu>
1424
1425         PR c++/18121
1426         * decl.c (grokdeclarator) <case cdk_array>: Remove the call
1427         layout_type as it is already done by create_array_type_for_decl.
1428
1429 2004-10-22  Nathan Sidwell  <nathan@codesourcery.com>
1430
1431         PR c++/18095
1432         * parser.c (eof_token): Make const, correctly initialize rid and
1433         location fields.
1434         (struct cp_lexer): Replace buffer_end pointer with buffer_length
1435         count. Adjust.
1436         (cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
1437         zero it out.
1438         (cp_lexer_new_from_tokens): Adjust.
1439         (cp_lexer_grow_buffer): Remove.
1440         (cp_lexer_peek_nth_token, cp_lexer_consume_token,
1441         cp_lexer_purge_token): Add const casts.
1442
1443 2004-10-21  Mark Mitchell  <mark@codesourcery.com>
1444
1445         PR c++/18073
1446         PR c++/10841
1447         * cp-tree.h (convert_to_base): Change prototype.
1448         (build_ptrmemfunc): Likewise.
1449         (convert_ptrmem): New function.
1450         * call.c (struct conversion): Adjust documentation for base_p.
1451         (standard_conversion): Set base_p for ck_pmem conversions as
1452         appropriate.
1453         (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
1454         conversions.
1455         * class.c (convert_to_base): Handle both pointers and objects.
1456         Add nonnull parameter.
1457         (build_vfield_ref): Adjust call to convert_to_base.
1458         * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
1459         (convert_force): Likewise.
1460         * typeck.c (build_unary_op): Likewise.
1461         (convert_ptrmem): New function.
1462         (build_static_cast_1): Use it.
1463         (build_reinterpret_cast): Allow conversions to vector types.
1464         (get_delta_difference): Add c_cast_p parameter.
1465         (build_ptrmemfunc): Likewise.  Adjust calls to
1466         get_delta_difference.
1467
1468 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
1469
1470         PR c++/13560
1471         * error.c (cp_error_at): Output the context as it might be
1472         different file as the other location.
1473
1474 2004-10-21  Kazu Hirata  <kazu@cs.umass.edu>
1475
1476         * typeck.c: Fix a comment typo.
1477
1478 2004-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1479
1480         PR c++/13495
1481         * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
1482         * cp-tree.h (make_unbound_class_template): Adjust prototype.
1483         * parser.c (cp_parser_lookup_name): Adjust call to
1484         make_unbound_class_template.
1485         (cp_parser_single_declaration): Handle member class of class
1486         template as template friend parsing correctly.
1487         * friend.c (is_friend): Call is_specialization_of_friend for
1488         template friend class.
1489         (make_friend_class): Handle member class of class template as
1490         template friend.
1491         * pt.c (is_specialization_of_friend): Likewise.
1492         (instantiate_class_template): Likewise.
1493         (tsubst): Adjust call to make_unbound_class_template.
1494
1495 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
1496
1497         * typeck.c (composite_pointer_type): Add comment about DR 195
1498         (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
1499         Allow function pointer conversions that DR195 suggests.
1500         (build_reinterpret_cast, build_c_cast): Update
1501         build_reinterpret_cast_1 calls. 
1502
1503 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
1504
1505         * call.c, typeck.c: Fix comment typos.
1506
1507 2004-10-20  Nathan Sidwell  <nathan@codesourcery.com>
1508
1509         * parser.c (cp_token_position): New typedef. Define VEC thereof.
1510         (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
1511         next_token and last_token cp_token_position. Make saved_tokens a
1512         VEC(cp_token_position).
1513         (eof_token): New static variable.
1514         (CP_SAVED_TOKENS_SIZE): Rename to ...
1515         (CP_SAVED_TOKEN_STACK): ... here.
1516         (cp_lexer_new_main): Adjust main lexer creation and buffer
1517         filling.
1518         (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
1519         to the parent buffer.  Do not append eof token.
1520         (cp_lexer_destroy): Only free buffer if non-NULL. Free token
1521         stack.
1522         (cp_lexer_next_token, cp_lexer_prev_token): Remove.
1523         (cp_lexer_token_position, cp_lexer_token_at): New.
1524         (cp_lexer_saving_tokens): Adjust. Make inline.
1525         (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
1526         (cp_lexer_peek_token_emit_debug_info): Fold into ...
1527         (cp_lexer_peek_token): ... here.
1528         (cp_lexer_peek_nth_token): Don't peek past EOF.
1529         (cp_lexer_consume_token): Set next_token to eof_token, if reaching
1530         EOF.
1531         (cp_lexer_purge_token): Adjust eof setting.
1532         (cp_lexer_purge_tokens_after): Likewise.
1533         (cp_lexer_save_tokens): Push next_token directly.
1534         (cp_lexer_commit_tokens): Adjust.
1535         (cp_lexer_rollback_tokens): Pop next_token directly.
1536         (cp_parser_check_for_invalid_template_id): Adjust token purging.
1537         (cp_parser_translation_unit): Do not consume the EOF.
1538         (cp_parser_nested_name_specifier_opt): Adjust token purging.
1539         (cp_parser_template_id, cp_parser_template_name): Likewise.
1540
1541 2004-10-19  Mark Mitchell  <mark@codesourcery.com>
1542
1543         PR c++/14035
1544         * call.c (struct conversion): Add base_p.
1545         (convert_like): Add c_cast_p argument.
1546         (convert_like_with_conversion): Likewise.
1547         (build_conv): Clear base_p.
1548         (standard_conversion): Set it, for derived-to-base conversions.
1549         (convert_like_real): Add c_cast_p parameter.  Handle pointer
1550         conversions directly rather than relying on ocp_convert.
1551         (perform_direct_initialization_if_possible): Add c_cast_p
1552         parameter.
1553         * cp-tree.h (perform_direct_initialization_if_possible): Change
1554         prototype.
1555         (convert_member_func_to_ptr): New function.
1556         * typeck.c (check_for_casting_away_constness): Add diag_fn
1557         parameter.
1558         (build_static_cast_1): New function, split out from ...
1559         (build_static_cast): ... here.  Use build_static_cast_1.
1560         (build_reinterpret_cast_1): New function, split out from ...
1561         (build_reinterpret_cast): ... here.  Use build_reinterpret_cast_1.
1562         (build_const_cast_1): New function, split out from ...
1563         (build_const_cast): ... here.  Use build_const_cast_1.
1564         (build_c_cast): Rewrite to use build_const_cast_1,
1565         build_static_cast_1, and build_reinterpret_cast_1.
1566         (convert_member_func_to_ptr): New function.
1567
1568 2004-10-19  Paolo Bonzini  <bonzini@gnu.org>
1569
1570         PR c++/18047
1571         * parser.c (enum cp_parser_prec): Give relational expressions
1572         a higher precedence than equality expressions.
1573
1574 2004-10-15  Nathan Sidwell  <nathan@codesourcery.com>
1575
1576         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
1577         (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
1578         (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
1579         (enum base_access): Reorganize.
1580         (accessible_base_p, accessible_p): Add consider_local_p parameter.
1581         * call.c (standard_conversion): Update comment about
1582         DERIVED_FROM_P.
1583         (enforce_access): Adjust accessible_p call.
1584         (build_over_call): Adjust accessible_base_p call.
1585         * class.c (convert_to_base): Adjust lookup_base call.
1586         (build_vtbl_ref_1): Likewise.
1587         (warn_about_ambiguous_bases): Likewise. Add early exit.
1588         * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
1589         * search.c (accessible_base_p): Add consider_local_p parameter.
1590         (lookup_base): Pass consider_local_p to accessible_base_p call.
1591         (friend_accessible_p): Check whether scope is a class member.
1592         Remove unnecessary class template check.
1593         (accessible_p): Add consider_local_p parameter. Use it.
1594         (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
1595         * tree.c (maybe_dummy_object): Likewise.
1596         * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
1597         (build_class_member_access_expr): Adjust lookup_base call.
1598         * typeck2.c (binfo_or_else): Likewise.
1599         * rtti.c (build_dynamic_cast_1): Access can consider friendship
1600         and current scope.
1601
1602 2004-10-17  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1603
1604         PR c++/17743
1605         * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
1606
1607 2004-10-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1608
1609         PR c++/10479
1610         * parser.c (cp_parser_parenthesized_expression_list): Fold
1611         non-dependent expressions in attribute lists.
1612
1613 2004-10-15  Mark Mitchell  <mark@codesourcery.com>
1614
1615         PR c++/17042
1616         * decl.c (declare_global_var): Use the return value from pushdecl.
1617
1618         PR c++/14667
1619         * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
1620         type names if we have already found a valid type.
1621         (cp_parser_member_declaration): Likewise.
1622         
1623         PR c++/17916
1624         * parser.c (cp_parser_member_specification_opt): Handle
1625         CPP_PRAGMA.
1626
1627 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1628
1629         * dump.c, g++spec.c, repo.c: Update copyright.
1630
1631 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
1632
1633         * decl.c: Fix a comment typo.
1634
1635 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
1636
1637         PR c++/16301
1638         * name-lookup.c (parse_using_directive): If we have a
1639         error_mark_node, do not set the decl namespace associations
1640         on it.
1641
1642 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
1643
1644         PR c++/17976
1645         * decl.c (cp_finish_decl): Do not call expand_static_init more
1646         than once for a single variable.
1647
1648 2004-10-14  Matt Austern  <austern@apple.com>
1649
1650         * Make-lang.in (pt.o): depends on pointer-set.h
1651         * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
1652         * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
1653         (for_each_template_parm): Convert from htab_t to pointer_set_t.
1654         * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
1655         
1656 2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
1657
1658         PR c++/17661
1659         * semantics.c (finish_for_expr): Convert expression to void
1660         so that we don't create temporaries for a?b:c.
1661
1662 2004-10-13  Kazu Hirata  <kazu@cs.umass.edu>
1663
1664         * search.c: Fix a comment typo.
1665
1666 2004-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1667
1668         * class.c (dfs_modify_vtables): Simplify condition. Return
1669         dfs_skip_bases as appropriate.
1670         (modify_all_vtables): Walk in pre-order.
1671         * search.c (dfs_walk_all, dfs_walk_once_r,
1672         dfs_walk_once_accessible_r): Assert post order function never
1673         returns dfs_skip_bases.
1674
1675         * search.c (struct lookup_base_data_s): New.
1676         (lookup_base_r): Replace with ...
1677         (dfs_lookup_base): ... this.
1678         (lookup_base): Use dfs_walk_all.
1679
1680 2004-10-12  Kazu Hirata  <kazu@cs.umass.edu>
1681
1682         * search.c: Fix comment typos.
1683
1684 2004-10-11  Mark Mitchell  <mark@codesourcery.com>
1685
1686         PR c++/15786
1687         * parser.c (cp_parser_declarator): Add member_p parameter. 
1688         (cp_parser_condition): Adjust calls to cp_parser_declarator.
1689         (cp_parser_explicit_instantiation): Likewise.
1690         (cp_parser_init_declarator): Likewise.
1691         (cp_parser_direct_declarator): Add member_p parameter.  Do not
1692         parse tentatively when parsing the parameters to a member.
1693         (cp_parser_type_id): Adjust calls to cp_parser_declarator.
1694         (cp_parser_parameter_declaration): Likewise.
1695         (cp_parser_member_declaration): Likewise.
1696         (cp_parser_exception_declaration): Likewise.
1697
1698         PR c++/17936
1699         * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
1700         * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
1701         for members of partial or explicit specializations.
1702
1703         PR c++/17929
1704         * decl2.c (finish_anon_union): Robustify.
1705
1706 2004-10-11  Nathan Sidwell  <nathan@codesourcery.com>
1707
1708         * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
1709         (dcast_base_hint): ... here.
1710         * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
1711         * search.c (struct dcast_data_s): New.
1712         (dynamic_cast_base_recurse): Remove. Replace with ...
1713         (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
1714         (get_dynamic_cast_base_type): Rename to ...
1715         (dcast_base_hint): ... here.  Use dfs_walk_once_accessible.
1716         (accessible_r): Remove.
1717         (dfs_accessible_post): New, broken out of accessible_r.
1718         (accessible_p): Use dfs_walk_once_accessible.
1719         (dfs_walk_once_accessible_r): New. From accessible_r.
1720         (dfs_walk_once_accessible): New. From acessible_p.
1721
1722         * cp-tree.h (SAME_BINFO_TYPE_P): New.
1723         * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
1724         binfo types.
1725         (convert_to_base_statically, determine_primary_bases,
1726         update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
1727         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
1728         accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
1729         build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
1730         * init.c (expand_member_init): Likewise.
1731         * search.c (lookup_base_r, dynamic_cast_base_recurse,
1732         binfo_via_virtual, copied_binfo, binfo_for_vbase,
1733         original_binfo): Likewise.
1734         * tree.c (copy_binfo): Likewise.
1735
1736 2004-10-11  Kazu Hirata  <kazu@cs.umass.edu>
1737
1738         * semantics.c: Fix comment typos.
1739
1740 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
1741
1742         PR c++/17554
1743         part of c++/17657
1744         middle-end/17703
1745         * semantics.c (maybe_cleanup_point_expr): Call
1746         fold_build_cleanup_point_expr.
1747         (maybe_cleanup_point_expr_void): New function.
1748         (add_decl_expr): Call maybe_cleanup_point_expr_void.
1749         (finish_expr_stmt): Likewise.
1750         (finish_return_stmt): Likewise.
1751         (finish_for_expr): Likewise.
1752         (finish_asm_stmt): Likewise.
1753         * typeck.c (condition_conversion): Call
1754         fold_build_cleanup_point_expr.
1755
1756 2004-10-10  Andrew Pinski  <pinskia@physics.uc.edu>
1757
1758         PR c++/17907
1759         * semantics.c (add_decl_expr): If the decl has a size which
1760         has side effects then the decl expression needs a cleanup point.
1761
1762 2004-10-10  Mark Mitchell  <mark@codesourcery.com>
1763
1764         PR c++/17393
1765         * decl.c (grokdeclarator): Robustify error-recovery on invalid
1766         declarations.
1767
1768 2004-10-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1769
1770         Convert diagnostics to use quoting flag q 7/n
1771         * typeck.c (composite_pointer_type_r, composite_pointer_type, 
1772         cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr, 
1773         string_conv_p, build_class_member_access_expr, 
1774         build_class_member_access_expr, lookup_destructor, 
1775         finish_class_member_access_expr, build_indirect_ref, 
1776         get_member_function_from_ptrfunc, build_function_call, 
1777         convert_arguments, build_binary_op, pointer_diff, build_unary_op, 
1778         check_for_casting_away_constness, build_static_cast, 
1779         build_reinterpret_cast, build_const_cast, build_c_cast, 
1780         build_modify_expr, get_delta_difference, build_ptrmemfunc, 
1781         dubious_conversion_warnings, convert_for_assignment, 
1782         convert_for_initialization, 
1783         maybe_warn_about_returning_address_of_local, check_return_expr): 
1784         Use quoting marks.
1785
1786         * typeck2.c (error_not_base_type, readonly_error, 
1787         abstract_virtuals_error, cxx_incomplete_type_diagnostic, 
1788         store_init_value, digest_init, build_x_arrow, 
1789         build_m_component_ref, require_complete_eh_spec_types): Likewise.
1790
1791         * tree.c (cp_build_qualified_type_real, 
1792         handle_java_interface_attribute, handle_init_priority_attribute):
1793         Likewise.
1794
1795         * semantics.c (finish_asm_stmt, finish_non_static_data_member, 
1796         finish_pseudo_destructor_expr, 
1797         check_template_template_default_arg, begin_class_definition, 
1798         finish_base_specifier, qualified_name_lookup_error, 
1799         finish_id_expression, finish_typeof): Likewise.
1800
1801         * search.c (lookup_base, check_final_overrider,
1802         look_for_overrides_r): Likewise.
1803
1804         * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
1805
1806 2004-10-09  Mark Mitchell  <mark@codesourcery.com>
1807
1808         PR c++/17867
1809         * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
1810         constructor.
1811
1812         PR c++/17670
1813         * init.c (build_new): Correct comments.
1814         * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
1815         the non-array case.
1816
1817         PR c++/17821
1818         * parser.c (cp_parser_postfix_dot_deref_expression): If the
1819         pseduo-destructor-name production does not work, fall back to the
1820         ordinary production.
1821
1822         PR c++/17826
1823         * tree.c (cp_tree_equal): Handle a BASELINK.
1824
1825         PR c++/17524
1826         * cp-tree.h (check_var_type): New function.
1827         * decl.c (check_var_type): New function, split out from ...
1828         (grokdeclarator): ... here.
1829         * pt.c (tsubst_decl): Use check_var_type.
1830
1831         PR c++/17685
1832         * decl.c (grokdeclarator): Disallow declarations of operators as
1833         non-functions.
1834         
1835 2004-10-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1836
1837         PR c++/17868
1838         * error.c (dump_expr): Add missing case for RDIV_EXPR.
1839
1840 2004-10-08  Kazu Hirata  <kazu@cs.umass.edu>
1841
1842         * pt.c, search.c: Fix comment typos.
1843
1844 2004-10-08  Nathan Sidwell  <nathan@codesourcery.com>
1845
1846         * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
1847         unmarkedp): Remove.
1848         (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
1849         * class.c (struct find_final_overrider_data): Remove most_derived,
1850         vpath_list and vpath fields.  Add path field.
1851         (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
1852         (dfs_find_final_overrider): Rename to ...
1853         (dfs_find_final_overrider_pre): ... here. Adjust.
1854         (dfs_find_final_overrider_post): Adjust.
1855         (dfs_find_final_overrider_q): Fold into
1856         dfs_find_final_overrider_pre.
1857         (find_final_overrider): Adjust dfs searching.
1858         (dfs_modify_vtables): Don't mark binfo here.
1859         (modify_all_vtables): Use dfs_walk_once.
1860         (build_vtt_inits): Likwise. Use dfs_walk_all.
1861         (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
1862         Return dfs_skip_bases as appropriate.
1863         (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
1864         * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
1865         appropriate. Don't mark binfo here.
1866         (initialize_vtbl_ptrs): Use dfs_walk_once.
1867         * search.c (struct vbase_info): Remove unused struct.
1868         (access_in_type): Use dfs_walk_once.
1869         (dfs_access_in_type): Don't mark binfo here.
1870         (dfs_accessible_queue_p, dfs_accessible_p) Remove.
1871         Fold into ...
1872         (accessible_r): ... here. New. Specialize dfs_walk_once.
1873         (accessible_p): Use accessible_r.
1874         (lookup_field_queue_p): Remove. Fold into ...
1875         (lookup_field_r): ... here. Adjust.
1876         (lookup_member): Use dfs_walk_all.
1877         (dfs_walk_real, dfs_walk): Replace with ...
1878         (dfs_walk_all, dfs_walk_once): ... these.
1879         (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
1880         (dfs_unmark, unmarkedp, markedp): Remove.
1881         (dfs_get_pure_virtuals): Don't mark binfo here.
1882         (get_pure_virtuals): Use dfs_walk_once.
1883         (dfs_debug_unmarked_p): Remove. Fold into ...
1884         (dfs_debug_mark): ... here.
1885         (note_debug_info_needed): Use dfs_walk_all.
1886
1887 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
1888
1889         * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
1890         CLEANUP_POINT_EXPR to get the asm expression.
1891
1892 2004-10-07  Mark Mitchell  <mark@codesourcery.com>
1893
1894         * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
1895         (DECL_MEMBER_TEMPLATE_P): New macro.
1896         (is_member_template): Remove.
1897         (class_method_index_for_fn): New function.
1898         * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
1899         * class.c (finish_struct_methods): Remove out-of-date comment.
1900         * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
1901         * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
1902         class_method_index_for_fn.
1903         * pt.c (is_member_template): Remove.
1904         (is_member_template_class): Likewise.
1905         (optimize_specialization_lookup_p): New function.
1906         (retrieve_specialization): Optimize lookups for members that are
1907         not member templates.
1908         (register_specialization): Adjust accordingly.
1909         (build_template_decl): Add member_template_p parameter.  Set
1910         DECL_MEMBER_TEMPLATE_P.
1911         (process_partial_specialization): Adjust call to
1912         retrieve_specialization.
1913         (push_template_decl_real): Determine whether the template is a
1914         member template.
1915         (lookup_template_class): Use retrieve_specialization.
1916         (tsubst_decl): Adjust call to retrieve_specialization.
1917         (tsubst_exception_specification): New function.
1918         (tsubst): Use it.
1919         (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
1920         (instantiate_template): Adjust call to retrieve_specialization.
1921         (regenerate_decl_from_template): Do not actually generate a new
1922         DECL.
1923         (instantiate_decl): Adjust call to retrieve_specialization.
1924         (class_method_index_for_fn): New method.
1925
1926 2004-10-07  Andrew Pinski  <pinskia@physics.uc.edu>
1927
1928         * parser.c (cp_parser_asm_definition): Look passed the
1929         CLEANUP_POINT_EXPR to get the asm expression.
1930
1931 2004-10-06  Andrew Pinski  <pinskia@physics.uc.edu>
1932
1933         PR c++/17368
1934         * semantics.c (finish_asm_stmt): Asm expressions need cleanup
1935         also.
1936
1937 2004-10-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1938
1939         Convert diagnostics to use quoting flag q 6/n
1940         * pt.c (finish_member_template_decl, check_specialization_scope, 
1941         maybe_process_partial_specialization, determine_specialization, 
1942         check_explicit_specialization, maybe_check_template_type, 
1943         process_partial_specialization, check_default_tmpl_args, 
1944         push_template_decl_real, redeclare_class_template, 
1945         convert_nontype_argument, coerce_template_parms, 
1946         lookup_template_class, push_tinst_level, 
1947         instantiate_class_template, tsubst_arg_types, 
1948         tsubst_function_type, tsubst, tsubst_qualified_id, 
1949         tsubst_copy_and_build, check_instantiated_args, 
1950         do_decl_instantiation, do_type_instantiation, 
1951         invalid_nontype_parm_type_p, check_specialization_namespace, 
1952         convert_template_argument, determine_specialization, 
1953         check_template_shadow, tsubst_decl 
1954         instantiate_pending_templates): Use quoting marks.
1955
1956 2004-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1957
1958         PR c++/17829
1959         * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
1960         unqualified lookup finds a member function.
1961
1962 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1963
1964         Convert diagnostics to use quoting flag q 5/n
1965         * parser.c (cp_parser_name_lookup_error, 
1966         cp_parser_diagnose_invalid_type_name, 
1967         cp_parser_primary_expression, cp_parser_unqualified_id, 
1968         cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement, 
1969         cp_parser_jump_statement, cp_parser_simple_declaration, 
1970         cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id, 
1971         cp_parser_type_parameter, cp_parser_template_id, 
1972         cp_parser_template_name, cp_parser_direct_declarator, 
1973         cp_parser_parameter_declaration_list, cp_parser_class_head, 
1974         cp_parser_base_specifier, cp_parser_lookup_name, 
1975         cp_parser_late_parsing_default_args, 
1976         cp_parser_optional_template_keyword 
1977         cp_parser_elaborated_type_specifier, cp_parser_check_class_key, 
1978         cp_parser_check_access_in_redeclaration): Use quoting marks.
1979
1980         * name-lookup.c (supplement_binding, pushdecl, 
1981         check_for_out_of_scope_variable, validate_nonmember_using_decl, 
1982         do_nonmember_using_decl, lookup_tag, set_decl_namespace, 
1983         push_namespace, do_namespace_alias, do_using_directive, 
1984         ambiguous_decl, lookup_namespace_name, add_function): Likewise.
1985
1986         * method.c (use_thunk): Likewise.
1987
1988         * lex.c (unqualified_name_lookup_error, 
1989         unqualified_fn_lookup_error): Likewise.
1990
1991 2004-10-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1992
1993         Convert diagnostics to use quoting flag q 4/n
1994         * except.c (decl_is_java_type, build_throw, 
1995         is_admissible_throw_operand, check_handlers_1, check_handlers): 
1996         Use quoting formats.
1997         * friend.c (add_friend, make_friend_class, do_friend): Likewise.
1998         * init.c (sort_mem_initializers, emit_mem_initializers, 
1999         member_init_ok_or_else, expand_member_init, is_aggr_type, 
2000         build_offset_ref, build_java_class_ref): Likewise.
2001
2002 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2003
2004         Convert diagnostics to use quoting flag q 3/n
2005         * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
2006         redeclaration_error_message, lookup_label, check_goto,
2007         make_typename_type, make_unbound_class_template,
2008         fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1, 
2009         grok_reference_init, layout_var_decl, maybe_commonize_var, 
2010         check_for_uninitialized_const_var, reshape_init_array, 
2011         reshape_init, check_initializer, cp_finish_decl,
2012         member_function_or_else, bad_specifiers, grokfndecl, grokvardecl, 
2013         check_static_variable_definition, compute_array_index_type, 
2014         create_array_type_for_decl, check_special_function_return_type, 
2015         grokdeclarator, check_default_argument, grokparms, 
2016         grok_ctor_properties, grok_op_properties, 
2017         check_elaborated_type_specifier, xref_tag, finish_enum, 
2018         build_enumerator, check_function_type, start_preparsed_function, 
2019         store_parm_decls): Use quoting formats.
2020         * decl2.c (grok_array_decl, delete_sanity, check_member_template, 
2021         check_java_method, check_classfn, finish_static_data_member_decl, 
2022         grokfield, grokbitfield, grok_function_init,
2023         build_anon_union_vars, coerce_new_type, coerce_delete_type,
2024         check_default_args): Likewise.
2025         * parser.c (cp_parser_decl_specifier_seq): Likewise.
2026
2027 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2028
2029         Convert diagnostics to use quoting flag q 2/n
2030         * class.c (build_base_path, add_method, alter_access,
2031         handle_using_decl, check_bases,
2032         maybe_warn_about_overly_private_class, find_final_overrider,
2033         warn_hidden, finish_struct_anon, add_implicitly_declared_members,
2034         check_bitfield_decl, check_field_decls, layout_empty_base,
2035         build_base_field, check_methods, layout_virtual_bases,
2036         warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
2037         resolve_address_of_overloaded_function, instantiate_type,
2038         note_name_declared_in_class): Use format flag "q" for quoting.
2039
2040 2004-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2041
2042         Convert diagnostics to use quoting flag q 1/n
2043         * error.c (locate_error): Ignore quoting flag q.
2044         * call.c (build_user_type_conversion_1, build_operator_new_call,
2045         build_object_call, op_error, build_conditional_expr,
2046         build_new_op, build_op_delete_call, enforce_access,
2047         convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
2048         convert_default_arg, build_over_call, build_new_method_call,
2049         joust, perform_implicit_conversion, initialize_reference): Use the
2050         quoting flag q.
2051
2052 2004-10-03  Andrew Pinski  <pinskia@physics.uc.edu>
2053
2054         PR c++/17797
2055         * typeck.c (build_reinterpret_cast): Return if the inner type
2056         is error_mark_node.
2057
2058 2004-10-01  Jan Hubicka  <jh@suse.cz>
2059
2060         * semantics.c (expand_body): Update call of tree_rest_of_compilation.
2061
2062 2004-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2063
2064         * cp-tree.h (struct lang_decl): Shrink by reordering fields and
2065         turning operator_code and fixed_offset into bitfields.
2066
2067 2004-09-29  Joseph S. Myers  <jsm@polyomino.org.uk>
2068
2069         * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
2070
2071 2004-09-29  Jason Merrill  <jason@redhat.com>
2072
2073         PR tree-optimization/17697
2074         * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
2075
2076 2004-09-28  Jason Merrill  <jason@redhat.com>
2077
2078         PR middle-end/17525
2079         * class.c (build_base_field): Set TYPE_MODE.
2080
2081 2004-09-28  Roger Sayle  <roger@eyesopen.com>
2082
2083         PR driver/17537
2084         * g++spec.c (lang_specific_driver): Unrecognized libraries, other
2085         than -lc and -lm, may require linking against libstc++.
2086
2087 2004-09-28  Kazu Hirata  <kazu@cs.umass.edu>
2088
2089         * tree.c: Fix a comment typo.
2090
2091 2004-09-28  Nathan Sidwell  <nathan@codesourcery.com>
2092
2093         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
2094         (struct secondary_vptr_vtt_init_data_s): New.
2095         (build_vtt_inits): Adjust dfs_walkers.
2096         (dfs_build_secondary_vptr_vtt_inits): Caller data is a
2097         secondary_vptr_vtt_init_data_s structure. Adjust.
2098         (dfs_ctor_vtable_bases_queue_p): Remove.
2099         (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
2100
2101         * pt.c (struct get_template_base_data_s): Remove.
2102         (get_template_base_r): Fold into get_template_base.
2103         (get_template_base): Walk base binfos directly in inheritance
2104         graph order.
2105
2106 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
2107
2108         PR c++/17642
2109         * cp-tree.h (fold_if_not_in_template): New function.
2110         * call.c (build_conditional_expr): Use fold_if_not_in_template.
2111         (build_cxx_call): Likewise.
2112         * cvt.c (convert_to_complex): Likewise.
2113         (ocp_convert): Likewise.
2114         (convert): Likewise.
2115         (convert_force): Likewise.
2116         * decl.c (compute_array_index_type): Clear
2117         processing_template_decl while folding array bounds.
2118         * pt.c (convert_nontype_argument): Clear
2119         processing_template_decl while processing non-type argument
2120         initialization.
2121         * tree.c (fold_if_not_in_template): New function.
2122         * typeck.c (build_class_member_access_expr): Use
2123         fold_if_not_in_template.
2124         (build_array_ref): Likewise.
2125         (build_binary_op): Likewise.  Do not try to optimize computations
2126         when processing templates.
2127         (cp_pointer_int_sum): Use fold_if_not_in_template.
2128         (pointer_diff): Likewise.
2129         (build_unary_op): Likewise.
2130         (build_reinterpret_cast): Likewise.
2131         (get_delta_difference): Likewise.
2132         (expand_ptrmemfunc_cst): Likewise.
2133         (dubious_conversion_warnings): Likewise.
2134
2135 2004-09-27  Matt Austern  <austern@apple.com>
2136
2137         * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
2138         (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
2139         tokens that come from headers that are implicitly extern "C".
2140         (struct cp_parser): new one-bit field, implicit_extern_c.
2141         (cp_parser_new): Set parser's implicit_extern_c to false.
2142         (cp_parser_translation_unit): Pop lang context if we were in a
2143         header that was implicitly extern "C".
2144         (cp_parser_declaration_seq_opt): Push/pop lang context as
2145         required by the token's and parser's implicit_extern_c.
2146         
2147 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
2148
2149         PR c++/17585
2150         * cp-tree.h (shared_member_p): Declare.
2151         * search.c (shared_member_p): Give it external linkage.
2152         * semantics.c (finish_qualified_id_expr): Use it.
2153         (finish_id_expression): Likewise.
2154
2155         PR c++/17585
2156         * semantics.c (finish_id_expression): Do not add "this->" to
2157         static member functions.
2158
2159 2004-09-27  Nathan Sidwell  <nathan@codesourcery.com>
2160
2161         PR c++/17681
2162         * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
2163
2164         * class.c (struct count_depth_data): Remove.
2165         (dfs_depth_post, dfs_depth_q): Remove.
2166         (find_final_overrider): Use number of vbase classes as depth
2167         bound.
2168         
2169         * cp-tree.h (types_overlap_p): Remove.
2170         * search.c (struct overlap_info): Remove.
2171         (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
2172         
2173         * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
2174         (get_template_base_recursive): Remove. Replace with ...
2175         (get_template_base_r): ... this.
2176         (struct get_template_base_data_s): New.
2177         (get_template_base): Use get_template_base_r via dfs_walk.  Always
2178         return NULL on failure.
2179         (unify): Remove error_mark_node check from get_template_base result.
2180
2181 2004-09-24  Paolo Bonzini  <bonzini@gnu.org>
2182
2183         * parser.c (cp_parser_expression_stack): Clarify why it is
2184         an array of NUM_PREC_VALUES elements.
2185         (cp_parser_binary_expression): Clarify why we do not need to
2186         handle stack overflow.
2187
2188 2004-09-24  Nathan Sidwell  <nathan@codesourcery.com>
2189
2190         PR c++/16889
2191         * search.c (lookup_field_queue_p): Correct check for hidden base.
2192
2193         * search.c (bfs_walk): Remove.
2194         (lookup_member): Use dfs_walk_real.
2195         (dfs_walk_real): Move and adjust documentation from bfs_walk.
2196
2197 2004-09-23  Zack Weinberg  <zack@codesourcery.com>
2198
2199         * decl.c (grokfndecl): If ::main is found not to return int,
2200         correct it after issuing a diagnostic.
2201         (grokdeclarator): If the incoming type was error_mark_node, do
2202         not complain about declaring something with no type.
2203         (start_function): Change check for ::main not returning int to
2204         an assertion, as grokfndecl now catches this when the user did it.
2205         * init.c (perform_member_init, sort_mem_initializers)
2206         (emit_mem_initializers): Make most diagnostics be issued on
2207         the line of current_function_decl, not whatever the current
2208         input line is.
2209         * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
2210         definition and declaration with #ifdef ENABLE_CHECKING.
2211         Avoid unnecessary use of fprintf.
2212         (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
2213         definitions to avoid warnings.
2214         (cp_lexer_new_main): Add assertion that first token is not a
2215         padding token.
2216         (cp_lexer_new_from_token_array): Fold into ...
2217         (cp_lexer_new_from_tokens): ... here.  Add assertion that
2218         first token is not a padding token.
2219         (cp_lexer_set_source_position_from_token): Move nearer to callers.
2220         Remove unused lexer argument.
2221         (cp_lexer_peek_token): Just print debugging report (if enabled)
2222         and return lexer->next_token.
2223         (cp_lexer_skip_purged_tokens): Delete.
2224         (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
2225         inline, simplify bodies.
2226         (cp_lexer_peek_nth_token): Add debugging report a la
2227         cp_lexer_peek_token.
2228         (cp_lexer_consume_token): Correct commentary.  Advance over
2229         purged tokens here.  Set current source position here, from
2230         token to be returned.  Avoid unnecessary use of fprintf.
2231         (cp_lexer_purge_token): Advance next_token pointer over this and
2232         subsequent purged tokens.
2233         (cp_parser_error): Adjust source position to that of the
2234         peeked token.
2235         (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
2236         (cp_parser_string_literal): Remove some excessive cleverness.
2237         (cp_parser_enum_specifier): Call start_enum before consuming
2238         the opening brace.
2239         (cp_parser_member_declaration): Make the "extra semicolon"
2240         diagnostic consistently-worded with the other place this is
2241         diagnosed.  Explicitly set the diagnostic location to the
2242         location of the offending semicolon.
2243         (cp_parser_enclosed_template_argument_list): Use %</%> quoting
2244         in diagnostics.  Do not use cp_parser_require.  Set location
2245         of diagnostics about improper use of '>>' to location of
2246         offending token.
2247         (cp_parser_late_parsing_for_member):
2248         Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
2249         (cp_parser_late_parsing_default_args): Likewise.  Manually
2250         move some logic outside the loop.
2251
2252 2004-09-23  Andrew Pinski  <pinskia@physics.uc.edu>
2253
2254         PR c++/17618
2255         * cvt.c (cp_convert_to_pointer): Return early when the type is
2256         an error_mark_node.
2257
2258 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
2259
2260         PR c++/13989
2261         PR c++/9844
2262         * decl.c (grokfndecl): Add new argument "attrlist", use it
2263         to call cplus_decl_attributes.
2264         (start_function): Remove call to cplus_decl_attributes.
2265         * cvt.c (ocp_convert): Add support to use type conversion
2266         function to vector type.
2267         * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
2268         to the parsed type.
2269
2270 2004-09-23  Paolo Bonzini  <bonzini@gnu.org>
2271
2272         PR c++/17596
2273
2274         * parser.c (cp_parser_token_tree_map_node,
2275         cp_parser_pm_expression, cp_parser_additive_expression,
2276         cp_parser_multiplicative_expression, cp_parser_shift_expression,
2277         cp_parser_relational_expression, cp_parser_equality_expression,
2278         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2279         cp_parser_inclusive_or_expression,
2280         cp_parser_logical_and_expression,
2281         cp_parser_logical_or_expression): Removed.
2282         (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
2283         binops, binops_by_token): New.
2284         (cp_parser_assignment_expression): Use cp_parser_binary_expression.
2285         (cp_parser_new): Initialize binops_by_token.
2286         (cp_parser_binary_expression): Rewritten.
2287         (N_CP_TTYPES): New.
2288
2289 2004-09-23  Kazu Hirata  <kazu@cs.umass.edu>
2290
2291         * parser.c: Fix a comment typo.
2292
2293 2004-09-23  Nathan Sidwell  <nathan@codesourcery.com>
2294
2295         PR c++/17620
2296         * decl.c (xref_basetypes): Look through typedefs before checking
2297         for duplicate base.
2298
2299 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
2300
2301         * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
2302         * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
2303         * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
2304         (init_rtti_processing): Initialize it to something realistic.
2305         (get_tinfo_decl): Adjust pushing the new decl.
2306
2307         * cp-tree.h (struct lang_type_class): Remove marked flags, add
2308         diamond_shaped and repeated_base flags.  Reorder to keep 8-bit blocks.
2309         (TYPE_MARKED_P): New.
2310         (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
2311         (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2312         CLEAR_CLASSTYPE_MARKED_N): Remove.
2313         (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
2314         CLEAR_CLASSTYPE_MARKED_*): Remove.
2315         * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
2316         shaped and repeated base properties.
2317         * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
2318         * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
2319         class_hint_flags): Remove.
2320         (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
2321         CLASSTYPE_DIAMOND_SHAPED_P.
2322
2323 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
2324
2325         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
2326         cp-objcp-common.h.
2327         (objcp_tsubst_copy_and_build): Reformat function signature.
2328         * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
2329         (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
2330
2331 2004-09-21  Zack Weinberg  <zack@codesourcery.com>
2332
2333         * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
2334         Don't handle CPP_PRAGMA tokens specially.
2335         (cp_lexer_handle_pragma): Use cp_lexer_consume_token.  Don't
2336         purge the token; do clear token->value after processing.  Add
2337         assertion at beginning that token->value is nonzero.
2338         (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
2339         CPP_PRAGMA as a full statement or declaration in its own right.
2340
2341 2004-09-21  Matt Austern  <austern@apple.com>
2342
2343         PR c++/15049
2344         * decl.c (grokvardecl): Accept declarations of global variables
2345         using anonymous types.
2346
2347 2004-09-21  Roger Sayle  <roger@eyesopen.com>
2348
2349         PR c++/7503
2350         * tree.c (lvalue_p_1):  Disallow MIN_EXPR and MAX_EXPR as lvalues
2351         if either operand has side-effects.
2352         * typeck.c (rationalize_conditional_expr): Assert that neither
2353         operand of MIN_EXPR or MAX_EXPR has side-effects.
2354         (build_modify_expr):  Add support for MIN_EXPR and MAX_EXPR.
2355         Check that the "lhs" is a valid lvalue, i.e. that neither operand
2356         of a MIN_EXPR or MAX_EXPR has a side-effect.
2357
2358 2004-09-21  Nathan Sidwell  <nathan@codesourcery.com>
2359
2360         * cp-tree.h (struct lang_type_header): Remove
2361         uses_multiple_inheritance field.
2362         (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
2363         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
2364         (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
2365         (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
2366         (TYPE_CONTAINS_VPTR_P): Likewise.
2367         * call.c (add_template_candidate_real): Use
2368         CLASSTYPE_VBASECLASSES.
2369         (build_special_member_call): Likewise.
2370         * class.c (finish_struct_bits): Remove
2371         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
2372         bookkeeping.
2373         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
2374         (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
2375         bookkeeping.
2376         (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
2377         (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
2378         Likewise.
2379         * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
2380         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2381         bookkeeping.
2382         (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
2383         * decl2.c (maybe_retrofit_in_chrg): Likewise.
2384         * init.c (expand_member, push_base_cleanups): Likewise.
2385         * pt.c (instantiate_class_template): Remove
2386         TYPE_USES_MULTIPLE_INHERITANCE,
2387         TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
2388         bookkeeping.
2389         * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
2390         check.
2391         * typeck2.c (process_init_constructor): Replace some sorrys with
2392         asserts.
2393
2394 2004-09-21  Andreas Tobler  <a.tobler@schweiz.ch>
2395
2396         * decl.c (reshape_init_array): Initialize max_index_cst to fix
2397         bootstrap failure.
2398
2399 2004-09-20  Mark Mitchell  <mark@codesourcery.com>
2400
2401         PR c++/17530
2402         * pt.c (tsubst): Fix parentheses to accomodate emacs.
2403         (tsubst_baselink): If we get a single function, mark it as used.
2404
2405 2004-09-20  Matt Austern <austern@apple.com>
2406             Zack Weinberg  <zack@codesourcery.com>
2407
2408         * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
2409         Apply lbasename to input_filename before passing to get_fileinfo.
2410         * semantics.c (begin_class_definition): Likewise.
2411         * lex.c (handle_pragma_interface): Apply get_fileinfo to the
2412         correct filename.  Rename variables to be less confusing.
2413         (handle_pragma_implementation): Likewise.  Disable "appears
2414         after file is included" diagnostic.
2415
2416         * parser.c (struct cp_token): Add in_system_header fiag.
2417         (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
2418         (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
2419         (CPP_NONE, cp_lexer_read_token): Delete.
2420         (struct cp_lexer): Remove first_token, string_tokens,
2421         main_lexer_p fields.  Clarify comments.
2422         (struct cp_token_cache): Now just a pair of pointers.
2423         (CP_LEXER_BUFFER_SIZE): New #define.
2424         (CPP_PURGED): New fake token type.
2425         (cp_lexer_new_from_token_array, cp_lexer_destroy)
2426         (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
2427         (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
2428         New functions.
2429         (cp_lexer_new_from_tokens): Now a simple wrapper around
2430         cp_lexer_new_from_token_array.
2431         (cp_lexer_set_source_position_from_token): Also update
2432         in_system_header.
2433         (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
2434         Don't wrap round.
2435         (cp_lexer_token_difference): Dont handle wrapping round.
2436         (cp_lexer_new_main): Enable pragma deferral and raw strings,
2437         read the entire translation unit through c_lex_with_flags into
2438         this lexer's buffer, then turn raw strings back off again.
2439         (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
2440         (cp_lexer_get_preprocessor_token): No need to handle not being
2441         the main lexer.  Set token->in_system_header too.
2442         (cp_lexer_peek_token): Skip purged tokens.  Feed pragma tokens
2443         to cp_lexer_handle_pragma.  No need to call cp_lexer_read_token.
2444         (cp_lexer_peek_nth_token): Likewise.
2445         (cp_lexer_purge_token): Mark the token PURGED, don't shift all
2446         the other tokens down.
2447         (cp_lexer_purge_tokens_after): Likewise.
2448         (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
2449         about there being no tokens.
2450         (cp_lexer_print_token): Revise to give useful information on
2451         all tokens.
2452         (struct cp_parser): Add field translate_strings_p.
2453         (cp_parser_new): Initialize it.
2454         (cp_parser_translation_unit): Destroy the lexer when done.
2455         (cp_parser_parameter_declaration): Restructure saving of
2456         default arguments.
2457         (cp_parser_save_member_function_body): Likewise.
2458         (cp_parser_check_for_invalid_template_id)
2459         (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
2460         Adjust calls to cp_lexer_advance_token.
2461         (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
2462         No need to fiddle c_lex_string_translate.
2463         (cp_parser_primary_expression, cp_parser_linkage_specification)
2464         (cp_parser_asm_definition, cp_parser_asm_specification_opt)
2465         (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
2466         Use cp_parser_string_literal.
2467         (cp_parser_attribute_list): Save and restore
2468         parser->translate_strings_p, not c_lex_string_translate.
2469         (cp_parser_cache_group): Delete.
2470         (cp_parser_cache_group_1): Rename cp_parser_cache_group.  Do
2471         not take a cache argument.
2472
2473 2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2474
2475         PR c++/14179
2476         * decl.c (reshape_init): Extract array handling into...
2477         (reshape_init_array): New function. Use integers instead of trees
2478         for indices. Handle out-of-range designated initializers.
2479
2480 2004-09-20  Steven Bosscher  <stevenb@suse.de>
2481
2482         * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
2483         to null_node.
2484
2485 2004-09-19  Mark Mitchell  <mark@codesourcery.com>
2486
2487         * decl2.c (determine_visibility): Allow class visibility
2488         directives to override targetm.cxx.export_class_data.
2489
2490 2004-09-18  Kazu Hirata  <kazu@cs.umass.edu>
2491
2492         * call.c, semantics.c: Follow spelling conventions.
2493         * class.c: Fix a comment typo.
2494
2495 2004-09-16  Geoffrey Keating  <geoffk@apple.com>
2496
2497         PR pch/13361
2498         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2499         (handle_pragma_implementation): Likewise.
2500
2501 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2502             Zack Weinberg  <zack@codesourcery.com>
2503
2504         * cp-tree.def: Use tree_code_class enumeration constants
2505         instead of code letters.
2506         * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
2507         * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
2508         Update for new tree-class enumeration constants.
2509
2510 2004-09-16  Mark Mitchell  <mark@codesourcery.com>
2511
2512         PR c++/16002
2513         * parser.c (cp_parser_simple_declaration): Commit to tentative
2514         parses after seeing a decl-specifier.
2515         (cp_parser_simple_declaration): Eliminate spurious message.
2516         (cp_parser_init_declarator): Adjust error message.
2517
2518         PR c++/16029
2519         * lex.c (unqualified_name_lookup_error): Mark the dummy
2520         declaration as used.
2521
2522         PR c++/17501
2523         * parser.c (cp_parser_nested_name_specifier): Do not resolve
2524         typename types if the user explicitly said "typename".
2525
2526 2004-09-16  Andrew MacLeod  <amacleod@redhat.com>
2527
2528         * error.c (dump_decl): Make sure there is lang_specific info before
2529         checking for DTOR and CTOR decls.
2530
2531 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2532
2533         * class.c (copy_virtuals): Remove.
2534         (build_primary_vtable): Use copy_list directly.
2535         (build_secondary_vtable): Likewise.
2536         (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
2537         (create_vtable_ptr): Likewise.
2538
2539 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
2540
2541         * search.c: Follow spelling conventions.
2542
2543 2004-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2544
2545         * cp-tree.h (struct lang_type_class): Make pure_virtuals a
2546         VEC(tree).
2547         (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
2548         comments.
2549         * call.c (build_new_method_call): Don't confirm a pure virtual is
2550         in CLASSTYPE_PURE_VIRTUALS.  Reorder checks. Make it a warning.
2551         * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
2552         (fixup_inline_methods, finish_struct): Likewise.
2553         * decl.c (finish_method): Likewise.
2554         * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
2555         CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
2556         * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
2557         vector to avoid repeating the list in error messages.
2558
2559 2004-09-15  Mark Mitchell  <mark@codesourcery.com>
2560
2561         * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
2562         * cp-tree.h (cxx_comdat_group): Declare.
2563         * decl.c (cxx_comdat_group): New function.
2564
2565 2004-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2566
2567         * search.c (get_pure_virtuals): Remove unused variables.
2568
2569         * cp-tree.h (struct lang_decl_flags): Remove
2570         needs_final_overrider.
2571         (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
2572         * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
2573         * class.c (finish_struct_bits): Correct comment about
2574         CLASSTYPE_PURE_VIRTUALS.
2575         * search.c (get_pure_virtuals): Remove useless loop.
2576
2577 2004-09-14  Mark Mitchell  <mark@codesourcery.com>
2578
2579         PR c++/17324
2580         * mangle.c (partially_mangled_name): New variable.
2581         (partially_mangled_name_len): Likewise.
2582         (save_partially_mangled_name): New function.
2583         (restore_partially_mangled_name): Likewise.
2584         (write_encoding): Save and restore partially mangled names around
2585         calls to get_mostly_instantiated_function_type.
2586         (write_unqualified_name): Likewise.
2587
2588 2004-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2589
2590         * pt.c (unify): Replace gcc_unreachable with gcc_assert.
2591
2592 2004-09-13  Mark Mitchell  <mark@codesourcery.com>
2593
2594         PR c++/16162
2595         * parser.c (cp_parser_id_expression): Correct value for
2596         is_declarator.
2597         (cp_parser_nested_name_specifier_opt): Look through typenames as
2598         necessary.
2599         (cp_parser_template_name): Honor check_dependency_p.
2600
2601         PR c++/16716
2602         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
2603         Robustify.
2604
2605         PR c++/17327
2606         * pt.c (unify): Add ENUMERAL_TYPE case.  Replace sorry with
2607         gcc_unreacable.
2608
2609 2004-09-12  Richard Henderson  <rth@redhat.com>
2610
2611         PR c++/16254
2612         * semantics.c (maybe_cleanup_point_expr): Don't call fold.
2613         * typeck.c (condition_conversion): Likewise.
2614
2615 2004-09-11  Richard Henderson  <rth@redhat.com>
2616
2617         PR c++/17404
2618         * pt.c (cur_stmt_expr): Move from tsubst_expr.
2619         (tsubst_expr) <case STMT_EXPR>: Move ...
2620         (tsubst_copy_and_build): ... here.
2621
2622 2004-09-10  Zack Weinberg  <zack@codesourcery.com>
2623
2624         * cp-tree.h (interface_only, interface_unknown): Delete declarations;
2625         comment explaining them moved to c-common.h.
2626         * lex.c (interface_only, interface_unknown, extract_interface_info):
2627         Delete definitions.
2628         (cxx_finish): Don't reset interface_unknown.
2629         (handle_pragma_interface): Don't set interface_only and
2630         interface_unknown; just the like-named fields in finfo.
2631         (handle_pragma_implementation): Adjust comment.
2632         * decl2.c (cp_finish_file): Don't reset interface_only and
2633         interface_unknown.
2634         * method.c (synthesize_method): Don't reset interface_unknown or
2635         call extract_interface_info.
2636         * pt.c (pop_tinst_level): Don't call extract_interface_info.
2637         * decl.c (start_cleanup_fn): Don't save or restore interface_only
2638         and interface_unknown.
2639         (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
2640         and use the result instead of the interface_only/interface_unknown
2641         globals.
2642         (start_preparsed_function): Likewise.
2643         * lex.c (cxx_make_type): Likewise.
2644         * semantics.c (begin_class_definition): Likewise.
2645         (expand_body): Don't call extract_interface_info.
2646
2647 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
2648
2649         * decl.c (objc_mark_locals_volatile): Make description of
2650         routine more descriptive; only mark VAR_DECLs at each
2651         binding level.
2652
2653 2004-09-10  Richard Henderson  <rth@redhat.com>
2654
2655         PR c++/17386
2656         * call.c (build_vfield_ref): Move...
2657         * class.c (build_vfield_ref): ... here.  Convert datum to the
2658         primary base containing the vptr.
2659         (make_new_vtable): Simplify build_primary_vtable arguments.
2660         (finish_struct_1): Do not duplicate TYPE_VFIELD.
2661         * typeck.c (build_class_member_access_expr): Don't warn for
2662         null object access to base fields.
2663
2664 2004-09-10  Ziemowit Laski  <zlaski@apple.com>
2665
2666         * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
2667         New functions, to be called from ObjC++.
2668
2669 2004-09-10  Kazu Hirata  <kazu@cs.umass.edu>
2670
2671         * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
2672         name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
2673         comment typos.
2674
2675 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
2676
2677         * typeck.c (build_c_cast): Preserve the cast if casting
2678         to and from an Objective-C type.
2679
2680 2004-09-09  Ziemowit Laski  <zlaski@apple.com>
2681
2682         * Make-lang.in (cp/typeck.o): Depend on c-common.h.
2683         * typeck.c: Include c-common.h.
2684         (comptypes): For RECORD_TYPEs, call objc_comptypes() and
2685         return the result if nonnegative.
2686
2687 2004-09-09  Zack Weinberg  <zack@codesourcery.com>
2688
2689         * decl2.c (import_export_class)
2690         * lex.c (handle_pragma_interface):
2691         Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
2692
2693 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
2694
2695         * Make-lang.in (cp/semantics.o): Depend on c-common.h.
2696         * semantics.c: Include c-common.h.
2697         (finish_compound_stmt): Call objc_clear_super_receiver().
2698
2699 2004-09-08  Ziemowit Laski  <zlaski@apple.com>
2700
2701         * cp-tree.h (do_poplevel): New prototype.
2702         * semantics.c (do_poplevel): Make externally visible.
2703
2704 2004-09-08  Nathan Sidwell  <nathan@codesourcery.com>
2705
2706         * cp-tree.h (tree_pair_s): Define a GC'd vector.
2707         * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
2708         * semantics.c (deferred_access): Likewise.
2709
2710 2004-09-06  Daniel Jacobowitz  <dan@debian.org>
2711
2712         * semantics.c (expand_body): Assert that we are not nested.
2713
2714 2004-09-06  Zack Weinberg  <zack@codesourcery.com>
2715
2716         * decl.c (build_enumerator): Use add_double and int_fits_type_p
2717         instead of cp_build_binary_op, to avoid creating short-lived trees.
2718         * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
2719         lookahead instead of backtracking.  Move some code to avoid a
2720         conditional branch.
2721         (cp_parser_enum_specifier): Avoid duplication of effort with caller.
2722         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2723         (cp_parser_enumerator_list, cp_parser_enumerator_definition):
2724         Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
2725
2726 2004-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2727
2728         * decl.c (grok_declarator): Remove a redundant semicolon.
2729
2730         * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
2731         Correct comments describing function parameters.
2732
2733 2004-09-03  Matt Austern  <austern@apple.com>
2734         Compile speed improvement.
2735         * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
2736         Otherwise define a stub macro that expands to nothing.
2737         (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set.  Otherwise
2738         define a stub macro that expands to 0.
2739         (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
2740         (cp_lexer_stop_debugging): Likewise.
2741         (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set.  Otherwise
2742         define a stub macro that expands to NULL.
2743         (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
2744         (cp_lexer_new_from_tokens): Likewise.
2745
2746 2004-09-03  Jan Hubicka  <jh@suse.cz>
2747
2748         * decl.c (finish_function): Clean out pointers we no longer need.
2749
2750 2004-09-03  Jan Beulich  <jbeulich@novell.com>
2751
2752         * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
2753         than "-lm".
2754
2755 2004-09-02  Paul Brook  <paul@codesourcery.com>
2756
2757         * decl2.c (determine_visibility): Only check data visibility
2758         for VAR_DECLS.
2759
2760 2004-08-31  Mark Mitchell  <mark@codesourcery.com>
2761
2762         * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
2763         * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
2764         * decl2.c (determine_visibility): Honor
2765         TARGET_CXX_EXPORT_CLASS_DATA.
2766
2767         * class.c (key_method): Rename to ...
2768         (determine_key_method): ... this.
2769         (finish_struct_1): Adjust accordingly.
2770         * cp-tree.h (key_method): Declare.
2771         * decl2.c (maybe_emit_vtables): Determine the key method here if
2772         it has not already been done.
2773
2774 2004-08-31  Ziemowit Laski  <zlaski@apple.com>
2775
2776         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
2777         (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
2778         (cp/cp-decl.c): Do not depend on gtype-cp.h.
2779         (cp/cp-objcp-common.o): New target.
2780         * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
2781         (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
2782         cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
2783         prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
2784         respectively.
2785         (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
2786         LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
2787         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2788         LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
2789         LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
2790         LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
2791         LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
2792         LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2793         LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
2794         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2795         LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2796         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
2797         LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
2798         LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
2799         LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
2800         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2801         LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
2802         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2803         LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
2804         LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
2805         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2806         LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
2807         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2808         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
2809         LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
2810         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
2811         LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
2812         LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2813         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
2814         LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
2815         LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
2816         hooks to cp-objcp-common.h.
2817         (finish_file): New function.
2818         * cp-objcp-common.c: New file.
2819         * cp-objcp-common.h: New file.
2820         * cp-tree.h (cp_finish_file): New prototype.
2821         * decl.c: Do not include gtype-cp.h.
2822         * decl2.c (finish_file): Rename to cp_finish_file.
2823
2824 2004-08-31  Richard Henderson  <rth@redhat.com>
2825
2826         PR c++/17221
2827         * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
2828         (tsubst_copy_and_build): ... here.
2829
2830 2004-08-30  Mark Mitchell  <mark@codesourcery.com>
2831
2832         * cp-tree.h (initialize_artificial_var): Declare.
2833         * decl.c (initialize_artifical_var): New function.
2834         * class.c (initialize_array): Remove.
2835         (initialize_vtable): Use initialize_artificial_var.
2836         (build_vtt): Likewise.
2837         (build_ctor_vtbl_group): Likewise.
2838
2839 2004-08-30  Richard Henderson  <rth@redhat.com>
2840
2841         * class.c (build_base_path): Use build_address directly.
2842         * typeck.c (build_unary_op): Don't lower &a.b to pointer
2843         arithmetic directly.
2844         * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
2845         means !initializer_constant_valid_p.
2846
2847 2004-08-30  Richard Henderson  <rth@redhat.com>
2848
2849         * class.c (fixed_type_or_null): Use get_base_address before
2850         assuming an ADDR_EXPR is non-null.
2851
2852 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2853
2854         * name-lookup.c (pop_binding, pushdecl,
2855         set_identifier_type_value_with_scope, push_overloaded_decl,
2856         arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
2857         * parser.c (cp_parser_diagnose_invalid_type_name,
2858         cp_parser_postfix_expression, cp_parser_unary_expression,
2859         cp_parser_check_declarator_template_para): Likewise.
2860         * pt.c (push_inline_template_parms_recursive,
2861         check_explicit_specialization, convert_nontype_argument,
2862         coerce_template_template_parms, uses_template_parms,
2863         instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
2864         tsubst_expr, instantiate_template,
2865         maybe_adjust_types_for_deduction, type_unification_real,
2866         resolve_overloaded_unification, template_decl_level,
2867         type_dependent_expression_p): Likewise.
2868         * search.c (lookup_base_r): Likewise.
2869         * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
2870         * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
2871         verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
2872         * typeck.c (common_type, get_member_function_from_ptrfunc,
2873         build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
2874         * typeck2.c (cxx_incomplete_type_diagnostic,
2875         split_nonconstant_init_1, store_init_value,
2876         process_init_constructor): Likewise.
2877
2878 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2879
2880         * call.c (check_dtor_name): Replace abort with gcc_assert or
2881         gcc_unreachable.
2882         (build_call, add_builtin_candidate, build_new_op,
2883         convert_like_real, build_over_call, in_charge_arg_for_name,
2884         source_type, joust): Likewise.
2885         * class.c (build_simple_base_path, get_vcall_index,
2886         finish_struct_1, instantiate_type, get_enclosing_class,
2887         add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
2888         * cp-gimplify.c (cp_genericize): Likewise.
2889         * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
2890         * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
2891         * decl.c (poplevel, make_unbound_class_template, reshape_init,
2892         check_special_function_return_type, grokdeclarator,
2893         grok_op_properties, tag_name, xref_tag, start_preparsed_function,
2894         finish_function): Likewise.
2895         * decl2.c (grokfield, maybe_emit_vtables):Likewise.
2896         * error.c (dump_global_iord, dump_decl, dump_template_decl,
2897         language_to_string): Likewise.
2898         * except.c (choose_personality_routine): Likewise.
2899         * friend.c (do_friend): Likewise.
2900         * g++spec.c (lang_specific_driver): Likewise.
2901         * init.c (build_zero_init, expand_default_init, build_new_1,
2902         build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
2903         * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
2904         * mangle.c (add_substitution, write_unscoped_name,
2905         write_template_prefix, write_identifier,
2906         write_special_name_destructor, write_type, write_builtin_type,
2907         write_expression, write_template_param,
2908         write_java_integer_type_codes): Likewise.
2909         * method.c (implicitly_declare_fn): Likewise.
2910
2911 2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
2912
2913         * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
2914         (BINFO_INDIRECT_PRIMARY_P): Remove.
2915         * class.c (determine_primary_base): Rename to ...
2916         (determine_primary_bases): ... here.  Set all primary bases.
2917         (set_primary_base): Remove.
2918         (mark_primary_bases): Remove.
2919         (build_simple_base_path, walk_subobject_offsets,
2920         propagate_binfo_offsets, end_of_class): Adjust.
2921         (layout_class_type): Rename determine_primary_base call.
2922         (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
2923         to type_as_string.
2924         (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
2925         build_rtti_vtbl_entries): Adjust.
2926         * init.c (build_vtbl_address): Adjust.
2927
2928         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
2929
2930 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
2931
2932         * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
2933         CXX_AND_OBJCXX_OBJS.
2934         (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
2935         separately on the link line.
2936
2937 2004-08-28  Jason Merrill  <jason@redhat.com>
2938
2939         * decl.c (expand_static_init): Avoid bogus warnings.
2940
2941 2004-08-27  Jason Merrill  <jason@redhat.com>
2942
2943         PR c++/16851
2944         * tree.c (stabilize_init): See through a COMPOUND_EXPR.
2945
2946         PR c++/13684
2947         * decl.c (expand_static_init): Use thread-safety API.
2948         (register_dtor_fn): Return the call, don't expand it.
2949         * tree.c (add_stmt_to_compound): New fn.
2950         (stabilize_call): Use it.
2951
2952 2004-08-27  Richard Henderson  <rth@redhat.com>
2953
2954         * cp-tree.def (OFFSETOF_EXPR): New.
2955         * parser.c (cp_parser_builtin_offsetof): Either built an
2956         OFFSETOF_EXPR, or call fold_offsetof immediately.
2957         * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
2958
2959 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
2960
2961         * call.c (validate_conversion_obstack): Replace
2962         my_friendly_assert with gcc_assert or gcc_unreachable.
2963         (direct_reference_binding, merge_conversion_sequences,
2964         build_user_type_conversion_1, perform_overload_resolution,
2965         build_op_delete_call, enforce_access, call_builtin_trap,
2966         build_over_call, build_special_member_call, build_new_method_call,
2967         initialize_reference): Likewise.
2968         * class.c (build_base_path, build_primary_vtable, alter_access,
2969         check_bases, update_vtable_entry_for_fn, layout_empty_base,
2970         clone_function_decl, adjust_clone_args,
2971         type_requires_array_cookie, include_empty_classes,
2972         finish_struct_1, resolve_address_of_overloaded_function,
2973         instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
2974         dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2975         accumulate_vtbl_inits, build_vtbl_initializer,
2976         build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
2977         * cvt.c (build_up_reference, convert_to_reference): Likewise.
2978         * decl.c (poplevel, duplicate_decls, make_typename_type,
2979         cxx_init_decl_processing, reshape_init, check_initializer,
2980         make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
2981         expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
2982         grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
2983         xref_basetypes, start_preparsed_function, save_function_data,
2984         finish_function, finish_method, maybe_register_incomplete_var,
2985         complete_vars): Likewise.
2986         * decl2.c (grok_array_decl, check_member_template,
2987         check_classfn, finish_static_data_member_decl, coerce_new_type,
2988         coerce_delete_type, import_export_class, decl_needed_p,
2989         determine_visibility, import_export_decl, build_cleanup,
2990         start_static_initialization_or_destructi, do_static_destruction,
2991         prune_vars_needing_no_initialization,
2992         build_offset_ref_call_from_tree): Likewise.
2993         * error.c (dump_decl, dump_expr): Likewise.
2994         * init.c (finish_init_stmts, build_zero_init,
2995         expand_virtual_init, expand_default_init, expand_aggr_init_1,
2996         build_offset_ref, build_new_1, build_delete, build_vbase_delete):
2997         Likewise.
2998         * mangle.c (write_method_parms, write_template_args,
2999         write_expression, write_template_arg): Likewise.
3000         * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
3001         * name-lookup.c (pop_binding, begin_scope, leave_scope,
3002         resume_scope, push_using_decl, validate_nonmember_using_decl,
3003         is_ancestor, poplevel_class, set_inherited_value_binding_p,
3004         push_class_level_binding, do_class_using_decl, push_namespace,
3005         pop_namespace, add_using_namespace, ambiguous_decl,
3006         lookup_namespace_name, lookup_type_current_level,
3007         maybe_process_template_type_declaration): Likewise.
3008         * parser.c (cp_lexer_peek_nth_token,
3009         cp_parser_parse_and_diagnose_invalid_typ,
3010         cp_parser_translation_unit, cp_parser_template_id,
3011         cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
3012         * pt.c (push_access_scope, finish_member_template_decl,
3013         push_inline_template_parms_recursive, add_outermost_template_args,
3014         get_innermost_template_args, begin_explicit_instantiation,
3015         end_explicit_instantiation, retrieve_specialization,
3016         is_specialization_of, is_specialization_of_friend,
3017         register_specialization, check_explicit_specialization,
3018         comp_template_parms, process_template_parm,
3019         process_partial_specialization, convert_nontype_argument,
3020         coerce_template_template_parms, coerce_template_parms,
3021         mangle_class_name_for_template, lookup_template_function,
3022         lookup_template_class, instantiate_class_template, tsubst_decl,
3023         tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
3024         instantiate_template, fn_type_unification, type_unification_real,
3025         get_template_base, regenerate_decl_from_template,
3026         template_for_substitution, instantiate_decl,
3027         get_mostly_instantiated_function_type, dependent_scope_ref_p,
3028         value_dependent_expression_p, resolve_typename_type): Likewise.
3029         * repo.c (repo_emit_p): Likewise.
3030         * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
3031         create_tinfo_types, emit_tinfo_decl): Likewise.
3032         * search.c (lookup_base_r, lookup_base, lookup_field_1,
3033         dfs_access_in_type, build_baselink, lookup_member,
3034         adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
3035         * semantics.c (perform_or_defer_access_check,
3036         finish_non_static_data_member, finish_stmt_expr_expr,
3037         finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
3038         finish_template_template_parm, finish_member_declaration,
3039         emit_associated_thunks): Likewise.
3040         * tree.c (build_target_expr_with_type, force_target_expr,
3041         copy_binfo, get_first_fn, cp_tree_equal): Likewise.
3042         * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
3043         cxx_sizeof_or_alignof_type, perform_integral_promotions,
3044         build_class_member_access_expr, finish_class_member_access_expr,
3045         build_ptrmemfunc_access_expr, build_unary_op,
3046         unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
3047         build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
3048         * typeck2.c (complete_type_check_abstract,
3049         abstract_virtuals_error, process_init_constructor,
3050         add_exception_specifier): Likewise.
3051
3052 2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
3053
3054         * class.c (build_vtbl_initializer): Use ssize_int.
3055         * decl.c (complete_array_type): Likewise.
3056         * method.c (finish_thunk): Likewise.
3057         * search.c (get_dynamic_base_type): Likewise.
3058
3059 2004-08-26  Richard Henderson  <rth@redhat.com>
3060
3061         * cp-tree.h (DECL_FIELD_IS_BASE): New.
3062         * class.c (build_base_field): Set it.
3063         (build_simple_base_path): Use it.
3064         (fixed_type_or_null): Don't consider base fields definitive.
3065
3066 2004-08-25  Roger Sayle  <roger@eyesopen.com>
3067
3068         PR middle-end/16693
3069         PR tree-optimization/16372
3070         * decl.c (finish_enum): Make the precision of the enumerated type
3071         the same width as the underlying integer type.
3072
3073 2004-08-25  Mark Mitchell  <mark@codesourcery.com>
3074
3075         PR c++/17155
3076         * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
3077         functions.
3078
3079         * mangle.c (get_identifier_nocopy): Add cast.
3080
3081         * cp-tree.h (mangle_type): Remove.
3082         * mangle.c (globals): GTY it.
3083         (mangle_obstack): New variable.
3084         (name_obstack): Likewise.
3085         (name_base): Likewise.
3086         (write_char): Adjust accordingly.
3087         (write_chars): Likewise.
3088         (write_string): Likewise.
3089         (start_mangling): Initialize G.substitutions only one.  Add
3090         ident_p parameter.
3091         (finish_mangling): Use VARRAY_CLEAR to reclaim
3092         storage in G.substitutions.  Use obstack_finish.
3093         (init_mangle): Adjust for changes to variable names above.
3094         Initialize G.substitutions.
3095         (mangle_decl_string): Adjust call to start_mangling.
3096         (get_identifier_nocopy): New function.
3097         (mangle_decl): Use it.
3098         (mangle_type_string): Adjust call to start_mangling.
3099         (mangle_special_for_type): Likewise.
3100         (mangle_vtt_for_type): Likewise.
3101         (mangle_ctor_vtbl_for_type): Likewise.
3102         (mangle_thunk): Likewise.
3103         (mangle_guard_variable): Likewise.
3104         (mangle_ref_init_variable): Likewise.
3105
3106 2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3107
3108         PR c++/14428
3109         * pt.c (redeclare_class_template): Check the type of non-type and
3110         template template parameter.
3111
3112 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3113
3114         * call.c (convert_class_to_reference): Adjust build_int_cst calls.
3115         (build_user_type_conversion_1, convert_like_real,
3116         build_java_interface_fn_ref, build_special_member_call): Likewise.
3117         * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
3118         * cp-gimplify.c (cp_gimplify_expr): Likewise.
3119         * cvt.c (cp_convert_to_pointer): Likewise.
3120         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3121         * decl2.c (start_static_initialization_or_destruction,
3122         generate_ctor_or_dtor_function): Likewise.
3123         * except.c (build_throw): Likewise.
3124         * mangle.c (write_integer_cst): Likewise.
3125         * method.c (finish_thunk): Likewise.
3126         * rtti.c (build_headof, get_tinfo_decl_dynamic,
3127         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3128         get_pseudo_ti_init): Likewise.
3129         * search.c (get_dynamic_cast_base_type): Likewise.
3130
3131 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
3132
3133         * class.c, search.c: Remove references to DWARF_DEBUG.
3134
3135 2004-08-25  Adam Nemet  <anemet@lnxw.com>
3136
3137         * repo.c (extract_string): Reset backquote after one character.
3138         (get_base_filename): Fix indentation.
3139
3140 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3141
3142         * decl.c (cxx_init_decl_processing): Adjust
3143         build_common_tree_nodes call.
3144
3145 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3146
3147         PR c++/16889
3148         * (is_subobject_of_p): Resurrect & optimize.
3149         (lookup_field_r): Use it.
3150
3151 2004-08-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3152
3153         PR c++/16706
3154         * search.c (friend_accessible_p): Increment processing_template_decl
3155         when deal with TEMPLATE_DECL of SCOPE.
3156
3157 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3158
3159         PR c++/17149
3160         * semantics.c (check_accessibility_of_qualified_id): Defer check
3161         if qualifying_type is a template parameter.
3162
3163 2004-08-23  Mark Mitchell  <mark@codesourcery.com>
3164
3165         PR c++/17163
3166         * pt.c (instantiate_decl): Do not try to apply
3167         DECL_DECLARED_INLINED_P to a VAR_DECL.
3168
3169         * search.c (build_baselink): Fix typo in comment.
3170
3171 2004-08-22 Andrew Pinski  <apinski@apple.com>
3172
3173         Revert:
3174         2004-08-22  Andrew Pinski  <apinski@apple.com>
3175         PR c++/14029
3176         * typeck.c (build_unary_op): Use &a.b if the folded lowered
3177         expression is not constant.
3178
3179 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3180
3181         * name-lookup.c (pushdecl): Rename build_type_copy call.
3182         * tree.c (cp_build_qualified_type_real,
3183         build_exception_variant, handle_java_interface_attribute): Likewise.
3184
3185 2004-08-22  Andrew Pinski  <apinski@apple.com>
3186
3187         PR c++/14029
3188         * typeck.c (build_unary_op): Use &a.b if the folded lowered
3189         expression is not constant.
3190
3191 2004-08-20  Mark Mitchell  <mark@codesourcery.com>
3192
3193         PR c++/17121
3194         * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
3195
3196 2004-08-21  Joseph S. Myers  <jsm@polyomino.org.uk>
3197
3198         PR c++/17120
3199         * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
3200         MODOP_EXPR.
3201
3202 2004-08-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3203
3204         * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
3205         before calling comp_template_args.
3206
3207 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
3208
3209         * class.c (build_vtbl_initializer): Use build_int_cst for
3210         negative size types.
3211         * decl.c (complete_array_type): Likewise.
3212         * method.c (finish_thunk): Likewise.
3213
3214 2004-08-20  Andreas Tobler  <a.tobler@schweiz.ch>
3215
3216         * tree.c: Remove unused mark_local_for_remap_r.
3217
3218 2004-08-19  Eric Christopher  <echristo@redhat.com>
3219
3220         * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
3221         * tree.c (cxx_unsave_expr_now): Delete.
3222         (cp_unsave_r): Ditto.
3223
3224 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
3225
3226         PR c++/15890
3227         * pt.c (push_template_decl_real): Disallow template allocation
3228         functions with fewer than two parameters.
3229
3230 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3231
3232         * cp-tree.h (build_shared_int_cst): Remove.
3233         * tree.c (shared_int_cache): Remove.
3234         (build_shared_int_cst): Remove.
3235         * class.c (finish_struct_1): Use build_int_cst.
3236
3237 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
3238
3239         * decl.c (finish_enum): Do not copy value node early, copy
3240         later.
3241         * lex.c (cxx_init): Force null_node to be unique.
3242
3243 2004-08-19  Joseph S. Myers  <jsm@polyomino.org.uk>
3244
3245         PR c++/17041
3246         * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
3247         from input for MODOP_EXPR.
3248
3249 2004-08-18  Mark Mitchell  <mark@codesourcery.com>
3250
3251         * pt.c (dependent_template_p): Fix typo in commment.
3252
3253         PR c++/17068
3254         * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
3255         dependent.
3256
3257 2004-08-17  Mark Mitchell  <mark@codesourcery.com>
3258
3259         PR c++/16246
3260         * pt.c (unify): Tidy ARRAY_TYPE handling.  Make sure that non-type
3261         arguments have the same type as the corresponding parameter.
3262
3263         PR c++/16215
3264         * parser.c (cp_parser_name_lookup_error): If parser->object_scope
3265         is set use it for diagnostic purposes.
3266         (cp_parser_pseudo_destructor_name): Remove special-case error
3267         message.
3268
3269         PR c++/15871
3270         * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
3271
3272         PR c++/16965
3273         * cp-tree.h (qualified_name_lookup_error): Add parameter.
3274         * name-lookup.c (do_class_using_decl): Restrict set of entities
3275         passed to cp_emit_debug_info_for_using more carefully.
3276         (lookup_qualified_name): Allow lookup_member to return sets of
3277         ambiguous entries.
3278         * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
3279         (cp_parser_primary_expression): Handle ambiguous lookups.
3280         (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
3281         (cp_parser_template_argument): Likewise.
3282         (cp_parser_elaborate_type_specifier): Likewise.
3283         (cp_parser_namespace_name): Likewise.
3284         (cp_parser_class_name): Likewise.
3285         (cp_parser_lookup_name_simple): Likewise.
3286         * pt.c (tsubst_qualified_id): Handle ambiguous results.
3287         (tsubst_expr): Likewise.
3288         * semantics.c (qualified_name_lookup_error): Add decl paramter.
3289         For ambiguous lookups, print candidates.
3290
3291 2004-08-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3292
3293         PR c++/6749
3294         * pt.c (instantiate_pending_templates): Add int parameter.  Don't
3295         return anything.
3296         * cp-tree.h (instantiate_pending_templates): Adjust prototype.
3297         * decl2.c (finish_file): Adjust call to
3298         instantiate_pending_templates.
3299
3300 2004-08-15  Roger Sayle  <roger@eyesopen.com>
3301
3302         * call.c (build_vfield_ref, build_call, build_conditional_expr,
3303         convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
3304         build_java_interface_fn_ref, build_special_member_call,
3305         build_new_method_call, initialize_reference): Replace calls to
3306         build with calls to buildN.
3307         * class.c (build_base_path, convert_to_base_statically,
3308         build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
3309         build_vtbl_initializer): Likewise.
3310         * cp-gimplify.c (genericize_try_block, genericize_catch_block,
3311         gimplify_if_stmt, cp_genericize_r): Likewise.
3312         * cvt.c (convert_to_void): Likewise.
3313         * decl.c (check_initializer, finish_constructor_body,
3314         finish_destructor_body): Likewise.
3315         * error.c (dump_expr): Likewise.
3316         * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
3317         Likewise.
3318         * init.c (perform_member_init, expand_virtual_init,
3319         expand_cleanup_for_base, build_init, expand_default_init,
3320         build_offset_ref, decl_constant_value, build_new, build_new_1,
3321         build_vec_delete_1, build_vec_init, build_delete,
3322         push_base_cleanups, build_vec_delete): Likewise.
3323         * mangle.c (write_integer_cst): Likewise.
3324         * method.c (thunk_adjust, do_build_copy_constructor,
3325         do_build_assign_ref): Likewise.
3326         * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
3327         unify, build_non_dependent_expr): Likewise.
3328         * rtti.c (build_headof, build_typeid, ifnonnull,
3329         build_dyanmic_cast_1, tinfo_base_init): Likewise.
3330         * semantics.c (begin_compound_stmt, finish_call_expr,
3331         finish_pseudo_destructor_expr, finish_id_expression,
3332         simplify_aggr_init_expr, finalize_nrv_r): Likewise.
3333         * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
3334         array_type_nelts_total, stabilize_call): Likewise.
3335         * typeck.c (decay_conversion, build_class_member_access_expr,
3336         lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
3337         get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
3338         build_x_unary_op, build_unary_op, unary_complex_lvalue,
3339         build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
3340         check_return_expr): Likewise.
3341         * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
3342         split_nonconstant_init, store_init_value, build_m_component_ref):
3343         Likewise.
3344
3345 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3346
3347         * call.c (convert_class_to_reference,
3348         build_user_type_conversion_1, convert_like_real,
3349         build_java_interface_fn_ref, build_special_member_call): Use
3350         build_int_cst.
3351         * class.c (build_vtbl_initializer): Likewise.
3352         * cp-gimplify.c (cp_gimplify_expr): Likewise.
3353         * cvt.c (cp_convert_to_pointer): Likewise.
3354         * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
3355         * decl2.c (start_static_initialization_or_destruction,
3356         generate_ctor_or_dtor_function): Likewise.
3357         * except.c (build_throw): Likewise.
3358         * lex.c (cxx_init): Likewise.
3359         * mangle.c (write_integer_cst): Likewise.
3360         * rtti.c (build_headof, get_tinfo_decl_dynamic,
3361         build_dynamic_cast_1, ptr_initializer, ptm_initializer,
3362         get_pseudo_ti_init): Likewise.
3363         * search.c (get_dynamic_cast_base_type): Likewise.
3364         * tree.c (build_shared_int_cst): Likewise.
3365
3366 2004-08-12  Mark Mitchell  <mark@codesourcery.com>
3367
3368         PR c++/16273
3369         * class.c (count_depth_data): New type.
3370         (dfs_depth_post): New function.
3371         (dfs_depth_q): Likewise.
3372         (find_final_overrider_data_s): Change type of vpath.
3373         Add vpath_list.
3374         (dfs_find_final_overrider_1): New function.
3375         (dfs_find_final_overrider): Use it.
3376         (dfs_find_final_overrider_q): Adjust use of vpath.
3377         (dfs_find_final_overrider_post): Likewise.
3378         (find_final_overrider): Use dfs_depth.  Allocate and deallocate
3379         vpath_list.
3380
3381 2004-08-12 Jan Beulich <jbeulich@novell.com>
3382
3383         * parser.c (cp_parser_asm_definition): Properly consume scope operator
3384         tokens preceding the clobbers. Don't check for scope operator
3385         following inputs. Simplify inputs handling to match that now used for
3386         clobbers.
3387
3388 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
3389
3390         PR c++/16698
3391         * except.c (build_throw): Allocate cleanup_type and the function
3392         for __cxa_throw separately.
3393
3394         PR c++/16853
3395         * call.c (standard_conversion): Do not accept conversions between
3396         pointers to members if the class types are unrelated.
3397
3398         PR c++/16618
3399         * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
3400         char &" instead of just "char &".
3401
3402         PR c++/16870
3403         * pt.c (tsubst): Just return the unknown_type_node.
3404
3405 2004-08-11  Mark Mitchell  <mark@codesourcery.com>
3406
3407         PR c++/16964
3408         * parser.c (cp_parser_class_specifier): Robustify.
3409
3410         PR c++/16904
3411         * pt.c (tsubst_copy_and_build): Complain about invalid
3412         qualification.
3413
3414         PR c++/16929
3415         * pt.c (tsubst_default_argument): Clear out current_class_ptr and
3416         current_class_ref while tsubsting.
3417
3418 2004-08-10  Mark Mitchell  <mark@codesourcery.com>
3419
3420         PR c++/16971
3421         * parser.c (cp_parser_init_declarator): Robustify.
3422
3423 2004-08-06  Richard Sandiford  <rsandifo@redhat.com>
3424
3425         * typeck2.c (process_init_constructor): Guard the missing field warning
3426         with warn_missing_field_initializers rather than extra_warnings.
3427
3428 2004-08-06  Paolo Bonzini  <bonzini@gnu.org>
3429
3430         * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
3431
3432 2004-08-05  Mark Mitchell  <mark@codesourcery.com>
3433
3434         * decl.c (start_preparsed_function): Move determine_visibility
3435         call.
3436         * decl2.c (determine_visibility): Incorporate dllexport testing.
3437
3438 2004-08-05  Geoffrey Keating  <geoffk@apple.com>
3439
3440         * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
3441         means that libstdc++ is needed.
3442
3443 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
3444
3445         * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
3446
3447 2004-08-04  Geoffrey Keating  <geoffk@apple.com>
3448
3449         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
3450         than passing it as a parameter to rest_of_decl_compilation.
3451         * decl2.c (grokfield): Use set_user_assembler_name.
3452
3453 2004-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3454
3455         * decl.c (complete_array_type): Don't gratuitously copy
3456         maxindex. Its type is always set.
3457
3458 2004-08-04  Paul Brook  <paul@codesourcery.com>
3459
3460         * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
3461         * cp-tree.h (struct language_function): Rename x_dtor_label to
3462         x_cdtor_label.
3463         (dtor_label): Rename ...
3464         (cdtor_label): ... to this.
3465         * decl.c (begin_constructor_body): Remove.
3466         (check_special_function_return_type): Maybe change the return type.
3467         (grokdeclarator): Pass the class type.
3468         (start_preparsed_function): Constructors may need a return label.
3469         (finish_constructor_body, finish_destructor_body): Set the return
3470         value.
3471         (begin_function_body): Don't call begin_constructor_body.
3472         (finish_function): Don't warn for constructors or destructors.
3473         (implicitly_declare_fn): Maybe change the return type.
3474         * optimize.c: Include target.h.
3475         (maybe_clone_body): Remap the function result.
3476         * semantics.c: Include target.h.
3477         (finish_return_stmt): Maybe jump to return label for constructors.
3478
3479 2004-08-03  Mark Mitchell  <mark@codesourcery.com>
3480
3481         * class.c (build_vtable): Do not set DECL_VISIBILITY here.
3482         (check_field_decls): Or here.
3483         (check_methods): Or here.
3484         (initialize_array): Don't mess with DECL_CONTEXT.
3485         * cp-tree.h (start_decl): Adjust prototype.
3486         (determine_visibility): New function.
3487         * decl.c (duplicate_decls): Remove checks for hidden "operator
3488         new".
3489         (build_library_fn_1): Give all library functions default
3490         visibility.
3491         (start_decl): Add pop_scope_p parameter.  Tidy.
3492         (cp_finish_decl): Do not pop scopes here.  Call
3493         determine_visibility for variable definitions.
3494         (start_preparsed_function): Call determine_visibility.
3495         * decl2.c (determine_visibility): New function.
3496         * method.c (use_thunk): Fix formatting.
3497         * parser.c (cp_parser_condition): Adjust calls to start_decl.
3498         (cp_parser_init_declarator): Likewise.
3499         * pt.c (instantiate_decl): Always call pop_nested_class.
3500         * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
3501         (tinfo_base_init): Likewise.
3502
3503 2004-08-02  Mark Mitchell  <mark@codesourcery.com>
3504
3505         PR c++/16707
3506         * name-lookup.c (validate_nonmember_using_decl): Robustify.
3507
3508 2004-08-01  Mark Mitchell  <mark@codesourcery.com>
3509
3510         PR c++/16224
3511         * name-lookup.c (decl_namespace): Remove.
3512         (current_decl_namespace): Use decl_namespace_context instead of
3513         decl_namespace.
3514         (push_decl_namespace): Likewise.
3515         (arg_assoc_class): Likewise.
3516         (arg_assoc_type): Likewise.
3517         * pt.c (check_specialization_namespace): New function.
3518         (maybe_process_partial_specialization): Use it.
3519         (register_specialization): Likewise.
3520
3521         PR c++/16489
3522         * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
3523         * call.c (null_ptr_cst_p): Handle variables with constant
3524         initializers.
3525         * pt.c (convert_nontype_argument): Use
3526         DECL_INTEGRAL_CONSTANT_VAR_P.
3527         * semantics.c (finish_id_expression): Likewise.
3528
3529         PR c++/16529
3530         * decl.c (duplicate_decls): Reject duplicate namespace
3531         declarations.
3532
3533         PR c++/16810
3534         * typeck.c (build_ptrmemfunc): Loosen assertion.
3535
3536 2004-08-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3537
3538         * call.c (z_candidate::template_decl): Rename from template.
3539         (add_template_candidate_real): Adjust member reference.
3540         (joust): Likewise.
3541
3542 2004-07-29  Mark Mitchell  <mark@codesourcery.com>
3543
3544         * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
3545         (lang_decl_flags): Narrow the width of "languages".  Add
3546         repo_available_p.
3547         (DECL_NEEDED_P): Remove.
3548         (FOR_EACH_CLONE): New macro.
3549         (DECL_REPO_AVAILABLE_P): Likewise.
3550         (DECL_TINFO_P): Likewise.
3551         (set_linkage_according_to_type): Declare.
3552         (import_export_vtable): Remove.
3553         (import_export_tinfo): Likewise.
3554         (mark_needed): New function.
3555         (decl_needed_p): Likewise.
3556         (note_vauge_linkage_fn): Likewise.
3557         (init_repo): Change prototype.
3558         (repo_template_used): Remove.
3559         (repo_template_instantiated): Likewise.
3560         (repo_emit_p): New function.
3561         (repo_export_class_p): Likewise.
3562         (no_linkage_check): Change prototype.
3563         * class.c (set_linkage_according_to_type): New function.
3564         (build_vtable): Use it.  Do not call import_export_vtable.  Set
3565         DECL_IGNORED_P if appropriate.
3566         * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
3567         (make_rtL_for_nonlocal_decls): Check for template instantiations
3568         explicitly.
3569         (grokfndecl): Adjust call to no_linkage_check.
3570         (set_linkage_for_static_data_member): New function.
3571         (grokvardecl): Use it.  Adjust call to no_linkage_check.
3572         (grokdeclarator): Use set_linkage_for_static_data_member.
3573         * decl2.c (note_vague_linkage_fn): New function.
3574         (note_vague_linkage_var): Likewise.
3575         (finish_static_data_member_decl): Use it.
3576         (import_export_vtable): Remove.
3577         (import_export_class): Use repo_export_class_p.
3578         (var_finalized_p): Simplify.
3579         (maybe_emit_vtables): Simplify.
3580         (mark_needed): New function.
3581         (decl_needed_p): Likewise.
3582         (import_export_decl): Add documentation and consistency checks.
3583         Use repo_emit_p.  Handle virtual tables and RTTI information
3584         here.
3585         (import_export_tinfo): Remove.
3586         (write_out_vars): Call import_export_decl.
3587         (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
3588         whenever one is.
3589         (finish_file): Use decl_needed_p.  Do not call import_export_decl
3590         for undefined static data members.  Do not warn about undefined
3591         inlines when using a repository.
3592         (mark_used): Use note_vague_linkage_fn.  Always defer template
3593         instantiations.
3594         * lex.c (cxx_init): Adjust call to init_repo.  Always set
3595         flag_unit_at_a-time.
3596         * method.c (synthesize_method): Remove unncessary
3597         import_export_decl call.
3598         (implicitly_declare_fn): Use set_linkage_according_to_type.
3599         * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
3600         * pt.c (instantiate_class_template): Don't redundantly add classes
3601         to keyed_classes.  Don't call repo_template_used.
3602         (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
3603         templates with internal linkage.
3604         (check_instantiated_args): Adjust call to no_linkage_check.
3605         (instantiate_template): Use FOR_EACH_CLONE.
3606         (mark_definable): New function.
3607         (mark_decl_instantiated): Use it.
3608         (do_decl_instantiation): Adjust tests for explicit instantiation
3609         after "extern template".
3610         (instantiate_class_member): Do not use repo_template_instantiated.
3611         (do_type_instantiation): Simplify.
3612         (instantiate_decl): Use mark_definable.  Check repo_emit_p.
3613         Simplify.
3614         * repo.c (repo_get_id): Remove.
3615         (original_repo): Remove.
3616         (IDENTIFIER_REPO_USED): Remove.
3617         (IDENTIFIER_REPO_CHOSEN): Remove.
3618         Remove all #if 0'd code.
3619         (repo_template_used): Remove.
3620         (repo_template_instantiated): Remove.
3621         (temporary_obstack_initialized_p): New variable.
3622         (init_repo): Register with lang_post_pch_load.  Avoid creating
3623         identifiers unnecessarily.  Don't use original_repo.  Close the
3624         file here.
3625         (reopen_repo_file_for_write): Not here.
3626         (finish_repo): Always write out a new repository file.
3627         (repo_emit_p): New function.
3628         (repo_export_class_p): Likewise.
3629         * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
3630         (involves_incomplete_p): New function.
3631         (tinfo_base_init): Use it.
3632         (ptr_initializer): Remove non_public_ptr parameter.
3633         (ptm_initializer): Likewise.
3634         (get_pseudo_ti_init): Likewise.
3635         (unemitted_tinfo_decl_p): Remove.
3636         (emit_tinfo_decl): Use import_export_decl.
3637         * semantics.c (expand_body): Move updates of static_ctors and
3638         static_dtors to ...
3639         (expand_or_defer_fn): ... here.
3640         * tree.c (no_linkage_check): Add relaxed_p parameter.
3641
3642 2004-07-28  Eric Christopher  <echristo@redhat.com>
3643
3644         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3645
3646 2004-07-28  Nathan Sidwell  <nathan@codesourcery.com>
3647
3648         * cp-tree.h (struct tree_pair_s): New.
3649         (typedef tree_pair_p): New.
3650         (DEF_VEC_O(tree_pair_s)): New.
3651         (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
3652         (CLASSTYPE_VCALL_INDICES): Update documentation.
3653         * class.c (get_vcall_index): Adjust.
3654         (add_vcall_offset): Adjust.
3655
3656 2004-07-27  Kelley Cook  <kcook@gcc.gnu.org>
3657
3658         * pt.c, typeck.c: Remove spurious carriage returns.
3659
3660 2004-07-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3661
3662         PR c++/14429
3663         * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
3664         when the type of ARG is not dependent.
3665
3666 2004-07-26  Geoffrey Keating  <geoffk@apple.com>
3667
3668         * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
3669         (lang_specific_driver): If the C++ or math library options don't
3670         start with '-l', don't count them as added libraries.
3671
3672 2004-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3673
3674         * decl.c (xref_basetypes): Adjust base access vector creation.
3675         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
3676         access accesses.
3677         * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
3678
3679 2004-07-26  Niall Douglas  <s_fsfeurope2@nedprod.com>
3680             Brian Ryner  <bryner@brianryner.com>
3681
3682         PR c++/15000
3683         PR c++/9283
3684         * class.c (check_field_decls): Apply hidden visibility if
3685         -fvisibility-inlines-hidden and inlined unless otherwise specified
3686         (build_vtable): Set vtable visibility to class visibility.
3687         (check_field_decls): Default static member visibility to class
3688         visibility.
3689         (check_methods): Default method visibility to class visibility.
3690         * cp-tree.h: Added CLASSTYPE_VISIBILITY and
3691         CLASSTYPE_VISIBILITY_SPECIFIED macro.
3692         * decl.c (duplicate_decls): New logic for merging definition decls
3693         with declaration decls. Added ignore & warning when non default
3694         applied to global operator new or delete.
3695         * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
3696         wherever VISIBILITY was changed
3697         * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
3698         visibility.
3699         (tinfo_base_init): Set typeinfo name visibility to class visibility.
3700
3701 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
3702
3703         * decl.c: Rename all identifiers named `class' to `cl'.
3704         * cp-tree.h: Likewise.
3705
3706 2004-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3707
3708         * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
3709         * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
3710         * name-lookup.c (binding_entry_make): Use GGC_NEW.
3711         (binding_table_construct): Use GGC_CNEWVEC.
3712         (binding_table_new): Use GGC_NEW.
3713         (cxx_binding_make): Likewise.
3714         (begin_scope): Likewise.
3715         (push_to_top_level): Use GCC_CNEW.
3716         * parser.c (cp_token_cache_new): Likewise.
3717         (cp_token_cache_push_token): Likewise.
3718         (cp_lexer_new_main): Likewise.
3719         (cp_lexer_new_from_tokens): Likewise.
3720         (cp_parser_context_new): Likewise.
3721         (cp_parser_new): Likewise.
3722         (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
3723         * lex.c (cxx_make_type): Use GGC_CNEW.
3724         (retrofit_lang_decl): Use GGC_NEWVAR.
3725         (cxx_dup_lang_specific_decl): Likewise.
3726         (copy_lang_type): Likewise.
3727         * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
3728         (save_function_data): Likewise.
3729         (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
3730         (cxx_push_function_context): Likewise.
3731
3732 2004-07-25  Richard Henderson  <rth@redhat.com>
3733
3734         * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
3735         DECL_IGNORED_P on RESULT_DECL.
3736         * semantics.c (finalize_nrv): Copy them too.
3737
3738 2004-07-23  Nathan Sidwell  <nathan@codesourcery.com>
3739
3740         * search.c (lookup_conversion_operator): Avoid two loops.
3741         (add_conversions): Remove.
3742         (check_hidden_convs, split_conversions,
3743         lookup_conversions_r):  New.
3744         (lookup_conversions): Use lookup_conversions_r.
3745
3746 2004-07-22  Nathan Sidwell  <nathan@codesourcery.com>
3747
3748         * pt.c (get_template_base): Check type is completable.
3749
3750 2004-07-21  Eric Christopher  <echristo@redhat.com>
3751
3752         * decl.c (poplevel): Inline unused variable checking.
3753         Change formatting.
3754
3755 2004-07-21  Paolo Bonzini  <bonzini@gnu.org>
3756
3757         * typeck.c (build_binary_op): Do not use RDIV_EXPR for
3758         integer vectors.
3759
3760 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3761
3762         PR c++/14497
3763         * pt.c (check_explicit_specialization): Remove extension to accept
3764         specializations without template headers. Fall-through to normal
3765         processing.
3766
3767 2004-07-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3768
3769         PR c++/509
3770         * pt.c (determine_specialization): New parameter template_count.
3771         Disambiguate between member templates and member functions counting
3772         the template headers.
3773         (check_explicit_specialization): Update caller.
3774         (tsubst_friend_function): Likewise.
3775
3776 2004-07-20  Steven Bosscher  <stevenb@suse.de>
3777
3778         * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
3779         * cp-tree.h (tinst_level_t): New tree type.
3780         (union lang_tree_node): Handle it.
3781         (TINST_LOCATION): New accessor macro.
3782         (make_tinst_level): New prototype.
3783         * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
3784         * decl.c (cp_tree_node_structure): Likewise.
3785         * error.c (print_instantiation_full_context): Use TINST_LOCATION.
3786         (print_instantiation_partial_context): Likewise.
3787         * pt.c (pop_tinst_level): Likewise.
3788          (push_tinst_level): Use make_tinst_level.
3789         * tree.c (make_tinst_level): New function.
3790         (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
3791
3792 2004-07-20  Mark Mitchell  <mark@codesourcery.com>
3793
3794         * parser.c (cp_parser_simple_type_specifier): Fix typo.
3795
3796         PR c++/16637
3797         * parser.c (cp_parser_simple_type_specifier): Do not record usage
3798         of globally-qualified names.
3799
3800 2004-07-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3801
3802         PR c++/16175
3803         * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
3804         cv qualifier.
3805
3806 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3807
3808         PR c++/16623
3809         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3810         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3811         * class.c (add_implicitly_declared_members): Use
3812         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3813         * method.c (lazily_declare_fn): Clear
3814         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3815         * search.c (lookup_fnfields_1): Check it.
3816
3817 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3818
3819         * cp-tree.h (vec_binfo_member): Remove.
3820         * tree.c (vec_binfo_member): Remove.
3821
3822         * cp-tree.h (struct lang_type_class): Remove vfields field.
3823         (CLASSTYPE_VFIELDS): Remove.
3824         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3825         * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
3826         handling.
3827         (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
3828         (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
3829         * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
3830
3831 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3832
3833         * cp-tree.h (DEF_VEC_P(tree)): Remove here.
3834         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
3835         Moved to common.
3836         (BINFO_LANG_SLOTS): Remove.
3837         * tree.c (copy_binfo): Adjust BINFO creation and accessors.
3838         * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
3839         * class.c (check_bases): Adjust BINFO accessors.
3840         (determine_primary_base, finish_struct_bits,
3841         maybe_warn_about_overly_private_class, warn_hidden,
3842         walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
3843         warn_about_ambiguous_bases, get_vfield_name,
3844         dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
3845         add_vcall_offset_vtbl_entries_r): Likewise.
3846         * dump.c (cp_dump_tree): Likewise.
3847         * init.c (sort_mem_initializers, expand_member_init, build_delete,
3848         push_base_cleanups): Likewise.
3849         * method.c (do_build_copy_constructor, do_build_assign_ref,
3850         synthesize_exception_spec): Likewise.
3851         name-lookup.c (arg_assoc_class): Likewise.
3852         * pt.c (instantiate_class_template,
3853         get_template_base_recursive): Likewise.
3854         * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
3855         * typeck2.c (process_init_constructor): Likewise.
3856         * search.c (lookup_base_r, dynamic_cast_base_recurse,
3857         dfs_access_in_type, dfs_walk_real, look_for_overrides,
3858         types_overlap_p, copied_binfo, original_binfo): Likewise.
3859         (binfo_for_vtable): Remove
3860
3861 2004-07-20  Steven Bosscher  <stevenb@suse.de>
3862
3863         * cp-tree.h (struct lang_decl_flags): Unify the template_info and
3864         thunk_alias, and the access and virtual_offset fields.
3865         (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
3866         * decl.c (finish_case_label): Update c_add_case_node call.
3867
3868 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3869
3870         Revert patch for PR c++/16623.
3871
3872 2004-07-19  Kelley Cook  <kcook@gcc.gnu.org>
3873
3874         * except.c: Remove two spurious carriage returns.
3875
3876 2004-07-19  Mark Mitchell  <mark@codesourcery.com>
3877
3878         PR c++/16623
3879         * cp-tree.h (lang_type_class): Add lazy_assignment_op.
3880         (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
3881         * class.c (add_implicitly_declared_members): Use
3882         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3883         * method.c (lazily_declare_fn): Clear
3884         CLASSTYPE_LAZY_ASSIGNMENT_OP.
3885         * search.c (lookup_fnfields_1): Check it.
3886
3887 2004-07-19  Nathan Sidwell  <nathan@codesourcery.com>
3888
3889         * class.c (add_method): Delay adding the slot until the end.
3890         (determine_primary_base): Adjust VEC_iterate invokation.
3891         (resort_type_method_vec, finish_struct_methods, warn_hidden,
3892         walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
3893         build_vtbl_initializer): Likewise.
3894         * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
3895         build_vbase_delete): Likewise.
3896         * method.c (do_build_copy_constructor): Likewise.
3897         * name-lookup.c (new_class_binding, print_binding_level,
3898         poplevel_class, store_class_bindings, push_to_top_level,
3899         pop_from_top_level): Likewise.
3900         * pt.c (check_explicit_specialization): Likewise.
3901         * search.c (lookup_conversion_operator, lookup_fnfields_1,
3902         get_pure_virtuals, add_conversions, dfs_check_overlap,
3903         binfo_for_vbase): Likewise.
3904
3905 2004-07-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3906
3907         PR c++/12170
3908         * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
3909         innermost set of template arguments during deduction.  Simplify.
3910
3911 2004-07-19  Joseph S. Myers  <jsm@polyomino.org.uk>
3912
3913         * typeck.c (build_modify_expr, build_x_modify_expr): Set
3914         TREE_NO_WARNING on assignments with an operator other than '='.
3915
3916 2004-07-10  Steven Bosscher  <stevenb@suse.de>
3917             Joseph S. Myers  <jsm@polyomino.org.uk>
3918
3919         * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
3920         * decl2.c (grokfield): Don't check current_class_depth via
3921         unused TREE_COMPLEXITY.
3922         * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
3923         to avoid the missing parentheses warning.
3924         Don't set C_SET_EXP_ORIGINAL_CODE.
3925
3926 2004-07-18  Mark Mitchell  <mark@codesourcery.com>
3927
3928         * tree.c (no_linkage_helper): Remove.
3929         (no_linkage_check): Don't use walk_tree_without_duplicates.
3930
3931         * mangle.c (write_expression): Issue a sorry for zero-operand
3932         functional casts.
3933
3934 2004-07-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3935
3936         PR c++/13092
3937         * init.c (build_offset_ref): Build SCOPE_REF with non-null
3938         TREE_TYPE for non-dependent names.
3939         * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
3940         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
3941         unknown_type_node as its TREE_TYPE.
3942         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
3943         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
3944         (dump_expr) <SCOPE_REF case>: Likewise.
3945
3946 2004-07-17  Jason Merrill  <jason@redhat.com>
3947
3948         PR c++/16115
3949         * call.c (type_passed_as): Make the invisible reference type
3950         __restrict.
3951         * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
3952         cp_genericize_r.  Handle invisible reference lowering.
3953         (is_invisiref_parm): New fn.
3954         (cp_genericize): Adjust the types of invisible reference parms.
3955         Don't repeat the walk for clones.
3956         * decl.c (store_parm_decls): Don't generate any code for clones.
3957
3958 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3959
3960         * cp-tree.h (builtin_function): Declare.
3961
3962 2004-07-16  Mark Mitchell  <mark@codesourcery.com>
3963
3964         * class.c (finish_struct_methods): Remove unncessary code.
3965         (add_implicitly_declared_members): Create declarations for default
3966         constructors and copy constructors lazily.
3967         * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
3968         lazy_copy_ctor.
3969         (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
3970         (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
3971         * decl2.c (check_classfn): Robustify.
3972         (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
3973         (locate_ctor): Handle lazy default constructors.
3974         (locate_copy): Handle lazy copy constructors.
3975         (implicitly_declare_fn): Make sure we're looking at the
3976         TYPE_MAIN_VARIANT for a class before creating functions.  Don't
3977         set TYPE_HAS_CONSTRUCTOR.
3978         (lazily_declare_fn): New function.
3979         * name-lookup.c (constructor_name_full): Simplify.
3980         * search.c (lookup_fnfields_1): Lazily create methods, as
3981         necessary.
3982         (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
3983
3984 2004-07-16  Steven Bosscher  <stevenb@suse.de>
3985
3986         * cp-tree.h (struct lang_type): Don't have three GTY options on a
3987         single bit GTY desc.
3988
3989 2004-07-16  Richard Henderson  <rth@redhat.com>
3990
3991         * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
3992         * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
3993         * tree.c (cp_copy_res_decl_for_inlining): Remove.
3994
3995 2004-07-16  Nathan Sidwell  <nathan@codesourcery.com>
3996
3997         * class.c (finish_struct_bits): Use for loop.
3998         (propagate_binfo_offsets): Do primary binfo outside of loop.
3999
4000         PR c++/16583
4001         * dump.c (cp_dump_tree): Don't dump the bases if there's no
4002         binfo.
4003
4004         * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
4005
4006 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
4007
4008         * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
4009         has_abstract_assign_ref.  Make methods a VEC(tree) *.
4010         (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
4011         (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
4012         (CLASSTYPE_DESTRUCTORS): Likewise.
4013         (TYPE_HAS_REAL_ASSIGN_REF): Remove.
4014         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
4015         (add_method): Change prototoype.
4016         * class.c (add_method): Remove error_p parameter.  Adjust for
4017         changes to CLASSTYPE_METHOD_VEC.
4018         (handle_using_decl): Adjust call to add_method.
4019         (maybe_warn_about_overly_private_class): Adjust for
4020         changes to CLASSTYPE_METHOD_VEC.
4021         (resort_type_method_vec): Likewise.
4022         (finish_struct_methods): Likewise.
4023         (check_for_override): Likewise.
4024         (warn_hidden): Likewise.
4025         (add_implicitly_declared_members): Defer creation of assignment
4026         operators.  Adjust call to add_method.
4027         (clone_function_decl): Adjust call to add_method.
4028         (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
4029         (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
4030         * decl.c (grok_special_member_properties): Don't set
4031         TYPE_HAS_ABSTRACT_ASSIGN_REF.
4032         * decl2.c (check_classfn): Adjust for
4033         changes to CLASSTYPE_METHOD_VEC.
4034         * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
4035         (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
4036         (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
4037         (implicitly_declare_fn): Set DECL_SOURCE_LOCATION.  Do not call
4038         cp_finish_decl.
4039         * pt.c (check_explicit_specialization): Adjust for
4040         changes to CLASSTYPE_METHOD_VEC.
4041         (instantiate_class_template): Do not set
4042         TYPE_HAS_ABSTRACT_ASSIGN_REF.
4043         * ptree.c (cxx_print_type): Don't try to print
4044         CLASSTYPE_METHOD_VEC.
4045         * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
4046         * search.c (lookup_field_r): Adjust for
4047         changes to CLASSTYPE_METHOD_VEC.
4048         (lookup_fnfields): Likewise.
4049         (lookup_conversion_operator): Likewise.
4050         (lookup_fnfields_1): Likewise.  Create assignment operators
4051         lazily.
4052         (look_for_overrides_here): Adjust for
4053         changes to CLASSTYPE_METHOD_VEC.
4054         (add_conversions): Likewise.
4055         * semantics.c (finish_member_declaration): Adjust call to add_method.
4056
4057 2004-07-15  Jason Merrill  <jason@redhat.com>
4058
4059         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4060         references and pointers are compatible.
4061
4062 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
4063
4064         * decl.c (xref_basetypes): Refactor.
4065         * tree.c (copy_base_binfos): Replace with ...
4066         (copy_binfo): ... this. Deep copy the given binfo, (not the just
4067         bases of the given base).
4068         * cp-tree.h (copy_base_binfo): Remove.
4069         (copy_binfo): Declare.
4070
4071 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
4072
4073         * name-lookup.c (set_inherited_value_binding_p): Add class_type
4074         parameter.
4075         (get_class_binding): Adjust.
4076         (push_class_level_binding): Don't use set_inherited_value_binding_p.
4077
4078 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
4079
4080         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
4081         * decl.c (xref_basetypes): Set it here.
4082
4083         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
4084         Don't check for incomplete base.
4085         (get_vfield_name): Simplify while loop.
4086         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
4087
4088 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
4089
4090         * lex.c (cxx_make_type): Remove call to get_pointer_type.
4091
4092         * cp-tree.h (IDENTIFIER_VALUE): Remove.
4093         (BINFO_PUSHDECLS_MARKED): Likewise.
4094         (maybe_inject_for_scope_var): Likewise.
4095         (push_class_decls): Likewise.
4096         * name-lookup.h (push_class_binding): Remove.
4097         (innermost_non_namespace_value): New function.
4098         (outer_binding): Likewise.
4099         * class.c (add_method): Push bindings before adding to
4100         TYPE_METHODS.
4101         (restore_class_cache): Do not restore class_shadowed.
4102         (pushclass): Do not add USING_DECLs.  Do not call
4103         push_class_decls.
4104         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
4105         * decl.c (pushdecl): Use outer_binding.
4106         (poplevel): Set the scope for an out-of-scope for-loop declaration
4107         appropriately.
4108         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
4109         * name-lookup.c (new_class_binding): New function.
4110         (push_binding): Use it.
4111         (pushdecl): Use innermost_non_namespace_value.
4112         (maybe_inject_for_scope_var): Remove.
4113         (push_class_binding): Remove.
4114         (set_inherited_value_binding_p): New function.
4115         (get_class_binding): New function.
4116         (push_class_level_binding): Assert that the current_class_type is
4117         being defined.
4118         (outer_binding): New function.
4119         (innermost_non_namespace_value): Likewise.
4120         (lookup_name_real): Use outer_binding.
4121         (lookup_name_current_level): Ignore out-of-scope variables.
4122         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
4123         (lookup_template_class): Likewise.
4124         * search.c (dfs_push_type_decls): Remove.
4125         (dfs_push_decls): Likewise.
4126         (setup_class_bindings): Likewise.
4127         (lookup_field_1): Handle USING_DECLs from dependent scopes.
4128         (marked_pushdecls_p): Remove.
4129         (unmarked_pushdecls_p): Remove.
4130         (marked_identifiers): Remove.
4131         (setup_class_bindings): Remove.
4132         (dfs_push_type_decls): Remove.
4133         (dfs_push_decls): Remove.
4134         (push_class_decls): Remove.
4135
4136 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
4137
4138         PR c++/16518
4139         PR c++/16337
4140         * decl.c (grokvardecl): Make declspecs parameter const.
4141         (grokdeclarator): Likewise.  Adjust accordingly.
4142         * decl.h (grokdeclarator): Adjust declaration.
4143         * parser.c (cp_parser_init_declarator): Do not clear
4144         decl_specifiers->attributes.
4145
4146         * cp-tree.h (lang_identifier): Remove class_value.
4147         (IDENTIFIER_CLASS_VALUE): Remove.
4148         (pop_class_decls): Likewise.
4149         (init_search_processing): Likewise.
4150         * class.c (handle_using_decl): Use lookup_member, not
4151         IDENTIFIER_CLASS_VALUE.
4152         (restore_class_cache): New function, split out from ...
4153         (pushclass): ... here.  Do not call clear_identifier_class_values.
4154         (invalidate_class_lookup_cache): Do not clear
4155         IDENTIFIER_CLASS_VALUE.
4156         (popclass): Do not call pop_class_decls.
4157         (maybe_note_name_used_in_class): Do not save names looked up after
4158         the class is complete.  Use lookup_member, not
4159         IDENTIFIER_CLASS_VALUE.
4160         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
4161         * decl.c (cxx_init_decl_processing): Do not call
4162         init_search_processing.
4163         * method.c (do_build_copy_constructor): Remove unnecessary code.
4164         (do_build_assign_ref): Likewise.
4165         * name-lookup.c (pushdecl): Use lookup_member, not
4166         IDENTIFIER_CLASS_VALUE.
4167         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
4168         type_shadowed list.
4169         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
4170         (push_class_binding): Do not set it.
4171         (clear_identifier_class_values): Remove.
4172         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
4173         (store_binding): Do not save it.
4174         (pop_from_top_level): Do not restore it.
4175         * name-lookup.h (cxx_saved_binding): Remove class_value.
4176         (clear_identifier_class_values): Remove.
4177         * ptree.c (cxx_print_identifier): Do not print
4178         IDENTIFIER_CLASS_VALUE.
4179         * search.c (search_obstack): Remove.
4180         (push_stack_level): Remove.
4181         (pop_stack_level): Remove.
4182         (search_level): Remove.
4183         (search_stack): Remove.
4184         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
4185         (setup_class_bindings): Use IDENTIFIER_MARKED, not
4186         IDENTIFIER_CLASS_VALUE.
4187         (marked_identifiers): New variable.
4188         (push_class_decls): Clear IDENTIFIER_MARKED.
4189         (pop_class_decls): Don't call pop_search_level.
4190         (init_search_processing): Remove.
4191
4192 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
4193
4194         * cp-tree.h (get_aggr_typedef): Remove.
4195         * init.c (get_aggr_typedef): Likewise.
4196
4197         * name-lookup.c (push_class_level_binding): Simplify.
4198
4199 2004-07-12  Andrew Pinski  <apinski@apple.com>
4200
4201         PR c++/16475
4202         Revert:
4203         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
4204                 PR c++/16276
4205                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4206                 is not public.
4207
4208 2004-07-12  Eric Christopher  <echristo@redhat.com>
4209
4210         * parser.c (cp_parser_class_head): Remove unused variable.
4211
4212 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4213
4214         * decl.c (grok_op_properties): Reject [de-]allocation functions
4215         declared in a namespace, or declared as static.
4216
4217 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
4218
4219         * cp-tree.h (make_binfo): Remove.
4220         * decl.c (xref_basetypes): Use make_tree_binfo directly.
4221         * tree.h (copy_base_binfos): Likewise.
4222         (make_binfo): Remove.
4223
4224         * call.c (build_user_type_conversion_1, build_new_op,
4225         check_constructor_callable, build_temp,
4226         perform_direct_initialization_of_possible): Pass type directly to
4227         lookup_fnfields & build_special_member_call.
4228         (build_special_member_call): Accept a type, and complete it.
4229         * class.c (finish_stuct_bits): Copy the BINFOs here.
4230         * cvt.c (ocp_convert): Pass type directly to
4231         build_special_member_call.
4232         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
4233         (xref_basetypes): Allocate the binfo here. Adjust.
4234         * init.c (build_init, build_new_1): Pass type directly to
4235         build_special_member_call.
4236         * lex.c (cxx_make_type): Do not allocate binfo here.
4237         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
4238         * parser.c (cp_parser_class_head): Always call xref_basetypes.
4239         * pt.c (instantiate_class_template): Likewise. Inhibit access
4240         checking for template friends.
4241         * ptree.c (cxx_print_type): Adjust record printing.
4242         * search.c (lookup_base): When taking a type, complete it before
4243         looking for a binfo.
4244         (lookup_member): Delay completing a type.
4245         (push_class_decls): Don't walk an incomplete type.
4246         (lookup_conversions): Likewise.
4247         * semantics.c (finish_stmt_expr_expr): Pass type directly to
4248         build_special_member_call.
4249         * tree.c (copy_base_binfos): Adjust.
4250         (make_binfo): Likewise.
4251         * typeck.c (build_modify_expr): Pass type directly to
4252         build_special_member_call.
4253         * typeck2.c (process_init_constructor): Check a binfo exists.
4254         (build_m_component_ref): Allow accessing an incomplete type.
4255         (build_functional_cast): Pass type directly to
4256         build_special_member_call.
4257
4258 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4259
4260         PR c++/2204
4261         * config-lang.in (gtfiles): Add typeck2.c.
4262         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
4263         gt-cp-typeck2.h.
4264         * cp-tree.h: Declare complete_type_check_abstract.
4265         * typeck2.c (pat_calc_hash, pat_compare,
4266         complete_type_check_abstract): New functions.
4267         (abstract_virtuals_error): If the type is abstract, register the
4268         declaration within abstract_pending_vars for further checks.
4269         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
4270         * decl.c (cp_finish_decl): Do not strip array types.
4271         (create_array_type_for_decl): Check for abstractness of the element
4272         type.
4273         (complete_vars): Call complete_type_check_abstract.
4274         * class.c (finish_struct): Prepare a list of virtual functions for
4275         template types, and call complete_vars on it to check for abstractness.
4276
4277 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
4278
4279         PR tree-optimization/14107
4280         * decl.c (finish_function): Remove temporary band-aid.
4281
4282 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
4283
4284         * call.c (build_operator_new_call): Avoid using push_to_top_level.
4285         (build_new_op): Adjust call to lookup_function_nonclass.
4286         * name-lookup.c (identifier_type_value): Adjust call to
4287         lookup_name_real.
4288         (lookup_name_real): Add block_p parameter.
4289         (lookup_name_nonclass): Adjust call to lookup_name_real.
4290         (lookup_function_nonclass): Likewise.
4291         (lookup_name): Likewise.
4292         * name-lookup.h (lookup_name_real): Change prototype.
4293         (lookup_name_nonclass): Likewise.
4294         * parser.c (cp_parser_lookup_name): Likewise.
4295
4296         * cp-tree.h (saved_scope): Make old_bindings a vector.
4297         (unuse_fields): Remove.
4298         * name-lookup.h (cxx_saved_binding): Define it.
4299         * class.c (pushclass): Don't use unuse_fields.
4300         * name-lookup.c (cxx_saved_binding_make): Remove.
4301         (store_binding): Add new bindings to a vector, using an
4302         accumulator style, rather than adding them to a list.
4303         (store_bindings): Adjust accordingly.
4304         (store_class_bindings): Likewise.
4305         (push_to_top_level): Likewise.
4306         (pop_from_top_level): Likewise.
4307         * optimize.c (maybe_clone_body): Must push_to_top_level and
4308         pop_from_top_level calls outside of loop.
4309         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
4310         calls here from cp_parser_late_parsing_default_args.
4311         (cp_parser_save_default_args): Record the class type in which the
4312         function is declared.
4313         (cp_parser_late_parsing_default_args): Do not call
4314         push_nested_class/pop_nested_class.
4315         * search.c (dfs_unuse_fields): Remove.
4316         (unuse_fields): Remove.
4317
4318 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4319
4320         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
4321         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
4322         * cp-tree.h (poplevel): Declare.
4323         (set_block): Remove.
4324         * decl.c (set_block): Remove.
4325
4326 2004-07-10  Mike Stump  <mrs@apple.com>
4327
4328         * decl2.c (import_export_class): Never export/import vtables
4329         with inline key functions.
4330
4331 2004-07-09  Steven Bosscher  <stevenb@suse.de>
4332
4333         * typeck.c (c_expand_asm_operands): Remove.
4334
4335 2004-07-09  Mike Stump  <mrs@apple.com>
4336
4337         * typeck.c (build_class_member_access_expr): Skip null deref
4338         warning when we don't dereference it.
4339
4340 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4341
4342         PR c++/8211
4343         PR c++/16165
4344         * class.c (check_field_decls): Improve -Weffc++ warning: do not
4345         warn for pointers to functions/members, or for classes without
4346         destructors.
4347
4348 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
4349
4350         * name-lookup.h (struct cp_binding_level): Update documentation
4351         for class_shadowed.
4352
4353 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4354
4355         PR c++/16169
4356         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
4357         returning CALL_EXPR, and non-reference return type.
4358
4359 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
4360
4361         * name-lookup.c (push_binding): Use VEC_reserve.
4362
4363 2004-07-08  Richard Henderson  <rth@redhat.com>
4364
4365         * cp-tree.h (expand_eh_spec_block): Remove.
4366
4367 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
4368
4369         * cp-tree.h (saved_scope): Remove x_previous_class_type and
4370         x_previous_class_values; add x_previous_class_level.
4371         (previous_class_type): Remove.
4372         (previous_class_values): Remove.
4373         (previous_class_level): New macro.
4374         * class.c (pushclass): Restore the identifier cache more
4375         expeditiously.
4376         (invalidate_class_lookup_cache): Use vector for class_shadowed and
4377         previous_class_values.
4378         * decl.c (poplevel): Likewise.
4379         * name-lookup.c (cxx_binding_init): New function.
4380         (cxx_binding_make): Use it.
4381         (push_binding): For a binding in a class level, use a vector of
4382         cp_class_binding nodes.
4383         (push_binding_level): New function.
4384         (begin_scope): Use it.
4385         (leave_scope): Do not put class binding levels on the free list.
4386         (print_binding_level): Adjust for the fact that class_shadowed is
4387         a vector.
4388         (poplevel_class): Likewise.
4389         (clear_identifier_class_values): Likewise.
4390         (push_class_level_binding): Likewise.
4391         (set_class_shadows): Remove.
4392         (store_binding): New function.
4393         (store_class_bindings): New function.
4394         (push_to_top_level): Use store_class_bindings as appropriate.
4395         (pop_from_top_level): Use previous_class_level, not
4396         previous_class_type.
4397         * name-lookup.h (cp_class_binding): New type.
4398         (cp_binding_level): Use a vector object for class_shadowed.
4399         (push_binding_level): Declare.
4400         (set_class_shadows): Remove.
4401
4402 2004-07-07  Andrew Pinski  <apinski@apple.com>
4403
4404         * class.c (instantiate_type): BUFFER_REF is dead.
4405         * lex.c (init_operators): IN_EXPR is dead.
4406
4407 2004-07-07  Jason Merrill  <jason@redhat.com>
4408
4409         PR c++/16334
4410         * call.c (build_new_op): Give overload warnings for built-in
4411         candidates.
4412
4413 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
4414
4415         PR c++/16276
4416         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
4417         is not public.
4418
4419 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4420
4421         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
4422         * class.c (build_primary_vtable, check_bases,
4423         determine_primary_base, finish_struct_bits,
4424         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
4425         get_basefndecls, warn_hidden, walk_subobject_offsets,
4426         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
4427         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
4428         finish_struct_1, get_vfield_name, contains_empty_class_p,
4429         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
4430         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
4431         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
4432         BINFO macros.
4433         * decl.c (xref_basetypes): Likewise.
4434         * dump.c (cp_dump_tree): Likewise.
4435         * error.c (dump_expr): Likewise.
4436         * init.c (sort_mem_initializers, expand_member_init,
4437         push_base_cleanups): Likewise.
4438         * method.c (do_build_copy_constructor, do_build_assign_reg,
4439         synthesize_exception_spec): Likewise.
4440         * name-lookup.c (arg_assoc_class): Likewise.
4441         * pt.c (instantiate_class_template, tsubst,
4442         get_template_base_recursive): Likewise.
4443         * ptree.c (cxx_print_type): Likewise.
4444         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
4445         * search.c (lookup_base_r, dynamic_cast_base_recurse,
4446         dfs_access_in_type, access_in_type, lookup_field_queue_p,
4447         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
4448         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
4449         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
4450         binfo_for_vtable, copied_binfo, original_binfo): Likewise
4451         * tree.c (copy_base_binfos, make_binfo): Likewise.
4452         * typeck.c (commmon_base_type): Likewise
4453         * typeck2.c (process_init_constructor): Likewise
4454
4455 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
4456
4457         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
4458
4459 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4460
4461         PR c++/3671
4462         * pt.c (convert_nontype_argument): Disallow conversions between
4463         different enumeration types.
4464
4465 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4466
4467         * cp-tree.h (BINFO_MARKED): Remove.
4468         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
4469         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
4470         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
4471         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
4472         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
4473         (mark_primary_bases, determine_primary_base, base_derived_from,
4474         dfs_find_final_overrider, dfs_find_final_overrider_q,
4475         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
4476         dfs_modify_vtables, walk_subobject_offsets,
4477         layout_nonempty_base_or_field, build_base_field,
4478         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
4479         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
4480         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
4481         build_ctor_vtbl_group, accumulate_vtble_inits,
4482         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
4483         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
4484         add_vcall_offset_vtbl_entries_1): Likewise.
4485         * decl.c (xref_basetypes): Incomming virtual base indicated by
4486         TREE_TYPE. Adjust.
4487         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
4488         * init.c (finish_init_stmts, sort_mem_initializers,
4489         emit_mem_initializers, build_vtble_address, expand_member_init,
4490         push_base_cleanups): Likewise.
4491         * method.c (do_build_copy_constructor): Likewise.
4492         * pt.c (instantiate_class_template,
4493         get_template_base_recursive): Likewise.
4494         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
4495         get_pseudo_ti_desc): Likewise.
4496         * search.c (lookup_base_r, dynamic_cast_base_recurse,
4497         binfo_from_vbase, binfo_via_virtual, copied_binfo,
4498         original_binfo): Likewise.
4499         * semantics.c (finish_base_specifier): Virtualness is indicated
4500         by TREE_TYPE.
4501         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
4502
4503 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
4504
4505         Revert:
4506         2004-06-24  Jason Merrill  <jason@redhat.com>
4507         PR c++/16115
4508         * decl.c (grokparms): Give the PARM_DECL reference type if the
4509         parameter is passed by invisible reference.
4510
4511 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4512
4513         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
4514         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
4515         * pt.c (check_instantiated_args, unify): Likewise.
4516
4517 2004-07-05  Phil Edwards  <phil@codesourcery.com>
4518
4519         * Make-lang.in (check-c++, lang_checks):  Add some comments.
4520
4521 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
4522
4523         * cp-mudflap.c: Delete file.
4524         * Makefile.in: Remove all references to cp-mudflap.o.
4525
4526 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
4527
4528         * decl.c (cxx_init_decl_processing): Call
4529         build_common_tree_nodes before creating the global NAMESPACE_DECL.
4530
4531 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4532
4533         PR c++/2518
4534         * call.c (build_operator_new_call): Look only at global scope.
4535
4536 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4537
4538         * call.c (enforce_access): Expect TREE_BINFO.
4539         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
4540         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
4541         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4542         Adjust.
4543         (BINFO_LANG_ELTS): Remove.
4544         (BINFO_LANG_SLOTS): New.
4545         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
4546         (CLASSTYPE_TEMPLATE_INFO): Adjust.
4547         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
4548         * search.c (lookup_member): Check TREE_BINFO.
4549         * semantics.c (perform_or_defer_access_check): Likewise.
4550         (check_accessibility_of_qualified_id): Check
4551         deferred_access_no_check.
4552         * tree.c (make_binfo): Use make_tree_binfo.
4553
4554 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
4555
4556         * method.c (implicitly_declare_fn): Set linkage of generated
4557         functions.
4558
4559 2004-07-04  Richard Henderson  <rth@redhat.com>
4560
4561         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
4562
4563 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
4564
4565         PR c++/3761
4566         * name-lookup.c (push_class_level_binding): Don't pass a
4567         TREE_LIST of ambiguous names to check_template_shadow as it
4568         only handles declarations. Instead, pull the declaration
4569         out and pass that.
4570
4571 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4572
4573         PR c++/14971
4574         * pt.c (check_explicit_specialization): Clarify error message.
4575
4576 2004-07-02  Richard Henderson  <rth@redhat.com>
4577
4578         * tree.c (cp_unsave_r): Update remap_save_expr call.
4579
4580 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
4581
4582         PR c++/16240
4583         * mangle.c (write_template_arg): Correct mangling.
4584
4585         PR c++/16297
4586         * decl.c (grokdeclarator): Robustify.
4587
4588 2004-07-01  Richard Henderson  <rth@redhat.com>
4589
4590         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
4591         * method.c (synthesize_method): Don't clear_last_expr.
4592         * name-lookup.c (maybe_push_cleanup_level): Likewise.
4593
4594 2004-07-01  Nick Clifton  <nickc@redhat.com>
4595
4596         * decl2.c (import_export_class): Invoke the
4597         import_export_class field in the gcc_target structure if it is not
4598         empty.
4599
4600 2004-06-30  Richard Henderson  (rth@redhat.com>
4601
4602         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
4603         * method.c (use_thunk): Likewise.
4604
4605 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
4606
4607         * call.c (build_over_call), typeck.c (build_function_call): Call
4608         check_function_arguments instead of check_function_format.
4609
4610 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
4611
4612         * call.c (build_over_call), typeck.c (build_function_call): Update
4613         calls to check_function_format.
4614
4615 2004-06-30  Richard Henderson  <rth@redhat.com>
4616
4617         * call.c (build_over_call): Use __builtin_memcpy for copying
4618         CLASS_AS_BASE rather than funny casting.
4619
4620 2004-06-30  Richard Henderson  <rth@redhat.com>
4621
4622         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
4623         TYPE_SIZE_UNIT of full_type.
4624
4625 2004-06-30  Per Bothner  <per@bothner.com>
4626
4627         Conditionally compile support for --enable-mapped_location.
4628         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
4629         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
4630         adjustments - which I don't understand.
4631         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
4632         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
4633         (print_instantiation_partial_context):  Use expand_location.
4634         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
4635         * name-lookup.c:  Likewise.
4636         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
4637         * name-lookup.c:  Use input_line macro.
4638         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
4639         (cp_parser_statement):  Rename locaal variable statement_locus to
4640         statement_location and use SET_EXPR_LOCATION macro.
4641         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
4642         * tree.c (cp_walk_subtrees):  Likewise.
4643
4644 2004-06-29  Per Bothner  <per@bothner.com>
4645
4646         * tree.c (build_min_nt, build_min, build_min_non_dep):
4647         Don't set TREE_COMPLEXITY from input_line.
4648
4649 2004-06-29  Paul Brook  <paul@codesourcery.com>
4650
4651         * init.c: Include target.h.
4652         (get_cookie_size): Remove and replace with target hook.
4653         Update callers.
4654         (build_new_1): Store the element size in the cookie.
4655
4656 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
4657
4658         PR c++/16260
4659         * parser.c (cp_parser_template_declaration_after_export): Disable
4660         access checks here ...
4661         (cp_parser_class_specifier): ... not here.
4662
4663 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4664
4665         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4666         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4667         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
4668         TREE_CHECK macro.
4669
4670 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4671
4672         * cp-tree.h (struct deferred_access): Move to ...
4673         * semantics.c (struct deferred_access): ... here. Adjust.
4674         (deferred_access_stack): Make a VEC(deferred_access),
4675         (deferred_access_free_list): Remove.
4676         (deferred_access_no_check): New.
4677         (push_deferring_access_checks, resume_deferring_access_checks,
4678         stop_deferring_access_checks, pop_deferring_access_checks,
4679         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
4680         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
4681
4682 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4683
4684         PR c++/16174
4685         * call.c (build_temp): Declare.
4686         (check_constructor_callable): New.
4687         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
4688         CONSTRUCTOR_CALLABLE.
4689         (convert_like_real, initialize_reference): Use
4690         check_constructor_callable.
4691         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
4692         (LOOKUP_*): Renumber.
4693
4694 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4695
4696         * friend.c (add_friend): Only perform access checks when context
4697         is a class.
4698         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
4699         * parser.c (cp_parser_class_specifier): Disable access checks here
4700         when parsing the body of a templated class.
4701         * semantics.c (perform_or_defer_access_checks): Reorder to allow
4702         NULL binfos when not checking access.
4703
4704 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
4705
4706         Use vector API for vbase list.
4707         * cp-tree.h: Include vec.h
4708         (DEF_VEC_P (tree)): New type.
4709         (struct lang_type_class): Change vbase's member type.
4710         (binfo_for_vbase): Declare.
4711         * class.c (determine_primary_base, base_derived_from,
4712         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
4713         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
4714         build_vtbl_initializer): Adjust.
4715         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
4716         vbases.
4717         * init.c (sort_mem_initializers, expand_member_init,
4718         push_base_cleanups): Adjust.
4719         * method.c (do_build_copy_constructor): Adjust.
4720         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
4721         (binfo_for_vbase): New.
4722         * tree.c (copy_base_binfos): Adjust.
4723
4724 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
4725
4726         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
4727
4728 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4729
4730         PR c++/14123
4731         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
4732         paranthesis in case of pointers to array members.
4733         * error.c (dump_type_prefix): Likewise.
4734         (dump_type_suffix): Maybe issue a whitespace when printing
4735         ARRAY_TYPE.
4736
4737 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
4738
4739         PR c++/16193
4740         * parser.c (cp_parser_set_decl_spec_type): Refine test for
4741         redefinition of built-in types.
4742
4743 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4744
4745         * error.c (pp_template_argument_list_start): Remove.
4746         (pp_template_argument_list_end): Likewise.
4747         (pp_separate_with_comma): Use pp_cxx_separate_with.
4748         (reinit_global_formatting_buffer): Remove.
4749         (pp_non_consecutive_character): Likewise.
4750         (dump_scope): Use pp_cxx_colon_colon.
4751         (dump_template_parameter): Use pp_cxx_identifier,
4752         pp_cxx_tree_identifier and pp_cxx_whitespace.
4753         (dump_templat_bindings): Replace use of pp_string with sequence
4754         of pp_cxx_whitespace and pp_equal.
4755         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
4756         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
4757         padding here.
4758         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
4759         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
4760         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
4761         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
4762         pp_cxx_right_bracket, pp_cxx_identifier throughout,
4763         (dump_decl): Likewise.
4764         (dump_template_decl): Likewise.
4765         (dump_function_decl): Likewise.  Set padding as appropriate.
4766         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
4767         pp_cxx_right_paren.
4768         (dump_exception_spec): Likewise.
4769         (dump_function_name): Use pp_cxx_tree_identifier and
4770         pp_cxx_identifier.
4771         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
4772         pp_cxx_end_template_argument_list.
4773         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
4774         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
4775         pp_cxx_whitespace throughout.
4776         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
4777         pp_cxx_right_paren.
4778         (dump_unary_op): Likewise.
4779         (reinit_cxx_pp): New function.
4780         (type_as_string); Use it.
4781         (expr_as_string): Likewise.
4782         (decl_as_string); Likewise.
4783         (context_as_string): Likewise.
4784         (lang_decl_name): Likewise.
4785         (decl_to_string): Likewise.
4786         (expr_to_string): Likewise.
4787         (parm_to_string): Likewise.
4788         (type_to_string): Likewise.
4789         (args_to_string): Likewise.
4790         (cv_to_string): Likewise.
4791
4792 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
4793
4794         * cp-tree.h (cp_cv_quals): New type.
4795         (cp_declarator): Use it instead of "tree" as appropriate.
4796         (grok_method_quals): Adjust prototype.
4797         (grokclassfn): Likewise.
4798         (do_friend): Likewise.
4799         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
4800         (grokdeclarator): Likewise.
4801         * decl2.c (grok_method_quals): Likewise.
4802         (grokclassfn): Likewise.
4803         * friend.c (do_friend): Likewise.
4804         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
4805         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
4806         (make_pointer_declarator): Likewise.
4807         (make_reference_declarator): Likewise.
4808         (make_ptrmem_declarator): Likewise.
4809         (cp_parser_ptr_operator): Likewise.
4810         (cp_parser_cv_qualifier_seq_opt): Likewise.
4811         (cp_parser_cv_qualifier_opt): Remove.
4812         (cp_parser_new_declarator_opt): Adjust call to
4813         cp_parser_ptr_operator.
4814         (cp_parser_conversion_declaration_opt): Likewise.
4815         (cp_parser_declarator): Use cp_cv_quals, not tree.
4816         (cp_parser_direct_declarator): Likewise.
4817
4818 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4819
4820         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
4821         Rename DECL_STMT to DECL_EXPR.
4822         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
4823         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
4824         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
4825
4826 2004-06-26  Jan Hubicka  <jh@suse.cz>
4827
4828         PR C++/14865
4829         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
4830         reachability analysis.
4831
4832 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
4833
4834         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
4835         2004-06-23 change.
4836
4837 2004-06-25  Paul Brook  <paul@codesourcery.com>
4838
4839         * decl2.c (get_guard): Call targetm.cxx.guard_type.
4840         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
4841
4842 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
4843
4844         * decl.c (grokdeclarator): Restore error messages about __thread.
4845         * parser.c (cp_parser_decl_specifier_seq): Likewise.
4846
4847 2004-06-24  Jason Merrill  <jason@redhat.com>
4848
4849         PR c++/16115
4850         * decl.c (grokparms): Give the PARM_DECL reference type if the
4851         parameter is passed by invisible reference.
4852
4853 2004-06-24  Andreas Schwab  <schwab@suse.de>
4854
4855         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
4856
4857 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
4858
4859         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
4860         (cp/decl.o): Likewise.
4861         (cp/decl2.o): Likewise.
4862         (cp/pt.o): Likewise.
4863         (cp/semantics.o): Likewise.
4864         * config-lang.in (gtfiles): Do not reference cp/lex.h.
4865         * class.c: Do not include lex.h.
4866         (add_implicitly_declared_members): Do not use
4867         adding_implicit_members.
4868         (check_bases_and_members): Do not talk about grok_x_components.
4869         * cp/cp-tree.h (adding_implicit_members): Remove.
4870         (cp_storage_class): New type.
4871         (cp_decl_spec): Likewise.
4872         (cp_decl_specifier_seq): Likewise.
4873         (cp_parameter_declarator): Use it for the decl_specifiers field.
4874         (check_tag_decl): Adjust prototype.
4875         (shadow_tag): Likewise.
4876         (groktypename): Likewise.
4877         (start_decl): Likewise.
4878         (start_function): Likewise.
4879         (start_method): Likewise.
4880         (grok_x_components): Remove.
4881         (grokfield): Adjust prototype.
4882         (grokbitfield): Likewise.
4883         (finish_member_class_template): Remove.
4884         * decl.c: Do not include lex.h.
4885         (adding_implicit_members): Do not define.
4886         (check_tag_decl): Do not use trees to represent decl-specifiers.
4887         (shadow_tag): Likewise.
4888         (groktypename): Likewise.
4889         (start_decl): Likewise.
4890         (grokvardecl): Likewise.
4891         (grokdeclarator): Likewise.
4892         (grokparms): Likewise.
4893         (start_function): Likewise.
4894         (start_method): Likewise.
4895         * decl.h (grokdeclarator): Adjust prototype.
4896         * decl2.c: Do not include lex.h.
4897         (grok_x_components): Remove.
4898         (grokfield): Do not use trees to represent decl-specifiers.
4899         (grokbitfield): Likewise.
4900         * lex.c: Do not include lex.h.
4901         * lex.h: Remove.
4902         * parser.c: Include target.h.
4903         (clear_decl_specs): New function.
4904         (cp_parser_translation_unit): Do not use trees to represent
4905         decl-specifiers.
4906         (cp_parser_postfix_expression): Likewise.
4907         (cp_parser_new_type_id): Likewise.
4908         (cp_parser_condition): Likewise.
4909         (cp_parser_simple_declaration): Likewise.
4910         (cp_parser_decl_specifier_seq): Likewise.
4911         (cp_parser_function_specifier_opt): Likewise.
4912         (cp_parser_conversion_type_id): Likewise.
4913         (cp_parser_template_parameter): Likewise.
4914         (cp_parser_explicit_instantiation): Likewise.
4915         (cp_parser_type_specifier): Likewise.
4916         (cp_parser_simple_type_specifier): Likewise.
4917         (cp_parser_init_declarator): Likewise.
4918         (cp_parser_type_id): Likewise.
4919         (cp_parser_type_specifier_seq): Likewise.
4920         (cp_parser_parameter_declaration): Likewise.
4921         (cp_parser_member_declaration): Likewise.
4922         (cp_parser_exception_declaration): Likewise.
4923         (cp_parser_function_definition_from_specifiers_and_declarator):
4924         Likewise.
4925         (cp_parser_single_declaration): Likewise.
4926         (cp_parser_save_member_function_body): Likewise.
4927         (cp_parser_friend_p): Likewise.
4928         (cp_parser_set_storage_class): New function.
4929         (cp_parser_set_decl_spec_type): Likewise.
4930         * pt.c: Do not include lex.h.
4931         * semantics.c: Likewise.
4932         (finish_member_class_template): Remove.
4933
4934 2004-06-23  Roger Sayle  <roger@eyesopen.com>
4935
4936         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
4937         longer take both "args" and "convert_args" as arguments.
4938         (build_op_delete_call): Update call to build_cxx_call.
4939         (build_over_call): Likewise, update call to build_cxx_call.
4940         * cp-tree.h (build_cxx_call): Update funtion prototype.
4941         * typeck.c (build_function_call): Don't call expand_tree_builtin.
4942         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
4943         (throw_bad_typeid): Likewise.
4944         (build_dynamic_cast_1): Likewise.
4945
4946 2004-06-22  Richard Henderson  <rth@redhat.com>
4947
4948         * class.c (build_vfn_ref): Take a pointer not object.  Build
4949         an OBJ_TYPE_REF.
4950         (cp_fold_obj_type_ref): New.
4951         * call.c (build_over_call): Update build_vfn_ref call.
4952         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
4953         * cp-tree.h (cp_fold_obj_type_ref): Declare.
4954
4955 2004-06-21  Jason Merrill  <jason@redhat.com>
4956
4957         PR c++/16112
4958         * cp-gimplify.c (cp_gimplify_init_expr): Look through
4959         CLEANUP_POINT_EXPR.
4960
4961 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
4962
4963         * cp-tree.def (NEW_EXPR): Add a fourth slot.
4964         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
4965         (TREE_PARMLIST): Likewise.
4966         (CALL_DECLARATOR_PARMS): Likewise.
4967         (CALL_DECLARATOR_QUALS): Likewise.
4968         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
4969         (cp_declarator_kind): New type.
4970         (cp_parameter_declarator): Likewise.
4971         (cp_declarator): Likewise.
4972         (cp_error_declarator): Likewise.
4973         (no_parameters): Likewise.
4974         (groktypename): Change prototype.
4975         (start_decl): Likewise.
4976         (start_handler_parms): Likewise.
4977         (get_scope_of_declarator): Likewise.
4978         (start_function): Likewise.
4979         (start_preparsed_function): New function.
4980         (start_function): Change prototype.
4981         (start_method): Likewise.
4982         (grokfield): Likewise.
4983         (grokbitfield): Likewise.
4984         (build_new): Likewise.
4985         (make_pointer_declarator): Remove.
4986         (make_reference_declarator): Likewise.
4987         (make_call_declarator): Likewise.
4988         (set_quals_and_spec): Likewise.
4989         (process_template_parm): Change prototype.
4990         (begin_function_definition): Remove.
4991         (finish_parmlist): Remove.
4992         * decl.c (groktypename): Do not use trees to represent
4993         declarators.
4994         (start_decl): Likewise.
4995         (start_handler_parms): Remove.
4996         (get_scope_of_declarator): Reimplement.
4997         (grokdeclarator): Do not use trees to represent declarators.
4998         (grokparms): Likewise.
4999         (start_function): Likewise.
5000         (start_method): Likewise.
5001         (build_void_list_mode): Do not use TREE_PARMLIST.
5002         * decl.h (grokdeclarator): Change prototype.
5003         * decl2.c (grok_method_quals): Robustify.
5004         (grok_x_components): Do not use trees to represent declarators.
5005         (grokfield): Likewise.
5006         (grokbitfield): Likewise.
5007         (start_objects): Build FUNCTION_DECLs, not declarators.
5008         (start_static_storage_duration_function): Likewise.
5009         * init.c (build_new): Simplify.
5010         * lex.c (make_pointer_declarator): Remove.
5011         (make_reference_declarator): Likewise.
5012         (make_call_declarator): Likewise.
5013         (set_quals_and_spec): Likewise.
5014         * method.c (use_thunk): Use start_preparsed_function.
5015         (synthesize_method): Likewise.
5016         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
5017         * optimize.c (maybe_clone_body): Use start_preparsed_function.
5018         * parser.c (cp_error_declarator): New variable.
5019         (declarator_obstack): Likewise.
5020         (alloc_declarator): New function.
5021         (make_declarator): Likewise.
5022         (make_id_declarator): Likewise.
5023         (make_pointer_declarator): Likewise.
5024         (make_reference_declarator): Likewise.
5025         (make_ptrmem_declarator): Likewise.
5026         (make_call_declarator): Likewise.
5027         (make_array_declarator): Likewise.
5028         (no_parameters): New variable.
5029         (make_parameter_declarator): Likewise.
5030         (cp_parser_check_for_definition_in_return_type): Do not use trees
5031         to represent declarators.
5032         (cp_parser_translation_unit): Likewise.
5033         (cp_parser_new_expression): Likewise.
5034         (cp_parser_new_type_id): Likewise.
5035         (cp_parser_new_declarator_opt): Likewise.
5036         (cp_parser_direct_new_declarator): Likewise.
5037         (cp_parser_condition): Likewise.
5038         (cp_parser_declaration_statement): Likewise.
5039         (cp_parser_declaration): Likewise.
5040         (cp_parser_conversion_type_id): Likewise.
5041         (cp_parser_conversion_declarator_opt): Likewise.
5042         (cp_parser_template_parameter_list): Likewise.
5043         (cp_parser_template_parameter): Likewise.
5044         (cp_parser_explicit_instantiation): Likewise.
5045         (cp_parser_init_declarator): Likewise.
5046         (cp_parser_declarator): Likewise.
5047         (cp_parser_direct_declarator): Likewise.
5048         (cp_parser_type_id): Likewise.
5049         (cp_parser_parameter_declaration_clause): Likewise.
5050         (cp_parser_parameter_declaration_list): Likewise.
5051         (cp_parser_parameter_declaration): Likewise.
5052         (cp_parser_member_declaration): Likewise.
5053         (cp_parser_exception_declaration): Likewise.
5054         (cp_parser_check_declarator_template_parameters): Likewise.
5055         (cp_parser_function_definition_from_specifiers_and_declarator):
5056         Likewise.
5057         (cp_parser_save_member_function_body): Likewise.
5058         * pt.c (process_template_parm): Add is_non_type parameter.
5059         (convert_template_argument): Adjust call to groktypename.
5060         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
5061         (tsubst): Do not expect declarators.
5062         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
5063         argument.
5064         (instantiate_decl): Use start_preparsed_function.
5065         * semantics.c (begin_function_definition): Remove.
5066         (finish_parmlist): Remove.
5067         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
5068         declarators.
5069
5070 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5071
5072         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
5073         (build_new_method_call): Likewise.
5074         * decl.c (local_variable_p_walkfn): Don't walk into types.
5075         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
5076         (build_anon_union_vars): Add new operand for COMPONENT_REF.
5077         * init.c (buld_new): Add new operand for ARRAY_REF.
5078         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
5079         (do_build_assign_ref): Likewise.
5080         * parser.c (cp_parser_direct_new_declarator): Add new operands
5081         for ARRAY_REF.
5082         (cp_parser_direct_declarator): Likewise.
5083         * pt.c (tsubst): Likewise.
5084         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
5085         for COMPONENT_REF.
5086         * semantics.c (finish_non_static_data_member): Add new operand
5087         for COMPONENT_REF.
5088         * typeck.c (build_class_member_access_expr): Likewise.
5089         (build_class_member_access_expr, finish_class_member_access_expr):
5090         Likewise.
5091         (build_ptrmemfunc_access_expr): Likewise.
5092         (build_array_ref): Add new operands for ARRAY_REF.
5093         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
5094         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
5095
5096 2004-06-21  Richard Henderson  <rth@redhat.com>
5097
5098         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
5099         * parser.c (cp_parser_jump_statement): Update commentary.
5100         * pt.c (tsubst_expr): Use RETURN_EXPR.
5101         * semantics.c (finish_return_stmt): Likewise.
5102         (finalize_nrv_r): Likewise.
5103         * typeck.c, typeck2.c: Update file start commentary.
5104
5105 2004-06-21  Richard Henderson  <rth@redhat.com>
5106
5107         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
5108
5109 2004-06-20  Richard Henderson  <rth@redhat.com>
5110
5111         * cp-tree.h (add_decl_stmt): Declare.
5112         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
5113         * semantics.c (maybe_cleanup_point_expr): New.
5114         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
5115         finish_for_expr, finish_switch_cond): Use it.
5116         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
5117
5118 2004-06-20  Richard Henderson  <rth@redhat.com>
5119
5120         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
5121         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
5122         (cp_gimplify_expr): Call it.
5123         (gimplify_cleanup_stmt): Move from c-gimplify.c.
5124         (cp_genericize): New.
5125         * decl.c (finish_function): Call it.
5126         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
5127         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
5128         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
5129         (cp_genericize): Declare.
5130         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
5131         * dump.c (cp_dump_tree): Likewise.
5132         * semantics.c (push_cleanup): Move from c-semantics.c.
5133
5134 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
5135
5136         * cp-lang.c (has_c_linkage): Implement.
5137
5138         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
5139         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
5140         (builtin_function_1): Don't call make_decl_rtl.
5141         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
5142         (grokvardecl): Don't call mangle_decl.
5143         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
5144         DECL_ASSEMBLER_NAME.
5145         * method.c (set_mangled_name_for_decl): Delete.
5146         * name-lookup.c (pushdecl): When a local extern shadows a
5147         file-scope declaration of the same object, give both DECLs the
5148         same DECL_UID.
5149         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
5150         on DECL_ASSEMBLER_NAME.
5151
5152 2004-06-19  Richard Henderson  <rth@redhat.com>
5153
5154         * cp-gimplify.c: Remove unnecessary prototypes.
5155         (cp_gimplify_stmt): Merge into ...
5156         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
5157         stmts_are_full_exprs_p frobbing.
5158         * cp-tree.h (cp_gimplify_stmt): Remove.
5159         * pt.c (tsubst_expr): Merge prep_stmt and unify.
5160         * tree.c (init_tree): Don't set lang_gimplify_stmt.
5161
5162 2004-06-18  Richard Henderson  <rth@redhat.com>
5163
5164         PR c++/16034
5165         * semantics.c (begin_cond): New.
5166         (finish_cond): Rewrite to handle template DECL_STMTs specially.
5167         Assume that non-template decls go land before the conditional.
5168         (simplify_loop_decl_cond): Likewise.
5169         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
5170         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
5171         begin_switch_stmt, finish_switch_cond): Update to match.
5172
5173 2004-06-17  Jason Merrill  <jason@redhat.com>
5174
5175         PR c++/16015
5176         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
5177         (finish_stmt_expr_expr): Update type after conversions.
5178         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
5179         Handle void initializer.
5180         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
5181
5182 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
5183
5184         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
5185         * cp-tree.h (defer_fn): Delete.
5186         * decl2.c (defer_fn): Delete.
5187         (finish_file): Simplify deferred_fns loops; check that
5188         only used inline functions get into deferred_fns.
5189         (mark_used): Inline previous contents of defer_fn.
5190
5191 2004-06-16  Richard Henderson  <rth@redhat.com>
5192
5193         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
5194         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
5195         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
5196         of CTOR_INITIALIZER ...
5197         (pp_cxx_statement): ... here.
5198         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
5199         (finish_function): Use alloc_stmt_list to zap entire function.
5200         * parser.c (cp_parser_compound_statement): Update commentary.
5201         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
5202         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
5203         (finish_stmt_expr): Don't look through COMPOUND_STMT.
5204
5205 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
5206
5207         * pt.c (mark_decl_instantiated): Don't call defer_fn.
5208
5209 2004-06-16  Richard Henderson  <rth@redhat.com>
5210
5211         * parser.c (cp_parser_labeled_statement): Update commentary.
5212         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
5213         * tree.c (mark_local_for_remap_r): Likewise.
5214
5215 2004-06-16  Richard Henderson  <rth@redhat.com>
5216
5217         * parser.c (cp_parser_asm_definition): Update commentary.
5218         * pt.c (tsubst_expr): Use ASM_EXPR.
5219         * semantics.c (finish_asm_stmt): Likewise.
5220
5221 2004-06-16  Richard Henderson  <rth@redhat.com>
5222
5223         * decl.c (finish_destructor_body): Use LABEL_EXPR.
5224         * parser.c (cp_parser_statement): Update commentary.
5225         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
5226         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
5227         * tree.c (mark_local_for_remap_r): Likewise.
5228
5229 2004-06-16  Richard Henderson  <rth@redhat.com>
5230
5231         PR c++/16012
5232         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
5233         statement in FOR_INIT_STMT for templates.
5234
5235 2004-06-15  Richard Henderson  <rth@redhat.com>
5236
5237         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
5238         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
5239         (genericize_try_block): Use gimplify_stmt.
5240         (genericize_catch_block, genericize_eh_spec_block): Likewise.
5241         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
5242         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
5243         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
5244         (cp_tree_chain_matters_p): Remove.
5245         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
5246         (COMPOUND_STMT_BODY_BLOCK): New.
5247         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
5248         (EXPR_STMT_STMT_EXPR_RESULT): New.
5249         (building_stmt_tree): Check cur_stmt_list.
5250         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
5251         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
5252         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
5253         (cp_finish_decl): Use push_cleanup.
5254         (start_function, finish_function): Use statement lists.
5255         (finish_stmt): Do nothing.
5256         * except.c (begin_eh_spec_block): Use statement lists.
5257         (check_handlers_1, check_handlers): Likewise.
5258         * init.c (construct_virtual_base): Don't add extra compound stmts.
5259         (build_vec_init): Likewise.
5260         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
5261         * name-lookup.h (struct cp_binding_level): Add statement_list.
5262         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
5263         (cp_parser_labeled_statement, cp_parser_expression_statement,
5264         cp_parser_statement_seq_opt): Likewise.
5265         (cp_parser_compound_statement): Likewise.  Take bool for try block.
5266         (cp_parser_selection_statement): Tidy if processing.
5267         (cp_parser_already_scoped_statement): Rewrite to do what it says.
5268         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
5269         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
5270         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
5271         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
5272         (finish_cond): New, rewritten from FINISH_COND.
5273         (simplify_loop_decl_cond): New.
5274         (finish_expr_stmt): Avoid nested EXPR_STMTs.
5275         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
5276         begin_else_clause, finish_else_clause, finish_if_stmt,
5277         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
5278         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
5279         finish_for_cond, finish_for_stmt, begin_switch_stmt,
5280         finish_switch_cond, finish_switch_stmt, begin_try_block,
5281         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
5282         finish_handler_sequence, finish_function_handler_sequence,
5283         begin_handler, finish_handler_parms, finish_handler,
5284         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
5285         using statement lists.
5286         (begin_compound_stmt): Replace has_no_scope argument with flags.
5287         Update all callers.  Use statement lists.
5288         (finish_compound_stmt): Likewise.
5289         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
5290         (current_scope_stmt_stack): Remove.
5291         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
5292         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
5293         Rewrite with statement lists.
5294
5295 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
5296
5297         * parser.c: Change all assignments of c_lex_string_translate
5298         to true and false to 1 and 0.
5299         (cp_lexer_read_token): Convert type of the translated string.
5300         (cp_parser_skip_to_closing_parentheses): Preserve original
5301         value of c_lex_string_translate, and set it to -1 while
5302         running.
5303         (cp_parser_cache_group): Likewise.
5304         (cp_parser_cache_group_1): Renamed.
5305         (cp_parser_asm_operand_list): Remove redundant setting of
5306         c_lex_string_translate.
5307         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
5308         Handle chained strings.
5309
5310 2004-06-12  Andrew Pinski  <apinski@apple.com>
5311
5312         PR c++/14639
5313         Revert:
5314         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
5315
5316                 * cp-tree.h: Fix typo.
5317
5318                 * cp-tree.h: Include cgraph.h
5319                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5320                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5321
5322 2004-06-12  Jason Merrill  <jason@redhat.com>
5323
5324         PR tree-optimization/14107
5325         * decl.c (finish_function): Warn about no return in all functions.
5326
5327 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5328
5329         * cp-tree.h (struct language_function): Remove cannot_inline.
5330         * decl.c (save_function_data): cannot_inline is no more.
5331         (cxx_push_function_context): Likewise.
5332         * decl2.c (start_objects, start_static_storage_duration_function):
5333         Reset DECL_INLINE, set DECL_UNINLINABLE.
5334
5335 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5336
5337         PR c++/15967
5338         * search.c (lookup_field): Propagate the ambiguity list.
5339         (lookup_fnfields): Likewise.
5340
5341 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5342
5343         PR c++/15947
5344         * parser.c (cp_parser_template_name): Ctors/dtors never need a
5345         template keyword to disambiguate.
5346
5347 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
5348
5349         PR c++/15096
5350         * decl.c (grokdeclarator): Ignore pointer-to-members when
5351         computing template depth.
5352
5353         PR c++/14930
5354         * name-lookup.c (pushtag): Do not try to put class declarations in
5355         explicit specialization scopes.
5356
5357 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
5358
5359         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
5360
5361 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
5362
5363         PR c++/15862
5364         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
5365         bindings for undeclared built-ins.
5366
5367 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5368
5369         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
5370         appear at the correct location.
5371
5372 2004-06-10  Jason Merrill  <jason@redhat.com>
5373
5374         PR c++/15875
5375         Revert:
5376         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5377         * init.c (build_offset_ref): Build SCOPE_REF with non-null
5378         TREE_TYPE for non-dependent names.
5379         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5380         unknown_type_node as its TREE_TYPE.
5381         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5382         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5383         (dump_expr) <SCOPE_REF case>: Likewise.
5384
5385 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
5386
5387         PR c++/15227
5388         * parser.c (cp_parser_direct_declarator): Robustify.
5389
5390         PR c++/15877
5391         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
5392         constants in non-dependent contexts.
5393
5394         PR c++/14211
5395         PR c++/15076
5396         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
5397         necessary.
5398
5399 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
5400
5401         PR c++/14791
5402         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
5403         specially.
5404
5405 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
5406
5407         Revert:
5408         PR c++/15815
5409         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
5410         * lex.c (handle_pragma_interface): Deprecate.
5411         (handle_pragma_implementation): Likewise.
5412
5413 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
5414
5415         * g++spec.c (lang_specific_driver): Remove check for -lm
5416         and -lmath when check it see if it was the math library.
5417
5418 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5419
5420         PR c++/7841
5421         * parser.c (cp_parser_direct_declarator): Reject constructor named
5422         as qualified template-id.
5423
5424 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
5425
5426         PR c++/15815
5427         * lex.c (handle_pragma_interface): Deprecate.
5428         (handle_pragma_implementation): Likewise.
5429
5430 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
5431
5432         PR c++/15766
5433         * parser.c (cp_parser_iteration_statement): Fix typo in error
5434         message.
5435
5436         PR c++/14777
5437         * pt.c (tsubst_default_argument): Do not defer access checks
5438         while substituting into the default argument.
5439
5440         PR c++/15554
5441         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
5442         constant in a non-dependent context.
5443
5444         PR c++/15057
5445         * except.c (build_throw): Ensure that temp_expr has been
5446         initialized.
5447
5448 2004-06-06  Roger Sayle  <roger@eyesopen.com>
5449
5450         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
5451
5452 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5453
5454         PR c++/15503
5455         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
5456         'typename', and accept 'template'.
5457
5458 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
5459             Jan Hubicka  <jh@suse.cz>
5460
5461         PR c++/14639
5462         * method.c (use_think): Do not mark thunk as referenced.
5463
5464 2004-06-03  Matt Austern  <austern@apple.com>
5465
5466         PR c++/15428
5467         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
5468         is nonzero, and if we see a noninline definition of a key method,
5469         make the vtables nonweak.
5470
5471 2004-06-02  Matt Austern  <austern@apple.com>
5472
5473         * cp-tree.h (instantiate_decl): new boolean parameter,
5474         undefined_ok. Current behavior is equivalent to its being 0.
5475         * decl2.c (mark_used): Add new argument when calling instantiate_decl
5476         * pt.c (mark_decl_instantiated): Unconditionally make
5477         instantiations explicit unconditionally
5478         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
5479         since mark_decl_instantiated now does it.
5480         (instantiate_class_member): New.  Instantiate a member of an
5481         explicitly instantiated class template.
5482         (do_type_instantiation): Explicitly instantiate members of an
5483         explicitly instantiated class template.
5484         (instantiate_decl): if undefined_ok is nonzero, and if we're
5485         trying to explicitly instantiated a template with no definition,
5486         change it to an implicit instantiation.
5487         (instantiate_pending_templates): Add new argument to instantiate_decl.
5488         * tree.c (cp_cannot_inline_tree_fn): Likewise.
5489
5490 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
5491
5492         * cp-tree.h: Fix typo.
5493
5494         * cp-tree.h: Include cgraph.h
5495         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
5496         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
5497
5498 2004-06-01  Jason Merrill  <jason@redhat.com>
5499
5500         PR c++/15142
5501         * call.c (call_builtin_trap): Remove type parm.
5502         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
5503         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
5504
5505 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5506
5507         PR c++/13092
5508         * init.c (build_offset_ref): Build SCOPE_REF with non-null
5509         TREE_TYPE for non-dependent names.
5510         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5511         unknown_type_node as its TREE_TYPE.
5512         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5513         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5514         (dump_expr) <SCOPE_REF case>: Likewise.
5515
5516 2004-06-01  Richard Henderson  <rth@redhat.com>
5517             Andrew Pinski  <pinskia@physics.uc.edu>
5518
5519         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
5520         * parser.c (struct cp_parser): Remove in_offsetof.
5521         (cp_parser_new): Don't set it.
5522         (cp_parser_unary_expression): Don't check it.
5523         (cp_parser_postfix_open_square_expression): Split out from ...
5524         (cp_parser_postfix_expression): ... here.
5525         (cp_parser_postfix_dot_deref_expression): Likewise.
5526         (cp_parser_builtin_offsetof): New.
5527         (cp_parser_primary_expression): Use it.
5528
5529 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5530
5531         PR c++/14932
5532         * parser.c (cp_parser_postfix_expression): Allow subscript
5533         operator in offsetof.
5534
5535 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
5536
5537         PR c++/15701
5538         * friend.c (add_friend): Do not try to perform access checks for
5539         functions from dependent classes.
5540
5541 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5542
5543         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
5544         (pp_cxx_begin_template_argument_list): Turn into a function.
5545         (pp_cxx_end_template_argument_list): Likewise.
5546         (pp_cxx_separate_with): Define.
5547         (pp_cxx_unqualified_id): Tidy.
5548         (pp_cxx_primary_expression): Likewise.
5549         (pp_cxx_postfix_expression): Likewise.
5550         (pp_cxx_expression): Likewise.
5551         (pp_cxx_simple_type_specifier): Likewise.
5552         (pp_cxx_type_specifier_seq): Likewise.
5553         (pp_cxx_parameter_declaration_clause): Likewise.
5554         (pp_cxx_exception_specification): Likewise.
5555         (pp_cxx_direct_declarator): Likewise.
5556         (pp_cxx_type_id): Likewise.
5557         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
5558         cxx-pretty-print.c.
5559         (pp_cxx_left_paren): Likewise.
5560         (pp_cxx_right_paren): Likewise.
5561         (pp_cxx_left_brace): Likewise.
5562         (pp_cxx_right_brace): Likewise.
5563         (pp_cxx_left_bracket): Likewise.
5564         (pp_cxx_right_bracket): Likewise.
5565         (pp_cxx_dot): Likewise.
5566         (pp_cxx_identifier): Likewise.
5567         (pp_cxx_tree_identifier): Likewise.
5568         (pp_cxx_ampersand): New macro.
5569         (pp_cxx_star): Likewise.
5570         (pp_cxx_arrow): Likewise.
5571         (pp_cxx_semicolon): Likewise.
5572         (pp_cxx_complement): Likewise.
5573         (pp_cxx_begin_template_argument_list): Declaree.
5574         (pp_cxx_end_template_argument_list): Likewise.
5575         (pp_cxx_colon_colon): likewise.
5576
5577 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
5578
5579         * parser.c (cp_parser_simple_type_specifier): Explicitly test
5580         against NULL_TREE.
5581
5582 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
5583
5584         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
5585         typeck.c: Fix comment formatting.
5586
5587 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
5588
5589         * cp-lang.c (cp_expand_decl): Remove.
5590         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
5591
5592 2004-05-30  Andreas Jaeger  <aj@suse.de>
5593
5594         * lang-specs.h: Add missing initializers for .ii.
5595
5596 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
5597
5598         * decl.c (cp_make_fname_decl): Free return value from
5599         fname_as_string.
5600
5601 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
5602
5603         PR c++/15083
5604         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
5605         even in a templat.e
5606         * init.c (build_new): Likewise.
5607
5608         PR c++/15640
5609         * name-lookup.c (arg_assoc): Robustify.
5610
5611         PR c++/15471
5612         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
5613         when determining the scope to use for a pointer to member.
5614         (lookup_anon_field): Give it external linkage.
5615         * cp-tree.h (lookup_anon_field): Declare it.
5616         * expr.c (cplus_expand_constant): Use it.
5617
5618 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
5619
5620         PR c++/14668
5621         * parser.c (cp_parser_simple_type_specifier): Call
5622         maybe_note_name_used_in_class.
5623
5624 2004-05-28  Tom Marshall  <tmarshall@real.com>
5625
5626         PR c++/15214
5627         * class.c (finish_struct_1): Warn only if the dtor is non-private or
5628         the class has friends.
5629
5630 2004-05-27  Adam Nemet  <anemet@lnxw.com>
5631
5632         PR c++/12883
5633         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
5634         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
5635
5636 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
5637
5638         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
5639         if it might be needed.
5640         * pt.c (mark_decl_instantiated): Only call defer_fn if
5641         the function actually needs processing in finish_file.
5642         * decl2.c (finish_file): Add check that elements in
5643         deferred_fns_used are really needed there.  Remove unnecessary
5644         test of DECL_SAVED_TREE.
5645
5646 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
5647
5648         * Make-lang.in: No need to specify $(LIBCPP).
5649
5650 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
5651
5652         PR c++/15044
5653         * parser.c (cp_parser_class_head): Robustify.
5654
5655         PR c++/15317
5656         * parser.c (cp_parser_decl_specifier_seq): Correct error in
5657         comment.
5658         (cp_parser_constructor_declarator_p): Treat attributes
5659         as decl-specifiers.
5660
5661         PR c++/15329
5662         * typeck.c (build_unary_op): Do not attempt to resolve casts to
5663         base classes in templates.
5664
5665 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
5666
5667         PR c++/15165
5668         * pt.c (instantiate_template): Robustify.
5669
5670 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
5671
5672         PR c++/15025
5673         * decl.c (xref_tag): Issue errors about redeclaring template
5674         classes as non-template classes.
5675
5676 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
5677
5678         PR c++/14821
5679         * name-lookup.c (supplement_binding): Allow redefinitions of
5680         namespace aliases.
5681
5682         PR c++/14883
5683         * parser.c (cp_parser_template_argument): Robustify.
5684
5685 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5686
5687         * class.c (alter_access): Use %E format specifier to print an
5688         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
5689         (push_lang_context): Likewise.
5690         * decl.c (lookup_label): Likewise.
5691         (grokdeclarator): Likewise.
5692         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
5693         * pt.c (do_type_instantiation): Likewise.
5694         * tree.c (handle_java_interface_attribute): Likewise.
5695         (handle_com_interface_attribute): Likewise.
5696         (handle_init_priority_attribute): Likewise.
5697
5698 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
5699
5700         PR c++/15285
5701         PR c++/15299
5702         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
5703         recognized as overloaded functions.
5704
5705 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
5706
5707         PR c++/15507
5708         * class.c (layout_nonempty_base_or_field): Do not try to avoid
5709         layout conflicts for unions.
5710
5711         PR c++/15542
5712         * typeck.c (build_x_unary_op): Instantiate template class
5713         specializations before looking for "operator &".
5714
5715         PR c++/15427
5716         * typeck.c (complete_type): Layout non-dependent array types, even
5717         in templates.
5718
5719         PR c++/15287
5720         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
5721         template.
5722
5723 2004-05-22  Roger Sayle  <roger@eyesopen.com>
5724
5725         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
5726         returning when TREE_TYPE is error_mark_node.
5727         * typeck.c (require_complete_type): Return error_mark_node if
5728         value's type is an error_mark_node.
5729
5730 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
5731
5732         * optimize.c (calls_setjmp_r): Remove.
5733         (calls_setjmp_p): Remove.
5734         * cp-tree.c (calls_setjmp_p): Remove.
5735         * decl.c (finish_function): Do not call calls_setjmp_p.
5736
5737 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
5738
5739         * decl.c (cp_finish_decl): Use mark_decl_referenced.
5740         * decl2.c (maybe_make_one_only): Likewise.
5741         * method.c (use_thunk): Likewise.
5742
5743 2004-05-18  Jason Merrill  <jason@redhat.com>
5744
5745         * class.c (build_base_path): Tidy a bit.
5746
5747 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
5748
5749         * name-lookup.c (struct scope_binding): New.
5750         (EMPTY_SCOPE_BINDING): New.
5751         (lookup_using_namespace): Take a scope_binding instead of a
5752         cxx_binding.
5753         (qualified_lookup_using_namespace): Likewise.
5754         (cxx_binding_clear): Delete.
5755         (do_nonmember_using_decl): Use a scope_binding instead of a
5756         cxx_binding.
5757         (lookup_tag): Don't call select_decl.
5758         (ambiguous_decl): Don't return anything (and change callers to match).
5759         Take a scope_binding as the second parameter.
5760         (lookup_namespace_name): Use a scope_binding instead of a
5761         cxx_binding.
5762         (unqualified_namespace_lookup): Likewise.
5763         (lookup_qualified_name): Likewise.
5764         (select_decl): Take a scope_binding instead of a cxx_binding.
5765         Use macros rather than hand-coding tests for type-ness.
5766
5767 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5768
5769         * cp-gimplify.c: Rename from cp-simplify.c.
5770         * Make-lang.in, optimize.c: Update.
5771
5772 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5773
5774         Merge from tree-ssa-20020619-branch.  See
5775         ChangeLog.tree-ssa for details.
5776
5777         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
5778         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
5779         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
5780         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
5781         Merged.
5782         * cp-mudflap.c: New file.
5783         * cp-simplify.c:: New file.
5784
5785 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5786
5787         PR c++/14389
5788         * decl2.c (check_classfn): For member templates, compare also the
5789         template parameters to match the declaration.
5790         * cp-tree.h: Adjust declaration of check_classfn.
5791         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
5792         * friend.c (do_friend): Likewise.
5793         * pt.c (tsubst_friend_function): Likewise.
5794
5795 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
5796
5797         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
5798         Instead, dig into the representation type to find the array bound.
5799
5800 2004-04-30  Jason Merrill  <jason@redhat.com>
5801
5802         Refer to base members using COMPONENT_REFs where possible.
5803         * class.c (build_simple_base_path): New fn.
5804         (build_base_path): Use it for non-virtual base references.
5805         (layout_class_type): Change base fields to their real type
5806         after layout is done.
5807         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
5808         * cp-lang.c (cxx_get_alias_set): Use it.
5809
5810 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
5811
5812         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
5813         comment typos.
5814
5815 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5816
5817         PR c++/15064
5818         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
5819         used in integral constant expressions.
5820
5821 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
5822
5823         * init.c (build_aggr_init): Fix accidental use of C99 construct in
5824         previous change.
5825
5826         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
5827         braced initializer.
5828         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
5829         * decl.c (reshape_init): Use it.
5830         * init.c (perform_member_init): Remove redundant condition.
5831         (build_aggr_init): Adjust to handle brace-enclosed initializers
5832         correctly.
5833         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5834
5835         * parser.c (cp_parser_initializer_clause): Do not set
5836         TREE_HAS_CONSTRUCTOR on the initializer.
5837         * rtti.c (tinfo_base_init): Likewise.
5838         (generic_initializer): Likewise.
5839         (ptr_initializer): Likewise.
5840         (ptm_initializer): Likewise.
5841         (class_initializer): Likewise.
5842         (get_pseudo_ti_init): Likewise.
5843         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
5844
5845 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
5846
5847         * name-lookup.c (anonymous_namespace_name): Make static.
5848
5849 2004-04-19  Roger Sayle  <roger@eyesopen.com>
5850
5851         PR middle-end/14531
5852         * class.c (build_base_path): Call fold whilst building the NULL
5853         pointer check expression trees.
5854
5855 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
5856
5857         * init.c (build_new_1): Don't use type size argument for Java
5858         _Jv_AllocObject call.
5859
5860 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
5861
5862         * method.c (make_alias_for_thunk): Remove preprocessor guard on
5863         declaration and definition.
5864
5865 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
5866
5867         PR c++/14808
5868         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
5869         than ASM_OUTPUT_DEF.
5870
5871 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5872
5873         * decl2.c (mark_used): Don't segfault if cfun != NULL but
5874         current_function_decl == NULL.
5875
5876 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
5877
5878         PR c++/3518
5879         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
5880         level.
5881
5882 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5883
5884         * init.c (decl_constant_value): Don't look at DECL_INITIAL
5885         of PARM_DECL.
5886         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
5887         or TREE_SIDE_EFFECTS of a type.
5888
5889 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
5890
5891         PR c++/14007
5892         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
5893         cv-qualifier unification.
5894         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
5895
5896 2004-04-02  Jan Hubicka  <jh@suse.cz>
5897
5898         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
5899         * cp-tree.h (cp_update_decl_after_saving): Declare.
5900         * tree.c (cp_update_decl_after_saving): Define.
5901
5902 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
5903
5904         PR c++/14803
5905         * typeck.c (get_delta_difference): Call fold before returning the
5906         value.
5907
5908 2004-04-01  Richard Henderson  <rth@redhat.com>
5909
5910         PR c++/14804
5911         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
5912         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
5913
5914 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
5915
5916         PR c++/14810
5917         * name-lookup.c (maybe_push_cleanup_level): Robustify.
5918
5919 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5920
5921         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
5922
5923 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5924
5925         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
5926         * class.c (check_bitfield_decl): Likewise.
5927         * cvt.c (type_promotes_to): Likewise.
5928         * decl.c (finish_enum): Likewise.
5929         * mangle.c (write_builtin_type): Likewise.
5930         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
5931         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
5932         (build_binary_op): Likewise.
5933
5934 2004-03-31  Jan Hubicka  <jh@suse.cz>
5935
5936         * tree.h (optimize_function): Kill prototype.
5937         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
5938         * semantics.c (expand_body): Kill.
5939
5940 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
5941
5942         PR c++/14724
5943         * decl.c (start_decl_1): Do not decide whether or not to create a
5944         new cleanup level until after the type has been completed.
5945
5946         PR c++/14763
5947         * pt.c (tsubst_default_argument): Clear current_function_decl.
5948
5949 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
5950
5951         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
5952
5953 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
5954
5955         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
5956         is null, just print the literal name and return.
5957
5958 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
5959
5960         * cxx-pretty-print.c: Fix comment typos.
5961
5962 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
5963
5964         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
5965         Update copyright.
5966
5967 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
5968
5969         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
5970         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
5971         target hook.
5972
5973 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
5974
5975         PR 12267, 12391, 12560, 13129, 14114, 14133
5976         * cp-lang.c (c_reset_state): Delete.
5977         (push_file_scope, pop_file_scope): New stubs.
5978         * parser.c (c_parse_file): Call sorry() here if called more than once.
5979
5980 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5981
5982         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
5983         for INTEGER_CST.
5984
5985 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5986
5987         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
5988
5989 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5990
5991         * error.c (enum pad): Remove.
5992         (dump_qualifiers): Likewise.
5993         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
5994         (dump_aggr_type): Likewise.
5995         (dump_type_suffix): Likewise.
5996         (dump_simple_decl): Likewise.
5997         (dump_function_decl): Likewise.
5998         (cv_to_string): Likewise.
5999         (dump_type_prefix): Likewise.  Adjust return void.
6000         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
6001         cxx_pretty_print.h.
6002         (pp_cxx_template_keyword_if_needed): Document.
6003         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
6004         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
6005         MUST_NOT_THROW_EXPR.
6006
6007 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
6008
6009         PR c++/14616
6010         * decl.c (cp_finish_decl): Compute the size of arrays declared in
6011         templates, if their type is non-dependent.
6012
6013 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
6014
6015         * call.c (build_op_delete_call): Do not forget the placement
6016         arguments when iterating through mutiple delete operators.
6017
6018         * cp-tree.h (svaed_scope): Remove last_parms.
6019         (NEW_DELETE_OPNAME_P): New macro.
6020         (last_function_parms): Remove.
6021         (do_friend): Adjust prototype.
6022         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
6023         using last_function_parms.
6024         (grokfndecl): Take the PARM_DECLs as an argument, rather than
6025         using last_function_parms.
6026         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
6027         for class-specific operator new and operator delete.
6028         (grok_op_properties): Do not look for allocation functions with
6029         METHOD_TYPEs.
6030         (start_function): Use DECL_ARGUMENTS instead of
6031         last_function_parms.
6032         * decl.h (last_function_parms): Do not declare.
6033         * decl2.c (grokclassfn): Do not use last_function_parms.
6034         * friend.c (do_friend): Remove parmdecls parameter.
6035         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
6036         (pop_from_top_level): Do not restore it.
6037         * pt.c (check_explicit_specialization): Do not adjust
6038         last_function_parms.
6039
6040         * name-lookup.c (do_local_using_decl): Create a local binding for
6041         types brought in via using declarations.
6042
6043         * name-lookup.c (lookup_arg_dependent): Handle block-scope
6044         function declarations correctly.
6045
6046         * semantics.c (finish_id_expression): Correct handling of
6047         conversion operators to dependent types.
6048
6049         * typeck.c (lookup_destructor): Allow the use of destructors from
6050         base classes.
6051
6052 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6053
6054         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
6055         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
6056         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
6057         the field is named TEMPLATE_TYPE_PARM_INDEX.
6058
6059 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6060
6061         PR c++/14545
6062         * parser.c (cp_parser_functional_cast): A cast to anything
6063         but integral or enumaration type is not an integral constant
6064         expression.
6065         * pt.c (value_dependent_expression_p): Handle cast expressions
6066         without operands (such as "int()").
6067
6068 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
6069
6070         * semantics.c (finish_pseudo_destructor_expr): Allow differing
6071         cv-qualification between the type named by the
6072         pseudo-destructor-name and the object-type.
6073
6074         * search.c (accessible_base_p): Handle non-proper bases.
6075
6076         * name-lookup.c (do_nonmember_using_decl): If a using declaration
6077         refers to a single overloaded function, set the type of the
6078         function.
6079         * tree.c (lvalue_type): Simplify.
6080         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
6081         unknown type.
6082         (build_unary_op): Handle OVERLOADs with known types.
6083
6084         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
6085         function templates.
6086
6087         * parser.c (cp_parser_postfix_expression): Handle the use of
6088         "typename" in non-dependent contexts.  Convert appropriately when
6089         when using a qualified name after "->" or ".".
6090
6091         * call.c (conditional_conversion): Honor the requirement that some
6092         conversions refer to the original object.
6093
6094 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
6095
6096         * call.c (build_conditional_expr): Do not call force_rvalue for
6097         operands of void_type when the conditional expression itself has
6098         void type.
6099         * name-lookup.c (pushdecl): Don't consider a declaration of a
6100         function named "main" to be an overload of a type named "main".
6101         * parser.c (cp_parser_template_name): Perform name lookup when the
6102         template name is proceeded by "template" if the qualifying scope
6103         is non-dependent.
6104         * typeck.c (composite_pointer_type_r): Correctly handle
6105         pointer-to-member types.
6106         (build_const_cast): Likewise.
6107
6108 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6109
6110         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
6111         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
6112         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
6113         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
6114         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
6115         (TYPEOF_TYPE_EXPR): New macro.
6116         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
6117         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
6118         * pt.c (tsubst): Likewise.
6119         * semantics.c (finish_typeof): Likewise.
6120         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
6121         and TEMPLATE_TYPE_PARM.
6122         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
6123         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
6124
6125 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
6126
6127         PR c++/14586
6128         * cp-tree.h (build_new_op): Change prototype.
6129         (build_x_binary_op): Likewise.
6130         * call.c (build_new_op): Add overloaded_p parameter.
6131         * decl2.c (grok_array_decl): Adjust call to build_new_op.
6132         * parser.c (cp_parser_binary_expression): Note that uses of
6133         overloaded operators prevents an expression from being considered
6134         an integral constant.
6135         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
6136         build_x_binary_op.
6137         * semantics.c (finish_call_expr): Likewise.
6138         * typeck.c (rationalize_conditional_expr): Likewise.
6139         (build_x_indirect_ref): Likewise.
6140         (build_x_binary_op): Likewise.
6141         (build_x_unary_op): Likewise.
6142         (build_x_compound_expr): Likewise.
6143         (build_modify_expr): Likewise.
6144         * typeck2.c (build_x_arrow): Likewise.
6145
6146 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
6147
6148         * cp-lang.c, ptree.c: Update copyright.
6149
6150 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
6151
6152         PR c++/14550
6153         * parser.c (cp_parser_non_integral_constant_expression): Encode
6154         more of the idiom that surrounded calls to this function within
6155         the function itself
6156         (cp_parser_primary_expression): Adjust accordingly.
6157         (cp_parser_postfix_expression): Likewise.
6158         (cp_parser_unary_expression): Likewise.
6159         (cp_parser_cast_expression): Likewise.
6160         (cp_parser_assignment_expression): Likewise.
6161         (cp_parser_expression): Likewise.
6162         (cp_parser_new_expression): Note that new-expressions are not
6163         allowed in integral constant expressions.
6164         (cp_parser_delete_expression): Likewise.
6165
6166 2004-03-12  Matt Austern  <austern@apple.com>
6167
6168         * decl2.c (maybe_make_one_only): Look at
6169         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
6170         to make an explicit instantiation weak.
6171         * method.c (use_thunk): Make sure we call comdat_linkage
6172         when appropriate.
6173         * pt.c (do_type_instantiation): On systems where weak symbols
6174         don't go in a static archive's TOC, explicit instantiation of a
6175         class must imply *explicit* instantiation of its memeber.
6176
6177 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
6178
6179         * call.c, cp-tree.h, pt.c: Fix comment typos.
6180
6181 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
6182
6183         PR c++/14510
6184         * decl.c (xref_tag): Disregard non-type declarations when
6185         looking up a tagged type.
6186
6187 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
6188
6189         PR c++/14397
6190         * call.c (convert_like_real): Build a const qualified temporary,
6191         when testing ctor access.
6192
6193 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6194
6195         * call.c (initialize_reference): Fix typo.
6196
6197 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6198
6199         PR c++/14409
6200         * pt.c (determine_specialization): For member templates, match also
6201         constness.
6202
6203         PR c++/14448
6204         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
6205         non-dependent.
6206         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
6207
6208 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6209
6210         PR c++/14230
6211         * call.c (initialize_reference): Handle initializers that are
6212         class-member access expressions applies to rvalues.
6213
6214 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
6215
6216         PR c++/14432
6217         * name-lookup.c (supplement_binding): Ignore functions that are
6218         marked DECL_ANTICIPATED.
6219
6220 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
6221
6222         PR c++/14401
6223         * class.c (check_field_decls): Complain about non-static data
6224         members of reference type in unions.  Propagate
6225         CLASSTYPE_REF_FIELDS_NEED_INIT and
6226         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
6227         data members.
6228         * init.c (perform_member_init): Complain about mbmers with const
6229         type that are not explicitly initialized.
6230
6231 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
6232
6233         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
6234         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
6235         (lang_identifier): Remove implicit_decl and error_locus.
6236         (IDENTIFIER_IMPLICIT_DECL): Remove.
6237         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
6238         (IDENTIFIER_ERROR_LOCUS): Likewise.
6239         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
6240         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
6241         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6242         (implicitly_declare): Remove.
6243         * decl.c (warn_extern_redeclared_static): Remove check of
6244         IDENTIFIER_IMPLICIT_DECL.
6245         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
6246         (implicitly_declare): Remove.
6247         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
6248         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
6249         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
6250         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
6251         in the innermost scope, rather than at namespace scope.
6252         * name-lookup.c (push_local_binding): Give it external linkage.
6253         (pushdecl): Remove dead code.
6254         * name-lookup.h (push_local_binding): Declare it.
6255         * ptree.c (cxx_print_identifier): Don't print
6256         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
6257         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
6258         not IDENTIFIER_ERROR_LOCUS.
6259         * typeck.c (build_function_call): Remove dead code.
6260
6261 2004-03-08  Jason Merrill  <jason@redhat.com>
6262
6263         PR c++/13170
6264         * decl.c (xref_tag): Remove attribute handling.
6265         * cp-tree.h: Adjust prototype.
6266         * decl.c, parser.c, rtti.c: Adjust callers.
6267         * parser.c (cp_parser_class_head): Pass back attributes in the
6268         class head.
6269         (cp_parser_class_specifier): Adjust.
6270
6271 2004-03-08  Matt Austern  <austern@apple.com>
6272
6273         PR debug/14079
6274         * name-lookup.c (add_decl_to_level): Add extern variables, as well
6275         as static, to static_decls array.
6276
6277 2004-03-05  Jason Merrill  <jason@redhat.com>
6278
6279         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
6280
6281 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
6282
6283         * decl.c (grokfndecl): Update old incorrect comment.
6284         (grokvardecl): Diagnose C++ variables of type with no linkage.
6285
6286 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
6287
6288         PR c++/14369
6289         * pt.c (build_non_dependent_expr): Do not create a
6290         NON_DEPENDENT_EXPR for a THROW_EXPR.
6291
6292 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6293
6294         PR c++/14369
6295         * error.c (dump_expr): Handle THROW_EXPR.
6296
6297 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
6298
6299         PR c++/14360
6300         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
6301         lookup if ordinary name-lookup finds a non-function.
6302         * pt.c (tsubst_copy_and_build): Likewise.
6303
6304         PR c++/14361
6305         * parser.c (cp_parser_late_parsing_default_args): Check that there
6306         are no extra tokens after the end of the default-argument
6307         expression.
6308
6309 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
6310
6311         PR c++/14324
6312         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
6313         having C++ linkage for name-mangling purposes.
6314
6315         PR c++/14260
6316         * parser.c (cp_parser_direct_declarator): Recognize constructor
6317         declarators that use a template-id to name the class being
6318         constructed.
6319
6320         PR c++/14337
6321         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
6322         (tsubst_expr): Do not call tsubst_copy, even when
6323         processing_template_decl.
6324
6325 2004-03-01  Jeff Law  <law@redhat.com>
6326
6327         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
6328         the proper type.
6329
6330 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
6331
6332         PR c++/14138
6333         * name-lookup.h (push_scope): Change prototype.
6334         * name-lookup.c (push_scope): Do not reenter the current class
6335         scope.
6336         * decl.c (grokfndecl): Check return code from push_scope before
6337         calling pop_scope.
6338         * decl2.c (check_classfn): Likewise.
6339         * parser.c (cp_parser_conversion_function_id): Likewise.
6340         (cp_parser_init_declarator): Likewise.
6341         (cp_parser_direct_declarator): Likewise.
6342         (cp_parser_class_specifier): Likewise.
6343         (cp_parser_class_head): Likewise.
6344         (cp_parser_lookup_name): Likewise.
6345         (cp_parser_constructor_declarator_p): Likewise.
6346         * pt.c (instantiate_class_template): Likewise.
6347         (resolve_typename_type): Likewise.
6348
6349 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
6350
6351         PR c++/14267
6352         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
6353         extension.
6354
6355         PR debug/12103
6356         * class.c (update_vtable_entry_for_fn): Do not go through
6357         covariance machinery if the type returned by an overrider is the
6358         same as the original.
6359
6360 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
6361
6362         * call.c: Fix a comment typo.
6363
6364 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
6365
6366         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
6367
6368 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
6369
6370         PR c++/14278
6371         * parser.c (cp_parser_parameter_declaration_list): Commit
6372         to fewer tentative parses.
6373
6374 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6375
6376         PR c++/14284
6377         * pt.c (dependent_type_p_r): A template template parameter is a
6378         dependent type.
6379
6380 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6381
6382         PR c++/14246
6383         * mangle.c (write_template_arg_literal): Don't rely on identity for
6384         boolean constants.
6385
6386 2004-02-24  Jason Merrill  <jason@redhat.com>
6387
6388         * tree.c (build_exception_variant): Use check_qualified_type.
6389
6390 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
6391             Kazu Hirata  <kazu@cs.umass.edu>
6392
6393         * decl.c (cxx_init_decl_processing): Don't check
6394         flag_writable_strings.
6395
6396 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
6397
6398         PR c++/14156
6399         * typeck.c (maybe_warn_about_returning_address_of_location):
6400         Change check for VAR_DECL to use DECL_P instead.
6401
6402 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6403
6404         PR c++/14250
6405         * cvt.c (build_expr_type_conversion): Type must be complete before
6406         looking up for conversions.
6407
6408 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6409
6410         PR c++/14143
6411         * name-lookup.c (arg_assoc_class): Don't look into template
6412         arguments if it is not a primary template.
6413
6414 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6415
6416         PR c++/12007
6417         * method.c (use_thunk): Always clone function argument tree.
6418
6419 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
6420
6421         PR c++/14199
6422         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
6423
6424         PR c++/14173
6425         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
6426         for all type variants.
6427
6428 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
6429
6430         PR c++/13927
6431         * decl.c (duplicate_decls): Return error_mark_node for invalid
6432         redeclarations.
6433         * name-lookup.c (push_namespace): Ignore the return value from
6434         pushdecl.
6435         * pt.c (push_template_decl_real): Robustify.
6436
6437         PR c++/14186
6438         * name-lookup.c (push_class_level_binding): Do not complain about
6439         adding a binding for a member whose name is the same as the
6440         enclosing class if the member is located in a base class of the
6441         current class.
6442
6443 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6444
6445         PR c++/14181
6446         * parser.c (cp_parser_new_expression): Parse an ill-formed
6447         direct-new-declarator after a parenthesized type-id to emit good
6448         diagnostic.
6449
6450 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
6451
6452         * cp-tree.def, cvt.c: Update copyright.
6453
6454 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
6455
6456         PR c++/11326
6457         * cp-tree.h (abi_version_at_least): Remove.
6458         * mangle.c: Include flags.h.
6459
6460 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
6461
6462         PR c++/13971
6463         * call.c (build_conditional_expr): Handle conversions between
6464         class types which result in differently cv-qualified type
6465         variants.
6466
6467         PR c++/14086
6468         * class.c (delete_duplicate_fields_1): Remove.
6469         (delete_duplicate_fields): Likewise.
6470         (finish_struct_anon): Remove check for members with the same name
6471         as their enclosing class.
6472         (check_field_decls): Do not call duplicate_fields.
6473         * decl.c (grokdeclarator): Remove check for static data members
6474         with the same name as their enclosing class.
6475         * name-lookup.c (push_class_level_binding): Check for members with
6476         the same name as their enclosing class.
6477
6478 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6479
6480         PR c++/14085
6481         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
6482
6483 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6484
6485         PR c++/13635
6486         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
6487         has full set of arguments.
6488
6489 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6490
6491         PR c++/13927
6492         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
6493
6494 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
6495
6496         PR c++/14122
6497         * cp-tree.h (delete_sanity): Change prototype.
6498         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
6499         Remove dead code.  Adjust code to warn about deleting an array.
6500         * typekc.c (decay_conversion): Use build_address and build_nop.
6501
6502         PR c++/14108
6503         * search.c (accessible_p): Do not check access in thunks.
6504
6505         PR c++/14083
6506         * call.c (build_conditional_expr): Call force_rvalue on the
6507         non-void operand in the case that one result is a throw-expression
6508         and the other is not.
6509
6510 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
6511
6512         PR c++/9851
6513         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
6514         the type name and look ahead for ::~, and bail out early with a
6515         better error message if the parse is going to fail.
6516
6517 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
6518
6519         * call.c (conversion_kind): New type.
6520         (conversion_rank): Likewise.
6521         (conversion): Likewise.
6522         (CONVERSION_RANK): New macro.
6523         (conversion_obstack): New variable.
6524         (obstack_initialized): Likewise.
6525         (z_candidate): Change type of convs and second_conv.
6526         (candidate_warning): New type.
6527         (IDENTITY_RANK): Remove.
6528         (EXACT_RANK): Likewise.
6529         (PROMO_RANK): Likewise.
6530         (STD_RANK): Likewise.
6531         (PBOOL_RANK): Likewise.
6532         (USER_RANK): Likewise.
6533         (ELLIPSIS_RANK): Likewise.
6534         (BAD_RANK): Likewise.
6535         (ICS_RANK): Likewise.
6536         (ICS_STD_RANK): Likewise.
6537         (ICS_USER_FLAG): Likewise.
6538         (ICS_ELLIPSIS_FLAG): Likewise.
6539         (ICS_THIS_FLAG): Likewise.
6540         (ICS_BAD_FLAG): Likewise.
6541         (NEED_TEMPORARY_P): Likewise.
6542         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
6543         (USER_CONV_CAND): Likewise.
6544         (USER_CONV_FN): Likewise.
6545         (conversion_obstack_alloc): New function.
6546         (alloc_conversion): Likewise.
6547         (validate_conversion_obstack): Likewise.
6548         (alloc_conversions): Likewise.
6549         (build_conv): Adjust to deal with new conversion data structures.
6550         (build_identity_conv): New function.
6551         (build_ambiguous_conv): Likewise.
6552         (standard_conversion): Adjust to deal with new conversion data
6553         structures.
6554         (convert_class_to_reference): Likewise.
6555         (direct_reference_binding): Likewise.
6556         (reference_binding): Likewise.
6557         (implicit_conversion): Likewise.
6558         (add_candidate): Likewise.
6559         (add_function_candidate): Likewise.
6560         (add_conv_candidate): Likewise.
6561         (build_builtin_candidate): Likewise.
6562         (print_z_candidate): Likewise.
6563         (merge_conversion_sequences): Likewise.
6564         (build_user_type_conversion_1): Likewise.
6565         (build_user_type_conversion): Likewise.
6566         (build_new_function_call): Likewise.
6567         (build_object_call): Likewise.
6568         (conditional_conversion): Likewise.
6569         (build_conditional_expr): Likewise.
6570         (build_new_op): Likewise.
6571         (build_op_delete_call): Likewise.
6572         (convert_like_real): Likewise.
6573         (build_over_call): Likewise.
6574         (build_new_method_call): Likewise.
6575         (is_subseq): Likewise.
6576         (maybe_handle_implicit_object): Likewise.
6577         (maybe_handle_ref_bind): Likewise.
6578         (compare_ics): Likewise.
6579         (source_type): Likewise.
6580         (add_warning): Likewise.
6581         (joust): Likewise.
6582         (can_convert_arg): Likewise.
6583         (can_convert_arg_bad): Likewise.
6584         (perform_implicit_conversion): Likewise.
6585         (perform_direct_initialization_if_possible): Likewise.
6586         (initialize_reference): Likewise.
6587         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
6588         * cp-tree.def (WRAPPER): Likewise.
6589         (IDENTITY_CONV): Remove.
6590         (LVALUE_CONV): Likewise.
6591         (QUAL_CONV): Likewise.
6592         (STD_CONV): Likewise.
6593         (PTR_CONV): Likewise.
6594         (PMEM_CONV): Likewise.
6595         (BASE_CONV): Likewise.
6596         (REF_BIND): Likewise.
6597         (USER_CONV): Likewise.
6598         (AMBIG_CONV): Likewise.
6599         (RVALUE_CONV): Likewise.
6600         * cp-tree.h (tree_wrapper): Remove.
6601         (WRAPPER_ZC): Remove.
6602         (lang_tree_node): Remove wrapper.
6603         (LOOKUP_SPECULATIVELY): Remove.
6604         (build_op_delete_call): Adjust prototype.
6605         (validate_conversion_obstack): Declare.
6606         (build_zc_wrapper): Remove.
6607         * cvt.c (convert_to_reference): Remove dead code.
6608         (ocp_convert): Likewise.
6609         * decl.c (redeclaration_error_message): Correct handling of
6610         templates.
6611         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
6612         (cp_tree_node_structure): Remove WRAPPER case.
6613         * decl2.c (finish_file): Call validate_conversion_obstack.
6614         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
6615         (build_op_delete_call): Likewise.
6616         (build_x_delete): Likewise.
6617         (build_delete): Adjust call to build_op_delete_call.
6618         * pt.c (tsubst_friend_declaration): Adjust code to determine
6619         whether or not a friend template is a definition.
6620         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
6621         * tree.c (build_zc_wrapper): Remove.
6622
6623 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
6624
6625         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
6626         * cp-tree.h: Don't declare cxx_builtin_type_decls.
6627         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
6628         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
6629
6630 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
6631
6632         * typeck.c (lookup_destructor): Fix typo in error message.
6633
6634 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
6635
6636         * call.c, parser.c, tree.c: Fix comment typos.
6637
6638 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
6639
6640         Bug 13856
6641         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
6642         * decl.c (duplicate_decls, start_function): Likewise.
6643
6644 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
6645
6646         * name-lookup.c (pushdecl): Issue shadow warnings directly.
6647         * parser.c (free_parser_stacks): Delete.
6648
6649 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
6650
6651         * rtti.c: Update copyright.
6652
6653 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6654
6655         PR c++/14033
6656         * decl.c (require_complete_types_for_parms): Do not insert
6657         error_mark_node in the parameter list.
6658
6659 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6660
6661         PR c++/14028
6662         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
6663         error when terminator can not be found.
6664
6665 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6666
6667         Make-lang.in (po-generated):  Delete.
6668
6669 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6670
6671         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
6672         targetm.calls.promote_prototypes.
6673
6674 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6675
6676         PR middle-end/13750
6677         Revert:
6678         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
6679         PR pch/13361
6680         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
6681         (handle_pragma_implementation): Likewise.
6682
6683 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
6684
6685         PR c++/13714
6686         * typeck.c (lookup_destructor): Tweak error message.
6687
6688 2004-02-05  Jan Hubicka  <jh@suse.cz>
6689
6690         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
6691         functions.
6692
6693 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6694
6695         PR c++/14008
6696         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
6697         code, only emits the diagnostic now. Added lookup of the identifier
6698         and support for qualified ids.
6699         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
6700         Parse an (invalid) type name as id-expression within a declarator.
6701         (cp_parser_simple_declaration): Use it.
6702         (cp_parser_member_declaration): Likewise.
6703         (cp_parser_make_typename_type): New function. Handle errors through
6704         cp_parser_diagnose_invalid_typename.
6705         (cp_parser_elaborated_type_specifier): Use it.
6706
6707 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
6708
6709         PR c++/13932
6710         * call.c (convert_like_real): Use "converting" rather than
6711         "argument" as the descriptive keyword to
6712         dubious_conversion_warnings.
6713         * typeck.c (convert_for_assignment): Do not call
6714         dubious_conversion_warnings.
6715
6716 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6717
6718         PR c++/13086
6719         * init.c (build_delete): Emit a more informative error message in
6720         case of an incomplete type, and on the correct source line.
6721
6722 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6723
6724         * error.c, search.c: Update copyright.
6725
6726 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
6727
6728         PR c++/9941
6729         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
6730         linkage for the typeinfo name string.
6731
6732 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
6733
6734         PR c++/13969
6735         * cp-tree.h (fold_non_dependent_expr): New function.
6736         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
6737         (cp_parser_template_argument): Use fold_non_dependent_expr.
6738         (cp_parser_direct_declarator): Likewise.
6739         * pt.c (fold_non_dependent_expr): New function.
6740         (convert_nontype_argument): Use it.
6741         (tsubst_qualified_id): Simplify.
6742         (tsubst_copy_and_build): Likewise.
6743
6744 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
6745
6746         * decl.c (cxx_push_function_context): Do not set
6747         current_function_is_thunk.
6748         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
6749         actual function.
6750
6751 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6752
6753         PR c++/13997
6754         * pt.c (more_specialized_class): Increase processing_template_decl
6755         while partial ordering.
6756
6757 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
6758
6759         PR c++/13925
6760         * decl.c (start_function): Do not call pushdecl for any
6761         instantiation or specialization of a primary template.
6762
6763 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
6764
6765         PR c++/13950
6766         * parser.c (cp_parser_class_name): Robustify.
6767
6768         PR c++/13970
6769         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
6770
6771         PR c++/14002
6772         * semantics.c (finish_id_expression): Do not return an
6773         IDENTIFIER_NODE when lookup finds a PARM_DECL.
6774
6775 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
6776
6777         PR c++/13978
6778         * pt.c (build_non_dependent_expr): Do not build
6779         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
6780
6781         PR c++/13968
6782         * semantics.c (finish_id_expression): Do not return an
6783         IDENTIFIER_NODE when lookup finds a VAR_DECL.
6784
6785         PR c++/13975
6786         * parser.c (cp_parser_simple_declaration): When skipping to the
6787         end of the statement swallow the terminating semicolon.
6788
6789 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
6790
6791         PR c++/13113
6792         * init.c (build_offset_ref): Improve error recovery for invalid
6793         uses of non-static member functions.
6794
6795         PR c++/13854
6796         * cp-tree.h (cp_build_type_attribute_variant): New function.
6797         * class.c (build_clone): Use cp_build_type_attribute_variant.
6798         * decl.c (duplicate_decls): Likewise.
6799         * pt.c (copy_default_args_to_explicit_spec): Likewise.
6800         (tsubst_function_type): Likewise.
6801         * tree.c (build_exception_variant): Check attributes before
6802         concluding that two types are the same.
6803         (cp_build_type-attribute_variant): New method.
6804         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
6805
6806         PR c++/13907
6807         * call.c (convert_class_to_reference): Keep better track of
6808         pedantically invalid user-defined conversions.
6809
6810 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6811
6812         PR c++/13957
6813         * pt.c (tsubst_qualified_id): Improved error message when a type
6814         is expected but not found.
6815
6816 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
6817
6818         * class.c: Fix comment typos.
6819         * decl.c: Likewise.
6820         * error.c: Likewise.
6821         * parser.c: Likewise.
6822         * pt.c: Likewise.
6823         * search.c: Likewise.
6824         * typeck.c: Likewise.
6825
6826 2004-01-30  Richard Henderson  <rth@redhat.com>
6827
6828         PR c++/13693
6829         * method.c (use_thunk): Don't force_target_expr for void thunks.
6830         * tree.c (build_target_expr_with_type): Assert non-void type.
6831         (force_target_expr): Likewise.
6832
6833 2004-01-30  Michael Matz  <matz@suse.de>
6834
6835         * parser.c (cp_parser_labeled_statement): Accept case ranges.
6836
6837 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6838
6839         DR206
6840         PR c++/13813
6841         * decl.c (grokdeclarator): Check immediatly type completeness for
6842         non-dependent types.
6843
6844 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6845
6846         PR c++/13683
6847         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
6848         a sizeof expression.block
6849
6850 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
6851
6852         PR c++/13883
6853         * mangle.c (write_encoding): Correct encoding of member template
6854         constructors.
6855
6856 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6857
6858         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
6859         template name as it was `<::' (digraph typo).
6860         (cp_parser_nth_token_starts_template_argument_list_p): New function.
6861         (cp_parser_id_expression): Use it.
6862         (cp_parser_nested_name_specifier_opt): Likewise.
6863         (cp_parser_template_name): Likewise.
6864         (cp_parser_class_name): Likewise.
6865         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
6866
6867 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
6868
6869         PR c++/13791
6870         * typeck.c (merge_types): Do not merge attributes into
6871         TYPENAME_TYPEs.
6872
6873         PR c++/13736
6874         * parser.c (cp_parser_direct_declarator): Do not prevent
6875         backtracking inside a parenthesized declarator.
6876         (cp_parser_parameter_declaration): Fix typo in comment.
6877
6878 2004-01-28  Jan Hubicka  <jh@suse.cz>
6879
6880         * semantics.c (expand_body)  Do emit_associated_thunks before
6881         expansion.
6882
6883 2004-01-27  Devang Patel  <dpatel@apple.com>
6884
6885         * name-lookup.c: Include "debug.h"
6886         (do_namespace_alias): Invoke debug_hooks to emit debug info
6887         for namespace alias.
6888         (do_local_using_decl): Invoke debug_hooks to emit debug info
6889         for using decl.
6890         (do_class_using_decl): Same.
6891         (do_toplevel_using_decl): Same.
6892         (do_using_directive): Same.
6893         (cp_emit_debug_info_for_using): New function.
6894         * Make-lang.in (cp/parser.o): Depend on debug.h
6895         (cp/name-lookup.o): Same.
6896
6897 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6898
6899         * cp-tree.h (language_function, lang_type_header): Use
6900         BOOL_BITFIELD.
6901         * name-lookup.h (cp_binding_level): Likewise.
6902
6903 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
6904
6905         PR c++/13663
6906         * semantics.c (finish_for_expr): Check for unresolved overloaded
6907         functions.
6908
6909         * class.c (add_method): Just check processing_template_decl to
6910         determine whether or not we are within a template.
6911         * decl2.c (maybe_retrofit_in_chrg): Likewise.
6912         * init.c (decl_constant_value): Check the type of the declaration,
6913         not TREE_READONLY.
6914         * name-lookup.c (maybe_push_to_top_level): Rename to ...
6915         (push_to_top_level): ... this.
6916         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
6917         * pt.c (push_template_decl_real): Reorder condition for speed.
6918         (convert_template_argument): Use dependency-checking functions in
6919         place of uses_template_parms.
6920         (lookup_template_class): Avoid calling uses_template_parms more
6921         than once.
6922         (uses_template_parms): Reimplement, using dependency-checking
6923         functions.
6924         (instantiate_class_template): Use push_to_top_level, not
6925         maybe_push_to_top_level.
6926         (type_unification_real): Simplify.
6927         (type_dependent_expression_p): Handle OFFSET_REFs and
6928         TEMPLATE_DECLs.
6929         (any_dependent_template_arguments_p): Handle multiple levels of
6930         template argument.
6931         * semantics.c (expand_or_defer_fn): Do not check
6932         uses_template_parms for template instantiations.
6933         * typeck.c (comptypes): Avoid calling cp_type_quals.
6934
6935 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
6936
6937         PR c++/13833
6938         * call.c (build_over_call): Do not convert arguments when
6939         processing a template.
6940         * pt.c (build_non_dependent_expr): Do not build a
6941         NON_DEPENDENT_EXPR for arithmetic constants.
6942
6943 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6944
6945         PR c++/13810
6946         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
6947         returns a TYPE_DECL. no further lookup is required.
6948         * semantics.c (check_template_template_default_arg): A TYPE_DECL
6949         is invalid. Rework to give better diagnostics.
6950
6951 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6952
6953         PR c++/13797
6954         * pt.c (instantiate_class_template): Add an error_mark_node
6955         check.
6956         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
6957
6958 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
6959
6960         PR c++/13701
6961         * decl.c (finish_function): Move the call to
6962         finish_fname_decls below the call to
6963         finish_eh_spec_block.
6964
6965 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
6966
6967         * optimize.c, typeck2.c: Update copyright.
6968
6969 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
6970
6971         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
6972         init.c, mangle.c, typeck.c: Update copyright.
6973
6974 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
6975
6976         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
6977
6978 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6979
6980         * Make-lang.in: Replace $(docdir) with doc.
6981         (c++.info, c++.srcinfo): Dummy entry.
6982         (c++.man, c++.srcman): New rules.
6983         (c++.install-man): Revamp rule.
6984
6985 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6986
6987         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
6988         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
6989         immediate $(shell) instead of deferred backquote.
6990
6991 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
6992
6993         PR c++/13651
6994         * parser.c (cp_parser_postfix_expression): When encountering
6995         incomplete type on left-hand side of "->" or ".", treat the entire
6996         expression as erroneous.
6997
6998         PR c++/13592
6999         * call.c (build_field_call): Remove.
7000         (n_build_method_call): Likewise.
7001         (build_method_call): Likewise.
7002         (build_new_method_call): Do not call build_field_call.
7003         * class.c (n_build_method_call): Remove.
7004         (print_class_statistics): Do not print it.
7005         * cp-tree.h (build_method_call): Remove declaration.
7006         (finish_object_call_expr): Likewise.
7007         (build_new_1): Do not use build_method_call.
7008         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
7009         when the function appearing on the right-hand-side of "." or "->"
7010         is not actually a function.
7011         * pt.c (tsubst_copy_and_build): Likewise.
7012         * semantics.c (finish_object_call_expr): Remove.
7013
7014 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
7015
7016         PR c++/13710
7017         * pt.c (tsubst): Use finish_typeof.
7018
7019 2004-01-18  Jason Merrill  <jason@redhat.com>
7020
7021         PR c++/11725
7022         * except.c (build_throw): In a template, set
7023         current_function_returns_abnormally.
7024
7025 2004-01-17  Fred Fish  <fnf@intrinsity.com>
7026
7027         PR c++/11895
7028         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
7029         except don't call array_type_nelts() with a VECTOR_TYPE.
7030
7031 2004-01-16  Jan Hubicka  <jh@suse.cz>
7032
7033         * mangle.c (write_mangled_name): Remove inline modifier.
7034
7035 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
7036
7037         PR c++/13574
7038         * decl.c (compute_array_index_type): Fix grammar in comment.
7039         * init.c (build_zero_init): Handle zero-sized arrays correctly.
7040
7041         PR c++/13178
7042         * call.c (name_as_c_string): Print conversion operator names
7043         correctly.
7044
7045         PR c++/13478
7046         * call.c (initialize_reference): Pass -1 for inner parameter to
7047         convert_like_real.
7048
7049 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7050
7051         PR c++/13407
7052         * parser.c (cp_parser_base_specifier): Check for an invalid
7053         keyword `typename' and emit an user-friendly error message.
7054
7055 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
7056
7057         PR pch/13361
7058         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7059         (handle_pragma_implementation): Likewise.
7060
7061 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7062
7063         PR c++/9259
7064         * typeck.c (build_class_member_access_expr): Allow to access members
7065         of the currently open class.
7066         (finish_class_member_access_expr): Likewise.
7067
7068 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
7069
7070         PR c++/13659
7071         * name-lookup.c (validate_nonmember_using_decl): Take scope and
7072         name by value, instead of computing them.
7073         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
7074         arguments.  Pass them to validate_nonmember_using_decl.
7075         * name-lookup.h (do_local_using_decl): Adjust.
7076         (do_toplevel_using_decl): Likewise.
7077         * parser.c (cp_parser_using_declaration): Likewise.
7078         * pt.c (tsubst_expr): Likewise.
7079
7080 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
7081
7082         PR c++/13594
7083         PR c++/13658
7084         * name-lookup.c (qualified_lookup_using_namespace): Search
7085         strongly-associated namespaces first, and only then try other
7086         namespaces.
7087
7088 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
7089
7090         * Make-lang.in (c++.srcextra): Dummy entry.
7091
7092 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7093
7094         PR c++/8856
7095         * parser.c (cp_parser_template_name): Don't try to parse a
7096         conversion-function-id, as it cannot be a template-name.
7097         (cp_parser_simple_type_specifier): Check for invalid template-ids
7098         even after a built-in type.
7099
7100 2004-01-14  Jan Hubicka  <jh@suse.cz>
7101
7102         PR c++/12850
7103         * pt.c (instantiate_decl):  Do not increase function_depth.
7104
7105 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
7106
7107         PR c++/9021
7108         PR c++/11005
7109         * parser.c (cp_parser_elaborated_type_specifier): Warn about
7110         attributes and discard.
7111         * decl.c (xref_tag): Don't overwite existing attributes with
7112         NULL_TREE.
7113
7114 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7115
7116         PR c++/12335
7117         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
7118         is no destructor while looking up a BIT_NOT_EXPR.
7119
7120 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
7121
7122         * cxxfilt.c: Remove unused file.
7123
7124 2004-01-14  Jan Hubicka  <jh@suse.cz>
7125
7126         Partial fix to PR c++/12850
7127         * decl2.c (mark_used): Do not proactively instantiate templates
7128         when compiling in unit-at-a-time or not optimizing.
7129         * optimize.c (maybe_clone_body): Do not increase function depth.
7130
7131 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7132
7133         PR c++/13474
7134         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
7135
7136 2004-01-12  Steven Bosscher  <stevenb@suse.de>
7137
7138         PR c++/13558
7139         * parser.c (cp_parser_member_declaration): Any non-type is also
7140         not a class or a function.
7141
7142 2004-01-12  Jason Merrill  <jason@redhat.com>
7143
7144         PR c++/12815
7145         * class.c (build_base_path): Do not mark vtable references as
7146         TREE_CONSTANT.
7147         (build_vtbl_ref_1): Likewise.
7148
7149 2004-01-12  Richard Henderson  <rth@redhat.com>
7150
7151         PR opt/10776
7152         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
7153         (store_init_value): Use it.
7154         * decl.c (check_initializer): Expect full initialization code
7155         from store_init_value.
7156         * init.c (expand_aggr_init_1): Likewise.
7157         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
7158
7159 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
7160
7161         * class.c (layout_class_type): For non-POD class types, also copy
7162         the DECL_SIZE and DECL_MODE of fields to the base class type.
7163
7164 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7165
7166         PR c++/13289
7167         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
7168         calling regenerate_decl_from_template.
7169
7170 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
7171
7172         PR c++/4100
7173         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
7174         decl-specifier occurring along with a class definition.
7175
7176 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
7177
7178         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
7179         clauses to comments describing declares_class_or_enum.
7180         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
7181         false.
7182
7183 2004-01-12  Jan Hubicka  <jh@suse.cz>
7184
7185         * pt.c (for_each_template_parm): Do not check for duplicates.
7186         (for_each_template_parm): Use walk_tree duplicate checking code.
7187
7188 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
7189
7190         PR c++/3478
7191         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
7192         is error_mark_node, don't add any more decl_specs.
7193         (cp_parser_init_declarator): After committing to a declaration, if
7194         the decl_specifiers start with error_mark_node, issue an error and
7195         change the type to "int".
7196
7197 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7198
7199         PR bootstrap/7817
7200         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
7201
7202 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7203
7204         DR 337
7205         PR c++/9256
7206         * pt.c (tsubst): Substitution must fail if we are attempting to
7207         create an array with element type that is an abstract class type.
7208         * decl.c (cp_finish_decl): Strip pointers and array types recursively
7209         before calling abstract_virtuals_error.
7210
7211 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
7212
7213         * name-lookup.c (qualified_lookup_using_namespace): Consider
7214         strong using directives even if we've already found a binding.
7215
7216 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
7217
7218         * cp-tree.h (cxx_expand_expr): Change prototype.
7219         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
7220
7221 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
7222
7223         PR c++/12573
7224         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
7225         looking into them recursively. They can be there because of the
7226         new __offsetof__ extension.
7227
7228 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
7229
7230         * parser.c (cp_parser_save_member_function_body): Mark the
7231         definition static.
7232
7233 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
7234
7235         PR c++/13057
7236         * class.c (build_clone): Copy type attributes from the original
7237         function to the clone.
7238
7239         PR c++/12815
7240         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
7241         references as constant.
7242
7243         PR c++/12132
7244         * parser.c (cp_parser_explicit_instantiation): Improve error
7245         recovery.
7246         (cp_parser_require): Improve indication of the error location.
7247
7248         PR c++/13451
7249         * parser.c (cp_parser_class_head): Reorder logic to check for
7250         invalid qualification.
7251
7252 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
7253
7254         PR c++/13157
7255         * name-lookup.c (lookup_using_namespace): Remove spacesp
7256         parameter.
7257         (unqualified_namespace_lookup): Likewise.
7258         (lookup_qualified_name): Adjust accordingly.
7259         (lookup_name_real): Likewise.
7260         (lookup_arg_dependent): Do not eliminate the namespace of the
7261         functions found by unqualified name lookup unless that is the
7262         current namespace.
7263
7264 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
7265
7266         * semantics.c (push_deferring_access_checks): Fix format.
7267         (resume_deferring_access_checks): Likewise.
7268         (stop_deferring_access_checks): Likewise.
7269         (pop_deferring_access_checks): Likewise.
7270         (get_deferred_access_checks): Likewise.
7271         (pop_to_parent_deferring_access_checks): Likewise.
7272         (perform_deferred_access_checks): Likewise.
7273         (perform_or_defer_access_check): Likewise.
7274
7275 2004-01-04  Richard Henderson  <rth@redhat.com>
7276
7277         * call.c (build_over_call): Don't create a save_expr of an
7278         aggregate, but rather its address.
7279
7280 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
7281
7282         PR c++/13529
7283         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
7284         an offsetof expression.
7285
7286         * parser.c (cp_parser_parameter_declaration): Fix comment.
7287
7288         PR c++/12226
7289         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
7290         (reference_binding): Set it when appropriate.
7291         (build_temp): New function, split out from ...
7292         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
7293         (initialize_reference): Likewise.
7294
7295         PR c++/13536
7296         * parser.c (cp_parser): Add in_type_id_in_expr_p.
7297         (cp_parser_new): Initialize it.
7298         (cp_parser_postfix_expression): Set it.
7299         (cp_parser_sizeof_operand): Likewise.
7300         (cp_parser_parameteR_declaration): Do not commit early to tenative
7301         parsers when in_type_id_in_expr_p is set.
7302
7303 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7304
7305         PR c++/13094
7306         * parser.c (cp_parser_template_argument): Don't call
7307         make_unbound_class_template directly.
7308         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
7309         UNBOUND_CLASS_TEMPLATE tree node.
7310
7311 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
7312
7313         PR target/12729
7314         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
7315
7316 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7317
7318         PR c++/13520
7319         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
7320         (DECL_FUNCTION_TEMPLATE_P): Use it.
7321         (DECL_CLASS_TEMPLATE_P): Likewise.
7322         * parser.c (cp_parser_lookup_name): Add is_template parameter.
7323         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
7324         (cp_parser_template_name): Likewise.
7325         (cp_parser_elaborated_type_specifier): Likewise.
7326         (cp_parser_namespace_name): Likewise.
7327         (cp_parser_class_name): Likewise.
7328         (cp_parser_lookup_name_simple): Likewise.
7329
7330 See ChangeLog.3 for earlier changes.