OSDN Git Service

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