Don't warn when alignment of global common data exceeds maximum alignment.
[official-gcc.git] / gcc / cp / ChangeLog-2003
blob6dfb50afb2e509429193f337421ee6db615b9739
1 2003-12-30  Nathan Sidwell  <nathan@codesourcery.com>
3         PR c++/13507
4         * decl.c (duplicate_decls): Use build_type_attribute_variant to
5         merge attributes.
7         PR c++/13494
8         * tree.c (build_cplus_array_type_1): Only build a minimal array
9         type for dependent types or domains.
11 2003-12-29  Nathan Sidwell  <nathan@codesourcery.com>
13         PR c++/12774
14         * typeck.c (comp_array_types): Fold non-dependent domains for
15         ABI-1.
17 2003-12-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
19         PR c++/13289
20         * semantics.c (finish_id_expression): Only check if the type of
21         a template argument is integral or enumeration when it is not
22         dependent.
24 2003-12-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
26         PR c++/12403
27         * parser.c (cp_parser_template_declaration_after_export): Set up
28         template specialization scope in case of explicit specialization.
30 2003-12-28  Mark Mitchell  <mark@codesourcery.com>
32         PR c++/13081
33         * decl.c (duplicate_decls): Preserve inline-ness when redeclaring
34         a function template.
36         PR c++/12613
37         * decl.c (reshape_init): Reject GNU colon-style designated
38         initializers in arrays.
40         PR c++/13009
41         * call.c (build_special_member_call): Do not assume that we have a
42         pointer to the complete object in an assignment operator.
44 2003-12-28  Roger Sayle  <roger@eyesopen.com>
46         PR c++/13070
47         * decl.c (duplicate_decls): When setting the type of an anticipated
48         declaration, merge the existing type attributes.
50 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
52         PR c++/13268, c++/13339
53         * class.c (add_method): Return early when method is error_mark_node.
54         * pt.c (tsubst_friend_function): Return early when new_friend is
55         error_mark_node.
57 2003-12-23  Mark Mitchell  <mark@codesourcery.com>
59         * cp-lang.c (cp_expr_size): Return zero for empty classes.
61         * cp-tree.h (warn_if_uknown_interface): Remove unused function.
62         * decl2.c (warn_if_unknown_interface): Likewise.
64 2003-12-23  Nathan Sidwell  <nathan@codesourcery.com>
66         PR c++/13387
67         * cp-lang.c (cxx_get_alias_set): Correct logic for a base type.
69 2003-12-22  Mark Mitchell  <mark@codesourcery.com>
71         * decl.c (start_function): Do not check
72         flag_alt_external_templates or flag_external_templates.
73         * decl2.c (warn_if_unknown_interface): Likewise.
74         * lex.c (extract_interface_info): Likewise.
75         * pt.c (lookup_template_class): Likewise.
77         PR c++/12862
78         * name-lookup.c (pushdecl): Look up all namespace-scope entities
79         in their corresponding namespace.
81         PR c++/12397
82         * typeck.c (finish_class_member_access_expr): Don't tree
83         IDENTIFIER_NODEs as non-dependent expressions.
85 2003-12-22  Andrew Pinski  <pinskia@physics.uc.edu>
87         PR c++/5050
88         * tree.c (cp_start_inlining): Remove.
89         (cp_end_inlining): Remove.
90         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define.
91         (LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define.
92         * cp-tree.h (cp_start_inlining): Do not declare.
93         (cp_end_inlining): Do not declare.
95 2003-12-22  Mark Mitchell  <mark@codesourcery.com>
97         PR c++/12479
98         * parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;"
99         pedwarn when not in a system header.
101 2003-12-21  Mark Mitchell  <mark@codesourcery.com>
103         * cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE,
104         CPTI_UNION_TYPE, CPTI_ENUM_TYPE.
105         (record_type_node): Remove.
106         (union_type_node): Likewise.
107         (enum_type_node): Likewise.
108         * decl.c: Remove mention of above tree nodes in comment.
109         * lex.c (cxx_init): Do not assign to record_type_node,
110         union_type_node, or enum_type_node.  Simplify handling of
111         class_type_node.
113         PR c++/11554
114         * init.c (sort_mem_initializers): Add warning.
116 2003-12-21  Kazu Hirata  <kazu@cs.umass.edu>
118         * call.c: Fix comment formatting.
119         * class.c: Likewise.
120         * cp-tree.h: Likewise.
121         * cvt.c: Likewise.
122         * cxx-pretty-print.c: Likewise.
123         * decl.c: Likewise.
124         * decl2.c: Likewise.
125         * error.c: Likewise.
126         * except.c: Likewise.
127         * init.c: Likewise.
128         * name-lookup.c: Likewise.
129         * parser.c: Likewise.
130         * pt.c: Likewise.
131         * rtti.c: Likewise.
132         * semantics.c: Likewise.
133         * typeck.c: Likewise.
134         * typeck2.c: Likewise.
136 2003-12-19  Kazu Hirata  <kazu@cs.umass.edu>
138         * cvt.c: Remove uses of "register" specifier in
139         declarations of arguments and local variables.
140         * decl.c: Likewise.
141         * decl2.c: Likewise.
142         * expr.c: Likewise.
143         * friend.c: Likewise.
144         * lex.c: Likewise.
145         * name-lookup.c: Likewise.
146         * repo.c: Likewise.
147         * search.c: Likewise.
148         * tree.c: Likewise.
149         * typeck.c: Likewise.
150         * typeck2.c: Likewise.
152 2003-12-19  Mark Mitchell  <mark@codesourcery.com>
154         PR c++/12795
155         * name-lookup.c (pushdecl): Do not treated any functions as being
156         "nested" in C++.
158 2003-12-19  Jason Merrill  <jason@redhat.com>
160         PR c++/13371
161         * typeck.c (build_modify_expr): Stabilize lhs if we're narrowing.
162         * cvt.c (convert_to_void): Don't warn about the RHS of a comma
163         being useless if TREE_NO_UNUSED_WARNING is set.
165 2003-12-18  Richard Henderson  <rth@redhat.com>
167         * cp-tree.h (struct lang_type_header): Remove __extension__.
169 2003-12-18  Jason Merrill  <jason@redhat.com>
171         PR c++/12253
172         * init.c (build_vec_init): Initialization of an element from
173         an initializer list is also a full-expression.
175         * parser.c, pt.c, semantics.c: Rename constant_expression_p
176         to integral_constant_expression_p.
178 2003-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
180         PR c++/13262
181         * pt.c (instantiate_decl): Wrap push_nested_class and
182         pop_nested_class around cp_finish_decl call for static member
183         variable.
185 2003-12-18  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
187         PR c++/9154
188         * parser.c (cp_parser_template_argument): A type-id followed by '>>'
189         is just an user typo, and should be accepted as last resort if any
190         other parsing fails.
191         (cp_parser_enclosed_template_argument_list): If the argument list is
192         parsed correctly, but the next token is '>>', emit a diagnostic.
193         (cp_parser_next_token_ends_template_argument): Accept '>>' as
194         delimiter of template argument, it will be later detected as a typo.
196 2003-12-17  Kelley Cook  <kcook@gcc.gnu.org>
198         * Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1.
200 2003-12-17  Mark Mitchell  <mark@codesourcery.com>
202         PR c++/10603
203         PR c++/12827
204         * parser.c (cp_parser_error): Help c_parse_error print good
205         messages if the next token is a keyword.
206         (cp_parser_parameter_declaration_list): When resynchronizing after
207         a bad parameter declaration, stop if a comma is found.
208         (cp_parser_parameter_declaration): Avoid backtracking.
210 2003-12-16  Mark Mitchell  <mark@codesourcery.com>
212         PR c++/12696
213         * decl.c (reshape_init): Recover quickly from errors.
215 2003-12-16  Nathan Sidwell  <nathan@codesourcery.com>
217         PR c++/9043
218         C++ ABI change: Mangling array indices in templates.
219         * decl.c (compute_array_index_type): Reorganize for earlier
220         template errors. Use value_dependent_expression_p for abi-2.
221         * mangle.c (write_array_type): Check broken mangling for
222         expression indices on abi-1
224 2003-12-16  Mark Mitchell  <mark@codesourcery.com>
226         PR c++/12696
227         * decl.c (reshape_init): Recover quickly from errors.
229         PR c++/13275
230         * lex.c (reswords): Add "__offsetof" and "__offsetof__".
231         * parser.c (cp_parser): Add in_offsetof_p.
232         (cp_parser_new): Initialize it.
233         (cp_parser_primary_expression): Handle __offsetof__ (...).
234         (cp_parser_postfix_expression): Allow casts to pointer type and
235         uses of "->" in a constant expression if implementing offsetof.
236         (cp_parser_unary_expression): Allow the use of "&" in a constant
237         expression if implementing offsetof.
239 2003-12-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
241         PR c++/2294
242         * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
243         if the declaration comes from an using declaration.
245 2003-12-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
247         * semantics.c (finish_id_expression): Refactor the code to handle
248         template parameters, and emit a more informative error message
249         when they are used within an integral constant expression.
251 2003-12-16  Nathan Sidwell  <nathan@codesourcery.com>
253         PR c++/13387
254         * class.c (finish_struct_1): Compute mode and alias set for
255         CLASSTYPE_AS_BASE.
256         * call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial
257         assignment of a class, as necessary.
258         * cp-lang.c (cxx_get_alias_set): The alias set as a base is the
259         same as for the complete type.
261         PR c++/13242
262         C++ ABI change. Mangling template parameters of reference type
263         * mangle.c (write_template_args): Remove unreachable code.
264         (write_template_arg): Look through an argument of reference type.
266 2003-12-16  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
268         PR c++/2294
269         * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
270         if the declaration comes from an using declaration.
272 2003-12-15  Mark Mitchell  <mark@codesourcery.com>
274         PR c++/10926
275         * decl2.c (grokfield): Robustify.
277         PR c++/11116
278         * parser.c (cp_parser_throw_expression): Determine whether or not
279         an assignment-expression is present by doing one-token lookahead.
281         PR c++/13269
282         * parser.c (cp_parser_function_definition_after_declarator): Stop
283         scanning tokens when reaching EOF.
285         PR c++/12989
286         * typeck.c (cxx_sizeof_or_alignof_expr): Robustify.
288         PR c++/13310
289         * pt.c (dependent_template_p): Handle OVERLOADs.
291 2003-12-15  Mark Mitchell  <mark@codesourcery.com>
293         PR c++/13243
294         PR c++/12573
295         * parser.c (cp_parser_postfix_expression): Tighten handling of
296         integral constant expressions.
297         (cp_parser_unary_expression): Likewise.
298         * pt.c (value_dependent_expression_p): Remove handling for
299         COMPONENT_REFs.
301 2003-12-15  Nathan Sidwell  <nathan@codesourcery.com>
303         * class.c (add_method): Disallow destructor for java classes.
304         * decl.c (xref_basetypes): Check java class inheritance.
305         * decl2.c (check_java_method): Skip artificial params.
307         PR c++/13241
308         C++ ABI change. Mangling of symbols in expressions.
309         * mangle.c (write_mangled_name): Add top_level flag. Rework for
310         nested and unnested mangling. Deal with abi version 1 and version
311         2 differences.
312         (write_expression): Adjust write_mangled_name call.
313         (mangle_decl_string): Use write_mangled_name for all non-type decls.
315 2003-12-14  Mark Mitchell  <mark@codesourcery.com>
317         PR c++/10779
318         PR c++/12160
319         * parser.c (struct cp_parser): Add in_template_argument_list_p.
320         (cp_parser_error): Use c_parse_error.
321         (cp_parser_name_lookup_error): New function.
322         (cp_parser_new): Initialize it.
323         (cp_parser_declarator): Add parenthesized_p parameter.
324         (cp_parser_nested_name_specifier_opt): Use
325         cp_parser_name_lookup_error.
326         (cp_parser_parenthesized_expression_list): Improve comments.
327         (cp_parser_condition): Adjust call to cp_parser_declarator.
328         (cp_parser_template_parameter): Adjust call to
329         cp_parser_parameter_declaration.
330         (cp_parser_template_argument_list): Set
331         in_template_argument_list_p.
332         (cp_parser_explicit_instantiation): Adjust call to
333         cp_parser_declarator.
334         (cp_parser_simple_type_specifier): Remove unncessary code.
335         (cp_parser_using_declaration): Use cp_parser_name_lookup_error.
336         (cp_parser_init_declarator): Handle member function definitions.
337         (cp_parser_direct_declarator): Adjust call to
338         cp_parser_declarator.
339         (cp_parser_type_id): Adjust call to cp_parser_declarator.
340         (cp_parser_parameter_declaration_list): Avoid backtracking where
341         possible.
342         (cp_parser_parameter_declaration): Add parenthesized_p parameter.
343         (cp_parser_function_definition): Remove.
344         (cp_parser_member_declaration): Do not backtrack to look for
345         function definitions.
346         (cp_parser_exception_declaration): Adjust call to
347         cp_parser_declarator.
348         (cp_parser_single_declaration): Handle function definitions via
349         cp_parser_init_declarator.
350         (cp_parser_save_member_function_body): New function.
352 2003-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
354         PR c++/13106
355         * decl.c (finish_function): Check if return type is dependent before
356         issuing no return statement warning.
358 2003-12-12  Nathan Sidwell  <nathan@codesourcery.com>
360         PR c++/13118
361         * cp-tree.h (lang_decl_u): Add thunk_alias member.
362         (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL.
363         (THUNK_ALIAS_P): Remove.
364         (THUNK_ALIAS): Adjust.
365         * class.c (update_vtable_entry_for_fn): Get the vbase within the
366         overriding function's return type.
367         (dump_thunk): Adjust THUNK_ALIAS printing.
368         (build_vtbl_initializer): Adjust THUNK_ALIAS use.
369         * method.c (make_thunk): Revert 12881 test change. Clear
370         THUNK_ALIAS.
371         (finish_thunk): Adjust THUNK_ALIAS setting.
372         (use_thunk): Adjust THUNK_ALIAS use.
373         * semantics.c (emit_associated_thunks): Likewise.
375         PR c++/13114, c++/13115
376         * class.c (layout_empty_base): Propagate the move of an empty base
377         to offset zero.
379         PR c++/12881
380         * method.c (make_thunk): Deal with thunk aliases when searching
381         for a thunk. Robustify assertion.
383 2003-12-11  Nathan Sidwell  <nathan@codesourcery.com>
385         * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only.
386         (hash_type): Use TYPE_UID of the identifier's type.
387         (compare_type): Adjust.
388         (mangle_conv_op_name_for_type): Store identifier nodes only, use
389         TYPE_UID has hash value.
391 2003-12-10  Mark Mitchell  <mark@codesourcery.com>
393         * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
395 2003-12-08  Matt Austern  <austern@apple.com>
397         PR c/13134
398         * decl.c (duplicate_decls): Copy visibility flag when appropriate.
400 2003-12-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
402         * init.c (build_new_1): Deal with an OVERLOAD set when
403         looking up for _Jv_AllocObject.
404         * except.c (build_throw): Likewise for _Jv_Throw.
406 2003-12-08  Jason Merrill  <jason@redhat.com>
408         PR c++/11971
409         * tree.c (build_local_temp): Split out from build_cplus_new.
410         (force_target_expr): New fn.
411         * call.c (call_builtin_trap): Call it.  Take a type parm.
412         (convert_arg_to_ellipsis): Pass it.
413         (build_x_va_arg): Use call_builtin_trap.
415         PR c++/11929
416         * call.c (magic_varargs_p): New fn.
417         (build_over_call): Do no ellipsis conversions for arguments to
418         functions with magic varargs.
420         * name-lookup.c, init.c, except.c: Revert Giovanni's patch from
421         yesterday.
423         Give the anonymous namespace a null DECL_NAME.
424         * cp-tree.h: Don't declare anonymous_namespace_name.
425         * decl.c: Don't define it.
426         * dump.c (cp_dump_tree): Don't check for it.
427         * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
428         * error.c (dump_decl): Likewise.
429         * name-lookup.c: Define it here.
430         (push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
431         * mangle.c (write_unqualified_name): Adjust.
433 2003-12-07  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
435         PR c++/2294
436         * name-lookup.c (push_overloaded_decl): Always construct an
437         OVERLOAD unless the declaration is a built-in.
438         (set_namespace_binding): While binding OVERLOADs with only one
439         declaration, we still need to call supplement_binding.
440         * init.c (build_new_1): Deal with an OVERLOAD set when
441         looking up for _Jv_AllocObject.
442         * except.c (build_throw): Likewise for _Jv_Throw.
444 2003-12-06  Mark Mitchell  <mark@codesourcery.com>
446         PR c++/13323
447         * class.c (same_signature_p): Handle conversion operators
448         correctly.
449         (check_for_override): Likewise.
451 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
453         * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
454         (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
455         (c++.uninstall): Likewise.
457 2003-12-05  Danny Smith <dannysmith@gcc.gnu.org>
458             Mark Mitchell  <mark@codesourcery.com>
460         PR c++/13305
461         * parser.c (cp_parser_elaborated_type_specifier): Accept
462         attributes.
464 2003-12-05  Mark Mitchell  <mark@codesourcery.com>
466         PR c++/13314
467         * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
468         calls.
469         (cp_parser_class_head): Likewise.
471 2003-12-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
473         PR c++/13166
474         * parser.c (cp_parser_late_parsing_default_args): Make sure the
475         context is a class before calling push_nested_class and
476         pop_nested_class.
478 2003-12-03  James E Wilson  <wilson@specifixinc.com>
480         * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
481         support.
483 2003-12-03  Mark Mitchell  <mark@codesourcery.com>
485         PR c++/9127
486         * cp-tree.h (at_namespace_scope_p): New function.
487         * parser.c (cp_parser_class_head): Handle invalid explicit
488         specializations.
489         * search.c (at_namespace_scope_p): New function.
491         PR c++/13179
492         * semantics.c (finish_handler_parms): Do not call eh_type_info for
493         types used in templates.
495         PR c++/10771
496         * parser.c (cp_parser_check_for_invalid_template_id): New
497         function.
498         (cp_parser_simple_type_specifier): Use it.
499         (cp_parser_elaborated_type_specifier): Likewise.
500         (cp_parser_class_head): Likewise.
502 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
504         PR c++/10126
505         * pt.c (convert_nontype_argument): Handle default conversions
506         while converting a pointer to member function.
508 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
510         PR c++/12573
511         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
512         looking into them recursively.
514 2003-12-02  Richard Henderson  <rth@redhat.com>
516         * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
517         * parser.c (struct cp_token): Likewise.
518         (struct cp_parser_token_tree_map_node): Likewise.
519         * lex.c (struct resword): Move const after ENUM_BITFIELD.
521 2003-11-30  Mark Mitchell  <mark@codesourcery.com>
523         PR c++/9849
524         * parser.c (cp_lexer_prev_token): New function.
525         (cp_parser_skip_to_closing_parenthesis): Add consume_paren
526         parameter.
527         (cp_parser_nested_name_specifier_opt): Add is_declaration
528         parameter.
529         (cp_parser_nested_name_specifier): Likewise.
530         (cp_parser_class_or_namespace_name): Likewise.
531         (cp_parser_class_name): Likewise.
532         (cp_parser_template_id): Likewise.
533         (cp_parser_template_name): Likewise.
534         (cp_parser_id_expression): Adjust calls to
535         cp_parser_nested_name_specifier_op, cp_parser_template_id,
536         cp_parser_class_name.
537         (cp_parser_unqualified_id): Likewise.
538         (cp_parser_postfix_expression): Likewise.
539         (cp_parser_pseudo_destructor_name): Likewise.
540         (cp_parser_cast_expression): Likewise.
541         (cp_parser_mem_initializer_id): Likewise.
542         (cp_parser_simple_type_specifier): Likewise.
543         (cp_parser_type_name): Likewise.
544         (cp_parser_elaborated_type_specifier): Likewise.
545         (cp_parser_qualified_namespace_specifier): Likewise.
546         (cp_parser_using_declaration): Likewise.
547         (cp_parser_using_directive): Likewise.
548         (cp_parser_ptr_operator): Likewise.
549         (cp_parser_declarator_id): Likewise.
550         (cp_parser_class_head): Likewise.
551         (cp_parser_base_specifier): Likewise.
552         (cp_parser_constructor_declarator_p): Likewise.
553         (cp_parser_direct_declarator): Fix typo in comment.
554         (cp_parser_parenthesized_expression_list): Adjust call to
555         cp_parser_skip_to_closing_parenthesis.
556         (cp_parser_selection_statement): Likewise.
558 2003-11-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
560         PR c++/12924
561         * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
562         with OVERLOAD and DECL nodes as the first operand.
564 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
566         * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
568 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
570         PR c++/5369
571         * friend.c (is_friend): Handle member function of a class
572         template as template friend.
573         (do_friend): Likewise.
574         * decl2.c (check_classfn): Add template_header_p parameter.
575         * decl.c (start_decl): Adjust check_classfn call.
576         (grokfndecl): Likewise.
577         * pt.c (is_specialization_of_friend): New function.
578         (uses_template_parms_level): Likewise.
579         (push_template_decl_real): Use uses_template_parms_level.
580         (tsubst_friend_function): Adjust check_classfn call.
581         * cp-tree.h (check_classfn): Adjust declaration.
582         (uses_template_parms_level): Add declaration.
583         (is_specialization_of_friend): Likewise.
585 2003-11-21  Mark Mitchell  <mark@codesourcery.com>
587         PR c++/12515
588         * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
589         operator.
591 2003-11-21  Jan Hubicka  <jh@suse.cz>
593         * parser.c (cp_parser_postfix_expression): Initialize 's' to
594         NULL_TREE.
596 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
598         * Make-lang.in (c++.extraclean): Delete.
600 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
602         * Make-lang.in (check-g++, lang_checks): Add.
604 2003-11-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
606         PR c++/12932
607         * class.c (currently_open_derived_class): Check if
608         current_class_type is NULL_TREE.
609         * semantics.c (finish_call_expr): Check if
610         currently_open_derived_class returns NULL_TREE.
611         * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
612         parameter.
614 2003-11-17  Jason Merrill  <jason@redhat.com>
616         * init.c (build_new_1): Preevaluate placement args.
617         * call.c (build_op_delete_call): Don't expose placement args to
618         overload resolution.
620 2003-11-16  Jason Merrill  <jason@redhat.com>
622         * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
623         and TAGS files that include them for each front end.
625 2003-11-15  Bernardo Innocenti  <bernie@develer.com>
627         PR c++/2294
628         * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
629         build failure on libjava.
631 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
633         PR c++/2294
634         * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
635         unless the declaration is a built-in.
636         (set_namespace_binding): While binding OVERLOADs with only one
637         declaration, we still need to call supplement_binding.
639 2003-11-14  Mark Mitchell  <mark@codesourcery.com>
641         PR c++/12762
642         * parser.c (cp_parser_enclosed_template_argument_list): New
643         function.
644         (cp_parser_template_id): Use it.
645         (cp_parser_simple_type_specifier): Recognize invalid template
646         syntax.
648 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
650         PR c++/2094
651         * pt.c (unify): Add support for PTRMEM_CST and
652         FIELD_DECL unification.
654 2003-11-13  Richard Earnshaw  <rearnsha@arm.com>
656         * decl.c (grokfndecl): Change OK to type tree.
658 2003-11-12  Mark Mitchell  <mark@codesourcery.com>
660         * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
661         CONSTRUCTOR.
663         * decl.c (cp_make_fname_decl): When creating a top-level
664         __FUNCTION__-like symbol, do register it with pushdecl.
666         * decl.c (finish_case_label): Do not check that we are within a
667         switch statement here.
668         * parser.c (struct cp_parser): Add in_iteration_statement_p and
669         in_switch_statement_p.
670         (cp_parser_new): Initialize them.
671         (cp_parser_labeled_statement): Check validity of case labels
672         here.
673         (cp_parser_selection_statement): Set in_switch_statement_p.
674         (cp_parser_iteration_statement): Set in_iteration_statement_p.
675         (cp_parser_jump_statement): Check validity of break/continue
676         statements here.
678         PR c++/12735
679         * cp-tree.h (duplicate_decls): Return a tree.
680         * decl.c (duplicate_decls): Clarify documentation.  Return
681         error_mark_node to indicate a failed redeclaration.
682         * friend.c (do_friend): Handle that case.
683         * name-lookup.c (pushdecl): Likewise.
685 2003-11-11  Jason Merrill  <jason@redhat.com>
687         * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
688         * name-lookup.c (parse_using_directive): New fn.
689         (is_associated_namespace): New fn.
690         (arg_assoc_namespace): Also check associated namespaces.
691         * name-lookup.h: Declare new fns.
692         * pt.c (maybe_process_partial_specialization): Allow
693         specialization in associated namespace.
694         * parser.c (cp_parser_using_directive): Accept attributes.  Use
695         parse_using_directive.
697 2003-11-10  Richard Henderson  <rth@redhat.com>
699         * cvt.c (convert_to_void): Use void_zero_node after overload failure.
701 2003-11-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
703         PR c++/12832
704         * name-lookup.c (supplement_binding): Gracefully handle names
705         used at non-class scope prior declaration.
707 2003-11-06  Matt Austern  <austern@apple.com>
709         * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
710         * method.c (use_thunk): give thunk same visibility as function.
711         * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
713 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
715         PR c++/11616
716         * pt.c (instantiate_pending_templates): Save and restore
717         input_location.
719 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
721         PR c++/2019
722         * friend.c (add_friend): Don't display previous declaration in
723         case of duplicate friend warning.
725 2003-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
727         PR c++/9810
728         * call.c (build_over_call): Check access using primary template
729         if FN is a member function template.
731 2003-11-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
733         PR c++/12796
734         * class.c (handle_using_decl): Set input_location before calling
735         error_not_base_type.
737 2003-10-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
739         PR c++/10371
740         * semantics.c (finish_non_static_data_member): Handle when
741         both processing_template_decl and qualifying_scope are true.
743 2003-10-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
745         PR c++/11076
746         * class.c (handle_using_decl): Swap arguments of error_not_base_type.
747         * parser.c (cp_parser_direct_declarator): Only resolve typename for
748         namespace scope declarations.
750 2003-10-24  Nathan Sidwell  <nathan@codesourcery.com>
752         PR c++/12698, c++/12699, c++/12700, c++/12566
753         * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
754         (debug_class, debug_thunks): New.
755         * class.c (dump_class_hierarchy_1): New break out from ...
756         (dump_class_hierarchy): ... here.
757         (dump_thunk, debug_thunks, debug_class): New.
758         (update_vtable_entry_for_fn): Add ssizetype casts. Correct
759         continued search for primary binfo via virtual.
760         (build_vtbl_initializer): Follow covariant thunk alias.
761         * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
762         (finish_thunk): Look for an alias of the covariant thunk and point
763         to it.
764         (use_thunk): We should never use an alias.
765         * semantics.c (emit_associated_thunks): Do not emit aliases.
767         PR c++/12566
768         * cp-tree.h (cp_fname_init): Add TYPE pointer param.
769         * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
770         create an ad-hoc ERROR_MARK.
771         (cp_make_fname_decl): Adjust.
772         * pt.c (tsubst_expr): Adjust.
774 2003-10-23  Jason Merrill  <jason@redhat.com>
776         PR c++/12726
777         * tree.c (build_target_expr_with_type): Don't call force_rvalue
778         for CONSTRUCTORs.
780 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
782         * call.c: Fix comment formatting.
783         * class.c: Likewise.
784         * cxx-pretty-print.c: Likewise.
785         * init.c: Likewise.
786         * parser.c: Likewise.
787         * pt.c: Likewise.
788         * semantics.c: Likewise.
789         * tree.c: Likewise.
790         * typeck.c: Likewise.
791         * typeck2.c: Likewise.
793 2003-10-21  Mark Mitchell  <mark@codesourcery.com>
795         PR c++/11962
796         * typeck.c (build_x_conditional_expr): Handle missing middle
797         operands in templates.
798         * mangle.c (write_expression): Issue errors about attempts to
799         mangle a non-existant middle operator to the ?: operator.
801 2003-10-21  Robert Bowdidge   <bowdidge@apple.com>
803         * decl.c (cp_finish_decl): Remove clause intended for asm directives
804           in struct or class fields: this code is never executed.
806 2003-10-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
808         * decl.c (start_decl): Exit if push_template_decl returns
809         error_mark_node.
811 2003-10-20  Kazu Hirata  <kazu@cs.umass.edu>
813         * ChangeLog: Fix typos.
814         * call.c: Fix comment typos.
815         * class.c: Likewise.
816         * cp-tree.h: Likewise.
817         * cvt.c: Likewise.
818         * cxx-pretty-print.c: Likewise.
819         * decl.c: Likewise.
820         * decl2.c: Likewise.
821         * init.c: Likewise.
822         * mangle.c: Likewise.
823         * name-lookup.c: Likewise.
824         * parser.c: Likewise.
825         * search.c: Likewise.
826         * semantics.c: Likewise.
827         * tree.c: Likewise.
828         * typeck.c: Likewise.
830 2003-10-20  Jan Hubicka  <jh@suse.cz>
832         * decl.c (start_cleanup_fn):  Set DECL_DECLARED_INLINE_P to deffer
833         the expansion.
835 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
837         * Make-lang.in (c++.install-info): Remove.
839 2003-10-20  Jason Merrill  <jason@redhat.com>
841         * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
842         field.
844 2003-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
846         PR c++/9781, c++/10583, c++/11862
847         * decl.c (cp_finish_decl): Exit immediately if decl is an
848         error_mark_node.
849         * pt.c (push_template_decl_real): Return error_mark_node for
850         invalid template declaration of variable.
852 2003-10-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
854         PR c++/12495
855         * pt.c (lookup_template_class): Handle when current_class_type
856         is a local class.
858 2003-10-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
860         PR c++/2513
861         * decl.c (make_typename_type): Use dependent_type_p.
862         (make_unbound_class_template): Likewise.
863         * pt.c (instantiate_class_template): Increment
864         processing_template_decl during substitution of template friend
865         function.  Preincrement processing_template_decl rather than
866         postincrement.
867         (get_mostly_instantiated_function_type): Increment
868         processing_template_decl during partial substitution of function
869         type.
871 2003-10-15  Jan Hubicka  <jh@suse.cz>
873         PR c++/12574
874         * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
876 2003-10-14  Jason Merrill  <jason@redhat.com>
878         PR c++/11878
879         * tree.c (build_target_expr_with_type): Call force_rvalue for
880         classes with non-trivial copy ctors.
882         PR c++/11063
883         * typeck.c (build_modify_expr): Call convert rather than abort.
885 2003-10-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
887         Breack out decl.c (3/n)
888         * name-lookup.c: Include flags.h
889         (lookup_name_current_level): Make static.
890         (add_decl_to_level): Likewise.
891         (push_local_binding): Likewise.
892         (push_overloaded_decl): Likewise.
893         (lookup_using_namespace): Likewise.
894         (qualified_lookup_using_namespace): Likewise.
895         (lookup_type_current_level): Likewise.
896         (unqualified_namespace_lookup): Likewise.
897         (namespace_ancestor): Likewise.
898         (push_using_directive): Likewise.
899         * decl.c (pushdecl): Move to name-lookup.c.
900         (pushdecl_top_level_1): Likewise.
901         (pushdecl_top_level): Likewise.
902         (pushdecl_top_level_and_finish): Likewise.
903         (maybe_push_decl): Likewise.
904         (push_using_decl): Likewise.
905         (push_overloaded_decl): Likewise.
906         (make_anon_name): Likewise.
907         (anon_cnt): Likewise.
908         (clear_anon_tags): Likewise.
909         (maybe_inject_for_scope_var): Likewise.
910         (check_for_out_of_scope_variable): Likewise.
911         * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
912         * decl.c (warn_extern_redeclared_static): Export.
913         * cp-tree.h (warn_extern_redeclared_static): Declare.
915 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
917         * Make-lang.in: Replace uses of $(target_alias) with
918         $(target_noncanonical).
920 2003-10-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
922         * ChangeLog: Add PR number to patch for PR c++/12370.
924 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
926         * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
927         (binding_for_name): Likewise.
928         (cxx_binding_clear): Move to name-lookup.c.
929         * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
930         (binding_for_name): Likewise.
931         * decl2.c (is_ancestor): Move to name-lookup.c
932         (namespace_ancestor): Likewise.
933         (add_using_namespace): Likewise.
934         (ambiguous_decl): Likewise.
935         (lookup_using_namespace): Likewise.
936         (qualified_lookup_using_namespace): Likewise.
937         (set_decl_namespace): Likewise.
938         (decl_namespace): Likewise.
939         (current_decl_namespace): Likewise.
940         (push_decl_namespace): Likewise.
941         (pop_decl_namespace): Likewise.
942         (push_scope): Likewise.
943         (pop_scope): Likewise.
944         (struct arg_lookup): Likewise.
945         (arg_assoc): Likewise.
946         (arg_assoc_args): Likewise.
947         (arg_assoc_type): Likewise.
948         (add_function): Likewise.
949         (arg_assoc_namespace): Likewise.
950         (arg_assoc_class): Likewise.
951         (arg_assoc_template_arg): Likewise.
952         (do_namespace_alias): Likewise.
953         (validate_nonmember_using_decl): Likewise.
954         (do_nonmember_using_decl): Likewise.
955         (do_toplevel_using_decl): Likewise.
956         (do_local_using_decl): Likewise.
957         (do_class_using_decl): Likewise.
958         (do_using_directive): Likewise.
959         (constructor_name_full): Likewise.
960         (constructor_name): Likewise.
961         (constructor_name_p): Likewise.
963 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
965         Break out decl.c (2/n)
966         * name-lookup.c: Include diagnostic.h
967         (cxx_binding_free): Make static.
968         (cxx_binding_make): Likewise.
969         (binding_table_new): Likewise
970         (binding_table_free): Likewise.
971         (binding_table_insert): Likewise.
972         (binding_table_find_anon_type): Likewise.
973         (binding_table_reverse_maybe_remap): Likewise.
974         (supplement_binding): Likewise.
975         * name-lookup.h (global_scope_name): Declare extern.
976         (global_type_node): Likewise.
977         (cxx_binding_free): Don't export.
978         (cxx_binding_make): Likewise.
979         (binding_table_new): Likewise.
980         (binding_table_free): Likewise.
981         (binding_table_insert): Likewise.
982         (binding_table_find_anon_type): Likewise.
983         (binding_table_reverse_maybe_remap): Likewise.
984         * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
985         * decl.c (lookup_namespace_name): Move to name-lookup.c
986         (select_decl): Likewise.
987         (unqualified_namespace_lookup): Likewise.
988         (lookup_qualified_name): Likewise.
989         (lookup_name_real): Likewise.
990         (lookup_name_nonclass): Likewise.
991         (lookup_function_nonclass): Likewise.
992         (lookup_name): Likewise.
993         (lookup_name_current_level): Likewise.
994         (lookup_type_current_level): Likewise.
995         (lookup_flags): Likewise.
996         (qualify_lookup): Likewise.
997         (lookup_tag): Likewise.
998         (lookup_tag_reverse): Likewise.
999         (getdecls): Likewise.
1000         (storedecls): Remove.
1001         (cxx_remember_type_decls): Move to name-lookup.c.
1002         (global_bindings_p): Likewise.
1003         (innermost_nonclass_level): Likewise.
1004         (toplevel_bindings_p): Likewise.
1005         (namespace_bindings_p): Likewise.
1006         (kept_level_p): Likewise.
1007         (innermost_scope_kind): Likewise.
1008         (template_parm_scope_p): Likewise.
1009         (push_binding): Likewise.
1010         (push_local_binding): Likewise.
1011         (add_decl_to_level): Likewise.  Make extern.
1012         (push_class_binding): Move to name-lookup.c.
1013         (resume_level): Likewise.  Rename to resume_scope.
1014         (begin_scope): Move to name-lookup.c.
1015         (indent): Likewise.
1016         (binding_depth): Likewise.
1017         (is_class_level): Likewise.
1018         (cxx_scope_descriptor): Likewise.
1019         (cxx_scope_debug): Likewise.
1020         (namespace_scope_ht_size): Likewise.
1021         (leave_scope): Likewise.
1022         (pushlevel_class): Likewise.
1023         (poplevel_class): Likewise.
1024         (clear_identifier_class_values): Likewise.
1025         (pushdecl_with_scope): Likewise.
1026         (pushdecl_namespace_level): Likewise.
1027         (pushdecl_class_level): Likewise.
1028         (push_class_level_binding): Likewise.
1029         (push_using_directive): Likewise.
1030         (identifier_global_value): Likewise.
1031         (keep_next_level_flag): Likewise.
1032         (keep_next_level): Likewise.
1033         (free_binding_level): Likewise.
1034         (set_class_shadows): Likewise.
1035         (maybe_push_cleanup_level): Likewise.
1036         (cp_namespace_decls): Likewise.
1037         (bt_print_entry): Likewise.
1038         (print_binding_level): Likewise.
1039         (print_other_binding_stack): Likewise.
1040         (print_binding_stack): Likewise.
1041         (push_namespace): Likewise.
1042         (pop_namespace): Likewise.
1043         (push_nested_namespace): Likewise.
1044         (pop_nested_namespace): Likewise.
1045         (cxx_saved_binding_make): Likewise.
1046         (struct cxx_saved_binding_make): Likewise.
1047         (store_bindings): Likewise.
1048         (maybe_push_to_top_level): Likewise.
1049         (push_to_top_level): Likewise.
1050         (pop_from_top_level): Likewise.
1051         (identifier_type_value): Likewise.
1052         (set_identifier_type_value): Likewise.
1053         (set_identifier_type_value_with_scope): Likewise.
1054         (pop_everything): Likewise.
1055         (pushtag): Likewise.
1056         (follow_tag_typedef): Likewise.
1057         (maybe_process_template_type_declaration): Likewise.
1058         (pop_binding): Likewise.
1059         * cp-tree.h: Move corresponding declarations to name-lookup.h
1061 2003-10-12  Steven Bosscher  <steven@gcc.gnu.org>
1063         * cvt.c (ocp_convert): Move warning to C common code.
1065 2003-10-09  Jason Merrill  <jason@redhat.com>
1067         PR c++/6392
1068         * tree.c (build_cplus_array_type): Handle all quals the same.
1069         (cp_build_qualified_type_real): Look through arrays first.
1071         * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
1072         (build_target_expr_with_type): Likewise.
1074         * pt.c (instantiate_class_template): Sanity check that our
1075         enclosing class has been instantiated.
1077 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
1079         * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
1080         * error.c (dump_function_decl): Use it to skip the dump of the
1081         arguments.
1082         (dump_expr): When dumping a declaration found within an
1083         expression, always set TFF_NO_FUNCTION_ARGUMENTS
1084         in the flags.
1086 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
1088         PR c++/11097
1089         * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
1090         USING_DECL.
1092 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
1094         PR c++/10147
1095         * call.c (initialize_reference): Tweak error message.
1096         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
1097         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
1098         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
1099         qualified entities using qualified names.
1101         PR c++/12337
1102         * init.c (build_new_1): Make sure that the expression returned is
1103         not an lvalue.
1105         PR c++/12344, c++/12236, c++/8656
1106         * decl.c (start_function): Do not ignore attributes embedded in a
1107         function declarator.
1109 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
1111         * Make-lang.in (c++.info): Remove.
1112         (c++.dvi): Remove.
1113         (c++.generated-manpages): Replace with ...
1114         (generated-manpages): ... this.
1116 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1118         * decl.c (struct cp_binding_level): Move to name-lookup.h
1119         (current_binding_level): Likewise.
1120         (class_binding_level): Likewise.
1121         * cp-tree.h (enum scope_kind): Likewise.
1123 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1125         * name-lookup.c (binding_entry_free): Nullify name and type
1126         fields.
1128 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
1130         PR c++/12486
1131         * typeck.c (finish_class_member_access_expr): Issue diagnostic
1132         on erroneous use of qualified name.
1134 2003-09-30  Richard Henderson  <rth@redhat.com>
1136         PR c++/12370
1137         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
1139 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
1141         * g++spec.c: Convert to ISO C90 prototypes.
1142         * parser.c: Likewise.
1144 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1146         * decl.c (pop_binding): Don't mess with nullifying binding->scope
1147         here.
1148         * name-lookup.c: Re-format.
1149         (cxx_binding_free): Nullify binding->scope.
1151 2003-09-29  Jan Hubicka  <jh@suse.cz>
1153         PR C++/12047
1154         * except.c (build_eh_type_type): Call mark_used on the type.
1156 2003-09-28  Richard Henderson  <rth@redhat.com>
1158         * typeck.c (c_expand_asm_operands): Take location_t, instead of
1159         individual file and line.
1161 2003-09-28  Andreas Jaeger  <aj@suse.de>
1163         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
1164         definition.
1165         * init.c (push_base_cleanups): Likewise.
1166         * decl2.c (finish_file): Likewise.
1167         * mangle.c (init_mangle): Likewise.
1168         (dump_substitution_candidates): Likewise.
1169         * search.c: Likewise.
1171 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1173         * name-lookup.h (get_global_value_if_present): New function.
1174         (is_typename_at_global_scope): Likewise.
1175         * except.c (do_begin_catch): Use get_global_value_if_present.
1176         (do_end_catch): Likewise.
1177         (do_allocate_exception): Likewise.
1178         (do_free_exception): Likewise.
1179         (build_throw): Likewise.
1180         * parser.c (cp_parser_member_declaration): Likewise.
1181         * rtti.c (throw_bad_cast): Likewise.
1182         (throw_bad_typeid): Likewise.
1183         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
1184         (grokdeclarator): Likewise.
1185         * cp-tree.h (global_namespace): Move to name-lookup.h
1186         * call.c (call_builtin_trap): Tidy.
1188 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1190         PR c++/11415
1191         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
1192         error message when parser->scope is global_namespace.
1194 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1196         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
1197         macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
1199 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1201         * decl.c (pop_binding_level, suspend_binding_level,
1202         find_class_binding_level): Merge into leave_scope.  Remove.
1203         (leave_scope):  New function.
1204         (poplevel): Update.
1205         (poplevel_class): Likewise.
1206         (pop_namespace): Likewise.
1208 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1210         PR c++/5655
1211         * parser.c (cp_parser_check_access_in_redeclaration): New function.
1212         (cp_parser_member_declaration): Use it.
1213         (cp_parser_template_declaration_after_export): Likewise.
1215 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1217         * cp-tree.h (scope_kind): Add new enumerator.
1218         (keep_next_level): Change parameter type to bool.
1219         (begin_scope):  Change prototype.
1220         (pushlevel): Remove declaration.
1221         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
1222         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
1223         of bitsize one.
1224         (keep_next_level_flag): Make a bool.
1225         (cxx_scope_descriptor): Update scope names table
1226         (make_cxx_scope): Fold in begin_scope.  Remove..
1227         (namespace_scope_ht_size): New function.
1228         (begin_scope): Change prototype.  Return a scope.  Tidy.
1229         (kept_level_p): Update.
1230         (pushlevel): Remove.
1231         (maybe_push_cleanup_level): Simplify.
1232         (poplevel): Update for sk_cleanup and keep change.
1233         (print_binding_level): Likewise.
1234         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
1235         (push_namespace): Update.
1236         (pushtag): Likewise.
1237         (lookup_tag): Likewise.
1238         (lookup_name_current_level): Likewise.
1239         (lookup_type_current_level): Likewise.
1240         (cxx_init_decl_processing): Likewise.
1241         (start_function): Likewise.
1242         (begin_function_body): Likewise.
1243         (start_method): Likewise.
1244         * pt.c (push_inline_template_parms_recursive): Likewise.
1245         (begin_template_parm_list): Likewise.
1246         (begin_specialization): Likewise.
1247         * semantics.c (do_pushlevel): Likewise.
1248         (begin_compound_stmt): Likewise.
1249         (begin_stmt_expr): Likewise.
1251 2003-09-21  Richard Henderson  <rth@redhat.com>
1253         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
1254         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
1256 2003-09-21  Richard Henderson  <rth@redhat.com>
1258         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
1259         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
1260         DECL_SOURCE_LOCATION rename and change to const.
1262 2003-09-20  Richard Henderson  <rth@redhat.com>
1264         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
1266 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1268         PR c++/157
1269         * parser.c (cp_parser_direct_declarator): Clear
1270         parser->num_template_parameter_lists when parsing function
1271         parameters.
1272         (cp_parser_constructor_declarator_p): Likewise.
1274 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1276         PR c++/495
1277         * pt.c (tsubst_friend_class): Only use innermost template
1278         arguments for the injected friend class template.
1280 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
1282         PR c++/12332
1283         * pt.c (instantiate_class_template): Increment
1284         processing_template_decl around the tsubst of a template member
1285         function.
1287 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1289         * decl.c (cxx_scope_descriptor): Fix thinko.
1290         (struct cp_binding_level): Adjust type of binding_depth field.
1292 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
1294         PR c++/12320
1295         * call.c (type_passed_as): Check for incomplete type.
1296         (convert_for_arg_passing): Likewise.
1298 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
1300         PR c++/9848
1301         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
1302         here.
1303         * semantics.c (expand_body): Set it here on the remaining clones.
1305 2003-09-18  Roger Sayle  <roger@eyesopen.com>
1307         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
1308         * class.c (instantiate_type): Remove FFS_EXPR case.
1310 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1312         * ChangeLog: Fix recent commit.
1314 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1316         * ChangeLog: Add PR number to patch for PR c++/12316.
1318 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
1320         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
1321         "C" types.
1322         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
1324 2003-09-17  Richard Henderson  <rth@redhat.com>
1326         * semantics.c (expand_body): Don't save/restore input_location.
1328 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
1330         PR c++/12266
1331         * cp-tree.h (tsubst_flags_t): Add tf_conv.
1332         * class.c (standard_conversion): Pass tf_conv to
1333         instantiate_type.
1334         (resolve_address_of_overloaded_function): Do not call mark_used
1335         when just checking conversions.
1337         PR debug/12066
1338         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
1339         * cp-tree.h (cxx_builtin_type_decls): Declare.
1340         * decl.c (builtin_type_decls): New variables.
1341         (cxx_builtin_type_decls): New function.
1342         (record_builtin_type): Add to builtin_type_decls.
1344 2003-09-17  Richard Henderson  <rth@redhat.com>
1346         PR c++/12316
1347         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
1349 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1351         PR c++/7939
1352         * typeck.c (comptypes): Don't ICE when its first argument is
1353         error_mark_node.
1354         (compparms): Reverse the arguments of same_type_p.
1356 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
1358         PR c++/12184
1359         * typeck.c (convert_arguments): Return error_mark_node for an
1360         incomplete parameter. Make error message more informative.
1362 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
1364         PR c++/3907
1365         * class.c (maybe_note_name_used_in_class): Refine test for whether
1366         or not we are in a class scope.
1368         * cp-tree.h (language_function): Remove x_expanding_p.
1369         (expanding_p): Remove.
1370         (doing_semantic_analysis_p): Remove.
1371         (scope_kind): Add sk_function_parms, sk_class,
1372         sk_namespace.
1373         (innermost_scope_kind): New method.
1374         * call.c (cxx_type_promotes_to): Use type_decays_to.
1375         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
1376         (LANG_HOOKS_POPLEVEL): Likewise.
1377         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
1378         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
1379         is_catch_scope.  Add kind and explicit_spec_p.
1380         (cxx_scope_descriptor): Use a lookup table.
1381         (find_class_binding_level): Use "kind" field in binding_level, not
1382         the various flags.
1383         (pop_binding_level): Likewise.
1384         (innermost_nonclass_level): Likewise.
1385         (toplevel_bindings_p): Likewise.
1386         (namespace_bindings_p): Likewise.
1387         (template_parm_scope_p): Likewise.
1388         (innermost_scope_kind): New method.
1389         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
1390         the various flags.
1391         (pushlevel): Remove check for doing_semantic_analysis_p.
1392         (begin_scope): Simplify.
1393         (add_decl_to_level): Use "kind" field in binding_level, not
1394         the various flags.
1395         (push_local_binding): Likewise.
1396         (pop_label): Remove check for doing_semantic_analysis_p.
1397         (poplevel): Use "kind" field in binding_level, not
1398         the various flags.
1399         (set_block): Remove check for doing_semantic_analysis_p.
1400         (pushlevel_class): Use "kind" field in binding_level, not
1401         the various flags.
1402         (poplevel_class): Likewise.
1403         (initial_push_namespace_scope): Likewise.
1404         (maybe_push_to_top_level): Likewise.
1405         (set_identifier_type_value_with_scope): Likewise.
1406         (pop_everything): Likewise.
1407         (maybe_process_template_type_declaration): Likewise.
1408         (pushtag): Likewise.
1409         (pushdecl): Likewise.
1410         (pushdecl_with_scope): Likewise.
1411         (check_previous_goto_1): Likewise.
1412         (define_label): Likewise.
1413         (finish_case_label): Likewise.
1414         (lookup_tag): Likewise.
1415         (unqualified_namespace_lookup): Likewise.
1416         (lookup_name_real): Likewise.
1417         (lookup_name_current_level): Likewise.
1418         (lookup_type_current_level): Likewise.
1419         (record_builtin_type): Likewise.
1420         (cp_make_fname_decl): Likewise.
1421         (maybe_inject_for_scope_var): Likewise.
1422         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
1423         (start_function): Use begin_scope, not pushlevel.
1424         (finish_function): Use "kind" field in binding_level, not
1425         the various flags.
1426         (start_method): Use begin_scope, not pushlevel.
1427         (make_label_decl): Do not check expanding_p.
1428         (save_function-data): Do not set expanding_p.
1429         (cxx_push_function_context): Do not clear expanding_p.
1430         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
1432 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
1434         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
1435         an bit-field whose width exceeds that of its type.
1437 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
1439         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
1441 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
1443         * ChangeLog: Follow spelling conventions.
1444         * parser.c: Likewise.
1446 2003-09-13  Richard Henderson  <rth@redhat.com>
1448         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
1449         during relaxation loop.
1451 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
1453         * decl2.c (var_finalized_p): Swap arms of conditional.
1455 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
1457         PR c++/11788
1458         * typeck.c (build_address): If it is a function, mark it used.
1459         (build_unary_op): Do not lose object's side-effects when taking
1460         address of static member function.
1461         * class.c (resolve_address_of_overloaded_function): Use
1462         tsubst_flags_t parameter. Only expect overload sets. Adjust.
1463         (instantiate_type): Adjust flags passing. Do not lose object's
1464         side-effects when taking address of static member function.
1466 2003-09-11  Richard Henderson  <rth@redhat.com>
1468         * semantics.c (expand_or_defer_fn): Update for new
1469         cgraph_finalize_function argument.
1471 2003-09-10  Richard Henderson  <rth@redhat.com>
1473         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1475 2003-09-10  Jan Hubicka  <jh@suse.cz>
1477         * decl2.c (var_finalized_p): New.
1478         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1480 2003-09-10  Richard Henderson  <rth@redhat.com>
1482         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1483         mark_member_pointers.
1484         (lower_function): Remove.
1485         * cp-tree.h: Update to match.
1486         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1487         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1489 2003-09-09  Richard Henderson  <rth@redhat.com>
1491         * semantics.c (expand_or_defer_fn): Update call to
1492         cgraph_finalize_function.
1494         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1495         always.
1497         * decl2.c (finish_file): Avoid out-of-bounds array reference
1498         during memmove.
1500 2003-09-09  Richard Henderson  <rth@redhat.com>
1502         * decl2.c (mark_member_pointers): Rename from
1503         mark_member_pointers_and_eh_handlers and don't check eh handlers.
1505 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
1507         PR bootstrap/12168
1508         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1510 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
1512         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1513         c_register_builtin_type.
1515         PR c++/11786
1516         * decl2.c (add_function): Do not complain about seeing the same
1517         non-function twice.
1518         * semantics.c (perform_koenig_lookup): Improve documentation.
1520         PR c++/5296
1521         * pt.c (try_one_overload): Add addr_p parameter.
1522         (resolve_overloaded_unification): Pass it.
1524 2003-09-08  Richard Henderson  <rth@redhat.com>
1526         * optimize.c (maybe_clone_body): Inc/dec function_depth.
1528 2003-09-08  Richard Henderson  <rth@redhat.com>
1530         * decl.c (finish_function): Clear current_function_decl.
1531         * decl2.c (mark_used): Don't push/pop gc context.
1532         * optimize.c (optimize_function): Likewise.
1533         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1534         * pt.c (instantiate_decl): Inc/dec function_depth instead.
1535         * semantics.c (expand_body): Update for tree_rest_of_compilation
1536         nested argument.
1538 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
1540         PR c++/11762
1541         * error.c (dump_decl): Handle namespace-alias-definition.
1542         * decl.c (warn_extern_redeclared_static): There is no point in
1543         checking changes in storage class specifier for a namespace
1544         declaration.
1545         (duplicate_decls): Tidy diagnostic message.
1546         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1547         (pp_cxx_right_brace): Likewise.
1548         (pp_cxx_original_namespace_definition): New function.
1549         (pp_cxx_namespace_alias_definition): Likewise.
1550         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
1552 2003-09-07  Jan Hubicka  <jh@suse.cz>
1554         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1555         Avoid re-emitting variables in unit-at-a-time mode.
1557 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
1559         PR c++/11867
1560         * call.c (standard_conversion): Improve comments.
1561         (perform_direct_initialization): Make sure we return an expression
1562         of the correct type.
1563         * typeck.c (build_static_cast): Check for ambiguity and
1564         accessibility when performing conversions.
1566 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1568         * cp-tree.h (add_binding): Remove declaration.
1569         * name-lookup.h (supplement_binding): Declare.
1570         * decl.c (add_binding): Move to name-lookup.c.
1571         (push_local_binding): Adjust.
1572         (push_class_binding): Likewise.
1573         (set_identifier_type_value_with_scope): Likewise.
1574         * name-lookup.c (supplement_binding): Rename from add_binding.
1575         Return a bool.  Improve documentation.
1576         (set_namespace_binding): Adjust.
1577         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1579 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1581         PR c++/11794
1582         * class.c (pushclass): Push dependent using decls for nested
1583         classes of templates too.
1585 2003-09-06  Roger Sayle  <roger@eyesopen.com>
1587         PR c++/11409
1588         * class.c (resolve_address_of_overloaded_function): When building
1589         list of matching non-template function decls, ignore anticipated
1590         declarations of undeclared or shadowed GCC builtins.
1592 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
1594         PR c++/11595
1595         * decl.c (define_label): Remove unreachable timevar pop.
1596         Always return the decl, even if the definition is invalid.
1598 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1600         PR c++/12167
1601         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1602         unparsed functions queue.
1604 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
1606         PR c++/12163
1607         * call.c (perform_direct_initialization): Correct logic for
1608         direct-initialization of a class type.
1610         PR c++/12146
1611         * pt.c (lookup_template_function): Robustify.
1613 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
1615         PR c++/11922
1616         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1617         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1618         is_type_p to lookup_qualified_name.
1620         * semantics.c (finish_call_expr): Refactor some code.
1622         PR c++/12037
1623         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1624         (build_min_non_dep): Declare.
1625         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1626         (build_min_non_dep): New.
1627         * cvt.c (convert_to_void): Don't explicitly copy
1628         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1629         * call.c (build_new_method_call): Use build_min_non_dep.
1630         * decl2.c (grok_array_decl): Likewise.
1631         (build_offset_ref_call_from_tree): Likewise.
1632         * typeck.c (finish_class_member_access_expr,
1633         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1634         build_x_conditional_expr, build_x_compound_expr): Likewise.
1635         (build_static_cast, build_reinterpret_cast,
1636         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1637         * typeck2.c (build_x_arrow): Use build_min_non_dep.
1638         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1639         template.
1640         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1641         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1642         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1644 2003-09-04  Richard Henderson  <rth@redhat.com>
1646         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1647         change in cgraph_mark_needed_node arguments.
1649 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
1651         PR 12161
1652         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1653         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1655 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1657         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1658         (expr_sizeof): Replace with ...
1659         (cxx_sizeof_or_alignof_expr): ... here.
1660         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1661         * parser.c (cp_parser_unary_expression): Commonize alignof and
1662         sizeof handling.
1663         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1664         substitution.
1665         * semantics.c (finish_sizeof, finish_alignof): Remove.
1666         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1667         becomes bool. Set TREE_READONLY.
1668         (expr_sizeof): Replace with ...
1669         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1671 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
1673         Remove cast-as-lvalue extension.
1674         * call.c (build_conditional_expr): Correct formatting.
1675         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1676         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1677         * cp-tree.h (non_cast_lvalue_p): Remove.
1678         (real_non_cast_lvalue_p): Remove.
1679         (non_cast_lvalue_or_else): Remove.
1680         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1681         (real_lvalue_p): Adjust call to lvalue_p_1.
1682         (non_cast_lvalue_p): Remove.
1683         (non_cast_lvalue_or_else): Remove.
1684         (lvalue_p): Adjust call to lvalue_p_1.
1685         (lvalue_or_else): Simplify.
1686         * typeck.c (build_unary_op): Use lvalue_or_else, not
1687         non_cast_lvalue_or_else.
1688         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1690 2003-09-03  DJ Delorie  <dj@redhat.com>
1692         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1694 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
1696         PR c++/12053
1697         * class.c (include_empty_classes): Correct logic for ABI version 1.
1699 2003-09-03  Richard Henderson  <rth@redhat.com>
1701         * optimize.c (optimize_function): Push/pop ggc context around
1702         the call to optimize_inline_calls.
1704 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
1706         PR c++/11553
1707         * parser.c (cp_parser_decl_specifier_seq): Add check for a
1708         duplicate friend decl-specifier.
1710 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
1712         PR c++/11847
1713         * pt.c (convert_nontype_argument): Correct representation of
1714         REFERENCE_TYPE expressions.
1716         PR c++/11808
1717         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1718         (finish_call_expr): Change prototype.
1719         * parser.c (cp_parser_postfix_expression): Adjust call to
1720         finish_call_expr.
1721         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1722         * semantics.c (finish_call_expr): Add koenig_p parameter.
1724 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
1726         PR c++/12114
1727         * cp-tree.h (initialize_reference): Change prototype.
1728         * call.c (initialize_reference): Add cleanup parameter.
1729         * decl.c (grok_reference_init): Likewise.
1730         (check_initializer): Likewise.
1731         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1732         (duplicate_decls): When replacing an anticipated builtin, do not
1733         honor TREE_NOTHROW.
1734         * typeck.c (convert_for_initialization): Correct call to
1735         initialize_reference.
1737         PR c++/11972
1738         * pt.c (dependent_type_p_r): Pass only the innermost template
1739         arguments to any_dependent_template_arguments_p.
1741 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
1743         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1744         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1745         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1746         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1747         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1749 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1751         PR c++/12093
1752         * pt.c (build_non_dependent_expr): Do not build a
1753         NON_DEPENDENT_EXPR for a STRING_CST.
1755         PR c++/11928
1756         * search.c (add_conversions): Avoid adding two conversion
1757         operators for the same type.
1759 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1761         PR c++/6196
1762         * pt.c (tsubst_copy_and_build): Correct handling of
1763         address-of-label extension.
1764         * semantics.c (finish_goto_stmt): The address of a label must go
1765         through the lvalue-to-rvalue conversion.
1767 2003-08-29  Richard Henderson  <rth@redhat.com>
1768             Jason Merrill <jason@redhat.com>
1770         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1771         (LANG_HOOKS_RTL_EXPAND_STMT): New.
1772         * cp-tree.h (cxx_expand_function_start): Declare.
1773         * decl.c (start_function): Use allocate_struct_function.
1774         Move stmts_are_full_exprs_p assertion from expand_body.
1775         Do not free_after_parsing or free_after_compilation.
1776         (cxx_push_function_context): Move code to set struct function
1777         data from genrtl_start_function.
1778         * optimize.c (optimize_function): Don't inc/dec function_depth.
1779         * semantics.c (expand_body): Use tree_rest_of_compilation.
1780         (cxx_expand_function_start): Rename from genrtl_start_function,
1781         omit bits done by tree_rest_of_compilation.
1782         (genrtl_finish_function): Remove.
1783         (clear_decl_rtl): Move to ../tree-optimize.c.
1785 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1787         PR c++/11811
1788         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1789         function.
1790         * cxx-pretty-print.h: Declare.
1791         * error.c (dump_template_parameter): Use it.
1792         (dump_type): Likewise.
1794 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
1796         * init.c (decl_constant_value): Deal with COND_EXPR specially.
1797         * call.c (build_conditional_expr): Revert previous patch.
1799         PR optimization/5079
1800         * call.c (build_conditional_expr): Use decl_constant_value to
1801         simplify the arguments.
1803 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
1805         * parser.c (struct cp_token): Use enum bitfields.
1806         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1807         512B allocation unit.
1808         (cp_parser_token_tree_map_node): Use enum bitfields.
1810 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
1812         PR c++/11871
1813         * decl.c (push_class_level_binding): Correct old_decl value from
1814         my 2003-07-29 reorganization.
1816         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1817         (build_new_method_call): Add goto finish.
1818         * semantics.c (simplify_aggr_init_exprs_r): Don't set
1819         TREE_SIDE_EFFECTS on a call.
1821 2003-08-25  Richard Henderson  <rth@redhat.com>
1823         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1825 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1827         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1828         (cxx_pretty_printer): Adjust base type.
1829         (pp_cxx_function_specifier): Declare.
1830         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1831         (pp_cxx_left_paren): Likewise.
1832         (pp_cxx_right_paren): Likewise.
1833         (pp_cxx_dot): Likewise.
1834         (pp_cxx_arrow): Likewise.
1835         (pp_cxx_semicolon): Likewise.
1836         (pp_cxx_identifier): Likewise.
1837         (pp_cxx_cv_qualifier_seq): Likewise.
1838         (pp_cxx_storage_class_specifier): Likewise.
1839         (pp_cxx_expression_list): Likewise.
1840         (pp_cxx_space_for_pointer_operator): Likewise.
1841         (pp_cxx_init_declarator): Likewise.
1842         (pp_cxx_call_argument_list): Likewise.
1843         (pp_cxx_nonconsecutive_character): Tidy.
1844         (pp_cxx_conversion_function_id): New function.
1845         (pp_cxx_template_id): Likewise.
1846         (pp_cxx_template_keyword_if_needed): Likewise.
1847         (pp_cxx_nested_name_specifier): Likewise.
1848         (pp_cxx_unqualified_id): Tidy
1849         (pp_cxx_qualified_id): Handle more nodes.
1850         (pp_cxx_primary_expression): Tidy.
1851         (pp_cxx_postfix_expression): Likewise.
1852         (pp_cxx_new_expression): Tidy.
1853         (pp_cxx_delete_expression): Likewise.
1854         (pp_cxx_cast_expression): New function.
1855         (pp_cxx_pm_expression): Tidy.
1856         (pp_cxx_conditional_expression): Likewise.
1857         (pp_cxx_assignment_operator): New function.
1858         (pp_cxx_assignment_expression): Tidy.
1859         (pp_cxx_expression): New function.
1860         (pp_cxx_function_specifier): Likewise.
1861         (pp_cxx_decl_specifier_seq): Likewise.
1862         (pp_cxx_simple_type_specifier): Tidy.
1863         (pp_cxx_type_specifier_seq): Likewise.
1864         (pp_cxx_ptr_operator): New function.
1865         (pp_cxx_implicit_parameter_type): Likewise.
1866         (pp_cxx_parameter_declaration): Tidy.
1867         (pp_cxx_parameter_declaration_clause): New function.
1868         (pp_cxx_exception_specification): Likewise.
1869         (pp_cxx_direct_declarator): Tidy.
1870         (pp_cxx_declarator): Likewise.
1871         (pp_cxx_ctor_initializer): New function.
1872         (pp_cxx_function_definition): Likewise.
1873         (pp_cxx_abstract_declarator): Tidy.
1874         (pp_cxx_direct_abstract_declarator): Likewise.
1875         (pp_cxx_type_id): Likewise.
1876         (pp_cxx_exception_declaration): New function.
1877         (pp_cxx_statement): Likewise.
1878         (pp_cxx_simple_declaration): Likewise.
1879         (pp_cxx_template_parameter_list): Likewise.
1880         (pp_cxx_template_parameter): Likewise.
1881         (pp_cxx_template_declaration): Likewise.
1882         (pp_cxx_explicit_specialization): Likewise.
1883         (pp_cxx_explicit_instantiation): Likewise.
1884         (pp_cxx_declaration): Tidy.
1885         (pp_cxx_pretty_printer_init): Initialize more fields.
1887 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
1889         PR c++/8795
1890         * cp-tree.h (build_cplus_method_type): Remove.
1891         * call.c (standard_conversion): Use build_method_type_directly
1892         instead of build_cplus_method_type.
1893         * class.c (build_clone): Likewise.
1894         (adjust_clone_args): Likewise.
1895         * decl.c (build_ptrmem_type): Likewise.
1896         (grokdeclarator): Likewise.
1897         (check_function_type): Likewise.
1898         * decl2.c (grok_method_quals): Likewise.
1899         (maybe_retrofit_in_chrg): Likewise.
1900         * pt.c (copy_default_args_to_explicit_spec): Likewise.
1901         (tsubst_function_type): Likewise.
1902         (tsubst): Likewise.
1903         * tree.c (build_cplus_method_type): Remove.
1904         * typeck.c (merge_types): Use build_method_type_directly.
1906 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1908         PR c++/3765
1909         * search.c (dfs_access_in_type): Fix typo in comment.
1910         (dfs_accessible_queue_p): Likewise.
1911         (dfs_accessible_p): Only terminate when a friend is found.
1912         (accessible_p): Return immediately if access_in_type allows
1913         access.
1915 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1917         PR c++/641, c++/11876
1918         * friend.c (add_friend): Add complain parameter.
1919         (make_friend_class): Likewise.
1920         (do_friend): Adjust add_friend call.
1921         * decl.c (grokdeclarator): Adjust make_friend_class call.
1922         * parser.c (cp_parser_member_declaration): Likewise.
1923         (cp_parser_template_declaration_after_export): Likewise.
1924         * pt.c (instantiate_class_template): Adjust make_friend_class
1925         and add_friend call.
1926         * cp-tree.h (make_friend_class): Adjust declaration.
1927         (add_friend): Likewise.
1929 2003-08-21  Jason Merrill  <jason@redhat.com>
1931         PR c++/11283
1932         * call.c (build_conditional_expr): Ignore cv-qual differences for
1933         non-class types.
1935 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
1937         PR c++/11551
1938         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1939         (cp_parser_primary_expression): Adjust call to
1940         cp_parser_id_expression.
1941         (cp_parser_unqualified_id): Complain about the use of
1942         typedef-names in a destructor declarator.
1943         (cp_parser_postfix_expression): Adjust call to
1944         cp_parser_id_expression.
1945         (cp_parser_type_parameter): Likewise.
1946         (cp_parser_template_argument): Likewise.
1947         (cp_parser_declarator_id): Likewise.
1949         PR c++/11919
1950         * call.c (standard_conversion): Use same_type_p, not pointer
1951         equality, to compare types.
1953         PR c++/10762
1954         * parser.c (cp_parser_using_declaration): Check for invalid uses
1955         of template-ids here...
1956         * decl2.c (do_class_using_decl): ... rather than here.
1958 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
1960         PR c++/11834
1961         * pt.c (more_specialized): Bump processing_template_decl.
1963 2003-08-21  Jason Merrill  <jason@redhat.com>
1965         PR c++/11614
1966         * decl.c (grokdeclarator): Recognize a flexible array based on the
1967         type, not the form of the declarator.
1969 2003-08-20  Jason Merrill  <jason@redhat.com>
1971         * semantics.c (simplify_aggr_init_expr): Split out from
1972         simplify_aggr_init_exprs_r.  Convert slot address to match
1973         the return type.
1974         * cp-tree.h: Declare it.
1975         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1976         DECL_NAME of a user variable.
1978 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1980         PR c++/11945
1981         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1982         COMPOUND_EXPR.
1983         * semantics.c (finish_expr_stmt): Always convert to void.
1984         * typeck.c (build_x_compound_exp): Always convert to void.
1986 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
1988         PR c++/11684
1989         * cp-tree.h (grok_op_properties): Change prototype.
1990         * decl.c (grok_op_properties): Add complain parameter.
1991         (grokfndecl): Pass it.
1992         * pt.c (tsubst_decl): Adjust accordingly.
1994         PR c++/10926
1995         * decl.c (start_method): Return immediately if push_template_decl
1996         does not like the declaration.
1997         * pt.c (push_template_decl_real): Disallow member template
1998         destructors.
2000         PR c++/11036
2001         * cp-tree.h (add_binding): Add prototype.
2002         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
2003         (maybe_warn_about_overly_private_class): Use
2004         CLASSTYPE_DESTRUCTORS.
2005         (pushclass): Adjust call to set_identifier_type_value.
2006         * decl.c (add_binding): Give it external linkage.
2007         (push_local_binding): Adjust call to add_binding.
2008         (push_class_binding): Likewise.
2009         (set_identifier_type_value_with_scope): Change prototype.  Use
2010         add_binding for global bindings.
2011         (set_identifier_type_value): Adjust accordingly.
2012         (pushtag): Likewise.
2013         (pushdecl): Use set_identifier_type_value, not
2014         set_identifier_type_value_with_scope.
2015         (pushdecl_namespace_level): Adjust calls to
2016         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
2017         (pushdecl_class_level): Likewise.
2018         (lookup_tag): Use select_decl.
2019         (select_decl): Improve comment.
2020         (record_builtin_type): Do not call pushdecl.
2021         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
2022         (cp_finish_decl): Adjust call to set_identifier_type_value.
2023         (check_elaborated_type_specifier): Improve checks for invalid uses
2024         of typedefs.
2025         (xref_tag): Adjust call to check_elaborated_type_specifier.
2026         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
2027         * name-lookup.c (set_namespace_binding): Use add_binding.
2028         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
2029         rather than an IDENTIFIER_NODE, to represent built-in types, if
2030         requested by the caller.
2031         (cp_parser_postfix_expression): Adjust call.
2032         (cp_parser_type_specifier): Likewise.
2033         (cp_parser_elaborated_type_specifier): Adjust call to
2034         check_elaborated_type_specifier.
2035         * typeck2.c (build_functional_cast): Do not perform name lookups.
2037         PR c++/10717
2038         * decl.c (expand_static_init): Remove unnecessary code.
2040 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
2042         PR c++/10538, PR c/5582
2043         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
2045 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2047         PR c++/11174
2048         * init.c (build_offset_ref): Perform access checking for
2049         pointer to member correctly.
2051 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2053         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
2055 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2057         PR c++/11957
2058         * cp-tree.h (finish_stmt_expr): Add bool parameter.
2059         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
2060         adjust the stmt_expr here.
2061         (build_vec_init): Use finish_stmt_expr_expr, convert result to
2062         array type.
2063         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
2064         call.
2065         * pt.c (tsubst_copy): Likewise.
2066         * semantics.c (finish_stmt_expr): Add parameter.
2068         * pt.c (instantiate_class_template): Push to class's scope before
2069         tsubsting base.
2071 2003-08-17  Jan Hubicka  <jh@suse.cz>
2073         PR C++/11702
2074         * semantics.c (finish_id_expression): Mark all functions as used.
2076 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
2078         PR c++/11512
2079         * cvt.c (convert_to_void): Indicate which side of conditional has
2080         no effects, and rhs of comma operator. Test for no sideeffect
2081         expressions here and always build a convert expr.
2082         * init.c (expand_default_init): Convert the init to void.
2083         * typeck.c (build_x_compound_expr): Do not check for side effects
2084         here.
2085         (build_compound_expr): Do not convert lhs when building a
2086         template.
2088 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2090         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
2091         * decl2.c (build_offset_ref_call_from_tree): Use
2092         build_non_dependent_expr.
2093         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
2094         * pt.c (build_non_dependent_expr): Set operand.
2096 2003-08-14  Jan Hubicka  <jh@suse.cz>
2098         * decl2.c (mark_member_pointers): Rename to...
2099         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
2100         (lower_function): Update call.
2101         * except.c (eh_type_info): Break out from ...
2102         (build_eh_type): ... here; tinfo is already used.
2103         (finish_eh_spec_block): Mark tinfos as used.
2104         * semantics.c (finish_handler_params): Mark tinfo as used.
2105         * cp-tree.h (eh_type_info): Declare.
2107 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2109         * pt.c (instantiate_class_template): Set location before
2110         substuting bases.
2112         * decl.c (make_typename_type): Use my_friendly_assert.
2113         * pt.c (tsubst_aggr_type): Rearrange context substitution.
2115 2003-08-14  Jan Hubicka  <jh@suse.cz>
2117         * method.c (use_thunk): Expand body directly.
2119 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
2121         PR c++/11703
2122         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
2123         determine whether or not to promote types.
2124         (convert_for_arg_passing): Likewise.
2125         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
2126         templates.
2127         * pt.c (tsubst_decl): Do not expect it to be set.
2129         PR c++/9512
2130         PR c++/10923
2131         * cp-tree.h (check_elaborated_type_specifier): Declare.
2132         (handle_class_head): Remove.
2133         (note_got_semicolon): Likewise.
2134         (note_list_got_semicolon): Likewise.
2135         (finish_class_definition): Likewise.
2136         * decl.c (check_elaborated_type_specifier): Make it public.
2137         Robustify.
2138         (handle_class_head): Remove.
2139         * parser.c (cp_parser_elaborated_type_specifier): Use
2140         check_elaborated_type_specifier.
2141         (cp_parser_class_specifier): Do not call finish_class_definition.
2142         (cp_parser_class_head): Or handle_class_head.  Check for
2143         over-qualified names.
2144         * semantics.c (finish_class_definition): Remove.
2146         * parser.c (cp_parser_check_for_definition_in_return_type): New
2147         function.
2148         (cp_parser_simple_declaration): Adjust call to
2149         cp_parser_init_declarator.
2150         (cp_parser_decl_specifier_seq): Change type of
2151         declares_class_or_enum parameter.
2152         (cp_parser_explicit_instantiation): Adjust accordingly.
2153         (cp_parser_type_specifier): Change type of
2154         declares_class_or_enum parameter.
2155         (cp_parser_init_declarator): Add declares_class_or_enum
2156         parameter.
2157         (cp_parser_parameter_declaration): Adjust call to
2158         cp_parser_decl_specifier_seq.
2159         (cp_parser_function_definition): Likewise.
2160         (cp_parser_member_declaration): Likewise.
2161         (cp_parser_single_declaration): Likewise.
2163         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
2164         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
2165         (TYPE_OVERLOADS_CALL_EXPR): Remove.
2166         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
2167         (TYPE_OVERLOADS_ARROW): Likewise.
2168         (CLASSTYPE_GOT_SEMICOLON): Likewise.
2169         * class.c (check_bases): Do not set them.
2170         (finish_struct_1): Likewise.
2171         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
2172         (build_ptrmemfunc_type): Likewise.
2173         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
2174         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
2175         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
2176         * lex.c (note_got_semicolon): Remove.
2177         (note_list_got_semicolon): Likewise.
2178         * parser.c (cp_parser_simple_declaration): Do not call
2179         note_list_got_semicolon.
2180         * pt.c (list_eq): Remove.
2181         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
2182         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
2183         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
2184         * ptree.c (cxx_print_type): Do not print them.
2185         * semantics.c (finish_member_class_template): Do not call
2186         note_list_got_semicolon.
2188 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
2190         * call.c (standard_conversion): Opaque pointers interconvert.
2192         * testsuite/g++.dg/other/opaque-3.C: New.
2194 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
2196         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
2197         types correctly.
2199 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
2201         PR c++/11789
2202         * cp-tree.h (get_vbase): Remove.
2203         (get_vbase_types): Remove.
2204         * init.c (expand_member_init): Correct logic for looking up base
2205         classes.
2207 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2209         * error.c (dump_expr): Tidy.
2210         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
2211         (pp_cxx_begin_template_argument_list): Likewise.
2212         (pp_cxx_end_template_argument_list): Likewise.
2213         (is_destructor_name): Likewise.
2214         (pp_cxx_unqualified_id): Likewise.
2215         (pp_cxx_qualified_id): Likewise.
2216         (pp_cxx_id_expression): Likewise.
2217         (pp_cxx_new_expression): Likewise.
2218         (pp_cxx_delete_expression): Likewise.
2219         (pp_cxx_pm_expression): Likewise.
2220         (pp_cxx_type_specifier): Rework.
2221         (pp_cxx_type_id): Likewise.
2222         (pp_cxx_primary_expression): Likewise.
2223         (pp_cxx_postfix_expression): Likewise.
2224         (pp_cxx_unary_expression): Likewise.
2225         (pp_cxx_multiplicative_expression): Likewise.
2226         (pp_cxx_conditional_expression): Likewise.
2227         (pp_cxx_assignment_expression): Likewise.
2228         (pp_cxx_pretty_printer_init): Tidy.
2230 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2232         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
2233         NODE is always a TREE_VEC of nonzero size.
2234         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
2235         * decl2.c (arg_assoc): Template args will be a vec.
2236         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
2237         dump_template_argument_list.
2238         (dump_template_parms): Args will be a vec.
2239         * parser.c (cp_parser_template_argument_list): Produce a
2240         vector, not a list.
2241         * pt.c (coerce_template_parms): Args are always vectors.
2242         (mangle_class_name_for_template): Likewise.
2243         (lookup_template_function): Likewise.
2244         (lookup_template_class): Likewise.
2245         (tsubst_template_args): Likewise.
2246         (tsubst_baselink): Use tsubst_template_args.
2247         (tsubst_qualified_id): Likewise.
2248         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
2249         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
2250         (any_dependent_template_args_p):  Args are always vectors.
2251         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
2253         PR c++/11670
2254         * call.c (convert_like_real): Add rvalue binding error message.
2255         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
2256         really a cast.
2258         PR c++/10530
2259         * pt.c (dependent_type_p_r): A dependent template-id is a class
2260         type with dependent template arguments, or a bound template
2261         template parameter.
2262         (type_dependent_expression_p): A template function decl cannot
2263         have a dependent context.
2265 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2267         PR c++/5767
2268         * parser.c (cp_parser_class_name): Return immediately when scope
2269         is error_mark_node.
2271 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
2273         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
2275         * cp/call.c (standard_conversion): Support opaque types.
2276         Include target.h.
2277         (strip_top_quals): Use cp_build_qualified_type instead of
2278         TYPE_MAIN_VARIANT.
2280         * cp/typeck.c (convert_for_assignment): Support opaque types.
2282         * testsuite/g++.dg/other/opaque-1.C: New.
2284         * testsuite/g++.dg/other/opaque-2.C: New.
2286 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
2288         * decl.c (grokparms): Use cp_build_qualified_type instead
2289         TYPE_MAIN_VARIANT.
2291 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2293         * cxx-pretty-print.h: New file.
2294         * cxx-pretty-print.c: Likewise.
2295         * error.c (scratch_pretty_printer): Change type.
2296         (init_error): Tidy.
2297         (dump_aggr_type): Likewise.
2298         (dump_global_iord): Likewise.
2299         (dump_expr): Likewise.
2300         (dump_char): Remove.
2301         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
2302         (cxx_initialize_diagnostics): New function.
2303         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
2304         (CXX_PRETTY_PRINT_H): New variable.
2305         (cp/cxx-pretty-print.o): New rule.
2306         (cp/cp-lang.o): Update dependence.
2307         (cp/error.o): Likewise.
2309 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
2311         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
2312         (DECL_DECLARED_INLINE_P): Remove.
2313         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
2314         if decl is a FUNCTION_DECL.  This never made sense, but now it is
2315         required to avoid a tree check failure.
2316         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
2317         * optimize.c (maybe_clone_body): Likewise.
2319 2003-08-04  Roger Sayle  <roger@eyesopen.com>
2321         * decl.c (cxx_insert_default_attributes): Delete.
2322         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
2323         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
2325 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2327         PR c++/11704
2328         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
2329         unknown type.
2331         PR c++/11766
2332         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
2333         member functions.
2335 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2337         PR c++/9447
2338         * cp-tree.def (USING_DECL): Document its type.
2339         * class.c (pushclass): If we're entering a template, push any
2340         dependent using decls it has.
2341         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
2342         a dependent scope.
2343         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
2344         (tsubst): Remove USING_DECL checks.
2345         (type_dependent_expression_p): Remove USING_DECL case.
2346         * semantics.c (finish_member_declaration): A USING_DECL's type
2347         indicates whether it is dependent.
2349 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2351         * cp-tree.h (pushclass): Remove unneeded parameter.
2352         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
2353         (push_nested_class): Adjust pushclass call.
2354         * pt.c (instantiate_class_template): Likewise.
2355         * semantics.c (begin_class_definition): Likewise.
2357 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
2359         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
2361 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
2363         PR c++/11697
2364         * decl.c (decls_match): Don't ignore the types of template
2365         classes.
2367         PR c++/11744
2368         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
2370 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2372         PR c++/8442, c++/8806
2373         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
2374         preferred.
2375         (check_elaborated_type_specifier): Add allow_template_p
2376         parameter.  Check tag mismatch and class template.
2377         (xref_tag): Add template_header_p parameter.  Add assertion
2378         that name is an IDENTIFIER_NODE.  Remove implicit typename
2379         warning.  Simplify lookup process if globalize is true.
2380         (cxx_init_decl_processing): Adjust call to xref_tag.
2381         (xref_tag_from_type): Likewise.
2382         * decl2.c (handle_class_head): Likewise.
2383         * parser.c (cp_parser_elaborated_type_specifier,
2384         cp_parser_class_head): Likewise.
2385         * rtti.c (init_rtti_processing, build_dynamic_cast1,
2386         tinfo_base_init, emit_support_tinfos): Likewise.
2387         * class.c (is_base_of_enclosing_class): Remove.
2388         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
2389         template template argument.
2390         * cp-tree.h (xref_tag): Adjust declaration.
2391         (is_base_of_enclosing_class): Remove.
2392         * NEWS: Document template template argument change.
2394 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
2396         * parser.c (cp_parser_init_declarator,
2397         cp_paser_member_declaration): Reformat.
2398         * pt.c (lookup_template_class, type_unification_real, unify,
2399         type_dependent_expression_p): Reformat.
2401         PR c++/11295
2402         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
2403         tf_stmt_expr_body.
2404         (finish_stmt_expr_expr): Declare.
2405         * parser.c (cp_parser_primary_expression): Tell
2406         cp_parser_compount_statement that it is a statement expression.
2407         (cp_parser_statement, cp_parser_labeled_statement,
2408         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
2409         in_statement_expr_p parameter.
2410         (cp_parser_expression_statement): Likewise. Call
2411         finish_stmt_expr_expr for final expression of a statement
2412         expression.
2413         (cp_parser_for_init_statement,
2414         cp_parser_implicitly_scoped_statement,
2415         cp_parser_already_scoped_statement, cp_parser_function_definition,
2416         cp_parser_try_block, cp_parser_handled): Adjust.
2417         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
2418         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
2419         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
2420         * semantics.c (finish_expr_stmt): Do not deal with statement
2421         expressions.
2422         (begin_stmt_expr): Clear last_expr_type.
2423         (finish_stmt_expr_expr): New.
2424         (finish_stmt_expr): Process the value expression.
2426         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
2427         compound expr inside the target's initializer.
2429         PR c++/11525
2430         * parser.c (cp_parser_primary_expression): Do not set
2431         non-constant-p merely because it is a dependent scope.
2433         PR c++/9447
2434         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
2435         * semantics.c (finish_expr_stmt): Do not convert to void in a
2436         template.
2438 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2440         * pt.c (coerce_template_parms): Refactor.
2441         (fn_type_unification): Increment processing_template_decl when
2442         tsubsting an incomplete set of explicit args.
2444         PR c++/11347
2445         * pt.c (instantiate_class_template): Increment
2446         processing_template_decl around the tsubst of a template member
2447         class.
2448         (tsubst_qualified_id): Assert we do not have a dependent scope.
2450         * pt.c (coerce_template_template_parms, lookup_template_class,
2451         can_complete_type_without_circularity, instantiate_class_template,
2452         tsubst_decl, unify): Reformat.
2454 2003-07-31  Jan Hubicka  <jh@suse.cz>
2456         * decl2.c (maybe_make_one_only): Use mark_referenced.
2457         * method.c (use_thunk): Likewsie.
2459 2003-07-30  Jan Hubicka  <jh@suse.cz>
2461         * class.c (build_vtable_entry_ref): Kill.
2462         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
2463         (build_vfn_ref): Do not call build_vtable_entry_ref.
2464         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
2465         * cp-tree.h (prepare_assemble_variable): Kill.
2466         * cp-decl.c (prepare_assemble_variable): Kill.
2468 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
2470         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2471         of setting valid_pch by hand.
2473 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2475         * decl.c (finish_enum): Initialize underlying_type.
2477 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
2479         PR c++/9447
2480         * decl.c (add_binding): Add bval local variable.
2481         (push_class_level_binding): Likewise. Allow a USING_DECL to be
2482         pushed.
2483         * decl2.c (do_class_using_decl):  The type of a using decl is
2484         unknown.
2485         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2486         function call lookup code.
2487         * pt.c (tsubst): A USING_DECL will have unknown type.
2488         (tsubst_copy_and_build): Allow a using decl.
2489         (type_dependent_expression_p): A USING_DECL will make it
2490         dependent.
2491         * semantics.c (finish_member_declaration): Push a dependent using
2492         declaration.
2494 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2496         PR c++/11530
2497         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2498         * semantics.c (finish_id_expression): Call mark_used for all
2499         declarations.
2501 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2503         PR c++/11667
2504         * call.c (standard_conversion): Allow all integral->enumeral
2505         conversions, after marking them as bad.
2506         * decl.c (finish_enum): Make sure that all enumerators are
2507         properly converted to the underlying type.
2508         (build_enumerator): Set DECL_CONTEXT for namespace-scope
2509         enumeration types.
2510         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2511         (tsubst_enum): Tidy.
2513         * Make-lang.in (typeck.o): Depend on convert.h.
2514         (class.o): Likewise.
2515         (rtti.o): Likewise.
2516         * call.c: Include convert.h.
2517         (convert_arg_to_ellipsis): Use convert_to_real.
2518         * class.c: Include convert.h.
2519         (build_base_path): Use convert_to_integer.
2520         * rtti.c: Include convert.h.
2521         (build_headof): Use convert_to_integer.
2522         * typeck.c: Include convert.h.
2523         (decay_conversion): Use convert_to_integer.
2524         (build_unary_op): Use build_nop.
2525         (get_delta_difference): Use convert_to_integer.
2526         (build_ptrmemfunc): Avoid unnecessary conversions.
2528 2003-07-28  Jan Hubicka  <jh@suse.cz>
2530         * decl2.c (mark_member_pointers): Verify that member pointer points to
2531         the function.
2533 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
2535         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2536         (finish_compound_stmt): Remove no scope arg.
2537         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2538         end_compound_stmt calls.
2539         (expand_static_init, begin_destructor_body, begin_function_body,
2540         finish_function_body): Likewise.
2541         * decl2.c (start_objects, finish_objects,
2542         start_static_storage_duration_function,
2543         finish_static_storage_duration_function): Likewise.
2544         * init.c (begin_init_stmts, finish_init_stmts,
2545         construct_virtual_base, build_vec_init): Likewise.
2546         * method.c (do_build_assign_ref, synthesize_method): Likewise.
2547         * parser.c (cp_parser_compound_statement,
2548         cp_parser_implicitly_scoped_statement,
2549         cp_parser_already_scoped_statement): Likewise.
2550         * pt.c (tsubst_expr): Likewise.
2551         * semantics.c (begin_compound_stmt): No scope arg is a bool.
2552         (finish_compound_stmt): Remove no scope arg.
2554         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2555         always dyadic.
2557 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
2559         * call.c (standard_conversion): Tweak handling of
2560         pointer-to-member types.
2561         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2562         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2563         pointer-to-data member types.
2565 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2567         * parser.c (cp_parser_type_parameter): Reformat.
2568         (cp_parser_parameter_declaration): Deprecate default args where
2569         not allowed.
2571 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2573         * cfns.h: Rebuilt.
2575         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2576         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2577         * init.c (begin_init_stmts): Make static. Return is_global
2578         value. Always call begin_stmt_expr.
2579         (finish_init_stmts): Make static. Add is_global parm. Always
2580         building a stmt tree.
2581         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2582         (build_vec_init): Likewise. Always building a stmt tree.
2583         (expand_default_init): Always building a stmt tree.
2584         (get_temp_regvar): Likewise.
2585         * semantics.c (begin_global_stmt_expr,
2586         finish_global_stmt_expr): Remove.
2588 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2590         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2591         (build_x_compound_expr_from_list): Declare.
2592         * typeck.c (build_x_compound_expr_from_list): New.
2593         (build_x_compound_expr): Adjust.
2594         (build_compound_expr): Remove unreachable code. Take two
2595         parameters, adjust.
2596         * decl.c (grok_reference_init): Use
2597         build_x_compound_expr_from_list.
2598         (expand_static_init): Adjust build_compound_expr call.
2599         (cxx_maybe_build_cleanup): Likewise.
2600         * init.c (perform_member_init): Use
2601         build_x_compound_expr_from_list.
2602         (build_new_1): Likewise.
2603         (build_vec_delete): Adjust build_compound_expr calls.
2604         (build_vbase_delete): Likewise.
2605         * typeck2.c (store_init_value): Use
2606         build_x_compound_expr_from_list.
2607         (build_functional_cast): Likewise.
2609 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2611         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2612         * decl.c (make_typename_type): Pass it.
2613         * pt.c (lookup_template_class): Use it.
2614         (resolve_typename_type): Pass it.
2615         * semantics.c (finish_template_type): Pass it.
2617 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2619         PR c++/11617
2620         * cp-tree.h (qualified_name_lookup_error): Declare.
2621         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2622         errors.
2623         (tsubst_expr) <DECL_STMT case>: Likewise.
2624         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2625         * semantics.c (qualified_name_lookup_error): New, broken out of ...
2626         (finish_id_expression): ... here. Use it.
2628 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
2630         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2632 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2634         PR c++/11596
2635         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2636         (tsubst_template_arg): New.
2637         (tsubst_template_arg_vector): Rename to ...
2638         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2639         tsubst_template_arg.
2640         (coerce_template_parms): Use tsubst_template_arg for default
2641         value.
2642         (tsubst_template_parms): Likewise.
2643         (tsubst_aggr_type): Adjust.
2644         (tsubst_decl): Likewise.
2645         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2646         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2648 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
2650         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2651         * error.c: Use the new pretty-printer framework.
2653 2003-07-24  Per Bothner  <pbothner@apple.com>
2655         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2656         which causes errors messages to incorrectly mention included files.
2658 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
2660         * cp-tree.h (convert_to_base_statically): Declare.
2661         * call.c (build_special_member_call): Convert INSTANCE to the base
2662         type.
2663         * class.c (convert_to_base_statically): New method.
2664         * init.c (construct_virtual_base): Use it.
2665         * method.c (do_build_assign_ref): Fix typo in comment.
2667 2003-07-24  Jason Merrill  <jason@redhat.com>
2669         * decl.c: Just set truthvalue_* to boolean_*.
2671 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2673         * decl.c (reshape_init): Remove unreachable code.
2675 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2677         PR c++/11513
2678         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2680 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
2682         PR c++/11645
2683         * cp-tree.h (accessible_base_p): Declare.
2684         * call.c (build_over_call): Use it.
2685         * search.c (accessible_base_p): New function, split out from ...
2686         (lookup_base): ... here.
2688         PR c++/11517
2689         * call.c (build_conditional_expr): Use perform_implicit_conversion
2690         and error_operand_p.  Robustify.
2691         * typeck.c (build_unary_op): Use perform_implicit_conversion.
2693 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
2695         PR c++/10953
2696         * parser.c (cp_parser_nested_name_specifier): Reset scope on
2697         failure.
2698         (cp_parser_elaborated_type_specifier): Likewise.
2700 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
2702         Eliminate use of POINTER_TYPE for pointers-to-members.
2703         * call.c (standard_conversion): Rework pointer-to-member handling.
2704         Add comments.
2705         (add_builtin_candidate): Likewise.
2706         (resolve_scoped_fn_name): Remove.
2707         (build_conditional_expr): Rework pointer-to-member handling.
2708         (compare_ics): Likewise.
2709         * class.c (check_field_decls): Use TYPE_PTR_P.
2710         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2711         handling.
2712         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2713         (TYPE_PTRMEM_P): Add comment.
2714         (TYPE_PTR_P): Simplify.
2715         (TYPE_PTROB_P): Correct definition.
2716         (TYPE_PTR_TO_MEMBER_P): New macro.
2717         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2718         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2719         (resolved_scoped_fn_name): Remove declaration.
2720         (build_offset_ref): Change prototype.
2721         (resolve_offset_ref): Remove.
2722         (comp_target_types): Remove.
2723         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2724         handling.
2725         (convert_to_reference): Use can_convert.
2726         (ocp_convert): Improve error handling.  Rework pointer-to-member
2727         handling.
2728         (perform_qualification_conversions): Rework pointer-to-member
2729         handling.
2730         * decl.c (build_ptrmem_type): Handle functions too.
2731         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2732         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2733         (grokparms): Remove OFFSET_TYPE error message.
2734         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2735         * error.c (dump_type_prefix): Likewise.
2736         * expr.c (cplus_expand_constant): Use build_nop.
2737         * init.c (build_offset_ref): Add address_p parameter.  Fold in
2738         necessary bits from resolve_offset_ref.
2739         (resolve_offset_ref): Remove.
2740         * parser.c (cp_parser_postfix_expression): Remove special case
2741         code for OFFSET_TYPE.
2742         * pt.c (convert_nontype_argument): Rework pointer-to-member
2743         handling.
2744         (convert_template_argument): Likewise.
2745         (unify): Likewise.
2746         (invalid_nontype_parm_type_p): Likewise.
2747         (dependent_type_p_r): Likewise.
2748         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2749         (target_incomplete_p_): Rework pointer-to-member
2750         handling.
2751         (get_pseudo_ti_init): Likewise.
2752         (get_pseudo_ti_desc): Likewise.
2753         * semantics.c (finish_qualified_id_expr): Adjust call to
2754         build_offset_ref.  Remove use of resolve_offset_ref.
2755         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2756         * typeck.c (target_type): Use TYPE_PTRMEM_P.
2757         (type_unknown_p): Remove obsolete code about the time before
2758         non-dependent expressions were handled correctly.
2759         (qualify_type_recursive): Remove.
2760         (composite_pointer_type_r): New function.
2761         (composite_pointer_type): Use it.
2762         (merge_types): Remove dead comments.
2763         (comp_cv_target_types): Remove.
2764         (comp_target_types): Likewise.
2765         (comp_target_parms): Likewise.
2766         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2767         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2768         (build_binary_op): Do not use of comp_target_types.
2769         (pointer_diff): Remove OFFSET_TYPE case.
2770         (build_unary_op): Adjust pointer-to-member handling.
2771         (unary_complex_lvalue): Likewise.
2772         (check_for_casting_away_constness): Add description parameter.
2773         (build_static_cast): Pass it.
2774         (build_reinterpret_cast): Use check_for_casting_away_constness.
2775         (build_const_cast): Adjust pointer-to-member handling.
2776         (build_c_cast): Likewise.
2777         (convert_for_assignment): Remove OFFSET_TYPE error message.
2778         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2779         (comp_ptr_ttypes_reinterpret): Remove.
2780         (casts_away_constness_r): Adjust pointer-to-member handling.
2781         (casts_away_constness): Liekwise.
2782         (strip_all_pointer_quals): Remove.
2783         * typeck2.c (digest_init): Adjust pointer-to-member handling.
2784         (build_m_component_ref): Likewise.
2786 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
2788         * lex.c (unqualified_fn_lookup_error): Mention that the error
2789         message needs to be kept in synch with the manual.
2791 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2793         PR c++/11614
2794         * decl.c (grokdeclarator): An array member is only a flexible
2795         array member if the field itself is the array.
2797 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2799         PR c++/10793
2800         * decl.c (xref_basetypes): Handle error_mark_node.
2802 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2804         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2805         * tree.c (lvalue_p_1): Set it.
2806         * class.c (check_field): Don't allow non-packed non-POD fields to
2807         be packed.
2808         * call.c (reference_binding): Need a temporary for all bitfield
2809         and packed fields.
2810         (convert_like_real): Check it is ok to make a temporary here.
2812 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2814         * cp-tree.h (hack_identifier): Remove.
2815         * method.c (hack_identifier): Remove.
2816         * semantics.c (finish_id_expression): Expand hack_identifier
2817         here. Simplify.
2819 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2821         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2822         semantics.c typeck.c: Remove unnecessary casts.
2824 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2826         * cp-tree.h (hack_identifier): Remove.
2827         * method.c (hack_identifier): Remove.
2828         * semantics.c (finish_id_expression): Expand hack_identifier
2829         here. Simplify.
2831 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2833         * cp-tree.h (finish_non_static_data_member): Add object param.
2834         * method.c (hack_identifier): Adjust.
2835         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2836         again for a FIELD_DECL.
2837         * semantics.c (finish_non_static_data_member): Add object
2838         parameter. Always save the DECL in the COMPONENT_REF.
2839         * call.c (resolve_scoped_fn_name): Adjust.
2841 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
2843         * pt.c (get_bindings): Make definition consistent with
2844         forward declaration.
2846 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2848         PR c++/7809
2849         * friend.c (add_friend): Check access for member functions
2850         and templates.
2852 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2854         PR c++/10668
2855         * typeck.c (build_class_member_access_expr): Improve diagnostic.
2857 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
2859         PR c++/11547
2860         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2861         macro.
2862         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2863         * decl.c (duplicate_decls): Merge
2864         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2865         * parser.c (cp_parser_postfix_expression): Adjust call to
2866         cp_parser_initializer_list and
2867         cp_parser_parenthesized_expression_list.
2868         (cp_parser_parenthesized_expression_list): Add non_constant_p.
2869         (cp_parser_new_placement): Adjust call to
2870         cp_parser_parenthesized_expression_list.
2871         (cp_parser_direct_new_declarator): Likewise.
2872         (cp_parser_conditional_expression): Remove.
2873         (cp_parser_constant_expression): Parse an assignment-expression,
2874         not a conditional-expression.
2875         (cp_parser_simple_declaration): Resolve expression/declaration
2876         ambiguity more quickly.
2877         (cp_parser_mem_initializer): Adjust call to
2878         cp_parser_parenthesized_expression_list.
2879         (cp_parser_init_declarator): Keep track of whether or not the
2880         initializer is a constant-expression.
2881         (cp_parser_initializer): Add non_constant_p parameter.
2882         (cp_parser_initializer_clause): Likewise.
2883         (cp_parser_initializer_list): Likewise.
2884         (cp_parser_attribute_list): Adjust call to
2885         cp_parser_parenthesized_expression_list.
2886         (cp_parser_functional_cast): Likewise.
2887         * pt.c (tsubst_decl): Copy
2888         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2889         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2890         * semantics.c (finish_id_expression): Use
2891         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2893 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
2895         * lang-options.h: Remove.
2897 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
2899         PR c/10962
2900         * class.c (field_decl_cmp): Remove.
2901         (resort_field_decl_cmp): Remove.
2902         (resort_sorted_fields): Remove.
2903         (add_fields_to_vec): Rename to ...
2904         (add_fields_to_record_type): this.
2905         (finish_struct_1): Change to be using
2906         sorted_fields_type's fields.
2907         * cp-tree.h (lang_decl): In lang_decl_u3
2908         change sorted_fields to be a pointer to
2909         sorted_fields_type.
2910         (resort_sorted_fields): Remove prototype.
2911         * search.c (lookup_field_1): Change to be using
2912         sorted_fields_type's fields.
2914 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2916         PR c++/5421
2917         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2918         is a member of other class.
2919         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2920         is a specialization of function template.
2922 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2924         PR c++/10903
2925         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2926         Improve.
2928 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
2930         * cp-tree.def (LOOKUP_EXPR): Remove.
2931         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2932         (LOOKUP_EXPR_GLOBAL): Remove.
2933         (get_bindings): Remove.
2934         (is_aggr_type_2): Remove.
2935         * call.c (resolved_scoped_fn_name): Remove support for
2936         LOOKUP_EXPR.
2937         * decl.c (grokfndecl): Likewise.
2938         (grokdeclarator): Likewise.
2939         * error.c (dump_decl): Likewise.
2940         (dump_expr): Likewise.
2941         * friend.c (do_friend): Likewise.
2942         * init.c (build_offset_ref): Likewise.
2943         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
2944         LOOKUP_EXPRs
2945         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2946         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2947         test.
2948         * pt.c (get_bindings): Give it internal linkage.
2949         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2950         (lookup_template_function): Likewise.
2951         (for_each_tempalte_parm_r): Likewise.
2952         (tsubst_decl): Likewise.
2953         (tsubst_qualified_id): Handle template template parameters.
2954         (tsubst_copy): Remove support for LOOKUP_EXPR.
2955         (tsubst_copy_and_build): Likewise.
2956         (most_general_template): Likewise.
2957         (value_dependent_expression_p): Likewise.
2958         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2959         always dependent.
2960         * semantics.c (perform_koenig_lookup): Do not create
2961         IDENTIFIER_NODEs.
2962         (finish_fname): Likewise.
2963         (finish_id_expression): Likewise.
2964         * tree.c (is_aggr_type_2): Remove.
2966 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2968         PR c++/11531
2969         * typeck.c (check_return_expr): Fix thinko in diagnostic.
2971 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2973         PR c++/10108
2974         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2975         error_mark_node.
2977 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
2979         PR c++/11509
2980         * pt.c (dependent_scope_ref_p): New function.
2981         (value_dependent_expression_p): Use it.
2982         (type_dependent_expression_p): Likewise.
2984         * pt.c (tsubst_friend_function): Use reregister_specialization.
2986         PR c++/7019
2987         * cp-tree.h (lookup_qualified_name): Adjust prototype.
2988         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
2989         call to is_aggr_type.
2990         * parser.c (cp_parser_lookup_name): Adjust call to
2991         lookup_qualified_name.
2992         * pt.c (tsubst_qualified_id): Likewise.
2993         (tsubst_copy_and_build): Likewise.
2994         * semantics.c (finish_qualified_id_expr): Deal with erroneous
2995         expressions.
2997 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2999         PR c++/11510
3000         * call.c (op_error): Properly format  REALPART_EXPR and
3001         IMAGPART_EXPR.
3002         * error.c (dump_expr): Likewise.
3004 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
3006         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
3008 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3010         PR c++/5293
3011         * call.c (initialize_reference): Improve diagnostic.
3013 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3015         PR c++/11154
3016         * pt.c (more_specialized_class): Add full_args parameter.
3017         (most_specialized_class): Adjust calls to more_specialized_class.
3018         * cp-tree.h (more_specialized_class): Adjust declaration.
3020 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
3022         * lex.c (enum tree_node_kind): Delete.
3024 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
3026         PR c++/11503
3027         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
3028         (SET_DECL_SELF_REFERENCE_P): Likewise.
3029         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
3030         * pt.c (tsubst_decl): Copy it.
3031         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
3033         * pt.c (reregister_specialization): Fix thinko in previous change.
3035         * cp-tree.h (cp_id_kind): New type.
3036         (unqualified_name_lookup_error): Change prototype.
3037         (unqualified_fn_lookup_error): New function.
3038         (do_identifier): Remove.
3039         (do_scoped_id): Likewise.
3040         (tsubst_copy_and_build): Change prototype.
3041         (reregister_specialization): New function.
3042         (perform_koenig_lookup): Likewise.
3043         (finish_id_expression): Likewise.
3044         * call.c (build_method_call): Adjust call to
3045         unqualified_name_lookup_error.
3046         * decl.c (duplicate_decls): Use reregister_specialization.
3047         * lex.c (is_global): Remove.
3048         (unqualified_name_lookup_error): Return a value.
3049         (do_identifier): Remove.
3050         (do_scoped_id): Likewise.
3051         (identifier_typedecl_value): Remove.
3052         (unqualified_fn_lookup_error): New function.
3053         * parser.c (cp_parser_id_kind): Remove.
3054         (cp_parser_non_constant_id_expression): Remove.
3055         (cp_parser_primary_expression): Use finish_id_expression.
3056         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
3057         cp_parser_id_kind.
3058         (cp_parser_postfix_expression): Use perform_koenig_lookup.
3059         (cp_parser_template_argument): Use cp_id_kind.
3060         (cp_parser_fold_non_dependent_expr): Adjust call to
3061         tsubst_copy_and_build.
3062         * pt.c (unregister_specialization): Rename to ...
3063         (reregister_specialization): This.
3064         (tsubst_friend_function): Use it.
3065         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
3066         (tsubst_qualified_id): Likewise.
3067         (tsubst_expr): Likewise.
3068         (tsubst_copy_and_build): Add function_p parameter.  Use
3069         finish_id_expression.  Introduce RECUR macro.
3070         (tsubst_non_call_postfix_expression): New function.
3071         (regenerate_decl_from_template): Use reregister_specialization.
3072         * semantics.c (perform_koenig_lookup): New function.
3073         (finish_id_expression): Likewise.
3075 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3077         * pt.c (push_access_scope_real): Remove.
3078         (push_access_scope): Move code from push_access_scope_real.
3079         (pop_access_scope): Don't check for TEMPLATE_DECL.
3080         (instantiate_template): Defer access checking during template
3081         substitution.
3082         (regenerate_decl_from_template): Tidy.
3084 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
3086         PR c++/11437
3087         * operators.def: Add definitions for __imag__, __real__.
3089 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
3091         PR c++/11050
3092         * parser.c (cp_parser_expression_list): Rename to ...
3093         (cp_parser_parenthesized_expression_list): ... here. Add attribute
3094         parameter, parse the surounding parentheses.
3095         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
3096         parameters. Return int.
3097         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
3098         (cp_parser_postfix_expression): Adjust function call parsing.
3099         (cp_parser_new_placement): Adjust.
3100         (cp_parser_new_initializer): Likewise.
3101         (cp_parser_cast_expression): Likewise.
3102         (cp_parser_selection_statement): Likewise.
3103         (cp_parser_mem_initializer): Likewise.
3104         (cp_parser_asm_definition): Likewise.
3105         (cp_parser_init_declarator): Likewise.
3106         (cp_parser_declarator): Make
3107         cdtor_or_conv_p an int ptr.
3108         (cp_parser_direct_declarator): Likewise. Check for a parameter
3109         list on cdtors & conv functions.
3110         (cp_parser_initializer): Adjust.
3111         (cp_parser_member_declaration): Adjust.
3112         (cp_parser_attribute_list): Move code into
3113         cp_parser_parens_expression_list.
3114         (cp_parser_functional_cast): Adjust.
3115         * pt.c (type_dependent_expression_p): Erroneous expressions are
3116         non-dependent.
3118 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
3120         * decl.c (cp_finish_decl): Handle 'used' attribute.
3122         * cp-lang.c (c_reset_state): New dummy routine.
3123         * cp-tree.h (finish_file): Move prototype to c-common.h.
3124         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
3126 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
3128         PR c++/8327
3129         * pt.c (tsubst_qualified_id): Implement suggested resolution for
3130         Core Issue 2.
3131         (type_dependent_expression_p): Likewise.
3133 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
3135         * typeck.c (build_binary_op): Do not warn about signed
3136         vs. unsigned comparisons in the bodies of templates.
3138         PR c++/9411
3139         * parser.c (cp_parser_postfix_expression): Check dependency of
3140         functions.
3142 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
3144         PR c++/10032
3145         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
3146         still errors.
3148         PR c++/10527
3149         * error.c (decl_to_string): Do not print default argument
3150         expressions.
3152         * cp-tree.h (break_out_calls): Remove declaration.
3153         * tree.c (break_out_calls): Remove.
3154         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
3156 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
3158         PR c++ 9483
3159         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
3160         * decl2.c (constructor_name_p): Avoid repeated constructor_name
3161         calls.
3162         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
3164 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
3166         * typeck.c (build_x_unary_op): Take note of the fact that
3167         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
3168         trees.
3170         * parser.c (cp_parser_primary_expression): Preserve the form of
3171         qualified expressions in templates, even if they are not
3172         dependent.
3173         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
3174         (tsubst_qualified_id): Likewise.
3175         * search.c (accessible_p): Treat everything in the body of a
3176         template as accessible.
3178 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
3180         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
3181         * cp-tree.h (build_call_from_tree): Remove.
3182         (build_member_call): Likewise.
3183         (dependent_template_arg_p): Remove.
3184         (any_dependent_template_arguments_p): New function.
3185         (dependent_template_id_p): Likewise.
3186         (any_type_dependent_arguments_p): Likewise.
3187         (build_non_dependent_expr): Likewise.
3188         (build_non_dependent_args): Likewise.
3189         (build_x_compound_expr): Adjust prototype.
3190         * call.c (build_new_method_call): Handle non-dependent expressions
3191         correctly.
3192         * decl2.c (grok_array_decl): Likewise.
3193         (build_offset_ref_call_from_tree): Likewise.
3194         (build_call_from_tree): Remove.
3195         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
3196         (dump_expr): Likewise.
3197         * init.c (build_member_call): Remove.
3198         * mangle.c (write_expression): Update handling for template-ids.
3199         * parser.c (cp_parser_primary_expression): Use
3200         any_dependent_template_arguments_p.  Update constant-expression
3201         handling.
3202         (cp_parser_postfix_expression): Use
3203         any_type_dependent_arguments_p.  Simplify call processing.
3204         (cp_parser_unary_expression): Simplify.
3205         (cp_parser_expression): Adjust for changes to
3206         build_x_compound_expr.
3207         (cp_parser_template_argument): Implement standard-conforming
3208         parsing of non-type template arguments.
3209         (cp_parser_direct_declarator): Use
3210         cp_parser_fold_non_dependent_expr.
3211         (cp_parser_fold_non_dependent_expr): New function.
3212         (cp_parser_next_token_ends_template_argument_p): Likewise.
3213         * pt.c (convert_template_argument): Do not call
3214         maybe_fold_nontype_arg.
3215         (tsubst_baselink): Likewise.
3216         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
3217         processing work correctly for non-dependent expressions.  Adjust
3218         handling of COMPOUND_EXPR.  Simplify call processing.
3219         (value_dependent_expression_p): Deal with functional casts and
3220         sizeof/alignof correctly.
3221         (type_dependent_expression_p): Handle overloaded functions.
3222         (any_type_dependent_arguments_p): New function.
3223         (any_dependent_template_arguments_p): Likewise.
3224         (dependent_template_p): Treat SCOPE_REFs as dependent.
3225         (dependent_template_id_p): Simplify.
3226         (build_non_dependent_expr): New function.
3227         (build_non_dependent_args): Likewise.
3228         * semantics.c (finish_stmt_expr): Don't make dependent
3229         statement-expresions have void type.
3230         (finish_call_expr): Handle non-dependent expressions
3231         correctly.
3232         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
3233         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
3234         type size_t, even in templates.
3235         (expr_sizeof): Likewise.
3236         (finish_class_member_access_expr): Handle non-dependent expressions
3237         correctly.
3238         (build_x_indirect_ref): Likewise.
3239         (build_x_binary_op): Likewise.
3240         (build_x_unary_op): Likewise.
3241         (build_x_conditional_expr): Likewise.
3242         (build_x_compound_expr): Likewise.
3243         * typeck2.c (build_x_arrow): Likewise.
3245 2003-07-09  Jan Hubicka  <jh@suse.cz>
3247         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
3248         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
3249         (start_function): Use DECL_ESTIMATED_INSNS.
3250         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
3252         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
3253         unit-at-a-time
3255 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3257         PR c++/11030
3258         * pt.c (instantiate_class_template): Don't call xref_tag to
3259         inject name when the friend class is a specialization.
3261 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
3263         * cp-tree.h (build_scoped_method_call): Remove.
3264         (lookup_qualified_name): Remove parameter.
3265         (tsubst_copy_and_build): Declare.
3266         (finish_qualified_object_call_expr): Remove.
3267         (check_accessibility_of_qualified_id): New function.
3268         (finish_qualified_id_expr): Likewise.
3269         (non_reference): Likewise.
3270         (build_expr_from-tree): Remove.
3271         * call.c (non_reference): Remove.
3272         (build_scoped_method_call): Likewise.
3273         (build_method_call): Use error_operand_p.  Assert that we are not
3274         processing a template.
3275         (standard_conversion): Use non_reference.
3276         * class.c (build_vtbl_entry_ref): Likewise.
3277         (build_vtbl_ref_1): Likewise.
3278         * cvt.c (build_expr_type_conversion): Use non_reference.
3279         * decl.c (lookup_qualified_name): Remove flags parameter.
3280         (grok_op_properties): Use non_reference.
3281         * decl2.c (grok_array_decl): Likewise.
3282         (build_expr_from_tree): Remove.
3283         (build_offset_ref_call_from_tree): Update comment.
3284         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
3285         * except.c (prepare_eh_types): Use non_reference.
3286         (can_convert_eh): Likewise.
3287         * init.c (build_dtor_call): Avoid using build_method_call.
3288         * mangle.c (write_template_param): Remove misleading comment.
3289         * method.c (locate_copy): Use non_reference.
3290         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
3291         (cp_parser_primary_expression): Do not create SCOPE_REFs is
3292         non-dependent contexts.
3293         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
3294         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
3295         build_expr_from_tree.
3296         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
3297         Use check_accessibility_of_qualified_id.
3298         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
3299         build_expr_from_tree.
3300         (tsubst_baselink): New function.
3301         (tsubst_qualified_id): Likewise.
3302         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
3303         (tsubst_expr): Adjust call to lookup_qualified_name.
3304         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
3305         handling of CALL_EXPRs.
3306         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
3307         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
3308         * search.c (check_final_overrider): Likewise.
3309         * semantics.c (check_accessibility_of_qualified_id): New function.
3310         (finish_qualified_object_call_expr): Remove.
3311         * typeck.c (target_type): Use non_reference.
3312         (cxx_sizeof_or_alignof_type): Likewise.
3313         (dubious_conversion_warnings): Likewise.
3314         (convert_for_initialization): Likewise.
3315         (non_reference): New function.
3317 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3319         * decl.c (print_binding_level, print_other_binding_stack,
3320         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
3321         stdio calls.
3322         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
3324 2003-07-07  Andreas Jaeger  <aj@suse.de>
3326         * friend.c: Convert to ISO C90 prototypes.
3328         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
3329         language.
3330         * cfns.h: Regenerate.
3332         * typeck.c: Convert remaining prototypes to ISO C90.
3333         * search.c: Likewise.
3335         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
3336         * semantics.c (expand_or_defer_fn): Likewise
3337         * mangle.c (discriminator_for_string_literal): Likewise.
3338         * g++spec.c (lang_specific_driver): Likewise.
3340         * search.c (lookup_base_r): Remove unused variable.
3342 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3344         * semantics.c: (genrtl_try_block) Adjust emit_line_note
3345         calls.
3347 2003-07-07  Andreas Jaeger  <aj@suse.de>
3349         * search.c (lookup_base_r): Remove unused variable.
3351 2003-07-06  Michael Chastain  <mec@shout.net>
3353         PR debug/10055
3354         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
3355         assigning to input_filename directly.
3357 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
3359         * call.c: Fix comment formatting.
3360         * class.c: Likewise.
3361         * cp-tree.h: Likewise.
3362         * decl.c: Likewise.
3363         * decl2.c: Likewise.
3364         * error.c: Likewise.
3365         * method.c: Likewise.
3366         * name-lookup.c: Likewise.
3367         * parser.c: Likewise.
3368         * pt.c: Likewise.
3369         * rtti.c: Likewise.
3370         * search.c: Likewise.
3371         * typeck.c: Likewise.
3373 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
3375         PR c++/11345
3376         * search.c (lookup_base_r): Remove is_non_public and
3377         within_current_scope parameters.  Remove other dead code.
3378         (lookup_base): Adjust call to lookup_base_r.
3379         (adjust_result_of_qualified_name_lookup): Improve comment.
3380         * semantics.c (finish_call_expr): Use maybe_dummy_object.
3382 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
3384         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
3385         LANG_HOOKS_MISSING_ARGUMENT): Override.
3387 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
3389         PR c++/11431
3390         * typeck.c (build_static_cast): Check for reference conversions
3391         earlier.
3393 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
3395         * cp-tree.h (perform_integral_promotions): Declare.
3396         * call.c (build_addr_func): Use decay_conversion.
3397         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
3398         (convert_for_arg_passing): Use perform_integral_promotions.
3399         * cvt.c (build_expr_type_conversion): Use decay_conversion.
3400         (type_promotes_to): Do not return a cv-qualified type.
3401         * decl.c (grok_reference_init): Fix formatting.
3402         (get_atexit_node): Use decay_conversion.
3403         (build_enumerator): Use perform_integral_promotions.
3404         * init.c (build_vec_init): Use decay_conversion.
3405         * semantics.c (finish_expr_stmt): Likewise.
3406         (finish_switch_cond): Use perform_integral_promotions.
3407         * typeck.c (default_conversion): Likewise.
3408         (perform_integral_promotions): New function.
3409         (build_indirect_ref): Use decay_conversion.
3410         (build_array_ref): Use perform_integral_promotions.
3411         (convert_arguments): Use decay_conversion.
3412         (build_unary_op): Use perform_integral_promotions.
3413         (build_c_cast): Use decay_conversion.
3414         (build_modify_expr): Likewise.
3415         (convert_for_initialization): Likewise.
3416         * typeck2.c (build_x_arrow): Likewise.
3418 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
3420         * call.c: Fix comment typos.
3421         * class.c: Likewise.
3422         * cp-tree.h: Likewise.
3423         * cvt.c: Likewise.
3424         * decl2.c: Likewise.
3425         * decl.c: Likewise.
3426         * init.c: Likewise.
3427         * mangle.c: Likewise.
3428         * parser.c: Likewise.
3429         * pt.c: Likewise.
3430         * search.c: Likewise.
3431         * semantics.c: Likewise.
3432         * tree.c: Likewise.
3433         * typeck.c: Likewise.
3435 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
3437         * parser.c (cp_lexer_read_token): No need to handle string
3438         constant concatenation.
3440 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3442         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
3443         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
3444         ATTRIBUTE_GCC_CXXDIAG.
3446 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
3448         * call.c (build_addr_func): Handle bound pointers-to-members.
3449         (build_method_call): Do not call resolve_offset_ref.
3450         (implicit_conversion): Likewise.
3451         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
3452         resolve_offset_ref.
3453         (resolve_args): Do not call resolve_offset_ref.
3454         (build_conditional_expr): Likewise.
3455         (build_new_method_call): Likewise.
3456         * cp-tree.def (OFFSET_REF): Update documentation.
3457         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
3458         pointers to members to pointers.
3459         (ocp_convert): Do not call resolve_offset_ref.
3460         (convert_to_void): Likewise.
3461         (build_expr_type_conversion): Likewise.
3462         * decl2.c (delete_sanity): Likewise.
3463         * init.c (resolve_offset_ref): Simplify greatly.
3464         (build_vec_delete): Do not call resolve_offset_ref.
3465         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
3466         if appropriate.
3467         (cp_parser_unary_expression): Use
3468         cp_parser_simple_cast_expression.
3469         (cp_parser_delete_expression): Likewise.
3470         (cp_parser_cast_expression): Likewise.
3471         (cp_parser_pm_expression): Use cp_parser_binary_op.
3472         (cp_parser_simple_cast_expression): New function.
3473         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3474         * semantics.c (finish_increment_expr): Likewise.
3475         (finish_typeof): Likewise.
3476         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3477         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3478         (decay_conversion): Do not call resolve_offset_ref.
3479         (finish_class_member_access_expr): Likewise.
3480         (convert_arguments): Likewise.
3481         (build_x_binary_op): Handle DOTSTAR_EXPR.
3482         (condition_conversion): Do not call resolve_offset_ref.
3483         (unary_complex_lvalue): Likewise.
3484         (build_static_cast): Likewise.
3485         (build_reinterpret_cast): Likewise.
3486         (build_const_cast): Likewise.
3487         (build_c_cast): Likewise.
3488         (build_modify_expr): Likewise.
3489         (convert_for_assignment): Likewise.
3490         (convert_for_initialization): Likewise.
3491         * typeck2.c (build_x_arrow): Likewise.
3492         (build_m_component_ref): Simplify.
3494         * call.c (build_scoped_method_call): Use convert_to_void.
3495         (build_method_call): Likewise.
3496         * class.c (check_field_decls): Remove dead code.
3497         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3498         * decl2.c (grok_array_decl): Remove dead code.
3499         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3500         as pointer-to-member representation.
3501         * init.c (build_offset_ref): Tidy.
3502         (build_vec_delete_1): Use convert_to_void.
3503         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3504         as pointer-to-member representation.
3506 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3508         PR c++/9162
3509         * decl.c (grokdeclarator): Return friend decls, not
3510         void_type_node.
3511         * decl2.c (grokfield): Alter friend decl check.
3512         * parser.c (struct cp_parser): Document default_arg chain on
3513         unparsed_functions_queue.
3514         (cp_parser_save_default_args): New.
3515         (cp_parser_init_declarator, cp_parser_function_definition,
3516         cp_parser_member_declaration): Call it.
3517         (cp_parser_class_specifier): Remove unused variable. Alter
3518         processing of unparsed_functions_queue.
3520 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3522         * class.c (add_method, check_field_decl): Fix format specifier.
3523         * decl.c (duplicate_decls, pushdecl, check_goto,
3524         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3525         start_enum): Likewise.
3526         * decl2.c (ambiguous_decl): Likewise.
3527         * pt.c (redeclare_class_template): Likewise.
3529 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3531         PR c++/10219
3532         * pt.c (type_unification_real): Don't unify exprs of error type.
3533         * tree.c (error_type): Don't die on error_type.
3535         PR c++/9779
3536         * decl2.c (arg_assoc_class): Don't die on NULL type.
3537         * typeck.c (type_unknown_p): Don't die on untyped expressions.
3539 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3541         PR c++/6949
3542         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3543         classes.
3545 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3547         * error.c (locate_error): %P takes an `int', not a `tree'.
3549 2003-07-02  Jan Hubicka  <jh@suse.cz>
3551         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3552         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3553         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3554         massaging.
3556         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3557         (expand_or_defer_fn): Declare.
3558         (lower_function): Declare.
3559         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3560         * decl2.c: Include cgraph.h and varpool.h
3561         (maybe_emit_vtables):  Make explicit instantations as needed.
3562         (mark_member_pointers, lower_function): New functions.
3563         (finish_file): Do unit-at-a-time.
3564         * method.c (synthesize_method): Use expand_or_defer_fn.
3565         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3566         * parser.c (cp_parser_function_definition_after_decl): Use
3567         expand_or_defer_fn.
3568         * pt.c (instantiate_decl): Likewise.
3569         * semantics.c: Include cgraph.h
3570         (expand_or_defer_fn): Break out from ...
3571         (expand_body): ... here; deal with unit-at-a-time.
3572         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3573         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3575 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3577         * call.c (resolve_scoped_fn_name): Return error_mark_node for
3578         erroneous cases.
3580 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3582         PR c++/11149
3583         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3584         is a class type.
3586 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
3588         PR c++/8046
3589         * error.c (dump_decl): Handle BIT_NOT_EXPR as
3590         pseudo destructor calls.
3592 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
3594         * cp-tree.h (define_label): Replace filename and lineno
3595         arguments with a location_t.
3596         * decl.c (pop_label): Adjust define_label call.
3597         (define_label): Replace filename and lineno arguments with a
3598         location_t.
3599         * semantics.c (finish_label): Adjust define_label call.
3601 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3603         PR c++/9559
3604         * decl2.c (grokfield): Do not build NOP_EXPRs around the
3605         error_mark_node.
3607 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
3609         * Make-lang.in: Update.
3610         * cp-lang.c (c_language): Define.
3611         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3612         * cp-tree.h (cxx_init_options): Remove.
3613         * lex.c: Don't include diagnostic.h.
3614         (cxx_init_options): Remove.
3616 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3618         PR c++/4933
3619         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3620         tree generated within a template. Use dump_expr to dump an
3621         expression sizeof.
3623 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3625         * mangle.c (write_expression): Exit gracefully when trying to
3626         mangle a CALL_EXPR.
3628 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3630         PR c++/10750
3631         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3632         (value- or type-) dependent expression as DECL_INITIAL is a
3633         valid constant-expression (at parser time).
3635 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3637         PR c++/11106
3638         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3639         USING_DECL, instead of print_tree_identifier.
3641 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3643         * cp-tree.h (language_to_string): Adjust declaration.
3644         * dump.c (cp_dump_tree): Adjust usage.
3645         * error.c (dump_char): Use output_formatted_scalar. Tidy.
3646         (parm_to_string): Lose unused parameter.  Tidy.
3647         (expr_to_string): Likewise.
3648         (code_to_string): Likewise.
3649         (language_to_string): Likewise.
3650         (op_to_string): Likewise.
3651         (assop_to_string): Likewise.
3652         (digit_buffer): Remove.
3653         (dump_type): Format builtin vector type as __vector__.
3655 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3657         * error.c (print_integer): Remove.
3658         (dump_type_suffix): Adjust.
3659         (dump_expr): Likewise.
3661 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3663         * error.c (print_instantiation_partial_context): Take a
3664         location_t.
3665         (print_instantiation_full_context): Adjust.
3666         (print_instantiation_context): Adjust.
3668         * cp-tree.h (cp_line_of, cp_file_of): Remove.
3669         * error.c (cp_line_of, cp_file_of): Merge into ...
3670         (location_of): ... here. Make static, return a location_t.
3671         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3673 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3675         PR c++/10784
3676         * call.c (joust): Move warn_conversion check outwards.
3678 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
3680         * decl.c (build_typename_type)
3681         * mangle.c (write_template_template_arg)
3682         * parser.c (cp_parser_scope_through_which_access_occurs)
3683         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3684         * repo.c (get_base_filename)
3685         * semantics.c (maybe_convert_cond):
3686         Mark the definition static, matching the forward declaration.
3688 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3690         PR c++/10468
3691         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3693 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3695         PR c++/10796
3696         * decl.c (finish_enum): Implement DR377.
3698         * decl.c (cp_finish_decl): Don't make variables with reference
3699         type readonly while they are being initialized.
3701 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
3703         PR c++/11332
3704         * typeck.c (build_static_cast): Avoid returning expressions with
3705         reference type.
3707 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3709         * call.c (build_op_delete_call): Use strip_array_call. Correct
3710         error message to say 'delete' or 'delete[]'.
3712 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
3714         PR c++/8266
3715         * pt.c (check_explicit_specialization): When looking up a
3716         template function from an identifier outside class-scope, bind
3717         it to CP_DECL_CONTEXT.
3719 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
3721         PR c++/10990
3722         * search.c (lookup_base_r): Rely on accessible_p, rather than
3723         trying to emulate that logic here.
3725         PR c++/10931
3726         * call.c (convert_like): Pass issue_conversion_warnings.
3727         (convert_like_with_context): Likewise.
3728         (convert_like_real): Add issue_conversion_warnings parameter.
3729         (perform_direct_initialization_if_possible): New function.
3730         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3731         * typeck.c (check_for_casting_away_constness): New function.
3732         (build_static_cast): Rewrite.
3734 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
3736         * call.c (enforce_access): Assert we get a binfo.
3737         (build_op_delete_call): Pass a binfo to
3738         perform_or_defer_access_check.
3739         * class.c (alter_access): Likewise.
3740         * decl.c (make_typename_type): Likewise.
3741         (make_unbound_class_template): Likewise.
3742         * lex.c (do_identifier): Likewise.
3743         * method.c (hack_identifier): Likewise.
3744         * parser.c (cp_parser_lookup_name): Likewise.
3745         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3746         test.
3747         * semantics.c (finish_non_static_data_member): Likewise.
3748         (perform_or_defer_access_check): Expect a binfo.
3749         * typeck.c (comptypes): Expect types.
3751         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3752         * friend.c (make_friend_class): Likewise.
3753         * pt.c (check_default_tmpl_args): Likewise.
3754         (lookup_template_class): Likewise.
3756 2003-06-24  Jan Hubicka  <jh@suse.cz>
3758         * method.c (thunk_labelno): Move outside ifdef block to make garbage
3759         collector happy.
3761 2003-06-24  Jan Hubicka  <jh@suse.cz>
3763         * class.c (build_vtable): Make vtables.
3764         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3765         * decl2.c (output_vtable_inherit): Rename to ...
3766         (prepare_assemble_variable): ... this one; change interface.
3767         (maybe_emit_vtables): Do not call output_vtable_inherit.
3768         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3769         * cp-tree.h (prepare_assemble_variable): New.
3771 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
3773         * method.c: add prototype for make_alias_for_thunk.
3774         (thunk_labelno, make_alias_for_thunk): only define
3775         if ASM_OUTPUT_DEF is defined.
3777 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3779         * method.c (thunk_labelno): New variable.
3780         (make_alias_for_thunk): New function.
3781         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
3782         into the same section as the function it is calling.
3783         Include gt-cp-method.h.
3784         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3785         (cp/method.o): Depend on gt-cp-method.h.
3786         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3788 2003-06-23  Jan Hubicka  <jh@suse.cz>
3790         * decl.c (register_dtor_fn): Mark cleanup as used.
3791         * decl2.c (mark_vtable_entries): Skip nops.
3792         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3793         (build_dynamic_cast_1): Likewise.
3794         (tinfo_base_init): Likewise.
3795         (emit_tinfo_decl): Likewise.
3797 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3799         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3800         to it.
3802 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3804         PR c++/10784
3805         * call.c (joust): Warn about choosing conversion sequence only if
3806         -Wconversion.
3808 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3810         PR c++/10864
3811         * call.c (op_error): Tidy.
3812         * error.c (dump_expr): Properly format 'T()' when T is an
3813         aggregate type.
3815 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3817         PR c++/10915
3818         * decl.c (grok_op_properties): Warn possible confusing conversion
3819         only if -Wconversion.
3821 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
3823         PR c++/10749
3824         * parser.c (cp_parser_class_head): See through dependent names
3825         when parsing a class-head.
3827         PR c++/10845
3828         * pt.c (try_class_unification): Correct handling of member class
3829         templates.
3831 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3833         * semantics.c (genrtl_finish_function): Adjust
3834         expand_function_end call.
3836 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
3838         PR c++/10939
3839         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3840         functions.
3841         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3843         PR c++/9649
3844         * cp-tree.h (pushdecl_class_level): Change prototype.
3845         (push_class_level_binding): Likewise.
3846         * decl.c (add_binding): Reject duplicate static data members.
3847         (pushdecl_class_level): Return a value indicating whether or not
3848         the binding was valid.
3849         (push_class_level_binding): Likewise.
3850         * semantics.c (finish_member_declaration): Don't keep invalid
3851         declarations.
3853         PR c++/11041
3854         * call.c (initialize_reference): Do not use cp_finish_decl to emit
3855         temporary variables.
3856         * cp-tree.h (static_aggregates): Declare.
3857         (pushdecl_top_level_and_finish): Likewise.
3858         * decl.c (pushdecl_top_level_1): New function.
3859         (pushdecl_top_level): Use it.
3860         (pushdecl_top_level_and_finish): New function.
3861         (initialize_local_var): Remove redundant code.
3862         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
3863         building_stmt_tree.
3864         * decl.h (static_aggregates): Remove.
3865         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3866         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3867         (tinfo_base_init): Likewise.
3869 2003-06-19  Matt Austern  <austern@apple.com>
3871         PR c++/11228
3872         * init.c (build_zero_init): Assert that number of array elements
3873         is an integer constant.
3874         (build_default_init) Don't use build_zero_init for arrays with
3875         variable number of elements.
3877 2003-06-19  Andreas Jaeger  <aj@suse.de>
3879         * cp-tree.h: Remove duplicated declarations.
3881 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
3883         * pt.c: Convert to ISO C.
3884         * semantics.c: Convert to ISO C.
3886 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3888         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3889         at_least_as_qualified_p, more_qualified_p): Return bool.
3890         * typeck.c: ANSIFY function definitions.
3891         (comp_array_types): Take redeclaration bool parameter.
3892         (comptypes): Rearrange STRICT handling.
3893         (at_least_as_qualified_p, more_qualified_p,
3894         comp_cv_qualification): Cache cv quals.
3895         (compparms): Rearrange loop.
3897 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3899         * cp-tree.h (COMPARE_RELAXED): Rename to ...
3900         (COMPARE_DERIVED): ... here. Adjust comment.
3901         (resolve_typename_type_in_current_instantiation): Remove.
3902         (cp_tree_equal, comptypes): Return a bool.
3903         * cvt.c (convert_to_reference): Adjust comptypes call.
3904         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3905         (resolve_typename_type_in_current_instantiation): Remove.
3906         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3907         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3908         calls. Refactor code.
3909         * typeck.c (comp_array_types): Return bool. Lose callback.
3910         parameter. Adjust cp_tree_equal calls.
3911         (comptypes): Return bool. Adjust strict handling. Remove relaxed
3912         enumeration and java type handling. Deal with typename types here.
3913         Adjust recursive and cp_tree_equals calls. Adjust base and derived
3914         checking.
3915         (comp_target_types): Remove unreachable code. Adjust
3916         same_or_base_type_p calls.
3917         (ptr_reasonably_similar): Adjust base and derived check.
3919         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3920         unused calculation.
3921         (check_return_expr): Adjust error messages.
3922         * cp-tree.def (SCOPE_REF): Correct comment.
3924 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3926         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3927         string again.
3929 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3931         * optimize.c (dump_function): Form complete flag name by
3932         prefixing 'fdump-' to string returned by dump_flag_name().
3934 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3936         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3937         string.
3939 2003-06-17  Jason Merrill  <jason@redhat.com>
3941         PR c++/10929
3942         * decl.c (grokfndecl): Don't mark a function inline for
3943         -finline-functions if it isn't defined.
3945 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3947         PR c++/10712
3948         * class.c (handle_using_decl): Robustify.
3950         PR c++/11105
3951         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3952         * mangle.c (struct globals): Remove internal_mangling_p.
3953         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3954         (write_template_parm): Don't write out the level number.
3955         (conv_type_names): New variable.
3956         (hash_type): New function.
3957         (compare_type): Likewise.
3958         (mangle_conv_op_name_for_type): Don't try to mangle conversion
3959         operator names.
3960         * search.c (lookup_conversion_operator): New function.
3961         (lookup_fnfields_1): Use it.
3963 2003-06-17  Andreas Jaeger  <aj@suse.de>
3965         * except.c: Remove duplicate declaration of push_eh_cleanup.
3967         * call.c: Remove extra declaration of inhibit_warnings.
3969 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3971         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
3972         * mangle.c: Convert to ISO C.
3974 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3976         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3977         macro.
3979 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3981         * tree.c: Convert to ISO C.
3983 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
3985         * cp-tree.h: Follow spelling conventions.
3986         * mangle.c: Likewise.
3987         * method.c: Likewise.
3988         * parser.c: Likewise.
3990 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3992         * decl.c (start_function): Adjust init_function_start call.
3993         * method.c (use_thunk): Likewise.
3994         * semantics.c (genrtl_start_function): Likewise.
3996 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3998         * Make-lang.in: Remove c-options.o.
4000 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
4002         * lex.c: Convert to ISO C.
4004         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
4005         * init.c: removes use of PARAMS macro.  Use ISO style function
4006         declarations.  (Not copyright-significant change.)
4008         * rtti.c: Remove PARAMS.
4010         * typeck2.c: Convert to ISO C.
4012 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
4014         PR c++/10635
4015         * typeck.c (build_c_cast): Check that the destination type is
4016         complete.
4018 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
4020         PR c++/10432
4021         * cp-tree.h (finish_declarator): Remove.
4022         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
4023         erroneous declarations.
4024         * semantics.c (finish_declarator): Remove.
4026 2003-06-11  Roger Sayle  <roger@eyesopen.com>
4028         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
4029         global static constructor/destructor if it will be empty, i.e.
4030         either doesn't call any ctors/dtors or only calls pure or const
4031         ctors/dtors.
4033 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
4035         * mangle.c (tm_p.h): Include it.
4036         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
4038         PR c++/11131
4039         * tree.c (cp_cannot_inline_fn): Check for "inline" before
4040         instantiation.
4042 2003-06-10  Jason Merrill  <jason@redhat.com>
4044         PR c++/10968
4045         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
4047 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
4049         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
4050         (start_cleanup_cnt): New.
4052 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
4054         PR c++/11131
4055         * cp-tree.h (template_for_substitution): Declare.
4056         * decl2.c (mark_used): Use it when figuring out whether or not a
4057         function is inline.
4058         * pt.c (template_for_substitution): Give it external linkage.
4059         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
4060         possible.
4062 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
4064         PR 8861
4065         * mangle.c (write_real_cst): New function.  Implement
4066         ABI-compliant mangling of floating-point literals when
4067         -fabi-version>=2; provide backward compatibility with 3.3 when
4068         -fabi-version=1 (with warning).  Clarify commentary.
4069         (write_template_arg_literal): Use write_real_cst.
4071 2003-06-07  Andreas Jaeger  <aj@suse.de>
4073         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
4075 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
4077         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
4078         (LANG_HOOKS_HANDLE_OPTION): Override.
4079         * cp-tree.h (cxx_init_options): Update.
4080         * lex.c (cxx_init_options): Update.
4082 2003-06-05  Jan Hubicka  <jh@suse.cz>
4084         * Make-lang.in:  Add support for stageprofile and stagefeedback
4086 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
4088         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
4090 2003-06-04  Andreas Jaeger  <aj@suse.de>
4092         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
4094 2003-06-03  Jason Merrill  <jason@redhat.com>
4096         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
4098         * cp/decl.c (reshape_init): Handle vectors.
4100         * testsuite/g++.dg/init/array10.C: New.
4102 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4104         PR c++/10940
4105         * pt.c (check_explicit_specialization): Check for 'static'
4106         earlier.
4108 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
4110         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
4111         the operand of a CONSTRUCTOR node.
4113 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
4115         * decl.c (cp_binding_level::this_entity): Rename from this_class.
4116         (cxx_scope_descriptor): New function.
4117         (cxx_scope_debug): Likewise.
4118         (push_binding_level): Use it.
4119         (pop_binding_level): Likewise.
4120         (suspend_binding_level): Likewise.
4121         (resume_binding_level): Likewise.
4122         (pushlevel_class): Adjust use of this_class.
4123         (pushtag): Likewise.
4124         (lookup_name_real): Likewise.
4125         (global_scope_name): New variable.
4126         (initialize_predefined_identifiers): Initialize it.
4127         (push_namespace): Use it.
4128         (make_cxx_scope): New function.
4129         (pushlevel): Use it.
4130         (pushlevel_class): Likewise.
4131         (push_binding_level): Simplify.  Loose the last two arguments.
4132         (make_binding_level): Remove.
4133         (initial_push__namespace_scope): New function.
4134         (push_namespace): Use it.  Simplify.
4135         (cxx_init_decl_processing): Likewise.
4136         (declare_namespace_level): Remove.
4138 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4140         PR c++/10956
4141         * pt.c (instantiate_decl): Don't use full template arguments if
4142         we are dealing with specializations.
4144 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4146         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
4147         (binding_depth): Unconditionally define.
4148         (is_class_level): Likewise.
4149         (indent): Likewise.  Take an indenting parameter.
4150         (push_binding_level): Remove conditional definittion.
4151         (pop_binding_level): Likewise.
4152         (suspend_binding_level): Likewise.
4153         (resume_binding_level): Likewise.
4154         (pushlevel): Likewise.
4155         (pushlevel_class): Likewise.
4156         (poplevel_class): Likewise.
4157         (pop_everything): Likewise.
4159 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
4161         * name-lookup.h (global_scope_p): New macro.
4162         * decl.c (pop_binding_level): Use it.  Don't refer directly to
4163         global_binding_level.
4164         (suspend_binding_level): Likewise.
4165         (global_bindings_p): Likewise.
4166         (print_other_binding_stack): Likewise.
4167         (print_binding_stack): Likewise.
4168         (maybe_push_to_top_level): Likewise.
4169         (pushdecl_namespace_level): Likewise.
4170         (cxx_init_decl_processing): Likewise.
4171         (start_decl): Likewise.
4172         (cp_finish_decl): Likewise.
4173         (start_function): Likewise.
4174         (global_binding_level): Remove.
4176 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4178         * parser.c (cp_parser_explicit_instantiation): Restore old
4179         access before template instantiation.
4181 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
4183         * lang-specs.h: Use -o to specify preprocessor's output file.
4184         Make -no-integrated-cpp work when building PCH files.
4186 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4188         PR c++/10682
4189         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
4190         check for implicitly created typedef to an enum.
4192 2003-05-21  Jason Merrill  <jason@redhat.com>
4194         * init.c (build_vec_delete): Copy the address into a temporary
4195         variable before calling build_vec_delete_1.
4196         * decl2.c (delete_sanity): Don't call stabilize_reference.
4198 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
4200         * pt.c (register_specialization): Update the decl's location,
4201         if necessary.
4202         (check_explicit_specialization): Likewise.
4204 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4206         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
4208 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
4210         PR c++/9738
4211         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
4212         if the old decl had instantiated DECL_RTL.
4213         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
4215 2003-05-19  Matt Austern  <austern@apple.com>
4217         * lang-options.h: Document -Wno-invalid-offsetof
4218         * typeck.c (build_class_member_access_expr): Don't complain about
4219         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
4221 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
4223         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
4224         (binding_entry_make): Make entry->chain NULL after getting an entry.
4225         fix the spelling of chain in a comment.
4226         (binding_table_free): speed up by having temporary variable.
4227         (binding_table_new): set table->chain to be NULL after allocating
4228         a table.
4229         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
4230         binding->previous to NULL after getting an binding for speed.
4232 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4234         * cp-tree.h (struct lang_type_class): Replace data member tags
4235         with hash-table nested_udts.
4236         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
4237         * class.c (unreverse_member_declarations): Don't touch
4238         CLASSTYPE_TAGS.
4239         (pushclass): Use cxx_remember_type_decls.
4240         * decl.c (struct cp_binding_level): Replace data member tags with
4241         hash-table type_decls.
4242         (pop_binding_level): Handle level->type_decls.
4243         (kept_level_p): Adjust.
4244         (poplevel): Remove unused local variable.
4245         (bt_print_entry): New function.
4246         (print_binding_level): Use it.
4247         (push_namespace): Build current_binding_level->type_decls.
4248         (maybe_process_template_type_declaration): Adjust.
4249         (pushtag): Likewise.
4250         (clear_anon_tags): Use binding_table_remove_anonymous_types.
4251         (gettags): Remove.
4252         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
4253         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
4254         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
4255         (cxx_init_decl_processing): Build global_binding_level->type_decls.
4256         (store_parm_decls): Remove pointless code.
4257         * name-lookup.c (free_binding_entry): New variable.
4258         (ENTRY_INDEX): New macro.
4259         (struct binding_table_s): New datatype.
4260         (binding_entry_make): New function.
4261         (binding_entry_free): Likewise.
4262         (binding_table_construct): Likewise.
4263         (binding_table_free): Likewise.
4264         (binding_table_new): Likewise.
4265         (binding_table_expand): Likewise.
4266         (binding_table_insert): Likewise.
4267         (binding_table_find): Likewise.
4268         (binding_table_find_anon_type): Likewise.
4269         (binding_table_reverse_maybe_remap): Likewise.
4270         (binding_table_remove_anonymous_types): Likewise.
4271         (binding_table_foreach): Likewise.
4272         * name-lookup.h (binding_table): New type.
4273         (binding_entry): Likewise.
4274         (bt_foreach_proc): Likewise.
4275         (struct binding_entry_s): New datatype.
4276         (SCOPE_DEFAULT_HT_SIZE): New macro.
4277         (CLASS_SCOPE_HT_SIZE): Likewise.
4278         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
4279         (NAMESPACE_STD_HT_SIZE): Likewise.
4280         (GLOBAL_SCOPE_HT_SIZE): Likewise.
4281         (binding_table_new): Declare.
4282         (binding_table_free): Likewise.
4283         (binding_table_insert): Likewise.
4284         (binding_table_find_anon_type): Likewise.
4285         (binding_table_reverse_maybe_remap): Likewise.
4286         (binding_table_remove_anonymous_types): Likewise.
4287         (binding_table_foreach): Likewise.
4288         (binding_table_find): Likewise.
4289         (cxx_remember_type_decls): Likewise.
4290         * pt.c (bt_instantiate_type_proc): New function.
4291         (do_type_instantiation): Use it.
4292         * search.c (lookup_field_r): Use binding_table_find.
4294 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4296         * semantics.c (perform_deferred_access_checks): Don't discard
4297         checked access.
4299 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4301         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
4302         libiberty VA_ macros, always use stdarg.
4303         * rtti.c (create_pseudo_type_info): Likewise.
4304         * tree.c (build_min_nt, build_min): Likewise.
4306 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4308         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
4309         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
4310         collapse multiple function calls into one.
4311         * tree.c (debug_binfo): Likewise.
4313 2003-05-15  Jason Merrill  <jason@redhat.com>
4315         PR c++/5388
4316         * call.c (conditional_conversion): Don't consider implicit
4317         conversions if T2 is a base of T1.
4318         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
4319         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
4321         * parser.c (cp_parser_primary_expression): Convert a static data
4322         member from reference.
4324 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
4326         * call.c (build_op_delete_call): Avoid creating unnecessary types.
4327         * class.c (instantiate_type): Remove tests for tf_no_attributes.
4328         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
4329         (COMPARE_NO_ATTRIBUTES): Remove.
4330         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
4332         PR c++/8385
4333         * semantics.c (finish_typeof): Refine type-dependency check.
4335 2003-05-13  Jason Merrill  <jason@redhat.com>
4337         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
4338         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
4340 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4342         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
4344 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4346         PR c++/10230, c++/10481
4347         * semantics.c (finish_non_static_data_member): Handle when the
4348         non-static member is not from a base of the current class type.
4350 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4352         PR c++/10552
4353         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
4354         template and has dependent context.
4356 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4358         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
4360 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4362         PR c++/9252
4363         * cp-tree.h (saved_scope): Remove check_access field.
4364         (tsubst_flags_t): Remove tf_parsing.
4365         * decl.c (maybe_push_to_top_level): Don't initialize
4366         scope_chain->check_access.
4367         (make_typename_type, make_unbound_class_template): Don't use
4368         tf_parsing.
4369         (register_dtor_fn): Use push/pop_deferring_access_checks
4370         instead of scope_chain->check_access.
4371         * method.c (use_thunk): Likewise.
4372         * parser.c (cp_parser_explicit_instantiation
4373         (cp_parser_constructor_declarator_p): Don't call
4374         push/pop_deferring_access_checks here.
4375         (cp_parser_template_argument, cp_parser_class_name): Don't use
4376         tf_parsing.
4377         (yyparse): Check flag_access_control.
4378         * pt.c (instantiate_class_template): Call
4379         push/pop_deferring_access_checks.
4380         * semantics.c (push_deferring_access_checks): Propagate
4381         dk_no_check.
4382         (perform_or_defer_access_check): Make sure basetype_path is
4383         a type before comparison.
4384         * call.c (build_op_delete_call, build_over_call): Use
4385         perform_or_defer_access_check.
4386         * class.c (alter_access): Likewise.
4387         * init.c (build_offset_ref): Likewise.
4388         * lex.c (do_identifier): Likewise.
4389         * method.c (hack_identifier): Likewise.
4390         * search.c (lookup_member): Likewise.
4391         * semantics.c (finish_non_static_data_member): Likewise.
4392         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
4393         instead of flag_access_control.
4395 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4397         PR c++/9554
4398         * parser.c (cp_parser_class_name): Remove check_access parameter.
4399         All caller adjusted.  Update declaration.
4400         (cp_parser_lookup_name): Likewise.
4401         * semantics.c (push_deferring_access_checks): Change parameter type
4402         to enum deferring_kind.  All caller adjusted.
4403         (resume_deferring_access_checks): Adjust to use new enum.
4404         (stop_deferring_access_checks): Likewise.
4405         (perform_or_defer_access_check): Likewise.
4406         * cp-tree.h (deferring_kind): New enum.
4407         (deferred_access): Adjust field type.
4408         (push_deferring_access_checks): Update declaration.
4410 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4412         PR c++/10555, c++/10576
4413         * pt.c (lookup_template_class): Handle class template with
4414         multiple levels of parameters when one of the levels contain
4415         errors.
4417 2003-05-08  Jason Merrill  <jason@redhat.com>
4419         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
4420         expression.  Undo some of the recent reorg.
4422 2003-05-07  Richard Henderson  <rth@redhat.com>
4424         PR c++/10570
4425         * cfns.gperf: Comment out POSIX thread cancellation points,
4426         plus abort and raise.
4427         * cfns.h: Regenerate.
4429 2003-05-07  Jason Merrill  <jason@redhat.com>
4431         * call.c (build_conditional_expr): Don't assume that the folded
4432         expression has result_type.
4434 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4436         * typeck.c (build_unary_op): Deal with const qualifier in
4437         invalid pointer-to-member earlier.
4439 2003-05-05  Jason Merrill  <jason@redhat.com>
4441         PR c++/9537
4442         * call.c (conditional_conversion): Build an RVALUE_CONV if
4443         we're just changing the cv-quals.
4444         (build_conditional_expr): Don't call convert to change
4445         cv-quals.
4447 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4449         PR c++/10496
4450         * typeck.c (build_unary_op): Don't output const qualifier when
4451         output invalid pointer-to-member diagnostics.
4453 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4455         * decl.c: Fix typos.
4457 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4459         PR c++/4494
4460         * decl.c (start_function): Use same_type_p to check return type
4461         of main.
4463 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
4465         PR c/10604
4466         * cp/typeck.c (build_x_compound_expr): No need to check
4467         extra_warnings as well as warn_unused_value.
4469 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4471         PR c++/9364, c++/10553, c++/10586
4472         * decl.c (make_typename_type): Don't crash on illegal code.
4474 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
4476         * class.c (finish_struct): Use location_t and input_location
4477         directly.
4478         * decl.c (make_label_decl): Likewise.
4479         (use_label): Likewise.
4480         * decl2.c (warn_if_unknown_interface): Likewise.
4481         (start_static_initialization_or_destruction): Likewise.
4482         (generate_ctor_or_dtor_function): Likewise.
4483         (finish_file): Likewise.
4484         * error.c (print_instantiation_full_context): Likewise.
4485         * init.c (create_temporary_var): Likewise.
4486         * method.c (synthesize_method): Likewise.
4487         * parser.c (cp_token): Likewise.
4488         (cp_lexer_set_source_position_from_token): Likewise.
4489         (cp_lexer_get_preprocessor_token): Likewise.
4490         (cp_parser_statement): Likewise.
4491         * pt.c (tsubst_friend_function): Likewise.
4492         (instantiate_class_template): Likewise.
4493         (tsubst_decl): Likewise.
4494         (tsubst): Likewise.
4495         (instantiate_decl): Likewise.
4496         * semantics.c (begin_class_definition): Likewise.
4497         (expand_body): Likewise.
4499 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4501         * class.c (finish_struct): Rename lineno to input_line.
4502         * decl.c (push_binding_level, pop_binding_level,
4503         suspend_binding_level, resume_binding_level, make_label_decl,
4504         use_label, start_function): Likewise.
4505         * decl2.c (warn_if_unknown_interface,
4506         start_static_initialization_or_destruction,
4507         generate_ctor_or_dtor_function, finish_file): Likewise.
4508         * error.c (cp_line_of, print_instantiation_full_context,
4509         print_instantiation_context): Likewise.
4510         * except.c (check_handlers_1, check_handlers): Likewise.
4511         * init.c (create_temporary_var): Likewise.
4512         * method.c (use_thunk, synthesize_method): Likewise.
4513         * parser.c (cp_lexer_set_source_position_from_token,
4514         cp_lexer_get_preprocessor_token): Likewise.
4515         * pt.c (push_tinst_level, pop_tinst_level,
4516         tsubst_friend_function, instantiate_class_template, tsubst_decl,
4517         tsubst, tsubst_expr, instantiate_decl): Likewise.
4518         * semantics.c (genrtl_try_block, finish_label_stmt,
4519         begin_class_definition, expand_body,
4520         genrtl_finish_function): Likewise.
4521         * tree.c (build_min_nt, build_min): Likewise.
4523 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
4525         * decl2.c (comdat_linkage): Don't externalize explicit
4526         instantiations.
4528 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4530         PR c++/10554
4531         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4532         is not NULL.
4534 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
4536         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
4537         (struct lang_identifier): ... to here.
4538         (LANG_ID_FIELD): Remove.
4539         (SET_LANG_ID): Remove.
4540         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4541         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4542         (IDENTIFIER_IMPLICIT_DECL): Likewise.
4543         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4544         (IDENTIFIER_ERROR_LOCUS): Likewise.
4545         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4547 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4549         PR c++/8772
4550         * pt.c (convert_template_argument): Correct diagnostic.
4552 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4554         PR c++/9432, c++/9528
4555         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4557 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
4559         * decl.c (check_previous_goto_1): Adjust prototype.
4560         (check_previous_goto): Adjust use.
4561         (check_switch_goto): Likewise.
4562         (use_label): Adjust.
4563         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4564         (struct named_label_use_list): Use location_t datatype.
4566 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4568         PR c++/10551
4569         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4570         that have not yet been written out.
4572 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4574         PR c++/10549
4575         * class.c (layout_class_type): Mark overlong bitfields as having
4576         the maximum size permitted by their type, after layout.
4578         PR c++/10527
4579         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4581 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4583         * call.c (build_operator_new_call): Fix typo.
4584         * lang-options.h: Likewise.
4586 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4588         PR c++/10515
4589         * cp-tree.h (lookup_field_1): Declare it.
4590         * search.c (lookup_field_1): Make it public.
4591         * decl.c (reshape_init): Handle designated initializers.
4593         * decl.c (maybe_commonize_var): Further tweak support for systems
4594         without weak symbols.
4596 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4598         * decl.c (maybe_commonize_var): Fix thinko in last patch.
4600 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4602         PR c++/10506
4603         * method.c (use_thunk): Decrement immediate_size_expand.
4605         PR c++/10503
4606         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4607         (DECL_MAYBE_TEMPLATE): Remove.
4608         * class.c (fixed_type_or_null): Avoid infinite recursion.
4610         * decl.c (maybe_commonize_var): Make the code match the comments.
4611         * pt.c (instantiate_decl): Move call to import_export_decl.
4613 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
4615         * decl2.c (finish_file): Fix merge botch.
4617 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
4619         * decl2.c (finish_file): Don't call import_export_decl for
4620         functions that are not defined.
4621         (handle_class_head): Robustify.
4622         * pt.c (instantiate_decl): Do not call cp_finish_decl for
4623         variables that are not defined.
4625 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
4627         * call.c (print_z_candidates): Fix off by one error.
4629 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
4631         PR c++/10337
4632         * call.c (joust): Don't warn about conversion ops that are exact
4633         or cv-conversions. Rearrange to avoid multiple type comparisons.
4635 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4637         PR c++/10471
4638         * call.c (build_cxx_call): Robustify.
4640 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
4642         * Make-lang.in (lex.o): Remove mbchar.h.
4643         * lex.c (MULTIBYTE_CHARS): Lose.
4644         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4645         in c-lex.c.
4647 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4649         PR c++/9847
4650         * cp-tree.h (duplicate_tag_error): Remove.
4651         * class.c (duplicate_tag_error): Remove.
4652         * semantics.c (begin_class_definition): Return immediately for a
4653         duplicate class definition.
4655         PR c++/10451
4656         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4658 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
4660         PR c++/10446
4661         * search.c (lookup_fnfields_1): Handle empty slots in the method
4662         vector.
4664         PR c++/10428
4665         * decl.c (check_elaborated_type_specifier): New function, split
4666         out from ...
4667         (xref_tag): ... here.  Use the new function in more places.
4669         * rtti.c (throw_bad_typeid): Use build_cxx_call.
4671 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
4673         * call.c (build_over_call): Use build_cxx_call.
4674         (build_cxx_call): New method, split out of build_over_call.
4675         * cp-tree.h (language_function): Add can_throw.
4676         (build_cxx_call): Declare it.
4677         * decl.c (finish_function): If a function does not contain any
4678         calls to functions that can throw an exception, indicate that
4679         fact.
4680         * decl2.c (mark_used): Do not defer the instantiation of
4681         functions, if the current function does not throw.
4682         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4683         * pt.c (instantiate_decl): Make sure import_export_decl is called
4684         before emitting things.
4685         * rtti.c (throw_bad_cast): Use build_cxx_call.
4686         (build_dynamic_cast_1): Likewise.
4687         * typeck.c (build_function_call): Likewise.
4689 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
4691         PR c++/9881
4692         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4693         expressions. Reverts my 2002-08-08 patch.
4695         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4696         cheaper early exit.
4698 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4700         * cp/decl2.c (start_static_storage_duration_function): Take count
4701         arg, don't check if it wraps round.
4702         (generate_ctor_or_dtor_function): Add locus arg, use it.
4703         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4704         locus.
4705         (finish_file): Set line numbers to past EOF for synthesized
4706         functions.
4708 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4710         PR c++/10405
4711         * search.c (lookup_field_1): Final scan goes backwards for
4712         types, forwards for non-types.
4714 2003-04-17  Roger Sayle  <roger@eyesopen.com>
4716         PR c/10375
4717         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4718         "nothrow" function attributes.
4720 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4722         PR c++/10347
4723         * pt.c (type_dependent_expression_p): Handle array new.
4725 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
4727         PR c++/10381
4728         * parser.c (cp_parser_primary_expression): Reorganize logic for
4729         dealing with name lookup failures.
4731 2003-04-15  Jason Merrill  <jason@redhat.com>
4733         * decl2.c (mark_used): Don't instantiate anything if
4734         skip_evaluation.
4736 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
4738         * tree.c (build_cplus_array_type_1): Do not call
4739         uses_template_parms() on a NULL index_type.
4741 2003-04-13  Roger Sayle  <roger@eyesopen.com>
4743         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4745 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
4747         PR c++/10300
4748         * init.c (build_new_1): Reorganize.
4750 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4752         * class.c (initialize_array)
4753         * decl.c (reshape_init)
4754         * decl2.c (build_expr_from_tree)
4755         * init.c (build_zero_init)
4756         * pt.c (tsubst_copy, tsubst_copy_and_build)
4757         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4758         (ptm_initializer, class_initializer, get_pseudo_ti_init)
4759         * semantics.c (finish_compound_literal)
4760         * typeck.c (build_ptrmemfunc1)
4761         * typeck2.c (store_init_value, process_init_constructor)
4762         (build_functional_cast): Use build_constructor.
4764 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4766         * call.c (print_z_candidates): Use gcc_gettext_width, not
4767         strlen, to determine how much padding to use.
4769 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
4771         * decl.c: Update all calls to shadow_warning.
4773 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
4775         * class.c (layout_class_type): Correct handling for overlong
4776         bit-fields whose width is the same as an integer type.
4778 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4780         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4781         * cp-lang.c (cp_tree_size): New function.
4782         (LANG_HOOKS_TREE_SIZE): Override.
4784         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4785         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4786         (union lang_tree_node): Remove common and srcloc members.
4787         (build_srcloc_here): Don't prototype.
4788         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4789         * pt.c (pending_templates): Correct comment.
4790         * tree.c (build_srcloc, build_srcloc_here): Kill.
4792 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4794         * call.c: Include intl.h.
4795         (print_z_candidate): Always use inform; get rid of errfn
4796         argument. Reorganize so that all the strings get picked up
4797         by xgettext.  Note obligation of caller to pass first argument
4798         through gettext.
4799         (print_z_candidates): Update to match.  Indent second and
4800         successive candidates by strlen() of translated message.
4801         (joust): Restructure ambiguous-conversion pedwarn so that
4802         translators see a complete sentence.  Update calls to
4803         print_z_candidate.
4805         * Make-lang.in (cp/call.o): Update dependencies.
4807 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4809         * decl.c (set_current_binding_level): Delete, revert last change.
4810         (current_binding_level): Modify to allow it as as lvalue.
4812 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4814         * name-lookup.c (find_binding): Pass appropriate pointer type to
4815         POP_TIMEVAR_AND_RETURN.
4817 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4819         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4820         * cp-tree.h: Don't insist on having GNUC.
4822 2003-04-03  Jason Merrill  <jason@redhat.com>
4824         * cvt.c (ocp_convert): Only abort if we try to convert an object
4825         of TREE_ADDRESSABLE type.
4827         * class.c (build_vtable): Set DECL_ALIGN here.
4828         (get_vtable_decl): Not here.
4829         (layout_vtable_decl): Or here.
4830         (create_vtable_ptr): Or here.
4831         (layout_class_type): Or here.
4832         (check_bitfield_decl): Don't mess with field alignment.
4834 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4836         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4837         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4838         * rtti.c (dfs_class_hint_mark): Likewise.
4840         * decl.c (push_local_name, push_class_level_binding,
4841         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4842         functions returning void.
4843         * decl2.c (add_using_namespace): Likewise.
4845         * decl.c (print_binding_level, print_other_binding_stack,
4846         print_binding_stack): Cast argument of %p specifier to void*.
4847         * ptree.c (cxx_print_decl): Likewise.
4849         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4850         VAR_FUNCTION_OR_PARM_DECL_CHECK,
4851         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4852         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4853         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4855         * decl.c (set_current_binding_level): New macro.  Use throughout
4856         when setting the current binding level.
4858         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4859         in enum.
4860         * method.c (mangling_flags): Likewise.
4862         * cp-tree.h (lang_type_header): Add __extension__ and use
4863         CHAR_BITFIELD for members.
4865 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
4867         PR other/9274
4868         * mangle.c: Include gt-cp-mangle.h.
4869         (subst_identifiers): Mark with GTY.
4870         * config-lang.in (gtfiles): Add cp/mangle.c.
4871         * Make-lang.in: (gt-cp-mangle.h): New rule.
4872         (cp/mangle.o): Depends on gt-cp-mangle.h.
4874 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
4876         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4877         after \$(srcdir)/cp/name-lookup.h.
4878         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4879         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
4880         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4881         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4883 2003-03-31  Jason Merrill  <jason@redhat.com>
4885         PR java/10145
4886         * class.c (check_field_decl): Don't set DECL_ALIGN.
4888 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
4890         PR c++/7647
4891         * decl.c (grokdeclarator): Tidy, slightly.
4892         * search.c (lookup_field_1): Add want_type parameter.
4893         (lookup_field_r): Adjust call to lookup_field_1.
4895 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4897         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4899 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
4901         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
4902         prototype.
4903         (cxx_scope_find_binding_for_name): Likewise.
4904         * decl.c (find_binding: Move to name-lookup.c.
4905         (binding_for_name): Likewise.
4906         (cxx_scope_find_binding_for_name): Likewise.
4907         (BINDING_LEVEL):  Remove.
4908         (push_binding): Tidy.
4909         (push_class_binding): Likewise.
4910         (pop_binding): Likewise.
4911         (poplevel): Likewise.
4912         (poplevel_class): Likewise.
4913         (set_identifier_type_value_with_scope): Likewise.
4914         (push_overloaded_decl): Likewise.
4915         (lookup_tag): Likewise.
4916         (unqualified_namespace_lookup): Likewise.
4917         (lookup_name_current_level): Likewise.
4918         (maybe_inject_for_scope_var): Likewise.
4919         (namespace_binding): Move to name-lookup.c.
4920         (set_namespace_binding): Likewise.
4921         * decl2.c (lookup_using_namespace): Tidy.
4922         (qualified_lookup_using_namespace): Likewise.
4923         (do_toplevel_using_decl): Likewise.
4924         * name-lookup.c: Include "timevar.h"
4925         * name-lookup.h (cxx_scope):  Declare.
4926         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
4927         member declaration.
4928         (BINDING_SCOPE): Adjust definition.
4929         (BINDING_HAS_LEVEL_P): Remove.
4931 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4933         * name-lookup.c: New file.
4934         * name-lookup.h: Likewise..
4935         * decl.c (push_binding): Adjust use cxx_binding_make.
4936         (free_bindings): Move to name-lookup.c
4937         (pop_binding): Use cxx_binding_free.
4938         (binding_for_name): Tidy.
4939         * cp-tree.h: Include "name-lookup.h"
4940         (cxx_binding_make): Move to name-lookup.h
4941         (cxx_binding_clear): Likewise.
4942         (struct cxx_binding): Likewise.
4943         (LOCAL_BINDING_P): Likewise.
4944         (INHERITED_VALUE_BINDING_P): Likewise.
4945         (BINDING_SCOPE): Likewise.
4946         (BINDING_HAS_LEVEL_P): Likewise.
4947         (BINDING_VALUE): Likewise.
4948         (BINDING_TYPE): Likewise.
4949         * config-lang.in (gtfiles): Add cp/name-lookup.h
4950         * Make-lang.in (cp/name-lookup.o): New rule.
4951         (CXX_OBJS): Add cp/name-lookup.o
4952         (CXX_TREE_H): Add cp/name-lookup.h
4954 2003-03-28  Jason Merrill  <jason@redhat.com>
4956         PR c++/10245
4957         * cvt.c (force_rvalue): New fn.
4958         * call.c (build_conditional_expr): Use it.
4959         * cp-tree.h: Declare it.
4961 2003-03-28  Mike Stump  <mrs@apple.com>
4963         * error.c (dump_expr): Add 0x to printed hex numbers to make
4964         output match source code better.
4966 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
4968         PR c++/10218
4969         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4970         definitions.
4972         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4973         non-existant ssdf_decls array.
4974         (finish_file): Call generator_ctor_or_dtor_function when there are
4975         static constructors or destructors and no other static
4976         initializations.
4978 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
4980         PR c++/10047
4981         * decl2.c (finish_file): Don't warn about explicitly instantiated
4982         inline decls.
4984 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4986         PR c++/10224
4987         * pt.c (lookup_template_class): Only check instantiated args if
4988         they do not contain template parameters.
4990 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4992         PR c++/10158
4993         * parser.c (cp_parser_function_definition): Set
4994         DECL_INITIALIZED_IN_CLASS for members.
4995         * pt.c (instantiate_decl): Only reduce the template args for
4996         friends that are not defined in class.
4998 2003-03-25  Jason Merrill  <jason@redhat.com>
5000         * call.c (print_z_candidate): Change name of first arg to msgid.
5001         (joust): Add comment for translators.
5003 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
5005         PR c++/9898, PR c++/383, DR 322
5006         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
5007         through reference types on both PARM and ARG.
5009 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
5011         PR c++/10119
5012         * error.c (dump_expr) <BASELINK>: Use dump_expr.
5013         * pt.c (maybe_fold_nontype_args): New function.
5014         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
5015         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
5016         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
5017         maybe_fold_nontype_args.
5019 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
5021         PR c++/10026
5022         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
5024 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
5026         PR c++/7086
5027         * typeck.c (cxx_mark_addressable):  Adjust call to
5028         gen_mem_addressof or put_var_into_stack.
5030 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
5032         PR c++/9978, c++/9708
5033         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
5034         * call.c (add_template_candidate_real): Adjust
5035         instantiate_template call.
5036         * class.c (resolve_address_of_overloaded_function): Likewise.
5037         * decl.c (build_enumerator): Set TREE_CONSTANT.
5038         * pt.c (check_instantiated_args): New.
5039         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
5040         TREE_READONLY.
5041         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
5042         (reduce_template_parm_level): Likewise.
5043         (process_template_parm): Likewise.
5044         (check_explicit_specialization): Adjust instantiate_template call.
5045         (convert_template_argument): Don't check non-type argument here.
5046         (lookup_template_class): Check them here.
5047         (tsubst_friend_function): Adjust instantiate_template call.
5048         (instantiate_template): Add tsubst_flags parameter, use it. Check
5049         instantiated args.
5051 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
5053         * decl.c: Update calls to shadow_warning.
5055 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
5057         PR c++/9898
5058         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
5059         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
5061 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
5063         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
5064         friends.
5065         * cp/pt.c (instantiate_class_template): Fix formatting.
5067 2003-03-14  Matt Austern  <austern@apple.com>
5069         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
5070         (unemitted_tinfo_decl_p): Remove.
5071         (emit_tinfo_decl): Change declaration to remove unused parameter.
5072         * decl2.c (finish_file): Change tinfo emission to loop through
5073         unemitted_tinfo_decls array instead of looping through all decls.
5074         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
5075         unused second parameter.
5076         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
5077         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
5078         (emit_tinfo_decl): remove unused second parameter, add assertion
5079         that decl hasn't already been emitted.
5081 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
5083         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
5084         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
5085         return statements.
5087 2003-03-19  Jason Merrill  <jason@redhat.com>
5089         PR c++/8316, c++/9315, c++/10136
5090         * call.c (print_z_candidate): Split out from...
5091         (print_z_candidiates): ...here.
5092         (joust): Use it.
5094 2003-03-17  Roger Sayle  <roger@eyesopen.com>
5096         PR c++/10031
5097         * decl.c (duplicate_decls): Use the new type when prototyping
5098         anticipated decls, even when the types match.  This defines the
5099         exception list for the built-in function.
5101 2003-03-17  Jason Merrill  <jason@redhat.com>
5103         PR c++/10091
5104         * typeck.c (build_class_member_access_expr): Compare
5105         TYPE_MAIN_VARIANTs.
5107 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
5109         PR c++/9639
5110         * parser.c (cp_parser_declarator_id): Clear parser->scope.
5112 2003-03-16  Jason Merrill  <jason@redhat.com>
5114         PR c++/9993
5115         * decl.c (finish_function): Only allow the NRVO to use variables
5116         declared at function scope.
5118 2003-03-17  Andreas Jaeger  <aj@suse.de>
5120         * Make-lang.in (cp/TAGS): Remove.
5122 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5124         PR c++/9629
5125         * cp-tree.h (struct language_function): Add in_base_initializer.
5126         (in_base_initializer): define it.
5127         (expand_member_init): Remove INIT param.
5128         * init.c (expand_member_init): Remove INIT param, return the member.
5129         (emit_mem_initializers): Set in_base_initializer.
5130         * class.c (build_base_path): Check in_base_initializer.
5131         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
5132         * pt.c (tsubst_initializer_list): Likewise.
5134 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
5136         * decl.c (binding_for_name): Fix initialization thinko.
5138 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
5140         Compile-time improvement: 2/n.
5141         * cp-tree.h (struct cxx_binding): New datatype;
5142         (struct lang_identifier): Use it.
5143         (LOCAL_BINDING_P): Adjust definition.
5144         (INHERITED_VALUE_BINDING_P): Likewise.
5145         (BINDING_SCOPE): Likewise.
5146         (BINDING_HAS_LEVEL_P): Likewise.
5147         (BINDING_VALUE): Likewise.
5148         (BINDING_TYPE): Likewise.
5149         (IDENTIFIER_VALUE): Likewise.
5150         (struct tree_binding): Remove.
5151         (TS_CP_BINDING): Likewise.
5152         ((union lang_tree_node): Remove field "binding".
5153         (cxx_binding_clear): New macro.
5154         (binding_for_name): Adjust return type.
5155         (qualified_lookup_using_namespace): Adjust prototype.
5156         (lookup_using_namespace): Adjust prototype.
5157         (cxx_scope_find_binding_for_name): Declare.
5158         * cp-tree.def: Remove CPLUS_BINDING definition.
5159         * decl.c (push_binding): Adjust local variable type.
5160         (add_binding): Likewise.
5161         (push_class_binding): Likewise.
5162         (pop_binding): Likewise.
5163         (poplevel): Likewise.
5164         (poplevel_class): Likewise.
5165         (free_bindings):  Adjust type.
5166         (find_binding): Adjust return type, add a third parameter. Remove
5167         non-useful assertion now that we use static typing.
5168         (cxx_scope_find_binding_for_name): New function.
5169         (binding_for_name): Use it.  Adjust local variable type. Simplify.
5170         (namespace_binding):  Simplify.
5171         (set_namespace_binding): Likewise.
5172         (set_identifier_type_value_with_scope): Adjust local variable type.
5173         (lookup_tag): Don't type-abuse of local variable 'old'.
5174         (lookup_namespace_name): Likewise.  Allocate binding on stack.
5175         (select_decl): Adjust prototype.
5176         (unqualified_namespace_lookup):  Allocate binding on stack.
5177         Don't type-abuse of local variable 'val'.
5178         (lookup_name_real): Likewise.
5179         (maybe_inject_for_scope_var): Adjust local variable type.
5180         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
5181         (namespace_binding): Adjust logic, simplify.
5182         (BINDING_LEVEL): Adjust definition.
5183         (push_class_level_binding): Adjust local variable type.
5184         (struct cxx_saved_binding): Adjust field 'binding' type.
5185         * decl2.c (ambiguous_decl): Adjust prototype.
5186         (lookup_using_namespace): Adjust local variable type.
5187         (qualified_lookup_using_namespace): Catch type error and correct
5188         ensueing logic error.
5189         (do_nonmember_using_decl): Adjust local variable type.  Allocate
5190         temporary cxx_binding on stack.
5191         (do_toplevel_using_decl): Adjust local variable type.
5192         * ptree.c (cxx_print_cxx_binding): New function.
5193         (cxx_print_identifier): Use it.
5194         (cxx_print_xnode): Delete CPLUS_BINDING case label.
5196 2003-03-15  Roger Sayle  <roger@eyesopen.com>
5198         * tree.c (count_functions): Fix whitespace.
5200 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
5202         * Make-lang.in: Update.
5204 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5206         PR c++/6440
5207         * pt.c (maybe_process_partial_specialization): Handle
5208         member class template when enclosing class template is
5209         explicit specialized.
5210         (most_general_template): Stop looking when DECL is already
5211         specialized.
5213 2003-03-13  Jason Merrill  <jason@redhat.com>
5215         PR c++/9420
5216         * search.c (lookup_conversions): Call complete_type here.
5217         * call.c (implicit_conversion): Not here.
5219 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
5221         * decl2.c (do_nonmember_using_decl): Correct handling of
5222         simultaneous type/non-type bindings.
5224         * call.c (initialize_reference): Remove bogus assertion.
5225         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
5227 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
5229         PR c++/7050
5230         * expr.c (cxx_expand_expr): Return const0_rtx for throw
5231         expressions.
5233 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
5235         PR c++/9474
5236         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
5237         to merge old and new declarations.
5239 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
5241         * g++.1: Remove.
5242         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
5243         (cp/g++.1): Build it from scratch in the build tree.
5244         (c++.install-man): Depend on it.  Install it from the build tree.
5245         (c++.mostlyclean): Clean it.
5247 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
5249         PR c++/9474
5250         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
5251         to merge old and new declarations.
5253         PR c++/9924
5254         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
5256 2003-03-11  Jason Merrill  <jason@redhat.com>
5258         PR c++/9820
5259         * search.c (lookup_member): Fix handling of functions in a class
5260         being defined.
5262 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
5264         PR c++/8700
5265         * call.c (convert_class_to_reference): Adjust usage of
5266         splice_viable.
5267         (any_viable): Remove.
5268         (splice_viable): Combine with any_viable.
5269         (print_z_candidates): Avoid printing duplicates.
5270         (build_user_type_conversion_1): Adjust usage of splice_viable.
5271         (build_new_function_call): Likewise.
5272         (build_operator_new_call): Likewise.
5273         (build_object_call): Likewise.
5274         (build_conditional_expr): Likewise.
5275         (build_new_op): Likewise.
5276         (build_new_method_call): Likewise.
5277         (joust): Remove spurious comment.
5278         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
5279         * decl2.c (arg_assoc_class): Simplify.
5280         * friend.c (add_friend): Likewise.
5282 2003-03-11  Jason Merrill  <jason@redhat.com>
5284         PR c++/8660
5285         * decl2.c (check_classfn): A member template only matches a
5286         member template.
5288 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
5290         * Make-lang.in (CXX_C_OBJS): Update.
5291         * lang-specs.h: Don't define __GNUG__ here.
5293 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
5295         * call.c (perform_overload_resolution): New function.
5296         (build_new_function_call): Use it.
5297         (build_operator_new_call): Likewise.
5298         (add_candidates): Add explicit_targs and template_only parameters.
5299         (build_new_op): Adjust accordingly.
5300         * cp-tree.h (build_operator_new_call): New function.
5301         (build_function_call_real): Remove.
5302         (build_function_call_maybe): Likewise.
5303         * init.c (build_new_1): Use build_operator_new_call.
5304         * typeck.c (build_function_call_real): Rename to ...
5305         (build_function_call): ... this.
5307 2003-03-10  Devang Patel  <dpatel@apple.com>
5309         PR c++/9394
5310         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
5312 2003-03-10  Jason Merrill  <jason@redhat.com>
5314         PR c++/9798
5315         * decl.c (push_using_directive): Push before recursing.
5317         PR c++/9868, c++/9524
5318         * call.c (resolve_scoped_fn_name): Handle the case of a function
5319         pointer member.
5321         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
5322         argument in the pointer-to-member case.
5324 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
5326         PR c++/9373
5327         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
5328         pointers to member functions.
5330         PR c++/8534
5331         * decl.c (build_ptrmemfunc_type): Do not allow default arguments
5332         in pointer-to-member-function types.
5334 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5336         * expr.c (cplus_expand_constant): Use C90 prototype style.
5337         (cxx_expand_expr): Likewise.
5339 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5341         PR c++/9970
5342         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
5343         functions.
5345 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
5347         * lang-specs.h (c++-header): Change .pch to .gch.
5349 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
5351         * cp-tree.h (cxx_init): Update prototype.
5352         * lex.c (cxx_init): Similarly.
5354 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
5356         PR c++/9823
5357         * cp-tree.h (begin_mem_initializers): Remove.
5358         * parser.c (cp_parser_mem_initializer_list): Inline it here.
5359         Do not call finish_mem_initializers if not in a constructor.
5360         (cp_parser_class_head): Fix typo in error message.
5361         * semantics.c (begin_mem_initializers): Remove.
5362         * testsuite/g++.dg/parser/constructor1.C: New test.
5364         PR c++/9809
5365         * call.c (add_function_candidate): Skip builtin fuctions that have
5366         not yet been declared.
5368         PR c++/9982
5369         * init.c (build_new_1): Correct logic for determining whether or
5370         not to use an array cookie.
5372         PR c++/9524
5373         * parser.c (cp_parser_postfix_expression): Call
5374         finish_non_static_data_member, even when processing_template_decl.
5376         PR c++/9912
5377         * cp-tree.h (is_ancestor): New function.
5378         (handle_class_head): Change prototype.
5379         * decl2.c (is_namespace_ancestor): Rename to ...
5380         (namespace_anecestor): ... this.
5381         (set_decl_namespace): Adjust accordingly.
5382         (handle_class_head): Remove unnecessary parameters.
5383         * parser.c (cp_parser_class_head): Check that
5384         nested-name-specifiers are used appropriately.
5386 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
5388         * call.c (reference_binding): Remove REF_IS_VAR parameter.
5389         (implicit_conversion): Adjust call to reference_binding.
5390         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
5391         (initialize_reference): Adjust handling for references bound to
5392         rvalues.
5393         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
5394         prototype.
5395         (real_non_cast_lvalue_p): New method.
5396         * cvt.c (build_up_reference): Adjust use of
5397         make_temporary_var_for_ref_to_temp.
5398         * tree.c (real_non_cast_lvalue_p): New method.
5400 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5402         * except.c (init_exception_processing): Use C90 prototype style.
5403         (cp_protect_cleanup_actions): Likewise.
5404         (prepare_eh_type): Likewise.
5405         (build_eh_type_type): Likewise.
5406         (build_exc_ptr): Likewise.
5407         (do_begin_catch): Likewise.
5408         (dtor_nothrow): Likewise.
5409         (do_end_catch): Likewise.
5410         (push_eh_cleanup): Likewise.
5411         (decl_is_java_type): Likewise.
5412         (choose_personality_routine): Likewise.
5413         (initialize_handler_parm): Likewise.
5414         (expand_start_catch_block): Likewise.
5415         (expand_end_catch_block): Likewise.
5416         (begin_eh_spec_block): Likewise.
5417         (finish_eh_spec_block): Likewise.
5418         (do_allocate_exception): Likewise.
5419         (do_free_exception): Likewise.
5420         (wrap_cleanups_r): Likewise.
5421         (stabilize_throw_expr): Likewise.
5422         (build_throw): Likewise.
5423         (complete_ptr_ref_or_void_ptr_p): Likewise.
5424         (is_admissible_throw_operand): Likewise.
5425         (nothrow_libfn_p): Likewise.
5426         (can_convert_eh): Likewise.
5427         (check_handlers_1): Likewise.
5428         (check_handlers): Likewise.
5430 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
5432         * call.c (merge_conversion_sequences): New function.
5433         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
5434         (convert_class_to_reference): Correct handling of second
5435         standard conversion sequence in a user-defined conversion
5436         sequence.
5437         (build_user_type_conversion_1): Use merge_conversion_sequences.
5438         * cp-tree.def: Add comments for CONV nodes.
5439         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
5441 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5443         * error.c (init_error): Use C90 prototype style.
5444         (dump_scope): Likewise.
5445         (dump_qualifiers): Likewise.
5446         (dump_template_argument): Likewise.
5447         (dump_template_argument_list): Likewise.
5448         (dump_template_parameter): Likewise.
5449         (dump_template_bindings): Likewise.
5450         (dump_type): Likewise.
5451         (dump_typename): Likewise.
5452         (class_key_or_enum): Likewise.
5453         (dump_aggr_type): Likewise.
5454         (dump_type_prefix): Likewise.
5455         (dump_type_suffix): Likewise.
5456         (dump_global_iord): Likewise.
5457         (dump_simple_decl): Likewise.
5458         (dump_decl): Likewise.
5459         (dump_template_decl): Likewise.
5460         (dump_function_decl): Likewise.
5461         (dump_parameters): Likewise.
5462         (dump_exception_spec): Likewise.
5463         (dump_function_name): Likewise.
5464         (dump_template_parms): Likewise.
5465         (dump_char): Likewise.
5466         (dump_expr_list): Likewise.
5467         (dump_expr): Likewise.
5468         (dump_binary_op): Likewise.
5469         (dump_unary_op): Likewise.
5470         (type_as_string): Likewise.
5471         (expr_as_string): Likewise.
5472         (decl_as_string): Likewise.
5473         (context_as_string): Likewise.
5474         (lang_decl_name): Likewise.
5475         (cp_file_of): Likewise.
5476         (cp_line_of): Likewise.
5477         (decl_to_string): Likewise.
5478         (expr_to_string): Likewise.
5479         (fndecl_to_string): Likewise.
5480         (code_to_string): Likewise.
5481         (language_to_string): Likewise.
5482         (parm_to_string): Likewise.
5483         (op_to_string): Likewise.
5484         (type_to_string): Likewise.
5485         (assop_to_string): Likewise.
5486         (args_to_string): Likewise.
5487         (cv_to_string): Likewise.
5488         (cxx_print_error_function): Likewise.
5489         (cp_diagnostic_starter): Likewise.
5490         (cp_diagnostic_finalizer): Likewise.
5491         (cp_print_error_function): Likewise.
5492         (function_category): Likewise.
5493         (print_instantiation_full_context): Likewise.
5494         (print_instantiation_partial_context): Likewise.
5495         (maybe_print_instantiation_context): Likewise.
5496         (print_instantiation_context): Likewise.
5497         (cp_printer): Likewise.
5498         (print_integer): Likewise.
5499         (print_non_consecutive_character): Likewise.
5500         (locate_error): Likewise.
5502 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
5504         PR c++/9965
5505         * call.c (reference_binding): Add ref_is_var parameter.
5506         (implicit_conversion): Adjust call to reference_binding.
5507         (initialize_reference): Likewise.
5509         PR c++/9400
5510         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5511         PARM_DECLs.
5513         PR c++/9791
5514         * class.c (get_basefndecls): Use lookup_fnfields_1.
5516 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5518         PR c++/9188
5519         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5520         in error message.
5521         (cp_parser_single_declaration): Likewise.
5523 2003-03-05  Jason Merrill  <jason@redhat.com>
5525         PR c++/9440
5526         * call.c (build_conditional_expr): Use convert rather than an
5527         explicit NOP_EXPR.
5529 2003-03-02  Matt Austern  <austern@apple.com>
5531         * decl.c (cp_binding_level): Add static_decls varray member.
5532         (add_decl_to_level): Add static/inline namespace scope
5533         declarations to static_decls array.
5534         (wrapup_global_for_namespace): Pass static_decls only, instead of
5535         all decls, to wrapup_global_declarations/check_global_declarations.
5536         (push_namespace): Initialize static_decls for ordinary namespaces.
5537         (cxx_init_decl_processing): Initialize static_decls for global
5538         namespace.
5540 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
5542         * class.c (end_of_class): Correct thinko.
5544 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
5546         * config-lang.in: Replace ${libstdcxx_version} by its value.
5548 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
5550         * cp-tree.h (cxx_saved_binding): Declare.
5551         (struct saved_scope): Adjust type of field 'old_binding'.
5552         * decl.c (cxx_saved_binding_make): New macro.
5553         (struct cxx_saved_binding): Define.
5554         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
5555         C++ bindings.
5556         (maybe_push_to_top_level): Adjust local variable type.
5557         (pop_from_top_level): Likewise.
5559 2003-03-04  Tom Tromey  <tromey@redhat.com>
5561         * Make-lang.in (c++.tags): New target.
5563 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
5565         * Make-lang.in: Update.
5567 2003-03-03  Jason Merrill  <jason@redhat.com>
5569         * decl.c (finish_enum): Do set the type in a template. Simplify.
5570         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5572 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
5574         PR c++/9878
5575         * call.c (convert_class_to_reference): Correct conversion
5576         sequences.
5577         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5578         (implicit_conversion): Adjust call to reference_binding.
5579         (add_candidate): Change type of candidates parameter.
5580         (add_function_candidate): Likewise.
5581         (add_conv_candidate): Likewise.
5582         (build_builtin_candidate): Likewise.
5583         (add_builtin_candidate): Likewise.
5584         (add_builtin_candidates): Likewise.
5585         (add_template_candidate_real): Likewise.
5586         (add_template_candidate): Likewise.
5587         (add_template_conv_candidate): Likewise.
5588         (build_user_type_conversion_1): Adjust accordingly.
5589         (build_object_call): Likewise.
5590         (build_conditional_expr): Likewise.
5591         (add_candidates): Likewise.
5592         (build_new_op): Likewise.
5593         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
5594         (build_new_method_call): Adjust calls to add_function_candidate.
5595         (make_temporary_var_for_ref_to_temp): New function.
5596         (initialize_reference): Add decl parameter.
5597         * class.c (build_rtti_vtbl_entries): Use build_address and
5598         build_nop.
5599         * cp-tree.h (initialize_reference): Change prototype.
5600         (make_temporary_var_for_ref_to_temp): New function.
5601         (build_type_conversion): Change prototype.
5602         (build_address): New function.
5603         (build_nop): Likewise.
5604         * cvt.c (cp_convert_to_pointer): Adjust call to
5605         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
5606         Use build_nop.
5607         (convert_to_pointer_force): Use build_nop.
5608         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5609         (convert_to_reference): Adjust call to build_type_conversion.
5610         (ocp_convert): Likewise.
5611         (build_type_conversion): Remove for_sure parameter.
5612         * decl.c (grok_reference_init): Use initialize_reference.
5613         * typeck.c (build_address): New function.
5614         (build_nop): Likewise.
5615         (build_unary_op): Use them.
5616         (build_ptrmemfunc): Tidy slightly.
5617         (convert_for_initialization): Adjust call to
5618         initialize_reference.
5619         * typeck2.c (store_init_value): Remove #if 0'd code.
5621 2003-03-03  Jason Merrill  <jason@redhat.com>
5623         * decl.c (start_function): Clear DECL_NUM_STMTS.
5625         * class.c (get_vtable_decl): Use vtbl_type_node.
5626         (build_primary_vtable): Check for it.
5628 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
5630         * decl.c (check_initializer): Check for vector_opaque_p.
5632 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
5634         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5635           invoke an external cpp during compilation.
5637 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5639         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5640         that of warning().
5641         (start_decl): Likewise.
5642         (start_function): Likewise.
5644 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
5646         * Make-lang.in (CXX_C_OBJS): Update.
5648 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5650         PR c++/9892
5651         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5652         instantiating it.
5654 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
5656         * parser.c (cp_parser_init_declarator): Revert opaque
5657         vector_opaque_p change.
5658         Do not include target.h.
5660 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5662         PR c++/9879
5663         * cp-tree.h (build_zero_init): Add parameter.
5664         * decl.c (cp_finish_decl): Adjust call.
5665         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
5666         calls.
5667         (build_default_init): Add nelts parameter.  Adjust calls to
5668         build_zero_init.
5669         (build_new_1): Adjust call to build_default_init.
5670         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5672 2003-02-26  Devang Patel  <dpatel@apple.com>
5674         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5675         required.  Postpone enum setting for template decls.
5676         (build_enumerator): Delay copying value node until finish_enum
5677         (). Remove #if 0'ed code.
5678         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5679         (tsubst_copy): Add check for enum type.
5681 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
5683         PR c++/9683
5684         * decl2.c (prune_vars_needing_no_initialization): Do not throw
5685         away initializations for DECL_EXTERNAL VAR_DECLs.
5686         (finish_file): Adjust accordingly.
5687         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5689 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
5691         * decl.c (add_binding): Time TV_NAME_LOOKUP.
5692         (push_class_binding): Likewise.
5693         (set_namespace_binding): Likewise.
5695 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
5697         PR c++/9836
5698         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5699         specializations back to the main template.
5700         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5701         * pt.c (resolve_typename_type): Likewise.
5703 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
5705         PR c++/9778
5706         * pt.c (tsubst_copy_and_build): For a templated function inside a
5707         scope, process template arguments.
5709 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5711         PR c++/9602
5712         * typeck2.c (abstract_virtuals_error): Don't check when
5713         TYPE is still template parameter dependent.
5715 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
5717         PR c++/5333
5718         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5719         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5720         * pt.c (instantiate_class_template): Don't try to instantiate
5721         dependent types.
5722         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5724 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
5726         PR c++/9749
5727         * decl.c (grokdeclarator): Do not allow parameters with variably
5728         modified types.
5730 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
5732         * search.c (grow_bfs_bases): Remove. Fold into ...
5733         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5734         in previous patch.
5736 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
5738         PR c++/9729
5739         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5740         when the G++ 3.2 ABI prevents correct compilation.
5742 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5744         Change base class access representation. Share virtual base
5745         binfos.
5746         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5747         call.
5748         * cp/class.c (build_base_path): Likewise.
5749         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5750         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5751         (make_new_vtable): Adjust.
5752         (force_canonical_binfo_r): Delete.
5753         (force_canonical_binfo): Delete.
5754         (mark_primary_virtual_base): Delete.
5755         (dfs_unshared_virtual_bases): Delete.
5756         (mark_primary_bases): Adjust.
5757         (maybe_warn_about_overly_private_class): Adjust.
5758         (dfs_base_derived_from): Delete.
5759         (base_derived_from): Follow the inheritance chain.
5760         (struct find_final_overrider_data): Add vpath member.
5761         (dfs_find_final_overrider): Adjust.
5762         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5763         (find_final_overrider): Adjust.
5764         (update_vtable_entry_for_fn): Adjust.
5765         (modify_all_vtables): Adjust.
5766         (walk_subobject_offsets): Adjust.
5767         (layout_nonempty_base_or_field): Adjust.
5768         (layout_empty_base): Remove last parameter. Adjust.
5769         (build_base_field): Adjust.
5770         (build_base_fields): Adjust.
5771         (propagate_binfo_offsets): Remove last parameter. Adjust.
5772         (dfs_set_offset_for_unshared_vbases): Delete.
5773         (layout_virtual_bases): Adjust.
5774         (finish_struct_1): Adjust.
5775         (init_class_processing): Don't init access nodes.
5776         (dfs_get_primary_binfo): Delete.
5777         (get_primary_binfo): Adjust.
5778         (dump_class_hierarchy_r): Remove most derived arg, add IGO
5779         parameter. Adjust.
5780         (dump_class_hierarchy): Adjust.
5781         (finish_vtbls): Adjust.
5782         (get_original_base): Delete.
5783         (build_vtt_inits): Adjust.
5784         (dfs_build_secondary_vptr_vtt_inits): Adjust.
5785         (dfs_ctor_vtable_bases_queue_p): Adjust.
5786         (build_ctor_vtbl_group): Adjust.
5787         (dfs_accumulate_vtbl_inits): Adjust.
5788         (build_vtbl_initializer): Adjust.
5789         (build_vbase_offset_vtbl_entries): Adjust.
5790         (add_vcall_offset_vtbl_entries_1): Adjust.
5791         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5792         (access_*_node): Remove.
5793         (CANONICAL_BINFO): Delete.
5794         (BINFO_UNSHARED_MARKED): Remove.
5795         (BINFO_MARKED): Set LANG_FLAG_0 directly.
5796         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5797         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5798         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5799         Delete.
5800         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5801         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5802         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5803         Delete.
5804         (BINFO_DEPENDENT_BASE_P): New.
5805         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5806         index.
5807         (markedp, unmarkedp): Adjust.
5808         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5809         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5810         find_vbase_instance, binfo_for_vbase): Delete.
5811         (copied_binfo, original_binfo): Declare.
5812         (finish_base_specifier): Add virtual_p arg.
5813         (unshare_base_binfos): Delete.
5814         (copy_base_binfos): Declare.
5815         (reverse_path): Delete.
5816         * cp/decl.c (xref_basetypes): Access and virtuality passed
5817         differently. Don't copy direct base binfos here. Call
5818         copy_base_binfos.
5819         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5820         (initialize_vtbl_ptrs): Adjust.
5821         (expand_member_init): Adjust.
5822         * cp/parser.c (cp_parser_base_specifier): Adjust.
5823         * cp/pt.c (instantiate_class_template): Adjust.
5824         (get_template_base_recursive): Adjust.
5825         * cp/rtti.c (get_pseudo_ti_init): Adjust.
5826         (get_pseudo_ti_desc): Adjust.
5827         * cp/tree.c (unshare_base_binfos): Rename to ...
5828         (copy_base_binfos): ... here, reimplement.
5829         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5830         (reverse_path): Remove.
5831         * cp/typeck.c (get_delta_difference): Adjust error messages.
5832         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5833         * cp/search.c (lookup_base_r): Adjust.
5834         (dynamic_cast_base_recurse): Adjust.
5835         (canonical_binfo): Remove.
5836         (dfs_canonical_queue): Remove.
5837         (dfs_assert_unmarked_p): Remove.
5838         (assert_canonical_unmarked): Remove.
5839         (shared_marked_p, shared_unmarked_p): Remove.
5840         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5841         (dfs_access_in_type): Adjust.
5842         (access_in_type): Adjust.
5843         (dfs_accessible_queue_p): Adjust.
5844         (dfs_accessible_p): Adjust.
5845         (is_subobject_of_p_1, is_subobject_of_p): Remove.
5846         (struct lookup_field_info): Remove from_dep_base_p field.
5847         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5848         (lookup_field_r): Remove dependent base code.
5849         (lookup_member): Likewise.
5850         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5851         (dfs_unmarked_real_bases_queue_p): Remove.
5852         (dfs_marked_real_bases_queue_p): Remove.
5853         (dfs_skip_vbases): Remove.
5854         (dfs_get_pure_virtuals): Adjust.
5855         (markedp, unmarkedp): Adjust.
5856         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5857         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5858         (dfs_unmark): Adjust.
5859         (dfs_get_vbase_types):Remove.
5860         (dfs_build_inheritance_graph_order): Remove.
5861         (get_vbase_types): Remove
5862         (dfs_find_vbase_instance): Remove.
5863         (find_vbase_instance): Remove.
5864         (dfs_debug_unmarkedp): Adjust.
5865         (dependent_base_p): Remove.
5866         (dfs_push_type_decls): Adjust.
5867         (dfs_push_decls): Adjust.
5868         (dfs_no_overlap_yet): Adjust.
5869         (copied_binfo): New function.
5870         (original_binfo): New function.
5871         (binfo_for_vbase): Remove.
5873 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
5875         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5876         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5877         vectors, for speed.
5879 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
5881         PR c++/9704
5882         * class.c (layout_class_type): In the 3.2 ABI, take into account
5883         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5885 2003-02-18  Matt Austern <austern@apple.com>
5887         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5888         nothing for C++.
5889         * cp/decl.c (wrapup_globals_for_namespace): Remove special
5890         handling of global namespace.
5892 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
5894         * cp-tree.h (rid_to_yy): Delete.
5895         (C_RID_YYCODE): Delete.
5896         (finish_file): Delete redundant declaration.
5898 2003-02-18  Jason Merrill  <jason@redhat.com>
5900         PR c++/9623
5901         * decl.c (reshape_init): Don't mess with initializer labels.
5903         PR c++/9485
5904         * parser.c (cp_parser_postfix_expression): Set idk properly for
5905         object->scope::member.
5907 2003-02-18  Ben Elliston  <bje@redhat.com>
5909         PR other/7350
5910         * decl.c (duplicate_decls): Fix typo in comment.
5912 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
5914         PR debug/9717
5915         * class.c (build_base_field): Mark fields for base classes with
5916         DECL_IGNORED_P.
5918 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5920         PR c++/9457
5921         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5922         CONSTRUCTOR_ELTS only once.
5924 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5926         PR c++/9459
5927         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5928         (dump_type_suffix): Likewise.
5930 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5932         * search.c: ANSIfy function declarations and definitions.
5933         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5934         * call.c (build_method_call, resolve_scoped_fn_name,
5935         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5936         calls.
5937         * class.c (handle_using_decl): Likewise.
5938         * decl.c (make_typename_type, make_unmound_class_template,
5939         start_decl, compute_array_index_type): Likewise.
5940         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5941         * init.c (expand_member_init, build_member_call): Likewise.
5942         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5943         resolve_typename_type): Likewise.
5944         * typeck.c (lookup_destructor, finish_class_member_access_exprm
5945         build_prememfunc_access_expr): Likewise.
5947 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
5949         * decl2.c: Include "timevar.h".
5950         (namespace_ancestor): Time name lookup.
5951         (add_using_namespace): Likewise.
5952         (lookup_using_namespace): Likewise.
5953         (qualified_lookup_using_namespace): Likewise.
5954         (decl_namespace): Likewise.
5955         (lookup_arg_dependent): Likewise.
5956         * lex.c (do_identifier): Likewise.
5957         (do_scoped_id): Likewise.
5958         * pt.c (lookup_template_class): Likewise.
5960 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
5962         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5964 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5966         * decl.c: Include "timevar.h".
5967         (poplevel): Time name lookup.
5968         (find_binding): Likewise.
5969         (push_namespace): Likewise.
5970         (pop_nested_namespace): Likewise.
5971         (store_bindings): Likewise.
5972         (maybe_push_to_top_level): Likewise.
5973         (pop_from_top_level): Likewise.
5974         (push_local_name): Likewise.
5975         (pushtag): Likewise.
5976         (pushdecl): Likewise.
5977         (pushdecl_with_scope): Likewise.
5978         (pushdecl_namespace_level): Likewise.
5979         (pushdecl_top_level): Likewise.
5980         (pushdecl_class_level): Likewise.
5981         (push_class_level_binding): Likewise.
5982         (push_using_decl): Likewise.
5983         (push_using_directive): Likewise.
5984         (push_overloaded_decl): Likewise.
5985         (lookup_label): Likewise.
5986         (define_label): Likewise.
5987         (lookup_tag): Likewise.
5988         (lookup_tag_reverse): Likewise.
5989         (lookup_namespace_name): Likewise.
5990         (select_decl): Likewise.
5991         (unqualified_namespace_lookup): Likewise.
5992         (lookup_name_real): Likewise.
5993         (lookup_name_current_level): Likewise.
5994         (lookup_type_current_level): Likewise.
5995         (maybe_inject_for_scope_var): Likewise.
5996         (xref_tag): Likewise.
5998         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
6000 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
6002         * decl.c (build_enumerator):  Remove unneeded test.
6004 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
6006         * cp-tree.h (struct lang_type_header): Make all fields unsigned
6007         char.
6009 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
6011         PR c++/7129
6012         * call.c (z_candidate): Add args.
6013         (convert_class_to_reference): Set it.
6014         (implicit_conversion): Tidy.
6015         (add_candidate): Add args parameter.
6016         (add_function_candidate): Adjust call to add_candidate.
6017         (add_conv_candidate): Likewise.
6018         (build_builtin_candidate): Likewise.
6019         (build_user_type_conversion_1): Eliminate wasteful tree_cons
6020         usage.
6021         (build_new_function_call): Likewise.
6022         (build_object_call): Likewise.
6023         (add_candidates): New function.
6024         (build_new_op): Use it.
6025         (covert_like_real): Adjust call to build_over_call.
6026         (build_over_call): Remove args parameter.
6027         * operators.def: Add <?= and >?=.
6029 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
6031         * typeck.c (build_indirect_ref): Don't check flag_volatile.
6033 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6035         PR c++/8849
6036         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
6038 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
6040         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
6041         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
6042         (BINFO_LANG_ELTS): New #define.
6043         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
6045 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
6047         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
6049 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
6051         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
6052         for class types.
6053         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
6054         rather than TYPE_LANG_FLAG_0.
6055         (TYPE_BUILT_IN): Remove.
6056         (TYPE_DEPENDENT_P): New macro.
6057         (TYPE_DEPENDENT_P_VALID): Likewise.
6058         (lang_type_class): Add fields_readonly.
6059         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
6060         * pt.c (dependent_type_p_r): New function, split out from ...
6061         (dependent_type_p): ... here.  Memoize results.
6062         * search.c (dependent_base_p): Use dependent_type_p, not
6063         uses_template_parms.
6064         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
6065         for class types.
6067 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
6069         * call.c (build_field_call): Use build_new_op, not build_opfncall.
6070         (prep_operand): New function.
6071         (build_new_op): Use it.  Remove dead code.
6072         * class.c (pushclass): Change "modify" parameter type from int to
6073         bool.
6074         (currently_open_class): Use same_type_p, not pointer equality.
6075         (push_nested_class): Adjust calls to pushclass, remove modify
6076         parameter.
6077         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
6078         (pushclass): Change prototype.
6079         (push_nested_class): Likewise.
6080         (grokoptypename): Remove.
6081         (build_opfncall): Remove.
6082         (value_dependent_expression_p): Declare.
6083         (resolve_typename_type): Likewise.
6084         (resolve_typename_type_in_current_instantiation): Likewise.
6085         (enter_scope_of): Remove.
6086         (tsubst): Remove.
6087         (tsubst_expr): Likewise.
6088         (tsubst_copy): Likewise.
6089         (tsubst_copy_and_build): Likewise.
6090         * decl.c (warn_about_implicit_typename_lookup): Remove.
6091         (finish_case_label): Return error_mark_node for erroneous labels.
6092         (start_decl): Adjust calls to push_nested_class.
6093         (grokfndecl): Call push_scope/pop_scope around call to
6094         duplicate_decls.
6095         (grokdeclarator): Do not call tsubst.
6096         (start_function): Adjust calls to push_nested_class.
6097         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
6098         (check_classfn): Use push_scope/pop_scope around type comparisions.
6099         (grokoptypename): Remove.
6100         (push_sscope): Adjust call to push_nested_class.
6101         * error.c (dump_type): Show cv-qualification of typename types.
6102         * init.c (build_member_call): Use build_new_op, not
6103         build_opfncall.
6104         * method.c (build_opfncall): Remove.
6105         * parser.c (cp_parser): Add allow_non_constant_expression_p and
6106         non_constant_expression_p.
6107         (cp_parser_constant_expression): Adjust prototype.
6108         (cp_parser_resolve_typename_type): Remove.
6109         (cp_parser_non_constant_expression): New function.
6110         (cp_parser_non_constant_id_expression): Likewise.
6111         (cp_parser_new): Set allow_non_constant_expression_p and
6112         non_constant_expression_p.
6113         (cp_parser_primary_expression): Reject `this' and `va_arg' in
6114         constant-expressions.  Note that dependent names aren't really
6115         constant.
6116         (cp_parser_postfix_expression): Reject conversions to non-integral
6117         types in constant-expressions.  Neither are increments or
6118         decrements.
6119         (cp_parser_unary_expression): Reject increments and decrements in
6120         constant-expressions.
6121         (cp_parser_direct_new_declarator): Adjust call to
6122         cp_parser_constant_expression.
6123         (cp_parser_cast_expression): Reject conversions to non-integral
6124         types in constant-expressions.
6125         (cp_parser_assignment_expression): Rejects assignments in
6126         constant-expressions.
6127         (cp_parser_expression): Reject commas in constant-expressions.
6128         (cp_parser_labeled_statement): Adjust call to
6129         cp_parser_constant_expression.
6130         (cp_parser_direct_declarator): Simplify array bounds, even in
6131         templates, when they are non-dependent.  Use
6132         resolve_typename_type, not cp_parser_resolve_typename_type.
6133         (cp_parser_class_head): Use resolve_typename_type, not
6134         cp_parser_resolve_typename_type.
6135         (cp_parser_member_declaration): Adjust call to
6136         cp_parser_constant_expression.
6137         (cp_parser_constant_initializer): Likewise.
6138         (cp_parser_constructor_declarator): Use resolve_typename_type, not
6139         cp_parser_resolve_typename_type.
6140         (cp_parser_late_parsing_default_args): Adjust call to
6141         push_nested_class.
6142         * pt.c (tsubst): Give it internal linkage.
6143         (tsubst_expr): Likewise.
6144         (tsubst_copy): Likewise.
6145         (tsubst_copy_and_build): Likewise.
6146         (push_access_scope_real): Likewise.
6147         (tsubst_friend_class): Likewise.
6148         (instantiate_class_template): Adjust call to pushclass.
6149         (value_dependent_expression_p): Give it external linkage.
6150         Robustify.
6151         (resolve_typename_type): New function.
6152         * semantics.c (finish_call_expr): Use build_new_op, not
6153         build_opfncall.
6154         (begin_constructor_declarator): Remove.
6155         (begin_class_definition): Adjust call to pushclass.
6156         (enter_scope_of): Remove.
6157         * typeck.c (comptypes): Resolve typename types as appropriate.
6158         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
6159         (build_x_compound_expr): Likewise.
6160         (build_modify_expr): Likewise.
6161         (build_x_modify_expr): Likewise.
6162         * typeck2.c (build_x_arrow): Likewise.
6164 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
6166         * pt.c (last_pending_template) Declare GTY().
6168 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6170         PR c++/8591
6171         * parser.c (cp_parser_elaborated_type_specifier): Convert
6172         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
6173         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
6175 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
6177         PR c++/9437
6178         * pt.c (unify): Don't unify '*T' with 'U C::*'.
6180         PR c++/3902
6181         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
6182         inside a declarator.
6184 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
6186         * class.c (update_vtable_entry_for_fn): Add index parameter.
6187         Generate vcall thunk for covariant overriding from a virtual
6188         primary base.
6189         (dfs_modify_vtables): Adjust.
6191 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
6193         PR c++/9403
6194         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
6195         template keyword.
6196         (cp_parser_base_specifier): Look for and consume a
6197         TEMPLATE keyword. Replace switch with array index.
6199         PR c++/795
6200         * semantics.c (finish_non_static_data_member): Remember the
6201         field's type even in a template.
6203         PR c++/9415
6204         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
6205         already scoped.
6207         PR c++/8545
6208         * parser.c (cp_parser_cast_expression): Be more tentative.
6210 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6212         * cp-tree.h (flagged_type_tree_s): Remove.
6213         (check_for_new_type): Likewise.
6214         * typeck2.c (check_for_new_type): Likewise.
6216 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
6218         * dump.c: ANSIfy function declarations and definitions.
6220         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
6222 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
6224         PR c++/9354
6225         * init.c (build_new): Set the type of the new-expression, even
6226         when processing_templte_decl.
6228         PR c++/9216
6229         * parser.c (cp_parser_primary_expression): Improve error message
6230         for templates used in an expression context.
6232         PR c++/8696
6233         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
6234         parse when encountering "typedef".
6236 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
6238         * class.c, parser.c: ANSIfy function definitions and declarations.
6240 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
6242         PR c++/9328
6243         * error.c (dump_decl): For an OVERLOAD, just print the name of the
6244         function; it doesn't make sense to try to print its type.
6245         * semantics.c (finish_typeof): Issue errors about invalid uses.
6247         PR c++/9298
6248         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
6249         function.
6250         (cp_parser_expression_statement): Use it.
6251         (cp_parser_explicit_instantiation): Likewise.
6252         * pt.c (do_decl_instantiation): Improve error handling logic.
6254 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
6256         PR c++/9384
6257         * parser.c (cp_parser_using_declaration): Issue error messages
6258         about name resolution failures here.
6260         PR c++/9388
6261         * class.c (currently_open_derived_class): Use dependent_type_p.
6262         * cp-tree.h (dependent_type_p): New function.
6263         (dependent_template_arg_p): Likewise.
6264         (dependent_template_p): Likewise.
6265         (type_dependent_expression_p): Likewise.
6266         * parser.c (cp_parser_dependent_type_p): Remove.
6267         (cp_parser_value_dependent_type_p): Likewise.
6268         (cp_parser_type_dependent_expression_p): Likewise.
6269         (cp_parser_dependent_template_arg_p): Likewise.
6270         (cp_parser_dependent_template_id_p): Likewise.
6271         (cp_parser_dependent_template_p): Likewise.
6272         (cp_parser_diagnose_invalid_type_name): Replace
6273         cp_parser_dependent_type_p with dependent_type_p, etc.
6274         (cp_parser_primary_expresion): Likewise.
6275         (cp_parser_nested_name_specifier_opt): Likewise.
6276         (cp_parser_postfix_expression): Likewise.
6277         (cp_parser_unary_expression): Likewise.
6278         (cp_parser_template_name): Likewise.
6279         (cp_parser_class_name): Likewise.
6280         (cp_parser_lookup_name): Likewise.
6281         * pt.c (dependent_type_p): New function.
6282         (value_dependent_expression_p): Likewise.
6283         (type_dependent_expression_p): Likewise.
6284         (dependent_template_arg_p): Likewise.
6285         (dependent_template_id_p): Likewise.
6286         (dependent_template_p): Likewise.
6288         PR c++/9285
6289         PR c++/9294
6290         * parser.c (cp_parser_simple_declaration): Return quickly when
6291         encountering errors.
6293 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6295         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
6297 2003-01-17  Jason Merrill  <jason@redhat.com>
6299         PR c++/9167, c++/9358
6300         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
6302 2003-01-17  Jason Merrill  <jason@redhat.com>
6304         PR c++/9342
6305         * call.c (build_conditional_expr): Always do lvalue-rvalue
6306         conversion.
6308 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
6310         PR c++/9294
6311         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
6312         * cp-tree.h (BASELINK_BINFO): Adjust.
6313         (BASELINK_FUNCTIONS): Likewise.
6314         (BASELINK_ACCESS_BINFO): Likewise.
6315         (tree_baselink): New structure.
6316         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
6317         (lang_tree_node): Add baselink.
6318         * decl.c (cp_tree_node_structure): Add BASELINK case.
6319         * search.c (build_baselink): Adjust.
6320         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
6321         test from TREE_LIST case.
6323         PR c++/9272
6324         * parser.c (cp_parser_constructor_declarator_p): Do not assume
6325         that a constructor cannot be declared outside of its own class.
6327         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
6328         be resolved, neither can the qualified name.
6330         * rtti.c (get_pseudo_ti_desc): Fix thinko.
6332 2003-01-16  Jason Merrill  <jason@redhat.com>
6334         PR c++/8564
6335         * init.c (build_vec_init): Re-add maxindex parm.
6336         (perform_member_init, build_aggr_init): Pass it.
6337         (build_new_1): Pass it. Use an incomplete array type for full_type.
6338         * typeck.c (build_modify_expr): Pass it.
6339         * cp-tree.h: Adjust.
6341 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
6343         * cp-tree.h (tsubst_copy_and_build): New declaration.
6344         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
6345         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
6346         (tsubst_copy_and_build): New function.
6348 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
6350         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
6351         (PARTIAL_INSTANTIATION_P): Remove.
6352         (IMPLICIT_TYPENAME_P): Likewise.
6353         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
6354         (build_typename_type): Remove declaration.
6355         (parmlist_is_exprlist): Likewise.
6356         * decl.c (build_typename_type): Make it static, remove third
6357         parameter.
6358         (push_class_binding): Don't do implicit typename stuff.
6359         (make_typename_type): Likewise.
6360         (lookup_name_real): Likewise.
6361         (grokdeclarator): Don't try to convert declarations into
6362         initializations.  Don't do implicit typename stuff.
6363         (parmlist_is_exprlist): Remove.
6364         (xref_basetypes): Simplify.
6365         * decl2.c (grokfield): Don't try to convert declarations into
6366         initializations.
6367         (build_anon_union_vars): Do this while processing templates, too.
6368         (finish_anon_union): Likewise.
6369         * error.c (dump_type): Remove implicit typename handling.
6370         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
6371         (cp_parser_primary_expression): Correct handling of names not
6372         found by unqualified name lookup in templates.
6373         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
6374         of types when possible.
6375         (cp_parser_simple_declaration): Complain intelligently about some
6376         invalid declarations.
6377         (cp_parser_member_declaration): Likewise.
6378         (cp_parser_constructor_declarator_p): Don't check when we're in a
6379         function scope.
6380         * pt.c (instantiate_class_template): Remove
6381         PARTIAL_INSTANTIATION_P gunk.
6382         * search.c (lookup_field_r): Don't build implicit typenames.
6383         (marked_pushdecls_p): Don't enter dependent base types.
6384         (unmarked_pushdecls_p): Likewise.
6385         * semantics.c (begin_class_definition): Remove implicit typename
6386         stuff.
6388 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
6390         PR c++/9212
6391         * parser.c (cp_parser_direct_declarator): If accepting either
6392         abstract or named, the name must be an unqualified-id.
6394 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6396         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
6398 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6400         * decl2.c (check_classfn): Fix uninitialized warning.
6401         (build_anon_union_vars): Likewise.
6402         * pt.c (tsubst_copy): Likewise.
6404 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
6406         Further conform g++'s __vmi_class_type_info to the C++ ABI
6407         specification.
6408         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
6409         the specification.
6410         (class_hint_flags): Likewise.
6412 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6414         * config-lang.in: Add semantics.c to gtfiles.
6415         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
6416         (saved_scope): Likewise.
6417         (type_lookups): Remove.
6418         (deferred_access): New structure.
6419         (type_access_control): Remove.
6420         (save_type_access_control): Likewise.
6421         (reset_type_access_control): Likewise.
6422         (decl_type_access_control): Likewise.
6423         (push_deferring_access_checks): Declare.
6424         (resume_deferring_access_checks): Likewise.
6425         (stop_deferring_access_checks): Likewise.
6426         (pop_deferring_access_checks): Likewise.
6427         (get_deferred_access_checks): Likewise.
6428         (pop_to_parent_deferring_access_checks): Likewise.
6429         (perform_deferred_access_checks): Likewise.
6430         (perform_or_defer_access_check): Likewise.
6431         * decl.c (make_typename_type): Use perform_or_defer_access_check.
6432         (make_unbound_class_template): Likewise.
6433         (grokdeclarator): Don't call decl_type_access_control.
6434         * parser.c (cp_parser_context): Remove deferred_access_checks
6435         and deferring_access_checks_p fields.
6436         (cp_parser_context_new): Adjust.
6437         (cp_parser): Remove access_checks_lists.
6438         (cp_parser_defer_access_check): Remove.
6439         (cp_parser_start_deferring_access_checks): Remove.
6440         (cp_parser_stop_deferring_access_checks): Remove.
6441         (cp_parser_perform_deferred_access_checks): Remove.
6442         (cp_parser_nested_name_specifier_opt): Use new deferred access
6443         functions.
6444         (cp_parser_simple_declaration): Likewise.
6445         (cp_parser_template_id): Likewise.
6446         (cp_parser_function_definition): Likewise.
6447         (cp_parser_class_specifier): Likewise.
6448         (cp_parser_lookup_name): Likewise.
6449         (cp_parser_single_declaration): Likewise.
6450         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
6451         (cp_parser_parse_tentatively): Likewise.
6452         (cp_parser_parse_definitely): Likewise.
6453         (yyparse): Likewise.
6454         (cp_parser_init_declarator): Remove access_checks parameter.
6455         Use new deferred access functions.
6456         (cp_parser_function_definition_from_specifiers_and_declarator):
6457         Likewise.
6458         (cp_parser_class_head): Remove deferring_access_checks_p and
6459         saved_access_checks parameters.  Use new deferred access functions.
6460         (cp_parser_member_specification_opt): Don't call
6461         reset_type_access_control.
6462         * search.c (type_access_control): Remove.
6463         * semantics.c: Include "gt-cp-semantics.h".
6464         (deferred_type_access_control): Remove.
6465         (deferred_access_stack): New variable.
6466         (deferred_access_free_list): Likewise.
6467         (push_deferring_access_checks): New function.
6468         (resume_deferring_access_checks): Likewise.
6469         (stop_deferring_access_checks): Likewise.
6470         (pop_deferring_access_checks): Likewise.
6471         (get_deferred_access_checks): Likewise.
6472         (pop_to_parent_deferring_access_checks): Likewise.
6473         (perform_deferred_access_checks): New function, adapted from
6474         cp_parser_perform_deferred_access_checks.
6475         (perform_or_defer_access_check): New function, adapted from
6476         cp_parser_defer_access_check.
6477         (current_type_lookups): Remove.
6478         (deferred_type_access_control): Likewise.
6479         (decl_type_access_control): Likewise.
6480         (save_type_access_control): Likewise.
6481         (reset_type_access_control): Likewise.
6482         (begin_function_definition): Adjust.
6483         (begin_class_definiton): Likewise.
6485 2003-01-13  Jason Merrill  <jason@redhat.com>
6487         PR c++/8748
6488         * class.c (build_base_path): Take the address before calling save_expr.
6490         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6491         all the ambiguous conversions are bad.
6493         * class.c (maybe_warn_about_overly_private_class): Don't stop
6494         searching when we find a nonprivate method.
6496         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6498 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
6500         * cp-tree.h (get_arglist_len_in_bytes): Remove.
6502         PR c++/9264
6503         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6504         typeame types more robustly.
6506 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
6508         * parser.c:  Fix comment typos.
6510 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6512         PR c++/9099
6513         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6514         an object_type which is not a class type.
6516 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
6518         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6519         (cp_parser_late_parsing_default_args): Likewise.
6521 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
6523         * cfns.gperf: ANSIfy function declarations.
6524         * cfns.h: Regenerate.
6525         * cp-tree.h: ANSIfy function declarations.
6527 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6529         * cp-tree.h (reparse_absdcl_as_expr): Remove.
6530         (reparse_absdcl_as_casts): Likewise.
6531         (reparse_decl_as_expr): Likewise.
6532         (finish_decl_parsing): Likewise.
6533         * decl2.c (reparse_absdcl_as_expr): Remove.
6534         (reparse_absdcl_as_casts): Likewise.
6535         (repase_decl_as_expr): Likewise.
6536         (finish_decl_parsing): Likewise.
6538         PR c++/9128
6539         PR c++/9153
6540         PR c++/9171
6541         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6542         function.
6543         (cp_parser_nested_name_specifier_opt): Correct the
6544         check_dependency_p false.
6545         (cp_parser_postfix_expression): Fix formatting.
6546         (cp_parser_decl_specifier_seq): Avoid looking for constructor
6547         declarators when possible.
6548         (cp_parser_template_id): Avoid performing name-lookup when
6549         possible.
6550         (cp_parser_class_head): Do not count specializations when counting
6551         levels of templates.
6552         (cp_parser_constructor_declarator_p): Return immediately if
6553         there's no chance that the tokens form a constructor declarator.
6554         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
6555         expression with reference type.
6556         (get_tinfo_decl_dynamic): Do not return an expression with
6557         reference type.
6558         (build_typeid): Add comment.  Do not return an expression with
6559         reference type.
6560         * typeck.c (build_class_member_access_expr): Improve handling of
6561         conditionals and comma-expressions as objects.
6563 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6565         * cfns.gperf: ANSIfy function declarations.
6566         * cfns.h: Regenerate.
6567         * cp-tree.h: ANSIfy function declarations.
6568         * parser.c: ANSIfy function declarations & definitions.
6570         * decl.c (bad_specifiers): Fix parameter order error I introduced.
6572 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6574         Merge from pch-branch:
6576         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6578         Merge to tag pch-merge-20030102:
6580         * semantics.c (finish_translation_unit): Don't call finish_file.
6581         * parser.c: Don't include ggc.h.
6582         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6583         read first token here.  Don't allow PCH files after the first
6584         token is read.
6585         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6586         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6587         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6588         (cp_parser_late_parsing_for_member): Don't duplicate call to
6589         cp_lexer_set_source_position_from_token.
6590         (cp_parser_late_parsing_default_args): Likewise.
6591         (yyparse): Call finish_file after clearing the_parser.
6593         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
6595         * Make-lang.in: Remove $(GGC_H) from all dependencies.
6596         (CXX_TREE_H): Add $(GGC_H).
6597         * class.c: Don't include ggc.h.
6598         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6599         (method_name_cmp): Likewise.
6600         (resort_data): New variable.
6601         (resort_field_decl_cmp): New.
6602         (resort_method_name_cmp): New.
6603         (resort_sorted_fields): New.
6604         (resort_type_method_vec): New.
6605         (finish_struct_methods): Delete cast.
6606         (finish_struct_1): Delete cast.
6607         * cp-tree.h: Include ggc.h.
6608         (struct lang_type_class): Add reorder attribute to field `methods'.
6609         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6610         (resort_sorted_fields): New prototype.
6611         (resort_type_method_vec): New prototype.
6612         * call.c: Don't include ggc.h.
6613         * decl.c: Likewise.
6614         * decl2.c: Likewise.
6615         * init.c: Likewise.
6616         * lex.c: Likewise.
6617         * method.c: Likewise.
6618         * optimize.c: Likewise.
6619         * parse.y: Likewise.
6620         * pt.c: Likewise.
6621         * repo.c: Likewise.
6622         * search.c: Likewise.
6623         * semantics.c: Likewise.
6624         * spew.c: Likewise.
6625         * tree.c: Likewise.
6627         * lang-specs.h: Remove comment.
6629         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
6631         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6632         (operator_name_info): Mark to be saved for PCH, specify size.
6633         (assignment_operator_name_info): Likewise.
6635         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
6637         * decl.c (anon_cnt): Mark to be saved for PCH.
6639         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
6641         * lex.c  (init_reswords): Delete now-untrue comment.
6642         Allocate ridpointers using GGC.
6644         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
6646         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6648         * g++spec.c (lang_specific_driver): Don't include standard
6649         libraries in `added'.
6651         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
6653         * decl2.c (finish_file): Call c_common_write_pch.
6654         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6656         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
6658         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6659         files when using g++.
6660         * lang-specs.h: Handle compiling C++ header files.
6662 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6664         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6666 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6668         * pt.c (push_access_scope_real): Call push_to_top_level for
6669         function in namespace scope.
6670         (pop_access_scope): Call pop_from_top_level for function in
6671         namespace scope.
6673 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6675         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6677 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6679         * Make-lang.in (c++.install-common, c++.install-man,
6680         c++.uninstall): Prepend $(DESTDIR) to destination paths in
6681         all (un)installation commands.
6682         (c++.install-common): Rewrite $(LN) commands to support
6683         DESTDIR with "ln" as well as with "ln -s".
6685 2003-01-08  Jason Merrill  <jason@redhat.com>
6687         * parser.c (cp_parser_primary_expression): See through explicitly
6688         scoped ALIAS_DECLs, too.
6690 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6692         * decl.c: Remove some #if 0 code.
6694         * decl.c: ANSIfy function declarations.
6696 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
6698         * parser.c (cp_parser_asm_definition): Correct handling of omitted
6699         operands.
6701 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6703         PR c++/9030
6704         * decl.c (make_typename_type): Check access only when tf_error.
6705         (make_unbound_class_template): Likewise.
6706         * pt.c (saved_access_scope): New variable.
6707         (push_access_scope_real): New function.
6708         (push_access_scope): Likewise.
6709         (pop_access_scope): Likewise.
6710         (tsubst_default_argument): Use them.
6711         (instantiate_template): Likewise.
6712         (regenerate_decl_from_template): Likewise.
6713         (instantiate_decl): Likewise.
6714         (get_mostly_instantiated_function_type): Likewise.
6716 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
6718         * tree.c: Delete bogus #if 0 code.
6720 2003-01-07  Andreas Schwab  <schwab@suse.de>
6722         * class.c (layout_class_type): Don't use
6723         PCC_BITFIELD_TYPE_MATTERS if not defined.
6725 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
6727         PR c++/9165
6728         * decl2.c (build_cleanup): Mark the object as used.
6730         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6731         (hash_local_specialization): New function.
6732         (register_local_specialization): Revert 2003-01-05 change.
6733         (instantiate_decl): Use hash_local_specialization when creating
6734         the local_specializations table.
6736         * decl2.c (mark_used): Do not synthesize thunks.
6738         * class.c (layout_class_type): Correct handling of unnamed
6739         bitfields wider than their types.
6741         PR c++/9189
6742         * parser.c (cp_parser): Remove default_arg_types.  Update
6743         documentation for unparsed_functions_queues.
6744         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6745         parameter.
6746         (cp_parser_new): Don't set parser->default_arg_types.
6747         (cp_parser_function_definition): Adjust usage of
6748         unparsed_funtions_queues.
6749         (cp_parser_class_specifier): Don't mess with
6750         parser->default_arg_types.  Handle default argument processing in
6751         a separate phase from function body processing.
6752         (cp_parser_template_declaration_after_export): Adjust usage of
6753         unparsed_functions_queues.
6754         (cp_parser_late_parsing_for_member): Do not handle default
6755         arguments.
6757 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
6759         PR c++/9109
6760         * parser.c (cp_parser_declarator_kind): New enum.
6761         (cp_parser_declarator): Adjust.
6762         (cp_parser_direct_declarator): Adjust. Allow for either named or
6763         abstract declarator. Prefer abstract, if possible. Allow
6764         parenthesized function name.
6765         (cp_parser_condition): Adjust cp_parser_declarator call.
6766         (cp_parser_explicit_instantiation): Likewise.
6767         (cp_parser_init_declarator): Likewise.
6768         (cp_parser_type_id): Likewise.
6769         (cp_parser_function_definition): Likewise.
6770         (cp_parser_member_declaration): Likewise.
6771         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6772         the tentative parsing.
6773         (cp_parser_exception_declaration): Likewise.
6775 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
6777         * parser.c (cp_parser_template_parameter): Adjust call to
6778         cp_parser_parameter_declaration.
6779         (cp_parser_parameter_declaration_list): Likewise.
6780         (cp_parser_parameter_declaration): Replace
6781         greater_than_is_operator_p with template_parm_p parameter.  Do not
6782         cache tokens for template default arguments.
6784         * pt.c (retrieve_local_specialization): Use htab_find, not
6785         htab_find_with_hash.
6786         (register_local_specialization): Use htab_find_slot, not
6787         htab_find_slot_with_hash.
6788         (instantiate_decl): Pass a hash function to htab_create.
6790 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6792         * parser.c (cp_parser_binary_expression,
6793         cp_parser_multiplicative_expression,
6794         cp_parser_additive_expression, cp_parser_shift_expression,
6795         cp_parser_relational_expression, cp_parser_equality_expression,
6796         cp_parser_and_expression, cp_parser_exclusive_or_expression,
6797         cp_parser_inclusive_or_expression,
6798         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6799         cp_parser_binary_expression): Const-ify.
6801 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
6803         * method.c (use_thunk): Disable access control while building the
6804         body of the thunk.
6806 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
6808         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6809         front end.
6811 2003-01-03  Matt Austern  <austern@apple.com>
6813         * cp-tree.h (struct lang_type_class): add field for key method
6814         (cp_global_trees): rename dynamic_classes to keyed_classes
6815         (key_method): add definition
6816         * class.c (finish_struct_1): compute class's key method, and add
6817         the class to keyed_classes list if there is no key method.
6818         * decl.c (finish_function): add class to keyed_classes list if we
6819         see a definition of the class's key method.
6820         * pt.c (instantiate_class_template): add template specialization
6821         of a dynamic class to keyed_classes list.
6822         * decl2.c (key_method): remove
6823         (finish_file): iterate only through keyed_classes list when
6824         deciding whether to emit vtables, remove class from its list after
6825         we do the emission.
6827 2003-01-02  Jason Merrill  <jason@redhat.com>
6829         * call.c (build_conditional_expr): Stabilize lvalues properly.
6830         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6831         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6832         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6834         * call.c (convert_like_real): Call decl_constant_value for an
6835         IDENTITY_CONV even if there are no more conversions.
6837         * cvt.c (build_up_reference): Don't push unnamed temps.
6839         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6841         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6842         for a backend struct.
6844         * except.c (wrap_cleanups_r, build_throw): Make
6845         MUST_NOT_THROW_EXPRs void.
6846         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6848         * init.c (build_vec_delete_1): Pre-evaluate the base address.
6850         * init.c (get_temp_regvar): Simplify logic.
6852         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6853         our replacement is a decl.
6855         * decl.c (cp_make_fname_decl): Push the decls inside the
6856         outermost scope.
6858 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6860         PR c++/45, c++/3784
6861         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6862         the same too.
6864 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
6866         * parser.c (struct cp_parser): Add access_checks_lists field
6867         (cp_parser_simple_declaration): Use.
6868         (cp_parser_init_declarator): Likewise.
6870 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6872         * parser.c (cp_parser_declaration): Accept the __extension__
6873         keyword before the declaration.
6875         PR c++/2843
6876         * parser.c (cp_parser_parameter_declaration): Allow attributes to
6877         appear after the declarator.
6879         * call.c (build_new_method_call): Fix typo in message format
6880         string.
6882 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6884         * parser.c (cp_lexer_next_token_is): Declare it inline.
6885         (cp_lexer_set_source_position_from_token): Likewise.
6886         (cp_lexer_debugging_p): Likewise.
6887         (cp_parser_parsing_tentatively): Likewise.
6888         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6889         to the cp_lexer_peek_token.
6891         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6892         expression.
6894 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6896         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6897         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6898         cp/repo.c: Fix copyright years.
6900 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
6902         * lex.c: Remove superfluous include of cpplib.h.
6903         (CONSTRAINT): Define without conditions.
6904         (init_cp_pragma): Use c_register_pragma.
6908 Copyright (C) 2003 Free Software Foundation, Inc.
6910 Copying and distribution of this file, with or without modification,
6911 are permitted in any medium without royalty provided the copyright
6912 notice and this notice are preserved.