OSDN Git Service

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