OSDN Git Service

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