5009ebaa25189473ab115b70acd8cc4ae88365aa
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2006-12-21  Andrew Pinski  <pinskia@gmail.com>
2
3         PR C++/30225
4         * decl.c (cxx_builtin_function): Only copy the decl if adding
5         it to the std namespace.
6
7 2006-12-21  Andrew Pinski  <pinskia@gmail.com>
8
9         PR C++/30168
10         * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
11
12 2006-12-22  Kazu Hirata  <kazu@codesourcery.com>
13
14         * decl.c: Fix a coment typo.
15
16 2006-12-18  Ian Lance Taylor  <iant@google.com>
17
18         * decl.c (start_preparsed_function): Add support for
19         -Wmissing-declarations.
20
21 2006-12-16  Simon Martin  <simartin@users.sourceforge.net>
22
23         PR c++/29475
24         * cp-tree.h (struct deferred_access_check): New structure to represent a
25         deferred access check. It replaces the previous representation as a tree.
26         (get_deferred_access_checks): Return a vector of struct
27         deferred_access_check instead of a tree list.
28         (perform_access_checks): Take a vector of struct deferred_access_check
29         instead of a tree list.
30         * semantics.c (struct deferred_access): Store the deferred access checks
31         as a vector of struct deferred_access_check instead of a tree list.
32         (push_deferring_access_checks): Handle the change in struct
33         deferred_access.
34         (get_deferred_access_checks): Likewise.
35         (pop_to_parent_deferring_access_checks): Likewise.
36         (perform_or_defer_access_check): Likewise.
37         (perform_access_checks): Take a vector of struct deferred_access_check
38         instead of a tree list.
39         * parser.c (struct tree_check): New structure to store various data
40         associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
41         (struct cp_token): Changed the value field to be a union with a pointer to
42         a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
43         tokens and a tree field for all other tokens.
44         (eof_token): Adjusted due to the change in struct cp_token.
45         (cp_lexer_get_preprocessor_token): Likewise.
46         (cp_lexer_purge_token): Likewise.
47         (cp_lexer_purge_tokens_after): Likewise.
48         (cp_lexer_print_token): Likewise.
49         (cp_parser_error): Likewise.
50         (cp_parser_identifier): Likewise.
51         (cp_parser_string_literal): Likewise.
52         (cp_parser_primary_expression): Likewise.
53         (cp_parser_unqualified_id): Likewise.
54         (cp_parser_parenthesized_expression_list): Likewise.
55         (cp_parser_storage_class_specifier_opt): Likewise.
56         (cp_parser_function_specifier_opt): Likewise.
57         (cp_parser_type_specifier): Likewise.
58         (cp_parser_simple_type_specifier): Likewise.
59         (cp_parser_initializer_list): Likewise.
60         (cp_parser_member_specification_opt): Likewise.
61         (cp_parser_attribute_list): Likewise.
62         (cp_parser_objc_expression): Likewise.
63         (cp_parser_objc_protocol_qualifiers): Likewise.
64         (cp_parser_objc_selector): Likewise.
65         (cp_parser_objc_declaration): Likewise.
66         (cp_parser_objc_statement): Likewise.
67         (cp_parser_omp_clause_name): Likewise.
68         (cp_parser_omp_clause_default): Likewise.
69         (cp_parser_omp_clause_schedule): Likewise.
70         (cp_parser_omp_parallel): Likewise.
71         (cp_parser_initial_pragma): Likewise.
72         (pragma_lex): Likewise.
73         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
74         (cp_parser_nested_name_specifier_opt): Likewise.
75         Use cp_token::u::tree_check_value to save the token's value, the
76         associated deferred checks and its qualifying scope.
77         (cp_parser_template_id): Likewise.
78         (cp_parser_template_declaration_after_export): Adjusted the call to
79         get_deferred_access_checks.
80         (cp_parser_init_declarator): Take the access checks as a vector of struct
81         deferred_access_check instead of a tree list.
82         (cp_parser_single_declaration): Likewise.
83         (cp_parser_perform_template_parameter_access_checks): Likewise.
84         (cp_parser_simple_declaration): Adjusted the call to
85         cp_parser_init_declarator.
86         (cp_parser_explicit_specialization): Adjusted the call to
87         cp_parser_single_declaration.
88
89 2006-12-13  Ian Lance Taylor  <iant@google.com>
90
91         PR c++/19564
92         PR c++/19756
93         * parser.c (cp_parser_expression_stack_entry): Add field
94         lhs_type.
95         (cp_parser_binary_expression): Track tree code of left hand side
96         of expression.  Use it when calling build_x_binary_op.
97         (cp_parser_selection_statement): Add if_p parameter.  Change all
98         callers.  Warn about ambiguous else.
99         (cp_parser_statement): Add if_p parameter.  Change all callers.
100         (cp_parser_implicitly_scoped_statement): Likewise.
101         * typeck.c (build_x_binary_op): Add parameters arg1_code and
102         arg2_code.  Change all callers.  Call warn_about_parentheses.
103         * cp-tree.h (build_x_binary_op): Update declaration.
104
105 2006-12-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
106
107         * decl.c (build_enumerator): Update error message to match C
108         front-end.
109         
110 2006-12-11  Jan Hubicka  <jh@suse.cz>
111
112         * decl2.c (var_finalized_p): Update for renamed varpool functions.
113
114 2006-12-09  Zack Weinberg  <zackw@panix.com>
115
116         * parser.c (yydebug, enum pragma_omp_clause): Delete.
117
118 2006-12-07  Mark Mitchell  <mark@codesourcery.com>
119
120         PR c++/29732
121         * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
122         (explicit_class_specialization_p): Declare.
123         * pt.c (explicit_class_specialization_p): New function.
124         * parser.c (cp_parser_init_declarator): Check correct number of
125         template parameters for in-class function definitions.
126         (cp_parser_check_declrator_template_parameters): Stop looking for
127         template classes when we find an explicit specialization.
128
129 2006-12-07  Lee Millward  <lee.millward@codesourcery.com>
130
131         PR c++/29980
132         * cp_parser_elaborated_type_specifier: Check
133         the return value of check_elaborated_type_specifier.
134
135 2006-12-06  Mark Mitchell  <mark@codesourcery.com>
136
137         PR c++/29730
138         * parser.c (cp_parser_init_declarator): Reject initialization of
139         functions.
140
141 2006-12-05  Mark Mitchell  <mark@codesourcery.com>
142
143         PR c++/29729
144         * decl2.c (check_member_template): Move check for member
145         templates in local classes to ...
146         * parser.c (cp_parser_template_declaration_after_export):
147         ... here.
148
149         PR c++/29728
150         * decl.c (check_array_designated_initializer): New function.
151         (maybe_deduce_size_from_array_init): Use it.
152         (reshape_init_array): Likewise.
153
154 2006-12-05  Aldy Hernandez  <aldyh@redhat.com>
155
156         Merge from gimple-tuples-branch.
157
158         2006-10-05  Aldy Hernandez  <aldyh@redhat.com>
159
160         * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
161         (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
162         (cxx_omp_clause_copy_ctor): Same.
163         (cxx_omp_clause_assign_op): Same.
164
165         2006-09-28  Aldy Hernandez  <aldyh@redhat.com>
166
167         * cp-tree.h (union lang_tree_node): Gimple statements do not
168         have a TREE_CHAIN.
169         (TREE_INDIRECT_USING): Look in base.
170
171 2006-12-04  Jan Hubicka  <jh@suse.cz>
172
173         * cp-objcp-common.c (cp_expr_size): Return NULL in the case
174         size is undefined.
175
176 2006-12-04  Mark Mitchell  <mark@codesourcery.com>
177
178         PR c++/29733
179         * pt.c (tsubst_decl): Disallow variables of function type.
180
181         PR c++/29632
182         * call.c (add_builtin_candidate): Do not permit NULL pointer
183         constants to be compared with template parameters.
184
185 2006-12-04  Eric Botcazou  <ebotcazou@adacore.com>
186
187         * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
188         Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
189
190 2006-12-03  Richard Henderson  <rth@redhat.com>
191             Andrew Pinski  <pinskia@gmail.com>
192
193         PR C++/14329
194         * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
195
196 2006-12-02  Andrew Pinski  <andrew_pinski@playstation.sony.com>
197
198         PR C++/30033
199         * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
200
201 2006-12-02  Kazu Hirata  <kazu@codesourcery.com>
202
203         * name-lookup.c: Follow spelling conventions.
204
205 2006-12-01  Geoffrey Keating  <geoffk@apple.com>
206
207         * decl.c (poplevel): Check DECL_INITIAL invariant.
208         (duplicate_decls): Preserve DECL_INITIAL when eliminating
209         a new definition in favour of an old declaration.
210         (start_preparsed_function): Define and document value of
211         DECL_INITIAL before and after routine.
212         (finish_function): Check DECL_INITIAL invariant.
213         * parser.c
214         (cp_parser_function_definition_from_specifiers_and_declarator):
215         Skip duplicate function definitions.
216
217 2006-12-01  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
218
219         PR c++/30022
220         * typeck.c (type_after_usual_arithmetic_conversions):
221         Fix assertion for vector types.
222         (build_binary_op): Use temporary for inner type of vector types.
223
224 2006-12-01  Ryan Mansfield  <rmansfield@qnx.com>
225
226         PR c++/29066
227         * typeck.c (build_binary_op):  Fix pointer to member function
228         comparison for ptrmemfunc_vbit_in_delta targets.
229
230 2006-12-01  Dirk Mueller  <dmueller@suse.de>
231
232         PR c++/18313
233         * decl.c (grokdeclarator): Warn for type qualifiers on return
234         type for non-dependent types.
235         * pt.c (tsubst_function_type): Warn for type qualifiers on
236         return type for dependent types.
237
238 2006-11-30  Geoffrey Keating  <geoffk@apple.com>
239
240         * rtti.c (get_tinfo_decl): Handle return value from
241         pushdecl_top_level_and_finish.
242
243 2006-11-29  Lee Millward  <lee.millward@codesourcery.com>
244
245         PR c++/29022
246         * parser.c (cp_parser_class_head): Move processing
247         of any base classes to...
248         (cp_parser_class_specifier) ...here. Take an extra
249         tree* parameter for any base classes. Only process
250         them if the opening brace was found.
251
252 2006-11-28  Jakub Jelinek  <jakub@redhat.com>
253
254         PR c++/29735
255         * decl.c (grokfndecl): Check main's type after applying
256         attributes, not before.
257
258 2006-11-27  Mark Mitchell  <mark@codesourcery.com>
259
260         * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
261         entries for a primary construction virtual table.
262
263 2006-11-26  Mark Mitchell  <mark@codesourcery.com>
264
265         PR c++/29886
266         * parser.c (cp_parser): Add in_function_body.
267         (cp_parser_new): Initialize it.
268         (cp_parser_primary_expression): Use parser->in_function_body
269         instead of at_function_scope_p.
270         (cp_parser_asm_definition): Likewise.
271         (cp_parser_direct_declarator): Likewise.
272         (cp_parser_class_specifier): Clear parser->in_function_body.
273         (cp_parser_constructor_declarator_p): Use parser->in_function_body
274         instead of at_function_scope_p.
275         (cp_parser_function_body_after_declarator): Set
276         parser->in_function_body.
277
278 2006-11-21      Douglas Gregor <doug.gregor@gmail.com>
279
280         * cp-tree.def (STATIC_ASSERT): New.
281         * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
282         * error.c (dump_decl): Handle STATIC_ASSERT.
283         * cp-tree.h (STATIC_ASSERT_CONDITION): New.
284         (STATIC_ASSERT_MESSAGE): New.
285         (STATIC_ASSERT_SOURCE_LOCATION): New.
286         (struct tree_static_assert): New.
287         (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
288         (union lang_tree_node): Add static_assertion.
289         (finish_static_assert): Declare.
290         * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
291         (pp_cxx_declaration): Handle STATIC_ASSERT.
292         * pt.c (instantiate_class_template): Handle
293         STATIC_ASSERT members.
294         (tsubst_expr): Handle STATIC_ASSERT statements.
295         * semantics.c (finish_static_assert): New.
296         * lex.c (D_CPP0X): New.
297         (reswords): Add static_assert keyword.
298         (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
299         * parser.c (cp_parser_block_declaration): Parse static
300         assertions.
301         (cp_parser_static_assert): New.
302         (cp_parser_member_declaration): Parse static assertions.
303
304 2006-11-21  Jakub Jelinek  <jakub@redhat.com>
305
306         PR c++/29570
307         * decl.c (cp_finish_decl): Check for value dependent brace enclosed
308         scalar initializer.
309
310         PR c++/29734
311         * cp-tree.h (WANT_VECTOR): Define.
312         (WANT_ARITH): Add WANT_VECTOR.
313         * cvt.c (build_expr_type_conversion): Handle vector types.
314         * typeck.c (build_unary_op): Add WANT_VECTOR to
315         build_expr_type_conversion flags.
316
317 2006-11-20  Simon Martin  <simartin@users.sourceforge.net>
318
319         PR c++/29475
320         * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
321         extra argument that represents the declaration to use to print
322         potential error messages.
323         * init.c (build_offset_ref): Adjusted the call to
324         perform_or_defer_access_check.
325         * class.c (alter_access, resolve_address_of_overloaded_function):
326         Likewise.
327         * decl.c (make_typename_type, make_unbound_class_template): Likewise.
328         * search.c (lookup_member): Likewise.
329         * friend.c (add_friend): Likewise.
330         * parser.c (cp_parser_template_id,
331         cp_parser_pre_parsed_nested_name_specifier): Likewise.
332         * semantics.c (finish_non_static_data_member,
333         check_accessibility_of_qualified_id, finish_id_expression): Likewise.
334         (pop_to_parent_deferring_access_checks, perform_access_checks,
335         perform_or_defer_access_check): Adjusted the call to enforce_access.
336         * call.c (enforce_access): Use the new extra argument to build the
337         error message.
338         (build_op_delete_call): Adjusted the call to
339         perform_or_defer_access_check.
340         (build_over_call): Likewise.
341
342 2006-11-16  Dirk Mueller  <dmueller@suse.de>
343
344         * name-lookup.c (begin_scope): Use GGC_CNEW instead of
345         GGC_NEW and memset.
346
347 2006-11-13  Roger Sayle  <roger@eyesopen.com>
348
349         * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
350         base type info initializer has the correct type.
351
352 2006-11-13  Mark Mitchell  <mark@codesourcery.com>
353
354         PR c++/29518
355         * pt.c (coerce_template_parms): Do not skip_evaluation while
356         substituting template arguments.
357
358 2006-11-11  Richard Guenther  <rguenther@suse.de>
359
360         * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
361         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
362
363 2006-11-03  Roger Sayle  <roger@eyesopen.com>
364
365         * call.c (build_op_delete_call): Test user-visible type against
366         size_type_node, instead of against the internal type, sizetype.
367         * class.c (type_requires_array_cookie): Likewise.
368         * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
369         handling of TYPE_IS_SIZETYPE.
370         * typeck.c (type_after_usual_arithmetic_conversions): Remove
371         special case handling of TYPE_IS_SIZETYPE.
372         (comptypes): Likewise.
373
374 2006-11-01  Danny Smith  <dannysmith@users.sourceforge.net>
375
376         * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
377         if targetm.cxx.use_atexit_for cxa_atexit.
378         (start_cleanup_fn): Likewise.
379         (register_dtor_fn): Likewise.
380
381 2006-09-25  Geoffrey Keating  <geoffk@apple.com>
382
383         * decl2.c (cp_write_global_declarations): Rename from
384         cp_finish_file.
385         * cp-lang.c (finish_file): Don't call cp_finish_file.
386         * cp-tree.h (cp_write_global_declarations): Rename from
387         cp_finish_file.
388         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
389         cp_write_global_declarations.
390
391 2006-10-31  Geoffrey Keating  <geoffk@apple.com>
392
393         * name-lookup.c (get_anonymous_namespace_name): New.
394         (push_namespace_with_attribs): Use get_anonymous_namespace_name.
395         * decl2.c (start_objects): Update for rename of
396         get_file_function_name_long.
397
398 2006-10-30  Dirk Mueller  <dmueller@suse.de>
399
400         PR c++/28704
401         * decl.c (grokdeclarator): Duplicate diagnostic message
402         for easier translation.
403         * decl.c (grokdeclarator): Fix line-wrapping.
404
405 2006-10-30  Dirk Mueller  <dmueller@suse.de>
406
407         PR c++/6321
408         * decl.c (grokfndecl): Use check_main_parameter_types.
409
410 2006-10-30  Dirk Mueller  <dmueller@suse.de>
411
412         PR c++/28669
413         * decl.c (grokfndecl): Duplicate warning message for
414         easier translation.
415
416 2006-10-30  Dirk Mueller  <dmueller@suse.de>
417
418         * typeck.c (build_unary_op): Fix indenting. Use G_().
419
420 2006-10-29  Dirk Mueller  <dmueller@suse.de>
421
422         PR c++/29089
423         * typeck.c (build_unary_op): Duplicate warning message
424         for easier translation.
425
426 2006-10-29  Dirk Mueller  <dmueller@suse.de>
427
428         PR c++/16307
429         * typeck.c (build_array_ref): Warn for char subscriptions
430         on pointers.
431
432 2006-10-29  Kazu Hirata  <kazu@codesourcery.com>
433
434         * decl.c: Fix a comment typo.
435
436 2006-10-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
437
438         PR C++/29295
439         * typeck.c (build_unary_op): Use same_type_p when comparing to
440         boolean type.
441
442 2006-10-29  Dirk Mueller  <dmueller@suse.de>
443
444         PR c++/29033
445         * typeck.c (build_binary_op): Duplicate warning message
446         for better translation.
447
448 2006-10-23  Rafael Avila de Espindola  <rafael.espindola@gmail.com>
449
450         * decl.c (builtin_function_1): Move common code to
451         add_builtin_function.
452         (builtin_function): Rename to cxx_builtin_function.
453         Change the signature.
454         * call.c: Include langhooks.h.
455         (build_java_interface_fn_ref):  Replace calls to
456         builtin_function with add_builtin_function.
457         * Make-lang.in (cp/call.o): Depend on langhooks.h.
458         * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
459         cxx_builtin_function.
460         * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
461         Change the signature.
462
463 2006-10-22  Nathan Sidwell  <nathan@codesourcery.com>
464
465         PR c++/20647
466         * rtti.c (tinfo_base_init): The type info string is always global.
467
468 2006-10-20  Lee Millward  <lee.millward@codesourcery.com>
469             Mark Mitchell <mark@codesourcery.com>
470
471         PR c++/28053
472         * decl2.c (grokbitfield): Detect invalid non-integral
473         types earlier when possible.
474
475 2006-10-18  Mark Shinwell  <shinwell@codesourcery.com>
476
477         PR c++/26884
478         * typeck2.c (digest_init): Raise error upon attempts to
479         initialize arrays with variables.
480
481 2006-10-17  Lee Millward  <lee.millward@codesourcery.com>
482
483         PR c++/27952
484         * cp-tree.h (xref_basetypes): Return bool instead of void.
485         * decl.c (xref_basetypes): Adjust definition. Return false
486         if the class bases are invalid.
487         * parser.c (cp_parser_class_head): Check the return value
488         from xref_basetypes.
489
490 2006-10-17  Mark Mitchell  <mark@codesourcery.com>
491
492         PR c++/28261
493         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
494         comment.
495
496         PR c++/28261
497         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
498         function.
499         (cp_parser_constructor_declarator_p): Use it.
500         (cp_parser_check_type_definition): Return a value indicating
501         whether or not the definition is valid.
502         (cp_parser_enum_specifier): Skip invalid enum definitions.
503
504 2006-10-17  Mark Mitchell  <mark@codesourcery.com>
505
506         PR c++/29039
507         * typeck2.c (build_functional_cast): Don't zero-initialize
508         non-PODs; instead, call their constructors.
509         * method.c (synthesize_method): Always build mem-initializers, if
510         we're synthesizing the default constructor.
511
512 2006-10-17  Mark Mitchell  <mark@codesourcery.com>
513
514         PR c++/27270
515         * decl.c (reshape_init_class): Move check for designated
516         to ...
517         * parser.c (cp_parser_initializer_list): ... here.
518         * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
519
520 2006-10-16  Mark Mitchell  <mark@codesourcery.com>
521
522         PR c++/27270
523         * typeck2.c (process_init_constructor_array): Reword comment.
524         * pt.c (tsubst_copy_and_built): Call reshape_init before calling
525         digest_init.
526
527         PR c++/29408
528         * parser.c (cp_parser_using_declaration): Stop parsing when
529         something goes wrong with an access declaration.
530
531         PR c++/29435
532         * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
533         types when their sizes are required.  Refine test for VLAs.
534
535         PR c++/28211
536         * parser.c (cp_parser_template_argument): Don't consider "&var" a
537         possible constant-expression.
538         * pt.c (convert_nontype_argument): Refine handling of arguments of
539         pointer type.
540
541 2006-10-13  Mark Mitchell  <mark@codesourcery.com>
542
543         PR c++/28506
544         * parser.c (function_declarator_p): New function.
545         (cp_parser_init_declarator): Use it.
546         (cp_parser_member_declaration): Likewise.
547
548 2006-10-12  Mark Mitchell  <mark@codesourcery.com>
549
550         PR c++/29318
551         * rtti.c (get_tinfo_decl): Refuse to create type info objects for
552         variably modified types.
553
554 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
555
556        PR c++/27961
557        * decl.c (start_decl): Return error_mark_node if a
558        function is initialized like a variable.
559        (check_var_type): If a variable of field is declared void,
560        set the type to error_mark_node.
561        (grokdeclarator): Check the return type of check_var_type.
562        * class.c (finish_struct_1): Robustify.
563
564 2006-10-11  Mark Mitchell  <mark@codesourcery.com>
565
566         PR c++/29175
567         * decl.c (check_initializer): Issue errors about trying to
568         initialize arrays whose elements have variable size.
569
570 2006-10-11  Lee Millward  <lee.millward@codesourcery.com>
571
572         PR c++/29024
573         * cp-tree (struct cp_decl_specifier_seq): Rename to
574         conflicting_specifiers_p
575         * parser.c (cp_parser_set_storage_class): Set
576         conflicting_specifiers_p for the input decl specifier
577         if a typedef specifier is present. Rename uses of
578         multiple_specifiers_p to conflicting_specifiers_p.
579         (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
580         class specifier has already been set for this declaration,
581         set conflicting_specifiers_p to true on the decl_specs.
582         * decl.c (grokdeclarator): Rename uses of
583         multiple_specifiers_p to conflicting_specifiers_p.
584
585 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
586
587         * Make-lang.in: Added "c++.pdf" target support.
588
589 2006-10-10  Richard Guenther  <rguenther@suse.de>
590
591         PR rtl-optimization/29323
592         * decl.c (finish_function): Set TREE_NOTHROW only for
593         functions that bind local.
594
595 2006-10-09  Richard Henderson  <rth@redhat.com>
596
597         Revert emutls patch.
598
599 2006-10-04  Richard Henderson  <rth@redhat.com>
600             Jakub Jelinek  <jakub@redhat.com>
601
602         * decl.c (grokvardecl): Don't error if !have_tls.
603         (grokdeclarator): Likewise.
604         * parser.c (cp_parser_omp_threadprivate): Likewise.
605
606 2006-10-03  Mark Mitchell  <mark@codesourcery.com>
607
608         PR c++/29020
609         * friend.c (do_friend): Improve comments; add assertion.
610         * parser.c (cp_parser_nested_name_specifier_opt): Resolve
611         typenames for qualified names used in declarations, even when
612         caching qualified name lookup.
613
614         PR c++/29138
615         * decl2.c (grokfield): Don't handle access declarations here.
616         * parser.c (cp_parser_using_declaration): Handle access
617         declarations too.
618         (cp_parser_block_declaration): Adjust calls to
619         cp_parser_using_declaration.
620         (cp_parser_member_declaration): Likewise.  Use
621         cp_parser_using_declaration to look for access_declarations.
622
623 2006-10-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
624
625         PR c++/29291
626         * init.c (build_new): Check for invalid init.
627
628 2006-10-02  Mark Mitchell  <mark@codesourcery.com>
629
630         PR c++/29226
631         * typeck.c (cxx_sizeof_or_alignof_type): Tidy.  In templates, do
632         not try to actually evaluate sizeof for a VLA type.
633
634 2006-10-01  Mark Mitchell  <mark@codesourcery.com>
635
636         PR c++/29105
637         * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
638         * semantics.c (baselink_for_fns): Build a baselink, even when
639         processing a template.
640
641         PR c++/29080
642         * parser.c (cp_parser_postfix_dot_deref_expression): Use
643         BASELINK_ACCESS_BINFO as the qualifying scope when calling
644         adjust_result_of_qualified_name_lookup.
645
646 2006-09-25  Lee Millward  <lee.millward@codesourcery.com>
647
648         PR c++/27329
649         PR c++/26938
650         * cp-tree.h (redeclare_class_template): Adjust declaration
651         to return bool instead of void.
652         * pt.c (redeclare_class_template): Update definition.
653         Return false on error.
654         * decl.c (xref_tag): Return error_mark_node if
655         redeclare_class_template returned false.
656
657         PR c++/27667
658         * cp-tree.h (begin_specialization): Return bool
659         instead of void.
660         * pt.c (check_specialization_scope): Likwise.
661         Adjust comment. Return false if a specialization
662         isn't permitted in the current scope.
663         (begin_specialization): Use the return value of
664         check_specialization_scope.
665         * parser.c (cp_parser_explicit_specialization): If
666         begin_specialization returned false, skip the rest
667         of the specialization.
668
669 2006-09-21  Mark Mitchell  <mark@codesourcery.com>
670
671         PR c++/29016
672         * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
673         BASELINK.
674
675 2006-09-21  Lee Millward  <lee.millward@codesourcery.com>
676
677         PR c++/28861
678         * decl.c (shadow_tag): Return error_mark_node
679         if maybe_process_partial_specialization failed.
680
681         PR c++/28303
682         * decl.c (grokdeclarator): Return error_mark_node on
683         declaration with two or more data types.
684
685 2006-09-20  Danny Smith  <dannysmith@users.sourceforge.net>
686
687         PR target/27650
688         * class.c (check_for_override): Remove dllimport from virtual
689         methods.
690
691 2006-09-18  Steven Bosscher  <steven@gcc.gnu.org>
692
693         PR c++/29087
694         * parser.c (cp_parser_labeled_statement): Return nothing.  Do
695         not take in_statement_expr and in_compound as arguments.  Rename
696         to cp_parser_label_for_labeled_statement.  Parse only the label,
697         not the statement.
698         (cp_parser_statement): Parse the statement of a labeled-statement
699         from here, using tail recursion.
700
701 2006-09-14  Andrew Pinski  <pinskia@physics.uc.edu>
702
703         PR C++/29002
704         * init.c (build_zero_init): If we have an error mark node for
705         the array size, return.
706
707 2006-09-10  Mark Mitchell  <mark@codesourcery.com>
708
709         PR c++/28991
710         * cp-objcp-common.c (cxx_staticp): New function.
711         * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
712         * cp-tree.h (cxx_staticp): New function.
713
714 2006-09-09  Jason Merrill  <jason@redhat.com>
715
716         PR c++/28996
717         * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
718
719 2006-09-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
720
721         PR c++/28858
722         * parser.c (cp_parser_skip_until_found): Rename to
723         cp_parser_skip_to_end_of_template_parameter_list.  Remove last two
724         parameters.  Track levels of '< ... >'.  Stop at '{', '}', or ';'.
725         Reorganize.  Adjust comment.
726         (cp_parser_template_declaration_after_export): Adjust call.
727         (cp_parser_enclosed_template_argument_list): Likewise.
728
729 2006-09-07  Andrew Pinski  <pinskia@physics.uc.edu>
730
731         PR C++/28906
732         * init.c (build_new_1): Build a distinct type copy
733         for the array type that was returned from
734         build_cplus_array_type.
735
736 2006-09-07  Jason Merrill  <jason@redhat.com>
737
738         PR c++/27371
739         * cvt.c (convert_to_void): Enable previous change.
740
741         PR c++/26957
742         * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
743         parms.
744
745 2006-09-07  Simon Martin  <simartin@users.sourceforge.net>
746
747         PR c++/28284
748         * pt.c (fold_non_dependent_expr): Make sure expr is not
749         dereferenced if it is NULL.
750
751 2006-09-06  Zak Kipling  <zak@transversal.com>
752
753         PR c++/26195
754         * decl.c (make_rtl_for_nonlocal_decl),
755         (start_preparsed_function): Don't use lbasename on
756         input_filename when calling get_fileinfo.
757         * semantics.c (begin_class_definition): Likewise.
758         * lex.c (cxx_make_type): Likewise.
759         (handle_pragma_interface): Call get_fileinfo on input_filename,
760         not on the parameter to the directive.
761
762 2006-09-06  Mark Mitchell  <mark@codesourcery.com>
763
764         PR c++/28903
765         * pt.c (tsubst): Use fold_non_dependent_expr to fold array
766         dimensions.
767
768         PR c++/28886
769         * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
770         dimensions.
771
772 2006-09-06  Jason Merrill  <jason@redhat.com>
773
774         PR c++/27371
775         * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
776         * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
777         * tree.c (build_cplus_new): Set it.
778
779         PR c++/26696
780         * cvt.c (convert_to_void): Replace a subexpression with no side
781         effects with void_zero_node.
782         * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
783         (get_first_fn): Ditto.
784         * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
785
786 2006-09-05  Jason Merrill  <jason@redhat.com>
787
788         PR c++/26571
789         * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
790         where the name is a type used incorrectly.
791
792         PR c++/26671
793         * typeck.c (maybe_warn_about_returning_address_of_local): Look
794         through COMPONENT_REF and ARRAY_REF.
795
796         PR c++/26102
797         * name-lookup.c (do_class_using_decl): Try to find the base even
798         if bases_dependent_p.
799         * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
800
801         PR c++/19809
802         * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
803
804 2006-09-04  Nathan Sidwell  <nathan@codesourcery.com>
805
806         PR 23287 Revert my 2006-09-01 patch.
807         * parser.c: Reverted.
808         * pt.c: Reverted.
809
810 2006-09-02  Lee Millward  <lee.millward@codesourcery.com>
811
812         PR c++/27670
813         PR c++/27493
814         PR c++/27494
815         PR c++/27397
816         * parser.c (cp_parser_template_parameter_list): Add
817         invalid template parameters to the parameter list as
818         error_mark_node.
819
820 2006-09-02  Jakub Jelinek  <jakub@redhat.com>
821
822         PR c++/28878
823         * except.c (build_throw): Only set current_function_returns_abnormally
824         if cfun is not NULL.
825
826         PR c++/26917
827         * repo.c (repo_file): Remove.
828         (open_repo_file, reopen_repo_file_for_write): Return fopened
829         FILE * instead of setting global repo_file variable.
830         (init_repo): Adjust caller.
831         (finish_repo): Likewise.  Return instead of goto out before
832         reopen_repo_file_for_write has been called.
833
834 2006-09-01  Nathan Sidwell  <nathan@codesourcery.com>
835
836         PR c++/28705
837         * semantics.c (finish_call_expr): Add assert.
838         * name-lookup.c (lookup_arg_dependent): Check we found an overload
839         or an object.
840
841         PR c++/23287
842         * parser.c (cp_parser_id_expression): Add member_p
843         argument. Update all callers.
844         (cp_parser_unqualified_id): Likewise.  Lookup a destructor name in
845         the object's scope, if valid.
846         (cp_parser_global_scope_opt): Add object_scope_valid_p.  Update
847         callers.
848         (cp_parser_postfix_dot_deref_expression): Set object_scope.
849         * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
850
851 2006-08-30  Jason Merrill  <jason@redhat.com>
852
853         PR c++/26670
854         * class.c (check_field_decls): Don't unset TYPE_PACKED until all
855         the fields have been processed.
856
857 2006-08-29  Andrew Pinski  <pinskia@physics.uc.edu>
858
859         PR C++/28349
860         * call.c (build_x_va_arg): Remove the reference type
861         from the type before creating the pointer type.
862
863 2006-08-29  J"orn Rennecke  <joern.rennecke@st.com>
864
865         PR c++/28139
866         * except.c (expand_start_catch_block): Use correct types for bitwise
867         copy.
868
869 2006-08-28  Jason Merrill  <jason@redhat.com>
870
871         PR c++/26670
872         * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
873         fields can't be packed.
874
875         PR c++/26577
876         * cvt.c (convert_to_void): Don't automatically load from volatiles
877         of TREE_ADDRESSABLE type.
878
879 2006-08-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
880
881         PR c++/28860
882         * cp-tree.h (maybe_process_partial_specialization): Return
883         tree instead of void.
884         * parser.c (cp_parser_class_head): Use return value of
885         maybe_process_partial_specialization.
886         * pt.c (maybe_process_partial_specialization): Return error_mark_node
887         for broken specializations, TYPE otherwise.  Check for template
888         template parameters.
889
890 2006-08-27  Mark Mitchell  <mark@codesourcery.com>
891
892         PR c++/28058
893         * pt.c (register_specialization): Return error_mark_node for
894         specialization-after-instantiation.
895         * decl2.c (mark_used): Mark the main function used when one of its
896         clones is used.
897
898 2006-08-27  Lee Millward  <lee.millward@codesourcery.com>
899
900         PR c++/26573
901         * class.c (check_field_decls): Don't issue error about
902         local classes containing static data members.
903
904 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
905
906         PR c++/24009
907         * parser.c (struct cp_token): Add input_file_stack_index.
908         (eof_token): Update.
909         (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
910         (cp_lexer_set_source_position_from_token): Restore input file
911         stack.
912
913 2006-08-26  Lee Millward  <lee.millward@codesourcery.com>
914
915         PR c++/28736
916         PR c++/28737
917         PR c++/28738
918         * pt.c (process_template_parm): Store invalid template
919         parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
920         (push_inline_template_parms_recursive): Check for template
921         parameters having a TREE_VALUE of error_mark_node rather than
922         check the parameter itself.
923         (mangle_class_name_for_template): Likewise.
924         (comp_template_parms): When comparing the individual template
925         parameters, return 1 if either is error_mark_node.
926         (current_template_args): Robustify.
927         (redeclare_class_template): Likewise.
928
929 2006-08-26  Mark Mitchell  <mark@codesourcery.com>
930
931         PR c++/28588
932         * class.c (resolve_address_of_overloaded_function): Add
933         access_path parameter.  Perform access checks.
934         (instantiate_type): Adjust call to
935         resolve_address_of_overloaded_function.  Remove unnecessary code.
936         * tree.c (is_overloaded_fn): Document.  Return 2 when there are
937         acutally multiple functions.
938         (really_overloaded_fn): Use is_overloaded_fn.
939         * mangle.c (write_expression): Handle BASELINKs.
940         * cp-tree.h (really_overloaded_fn): Return bool.
941         (baselink_for_fns): Declare.
942         * search.c (lookup_member): Check access for single static
943         functions here.
944         * pt.c (convert_nontype_argument_function): Handle BASELINKs.
945         (tsubst_copy_and_build): Generate BASELINKs for template-ids.
946         * semantics.c (finish_call_expr): Use baselink_for_fns.
947         (baselink_for_fns): New function.
948         (finish_id_expression): Use it.
949         * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
950
951         PR c++/28595
952         * pt.c (tsubst): Issue errors about attempts to create VLAs at
953         template-instantiation time.
954
955 2006-08-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
956
957         PR c++/28853
958         * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
959         template parameters.  Improve error message for template type
960         parameters.
961
962         PR c++/28852
963         * cp-tree.h (grok_op_properties): Return bool instead of void.
964         * decl.c (grokfndecl): Discard invalid operator declarations.
965         (copy_fn_p): Revert change for PR 27547.
966         (grok_op_properties): Return error status (true on success).
967         * pt.c (tsubst_decl): Discard invalid operator declarations.
968
969 2006-08-25  Mark Mitchell  <mark@codesourcery.com>
970
971         PR c++/28056
972         * decl.c (grokdeclarator): Disallow declarations with qualified
973         names in local scopes.
974
975 2006-08-25  Nathan Sidwell  <nathan@codesourcery.com>
976
977         PR c++/27787
978         * decl.c (make_typename_type): Only try and resolve it when
979         context is not dependent.  Refactor.
980         * decl2.c (check_classfn): Push to class scope before looking for
981         the function.
982
983 2006-08-24  Danny Smith   <dannysmith@users.sourceforge.net>
984
985         PR driver/28528
986         * g++spec.c (lang_specific_driver): Always check if we need to
987         swallow a space-separated  arg to '-x'.
988         * lang-specs.h: Don't create ouput files for '-xc++-header'
989         if -fsyntax-only.
990
991 2006-08-23  Jason Merrill  <jason@redhat.com>
992
993         PR c++/27714
994         * pt.c (push_template_decl_real): A friend template with class
995         scope isn't primary.
996
997 2006-08-23  Benjamin Smedberg <benjamin@smedbergs.us>
998
999         PR c++/28687
1000         * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
1001         Move -fno-rtti check to be more specific.
1002
1003 2006-08-22  Jason Merrill  <jason@redhat.com>
1004
1005         PR c++/23372
1006         * call.c (build_over_call): Don't make a copy here if build_call
1007         will make one too.
1008
1009 2006-08-22  Andrew Pinski  <pinskia@physics.uc.edu>
1010
1011         PR C++/28450
1012         * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
1013         COMPLEX_TYPEs.
1014
1015 2006-08-22  Simon Martin  <simartin@users.sourceforge.net>
1016
1017         PR c++/28420
1018         * parser.c (cp_parser_postfix_expression): Make sure that the
1019         saved value for parser->type_definition_forbidden_message is
1020         restored before returning to avoid an invalid free().
1021
1022 2006-08-22  Jason Merrill  <jason@redhat.com>
1023
1024         PR c++/28659
1025         * typeck.c (merge_types): If either of the types have the right
1026         attributes, return that one.
1027
1028         * tree.c (cp_build_type_attribute_variant): Make sure we aren't
1029         doing this to class types.
1030         * typeck.c (original_type): Deal with type quals properly.
1031
1032 2006-08-21  Jason Merrill  <jason@redhat.com>
1033
1034         PR c++/27115
1035         * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
1036         just leave the expression as it is.
1037         (finish_stmt_expr): If the statement-expression has class type,
1038         wrap it in a TARGET_EXPR.
1039         * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
1040         CLEANUP_POINT_EXPR.
1041         * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
1042
1043 2006-08-21  Lee Millward  <lee.millward@codesourcery.com>
1044
1045         PR c++/26269
1046         * decl.c (duplicate_decls): Return early if either
1047         newdecl or olddecl is error_mark_node.
1048
1049          PR c++/28505
1050         * decl.c (grokdeclarator): Return early after
1051         issuing diagnostic about an incomplete type.
1052
1053         PR c++/28741
1054         * tree.c (decl_anon_ns_mem_p): Robustify.
1055         * decl2.c (determine_visibility): Likewise.
1056
1057 2006-08-20  Mark Mitchell  <mark@codesourcery.com>
1058
1059         PR c++/28341
1060         * tree.c (cast_valid_in_integral_constant_expression_p): New
1061         function.
1062         * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
1063         * pt.c (tsubst_expr): Add integral_constant_expression_p
1064         parameter.
1065         (fold_non_dependent_expr): Adjust callers of
1066         tsubst_{expr,copy_and_build}.
1067         (tsubst_friend_function): Likewise.
1068         (tsubst_template_arg): Likewise.
1069         (tsubst_default_argument): Likewise.
1070         (tsubst_decl): Likewise.
1071         (tsubst): Likewise.
1072         (tsubst_omp_clasuses): Likewise.
1073         (regenerate_decl_fromp_template): Likewise.
1074         (instantiate_decl): Likewise.
1075         (tsubst_initializer_list): Likewise.
1076         (tsubst_enum): Likewise.
1077         (tsubst_expr): Use RECUR throughout.
1078         (tsubst_copy_and_build): Change definition of RECUR.  Do not allow
1079         invalid casts in integral constant expressions.
1080         * parser.c (cp_parser_postfix_expression): Use
1081         cast_valid_in_integral_constant_expression_p.
1082         (cp_parser_cast_expression): Likewise.
1083         (cp_parser_functional_cast): Likewise.
1084
1085         PR c++/28346
1086         * pt.c (tsubst_qualified_id): Do not strip references from
1087         OFFSET_REFs.
1088
1089 2006-08-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1090
1091         PR c++/28606
1092         * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
1093         Fix formatting.
1094         (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
1095         for valid type-names.
1096         (cp_parser_unqualified_id): Fix error handling for destructors.
1097
1098         PR c++/28710
1099         * decl.c (xref_tag): Improve error message.  Return early on error.
1100
1101         PR c++/28711
1102         * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
1103
1104 2006-08-17  Paolo Bonzini  <bonzini@gnu.org>
1105
1106         PR c++/28573
1107         * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
1108
1109 2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
1110
1111         PR c++/28302
1112         * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
1113         perform_integral_promotions for non integral type.
1114
1115 2006-08-16  Jason Merrill  <jason@redhat.com>
1116
1117         PR c++/28385
1118         * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
1119         if arg is a function.
1120
1121 2006-08-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1122
1123         PR c++/28593
1124         * init.c (build_new): Return early on invalid placement.
1125
1126 2006-08-15  Lee Millward  <lee.millward@codesourcery.com>
1127
1128         PR c++/28594
1129         * pt.c (process_template_parm): Robustify.
1130
1131 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
1132
1133         PR c++/28288
1134         PR c++/14556
1135         * operators.def: Remove <?, ?>, <?=, and >?= operators.
1136         * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
1137         (cp_parser_warn_min_max): Remove.
1138
1139 2006-08-11  Jason Merrill  <jason@redhat.com>
1140
1141         PR c++/28559
1142         * parser.c (cp_parser_elaborated_type_specifier): Also ignore
1143         attributes applied to a TYPENAME_TYPE.
1144
1145 2006-08-09  Lee Millward  <lee.millward@codesourcery.com>
1146
1147         PR c++/28637
1148         * pt.c (coerce_template_parms): Copy across the
1149         invalid template arguments to the new template inner arguments.
1150         (retrieve_specialization): Robustify.
1151
1152         PR c++/28638
1153         * pt.c (coerce_template_template_parms): Robustify.
1154
1155         PR c++/28639
1156         * error.c (dump_template_parms): Robustify.
1157
1158         PR c++/28640
1159         * pt.c (redeclare_class_template): Robustify.
1160
1161         PR c++/28641
1162         * pt.c (type_unification_real): Robustify.
1163
1164 2006-08-03  Lee Millward  <lee.millward@codesourcery.com>
1165
1166         PR c++/28347
1167         * decl.c (start_decl): Return error_mark_node if a
1168         diagnostic was issed for an invalid typedef initialization.
1169
1170 2006-08-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1171
1172         PR c++/27508
1173         * parser.c (cp_parser_unqualified_id): Check for invalid scopes
1174         when parsing destructor names.
1175
1176         PR c++/28274
1177         * decl.c (duplicate_decls): Call check_default_args here.
1178         (start_preparsed_function): Do not call check_default_args.
1179         * name-lookup.c (pushdecl_maybe_friend): Only call
1180         check_default_args if duplicate_decls got bypassed.
1181
1182 2006-08-02  Richard Guenther  <rguenther@suse.de>
1183
1184         PR c++/28479
1185         Revert
1186         2006-07-05  Richard Guenther  <rguenther@suse.de>
1187         Andrew Pinski  <pinskia@gcc.gnu.org>
1188
1189         PR c++/27084
1190         * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1191         top level qualifiers for pointer type comparisons.
1192
1193 2006-08-02  Mark Mitchell  <mark@codesourcery.com>
1194
1195         PR c++/28557
1196         * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
1197
1198 2006-07-31  Mark Mitchell  <mark@codesourcery.com>
1199
1200         PR c++/28523
1201         * tree.c (stabilize_expr): Tweak documentation.  Add assertion.
1202         (stabilize_call): Tweak documentation.
1203         (stabilize_init): Only call stabilize_call for calls.
1204
1205 2006-08-01  Steve Ellcey  <sje@cup.hp.com>
1206
1207         PR c++/28432
1208         * decl2.c (check_classfn): Remove early return.
1209         * search.c (lookup_member): Return NULL with bad type.
1210
1211 2006-08-01  Steve Ellcey  <sje@cup.hp.com>
1212
1213         PR c++/28256
1214         * decl.c (check_initializer): Check for 1 initializer on scalar types.
1215
1216 2006-08-01  Daniel Jacobowitz  <dan@codesourcery.com>
1217
1218         PR debug/23336
1219         * pt.c (tsubst_copy_and_build): Mark used enum types.
1220         * semantics.c (finish_id_expression): Likewise.
1221
1222 2006-07-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1223
1224         PR c++/6634
1225         * decl.c (grokdeclarator): Check whether "long" or "short" was
1226         specified for non-integral types.
1227
1228 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1229
1230         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1231
1232 2006-07-28  Lee Millward  <lee.millward@codesourcery.com>
1233
1234         PR c++/27668
1235         PR c++/27962
1236         * pt.c (process_template_parm) Store invalid template
1237         parameters as error_mark_node in the paramater list.
1238         (push_inline_template_parms_recursive): Handle invalid
1239         template parameters.
1240         (comp_template_parms): Likewise.
1241         (check_default_tmpl_arg): Likewise.
1242         (coerce_template_template_parms): Likewise.
1243         (mangle_class_name_for_template): Likewise.
1244         (tsubst_template_parms): Likewise.
1245         * error.c (dump_template_argument_list): Likewise.
1246
1247 2006-07-28  Kazu Hirata  <kazu@codesourcery.com>
1248
1249         * cp-tree.h: Fix a comment typo.
1250
1251 2006-07-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1252
1253         PR c++/27572
1254         * decl.c (grokdeclarator): Return error_mark_node after invalid
1255         typedef.
1256
1257 2006-07-23  Daniel Jacobowitz  <dan@codesourcery.com>
1258
1259         PR c++/28460
1260         * decl.c (grokvardecl): Use FROB_CONTEXT.
1261         * pt.c (register_specialization): Likewise.
1262
1263 2006-07-23  Mark Mitchell  <mark@codesourcery.com>
1264
1265         PR c++/28025
1266         * cp-tree.h (LOOKUP_HIDDEN): New macro.  Reformat comments.
1267         * name-lookup.c (unqualified_namespace_lookup): There is no way to
1268         have a hidden name in non-namespace scopes.
1269         * pt.c (tsubst_friend_class): Look for hidden names.
1270         * decl.c (lookup_and_check_tag): Fix typo in comment.
1271
1272         * semantics.c (finish_compound_literal): Fix typo in comment.
1273
1274 2006-07-21  Jason Merrill  <jason@redhat.com>
1275
1276         * decl2.c (determine_visibility): Don't propagate visibility from
1277         type to decl.
1278         (constrain_class_visibility): Don't warn in system headers.
1279         Don't warn about pointer fields.
1280
1281 2006-07-20  Mike Stump  <mrs@apple.com>
1282
1283         * decl2.c (determine_visibility_from_class): Don't use hidden
1284         visibility for explicit instantiations.
1285
1286 2006-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1287
1288         PR c++/28250
1289         * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
1290         valid decls.  Cleanup.
1291
1292         PR c++/28363
1293         * semantics.c (check_template_template_default_arg): Simplify
1294         error handling.
1295
1296 2006-07-20  Jason Merrill  <jason@redhat.com>
1297
1298         PR c++/28407
1299         * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
1300         const variables with implicit internal linkage.
1301         * tree.c (decl_linkage): Only return lk_external if it's set.
1302
1303         PR c++/28409
1304         * decl2.c (constrain_visibility): Ignore the anonymous namespace
1305         for extern "C" decls.
1306         (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
1307
1308         * decl2.c (constrain_visibility): Remove specified and reason
1309         parameters.  Don't touch decls that already have explicit visibility.
1310         (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
1311         template.
1312         (determine_visibility_from_class): Reverse sense of
1313         DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
1314         (constrain_class_visibility): Only complain about member visibility
1315         if the member type is another class.  Don't change visibility of the
1316         current class.
1317
1318 2006-07-19  Mark Mitchell  <mark@codesourcery.com>
1319
1320         PR c++/28338
1321         * decl.c (layout_var_decl): Don't call push_local_name here.
1322         (initialize_artificial_var): Assert artificiality.
1323         (cp_finish_decl): Call push_local_name here.
1324
1325 2006-07-18  Mark Mitchell  <mark@codesourcery.com>
1326
1327         PR c++/28337
1328         * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
1329         templates.
1330
1331 2006-07-18  Mark Mitchell  <mark@codesourcery.com>
1332
1333         PR c++/28048
1334         * semantics.c (check_accessibility_of_qualified_id): Robustify.
1335
1336         PR c++/28235
1337         * pt.c (tsubst_decl): Handling substitutions into a static data
1338         member from within the scope of the tempalte itself.
1339
1340 2006-07-18  Lee Millward  <lee.millward@gmail.com>
1341
1342         PR c++/28258
1343         * method.c (locate_copy): Check for non_reference
1344         returning error_mark_node.
1345
1346         PR c++/28260
1347         * decl.c (duplicate_decls): Return error_mark_node
1348         on ambiguous declaration.
1349
1350 2006-07-18  Steve Ellcey  <sje@cup.hp.com>
1351
1352         PR c++/27495
1353         * search.c (adjust_result_of_qualified_name_lookup): Change
1354         assert to part of if statement.
1355
1356 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
1357
1358         PR c++/28291
1359         * decl.c (reshape_init_class): Return error_mark_node on error.
1360
1361 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
1362
1363         PR c++/28304
1364         * decl2.c (check_classfn): Return NULL_TREE on error.
1365
1366 2006-07-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1367
1368         PR c++/28250
1369         * name-lookup.c (pushdecl_maybe_friend): Return early on
1370         error_mark_node.
1371         * except.c (expand_start_catch_block): Use error_mark_node instead
1372         of NULL_TREE for invalid decls.
1373         * parser.c (cp_parser_exception_declaration): Return error_mark_node
1374         on invalid catch parameter. Simplify.
1375
1376 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
1377
1378         PR c++/28370
1379         * decl2.c (note_vague_linkage_var): Removed.
1380         (finish_static_data_member_decl): Add decl to pending_statics vector
1381         directly.  Do it even for non-public decls.
1382
1383 2006-07-15  Lee Millward  <lee.millward@gmail.com>
1384
1385         PR c++/28292
1386         * decl2.c (acceptable_java_type): Robustify. Use
1387         proper Boolean return type instead of return 1.
1388         (check_java_method): Don't issue error about
1389         type not being an acceptable Java parameter if
1390         it's error_mark_node.
1391
1392         PR c++/28269
1393         * parser.c (cp_parser_elaborated_type_specifier):
1394         Return early if an invalid type was detected.
1395
1396 2006-07-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1397
1398         PR c++/28249
1399         * parser.c (cp_parser_check_decl_spec): New function.
1400         (cp_parser_decl_specifier_seq): Factor out check for repeated
1401         decl-specifiers into cp_parser_check_decl_spec. Use it.
1402         (cp_parser_type_specifier_seq): Use it.
1403
1404         PR c++/28294
1405         * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
1406         only.
1407
1408         PR c++/28387
1409         * decl2.c (cplus_decl_attributes): Check for invalid decls.
1410
1411 2006-07-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1412
1413         PR c++/28343
1414         * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
1415         * decl2.c (grokfield): Likewise.
1416
1417 2006-07-12  Geoffrey Keating  <geoffk@apple.com>
1418
1419         * decl2.c (determine_visibility): Don't change visibility of
1420         function locals because of -fvisibility-inlines-hidden.
1421
1422 2006-07-12  Jason Merrill  <jason@redhat.com>
1423
1424         PR c++/28217
1425         * semantics.c (note_decl_for_pch): Don't premangle templates.
1426
1427 2006-07-12  Martin Michlmayr  <tbm@cyrius.com>
1428
1429         * typeck.c (string_conv_p): Remove spurious quotation mark in
1430         warning.
1431
1432 2006-07-07  Lee Millward  <lee.millward@gmail.com>
1433             Andrew Pinski  <pinskia@gmail.com>
1434
1435         PR c++/27820
1436         * decl.c (define_label): Return error_mark_node on error.
1437         * semantics.c (finish_label_stmt): Don't call
1438         add_stmt for invalid labels.
1439
1440 2006-07-06  Jason Merrill  <jason@redhat.com>
1441
1442         PR c++/28279
1443         * decl2.c (finish_static_data_member_decl): Don't assert
1444         TREE_PUBLIC.
1445
1446 2006-07-05  Jason Merrill  <jason@redhat.com>
1447
1448         PR c++/13983
1449         PR c++/17519
1450         * class.c (check_field_decls): Check TYPE_PACKED after
1451         stripping array types.
1452         (finish_struct_bits): Don't copy TYPE_SIZE here.
1453
1454         PR c++/18681
1455         * friend.c (is_friend): Fix DR 45 implementation.
1456
1457 2006-07-05  Richard Guenther  <rguenther@suse.de>
1458         Andrew Pinski  <pinskia@gcc.gnu.org>
1459
1460         PR c++/27084
1461         * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1462         top level qualifiers for pointer type comparisons.
1463
1464 2006-07-01  Jason Merrill  <jason@redhat.com>
1465
1466         PR c++/28215
1467         * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
1468         DECL_TEMPLATE_INFO.
1469
1470 2006-06-30  Jason Merrill  <jason@redhat.com>
1471
1472         PR c++/26577
1473         * call.c (build_new_method_call): Force evaluation of the
1474         instance pointer, not the object.
1475
1476 2006-06-30  Kazu Hirata  <kazu@codesourcery.com>
1477
1478         * decl2.c: Fix a comment typo.
1479
1480 2006-06-30  Jason Merrill  <jason@redhat.com>
1481
1482         PR c++/18698
1483         * decl2.c (grokfield): Only try to treat the decl as an access
1484         declaration if the scope is a class.
1485
1486 2006-06-29  Jason Merrill  <jason@redhat.com>
1487
1488         PR c++/26905
1489         PR c++/26612
1490         PR c++/27000
1491         PR c++/26984
1492         PR c++/19134
1493         * decl2.c (determine_visibility): Overhaul.
1494         (determine_visibility_from_class): Likewise.
1495         (min_vis_r, type_visibility, constrain_visibility): New fns.
1496         (constrain_visibility_for_template): Likewise.
1497         (constrain_class_visibility): Likewise.
1498         * decl.c (cp_finish_decl): Call determine_visibility for function
1499         decls, too.
1500         * name-lookup.c (pushtag): Call determine_visibility.
1501         * decl.c (duplicate_decls): Don't copy visibility from template to
1502         specialization.
1503         * pt.c (check_explicit_specialization): Likewise.
1504         (lookup_template_class, tsubst_decl): Call determine_visibility.
1505         * class.c (finish_struct_1): Call constrain_class_visibility.
1506
1507         PR c++/26905
1508         PR c++/21675
1509         PR c++/17470
1510         * parser.c (cp_parser_explicit_instantiation): Pass the attributes
1511         to grokdeclarator.
1512         (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
1513         (cp_parser_enum_specifier): Likewise.
1514         (cp_parser_elaborated_type_specifier): Apply attributes if this
1515         declares only the class.
1516         (cp_parser_class_specifier): Apply leading attributes immediately.
1517         * semantics.c (begin_class_definition): Add attributes parameter,
1518         apply them to the type.
1519
1520         PR c++/21581
1521         PR c++/25915
1522         * tree.c (decl_anon_ns_mem_p): New function.
1523         * cp-tree.h: Declare it.
1524         * decl2.c (determine_visibility): Make anonymous namespace
1525         members static.
1526         (min_vis_r, constrain_visibility): Likewise.
1527         * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
1528         pseudo-types.
1529         * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
1530         global_namespace.
1531         * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
1532         on anonymous namespaces.
1533
1534 2006-06-28  Jason Merrill  <jason@redhat.com>
1535
1536         PR c++/27424
1537         * pt.c (convert_template_argument): Pass all template arguments
1538         on to coerce_template_template_parms.
1539
1540 2006-06-25  Lee Millward  <lee.millward@gmail.com>
1541             Mark Mitchell <mark@codesuorcery.com>
1542
1543         PR c++/28054
1544         * decl2.c (grokbitfied): Remove check for grokdeclarator
1545         returning NULL_TREE, instead check for error_mark_node
1546         to indicate failure.
1547         * decl.c (grokdeclarator): Adjust block comment.
1548
1549 2006-06-25  Lee Millward  <lee.millward@gmail.com>
1550
1551         PR c++/28051
1552         * mangle.c (mangle_conv_op_name_for_type): Check for
1553         invalid types.
1554         * name-lookup.c (push_class_level_binding): Robustify.
1555         (do_class_using_decl): Return early if name is error_mark_node.
1556
1557 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
1558
1559         PR c++/28114
1560         * name-lookup.c (pushtag): Return if we have error_mark_node.
1561
1562 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
1563
1564         PR c++/27019
1565         * typeck2.c (process_init_constructor_array): Set ce->value on errors.
1566
1567 2006-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1568
1569         PR c++/28112
1570         * parser.c (cp_parser_attribute_list): Skip attributes with invalid
1571         arguments.  Fix comment.
1572
1573         PR c++/11468
1574         * init.c (build_new_1): Handle error_mark_nodes returned by
1575         build_java_class_ref.
1576         (build_java_class_ref): Do not abort compilation, but return
1577         error_mark_node.  Improve error message.  Fix indentation.
1578
1579 2006-06-23  Danny Smith   <dannysmith@users.sourceforge.net>
1580
1581         PR target/27789
1582         * decl.c (start_decl): Check that dllimports are not initialized.
1583
1584 2006-06-22  Lee Millward  <lee.millward@gmail.com>
1585
1586         PR c++/27805
1587         * typeck2.c (build_m_component_ref): Use error_operand_p.
1588
1589         PR c++/27821
1590         * decl.c (grokdeclarator): Return error_mark_node on
1591         invalid uses of the scope resolution operator.
1592
1593 2006-06-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1594
1595         PR c++/28111
1596         * pt.c (determine_specialization): Check for invalid decls.
1597
1598         PR c++/28110
1599         * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
1600         parameters.
1601
1602         PR c++/28109
1603         * rtti.c (get_tinfo_decl_dynamic): Robustify.
1604
1605 2006-06-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1606
1607         PR c++/28052
1608         * init.c (push_base_cleanups): Skip members with invalid types.
1609         * typeck.c (build_class_member_access_expr): Robustify.
1610
1611 2006-06-19  Mark Mitchell  <mark@codesourcery.com>
1612
1613         * pt.c (instantiate_template): Fix typo in comment.
1614
1615 2006-06-19  Richard Guenther  <rguenther@suse.de>
1616
1617         * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
1618         power-of-two token vector size.
1619
1620 2006-06-16  Mark Mitchell  <mark@codesourcery.com>
1621
1622         PR c++/28016
1623         * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
1624         members.
1625
1626         PR c++/27979
1627         * call.c (standard_conversion): Strip cv-qualifiers from bitfield
1628         types.
1629
1630         PR c++/27884
1631         * decl.c (have_extern_spec): Remove.
1632         (start_decl): Do not check have_extern_spec.
1633         (start_function): Likewise.
1634         * cp-tree.h (have_extern_spec): Remove.
1635         * parser.c (cp_parser_linkage_specification): Don't set
1636         have_extern_spec.
1637         (cp_parser_init_declarator): Likewise.
1638         (cp_parser_parameter_declaration): Do not treat parameters as
1639         within the scope of an unbraced linkage specification.
1640
1641 2006-06-15  Mark Mitchell  <mark@codesourcery.com>
1642
1643         PR c++/27689
1644         * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
1645         macro.
1646         * pt.c (unify): Use it.
1647
1648         PR c++/27666
1649         * call.c (build_conditional_expr): Robustify.
1650
1651         PR c++/27640
1652         * pt.c (instantiate_template): Set processing_template_decl to
1653         zero while performing substitutions.
1654
1655 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
1656
1657         PR c++/27665
1658         * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
1659         identify destructors.
1660         (cp_parser_nested_name_specifier_opt): Remove invalid
1661         optimization.
1662         (cp_parser_template_id): Refine heuristic for determining whether
1663         we are entering a scope.
1664
1665         PR c++/27648
1666         * parser.c (cp_parser_declarator): Robustify.
1667
1668         PR c++/26559
1669         * pt.c (tsubst_expr): Use finish_omp_atomic.
1670         (value_dependent_expression_p): All CALL_EXPRs are dependent.
1671         * semantics.c (finish_omp_atomic): Rework to use standard
1672         paradigms for handling non-dependent expressions.
1673
1674 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1675
1676         * typeck.c (build_modify_expr): Tidy diagnostic message.
1677
1678 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
1679
1680         PR c++/28018
1681         * typeck.c (build_modify_expr): Disallow array assignment.
1682
1683 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1684
1685         * cp-tree.def: Fix typo.
1686
1687 2006-06-13  Mark Mitchell  <mark@codesourcery.com>
1688
1689         PR c++/27227
1690         * decl.c (decls_match): Allow an extern "C" variable declarations
1691         from different namespaces to match.
1692         (duplicate_decls): Disallow redeclaring a variable with a
1693         different linkage specification.
1694
1695 2006-06-13  Jakub Jelinek  <jakub@redhat.com>
1696
1697         PR middle-end/27793
1698         * cp-tree.h (cxx_int_tree_map): New struct.
1699         (struct language_function): Add extern_decl_map field.
1700         * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
1701         to cp_function_chain->extern_decl_map hash table instead of
1702         copying over DECL_UID.
1703         * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
1704         functions.
1705         (cp_genericize_r): Remap DECL_EXTERN local decls using
1706         cp_function_chain->extern_decl_map hash table.
1707         * decl.c (finish_function): Clear extern_decl_map.
1708
1709 2006-06-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1710
1711         PR c++/27601
1712         * semantics.c (finish_offsetof): Handle pseudo-destructors.
1713
1714         PR c++/27933
1715         * name-lookup.c (lookup_qualified_name): Always return error_mark_node
1716         if lookup fails.
1717
1718         PR c++/27951
1719         * decl2.c (finish_anon_union): Return early if build_anon_union_vars
1720         fails.
1721
1722 2006-06-12  Roger Sayle  <roger@eyesopen.com>
1723
1724         PR c++/21210
1725         * typeck2.c (build_functional_cast): Use cp_convert to construct
1726         non-aggregate initializers instead of the user-level build_c_cast.
1727
1728 2006-06-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1729
1730         PR c++/27601
1731         * cp-tree.h (finish_offsetof): Add prototype.
1732         * semantics.c (finish_offsetof): New function.
1733         * parser.c (cp_parser_builtin_offsetof): Call it instead of
1734         fold_offsetof.
1735         * pt.c (tsubst_copy_and_build): Likewise.
1736
1737 2006-06-06  Mark Mitchell  <mark@codesourcery.com>
1738
1739         PR c++/27177
1740         * call.c (standard_conversion): Require that the derived type be
1741         complete when performing a derived-to-base conversion.
1742
1743 2006-06-04  Mark Mitchell  <mark@codesourcery.com>
1744
1745         PR c++/27819
1746         * decl.c (cp_finish_decl): Process initializers for static data
1747         members with non-dependent initializers, even in templates.
1748
1749         PR c++/27722
1750         * decl.c (maybe_deduce_size_from_array_init): If the declaration
1751         is erroneous, give it an erroneous type.
1752         (layout_var_decl): If the type is erroneous, give up.
1753         (check_initializer): Likewise.
1754
1755         PR c++/27807
1756         * cp-tree.h (TYPE_OBJ_P): New macro.
1757         (TYPE_PTROB_P): Use it.
1758         (TYPE_REF_OBJ_P): Likewise.
1759         * semantics.c (finish_compound_literal): Do not permit compound
1760         literals of non-object types.
1761
1762         PR c++/27806
1763         * typeck.c (original_type): Robustify.
1764
1765 2006-06-05  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1766
1767         PR c++/27804
1768         * init.c (constant_value_1): Return decl instead of error_mark_node
1769         for invalid initializers.
1770
1771 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
1772
1773         PR c++/27592
1774         * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
1775         on operand of the COND_EXPR for the null pointer check.
1776
1777 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
1778
1779         PR c++/26740
1780         * typeck.c (build_unary_op): Mark the function as being used.
1781
1782 2006-06-01  Alexandre Oliva  <aoliva@redhat.com>
1783
1784         PR c++/26660
1785         * parser.c (cp_parser_initial_pragma): Read one more token for
1786         caller after reading PCH file in.
1787
1788 2006-05-31  Mark Mitchell  <mark@codesourcery.com>
1789
1790         PR c++/27801
1791         * call.c (perform_implicit_conversion): Do not actually perform
1792         conversions in templates.
1793
1794         PR c++/26496
1795         * call.c (resolve_args): Check for invalid uses of bound
1796         non-static member functions.
1797         * init.c (build_offset_ref): Return error_mark_node for errors.
1798
1799         PR c++/27385
1800         * decl.c (reshape_init): Robustify.
1801         (reshape_init_array_1): Likewise.
1802
1803 2006-05-30  Mark Mitchell  <mark@codesourcery.com>
1804
1805         PR c++/27808
1806         * parser.c (cp_parser_decl_specifier_seq): Issue errors about
1807         "friend" specifiers that do not appear in class scopes.
1808
1809         PR c++/27803
1810         * class.c (check_bitfield_decl): Ensure that all bitfields have
1811         integral type.
1812
1813 2006-05-29  Kazu Hirata  <kazu@codesourcery.com>
1814
1815         * pt.c (convert_nontype_argument): Fix a typo in an error
1816         message.
1817
1818 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
1819
1820         * decl.c, decl2.c, parser.c: Fix comment typos.  Follow
1821         spelling conventions.
1822
1823 2006-05-24  Mark Mitchell  <mark@codesourcery.com>
1824
1825         PR c++/20103
1826         * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
1827         error_mark_node to indicate an initialization is OK.
1828         (start_decl): Likewise.  Adjust call to start_decl_1.
1829         (start_decl_1): Add initialized parameter.  Simplify.
1830         * except.c (initialize_handler_parm): Adjust call to
1831         setart_decl_1.
1832         (expand_start_catch_block): Let cp_finish_decl initialize catch
1833         parameters.
1834         * cp-tree.h (start_decl_1): Adjust prototype.
1835         * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
1836         (instantiate_decl): Let cp_finish_decl handle initialization.
1837         * semantics.c (finish_compound_literal): Create a temporary
1838         variable for the literal.
1839         * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
1840         cases.
1841         * decl2.c (finish_static_data_member_decl): Don't set
1842         DECL_INITIAL.
1843         (grokfield): Do not try to initialize functions.
1844
1845 2006-05-23  Mark Mitchell  <mark@codesourcery.com>
1846
1847         PR c++/20173
1848         * pt.c (determine_specialization): Disallow partial
1849         specializations of templates.
1850
1851 2006-05-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1852
1853         PR c++/27716
1854         * typeck.c (build_modify_expr): Test arguments for error_operand_p.
1855
1856         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
1857
1858 2006-05-21  Mark Mitchell  <mark@codesourcery.com>
1859
1860         PR c++/27210
1861         * cp-tree.h (cp_save_expr): New function.
1862         * init.c (build_new): Correct logic for zero-element array
1863         warning.  Use cp_save_expr.
1864         * tree.c (cp_save_expr): New function.
1865
1866 2006-05-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1867
1868         PR c++/27398
1869         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
1870         or void_type_node.
1871
1872 2006-05-19  Mike Stump  <mrs@apple.com>
1873
1874         * typeck.c (default_conversion): Remove static.
1875
1876 2006-05-19  Mark Mitchell  <mark@codesourcery.com>
1877
1878         PR c++/26433
1879         * cp-tree.h (begin_function_try_block): Change prototype.
1880         (finish_function_handler_sequence): Likewise.
1881         * parser.c (cp_parser_function_try_block): Adjust calls.
1882         * pt.c (tsubst_expr): Adjust calls.
1883         * semantics.c (begin_function_try_block): Create an artificial
1884         outer scope.
1885         (finish_function_handler_sequence): Close it.
1886
1887 2006-05-18  Mark Mitchell  <mark@codesourcery.com>
1888
1889         PR c++/27471
1890         PR c++/27506
1891         * typeck.c (decay_conversion): Convert bitfields to their declared
1892         types here.  Improve documentation.  Avoid use of cp_convert.
1893         (default_conversion): Make it static.  Perform integral promotions
1894         before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
1895         conversions.
1896         * init.c (build_init): Remove.
1897         (expand_default_init): Do not call rvalue.
1898         * call.c (null_ptr_cst_p): Robustify.
1899         (build_conditional_expr): Tidy.
1900         * except.c (build_throw): Do not perform lvalue-to-rvalue
1901         conversion on operand before initializing temporary.
1902         * tree.c (convert.h): Include it.
1903         (convert_bitfield_to_declared_type): Use convert_to_integer, not
1904         cp_convert.
1905         (rvalue): Don't convert bitfields to their declared type here.
1906         * cp-tree.h (build_init): Remove.
1907         (default_conversion): Likewise.
1908         * typeck2.c (build_m_component_ref): Do not perform
1909         lvalue-to-rvalue, function-to-pointer, or array-to-pointer
1910         conversions here.  Correct error message.
1911
1912 2006-05-17  Mark Mitchell  <mark@codesourcery.com>
1913
1914         PR c++/26122
1915         * decl2.c (check_member_template): Remove checks for virtual
1916         functions.
1917         * parser.c (cp_parser_function_specifier_opt): Complain about
1918         virtual templates.
1919         (cp_parser_pure_specifier): Likewise.
1920
1921         PR c++/26068
1922         * parser.c (cp_parser_set_storage_class): Check for
1923         invalid uses of storage classes on unbraced linkage
1924         specifications.
1925         (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
1926         to cp_parser_set_storage_class.
1927
1928 2006-05-17  Jakub Jelinek  <jakub@redhat.com>
1929
1930         PR c++/27491
1931         * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
1932         on CONSTRUCTORs.
1933
1934         PR middle-end/27415
1935         * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1936         on combined parallel workshare constructs.
1937         * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
1938
1939 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1940
1941         PR driver/26885
1942         * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
1943
1944 2006-05-15  Mark Mitchell  <mark@codesourcery.com>
1945
1946         PR c++/27339
1947         * cp-tree.h (perform_access_checks): New function.
1948         * semantics.c (perform_access_checks): New function.
1949         (perform_deferred_access_checks): Use it.
1950         * parser.c (cp_parser_simple_declaration): Adjust call to
1951         cp_parser_init_declarator.
1952         (cp_parser_type_parameter): Do not defer checks in default
1953         arguments.
1954         (cp_parser_explicit_specialization): Adjust call to
1955         cp_parser_single_declaration.
1956         (cp_parser_init_declarator): Perform template-parameter access
1957         checks.
1958         (cp_parser_parameter_declaration): Do not defer checks for
1959         template parameter default arguments.
1960         (cp_parser_template_declaration_after_export): Gather access
1961         checks for template parameters, and pass them to
1962         cp_parser_single_declaration.
1963         (cp_parser_template_parameter_access_checks): New function.
1964         (cp_parser_single_declaration): Add checks parameter.
1965
1966         PR c++/27505
1967         * call.c (convert_like_real): Convert bitfields to their declared
1968         types when forming an rvalue.
1969         * tree.c (convert_bitfield_to_declared_type): New function.
1970         (rvalue): Use it.
1971         * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
1972
1973 2006-05-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1974
1975         PR c++/27582
1976         * pt.c (any_dependent_template_arguments_p): Return early on invalid
1977         argument list.
1978
1979         PR c++/27581
1980         * search.c (adjust_result_of_qualified_name_lookup): Skip on
1981         invalid context_class.
1982
1983         PR c++/27315
1984         * pt.c (do_decl_instantiation): Return early on invalid decl.
1985
1986         PR c++/27559
1987         * pt.c (push_template_decl_real): Return error_mark_node instead
1988         of broken decl.
1989
1990         PR c++/27496
1991         * pt.c (tsubst_friend_class): Return early on invalid friend
1992         declarations.
1993
1994 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1995
1996         * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
1997         (cp/decl2.o): Likewise.
1998         (cp/typeck.o): Likewise.
1999         (cp/cvt.o): Likewise.
2000         (cp/parser.o): Likewise.
2001         (cp/call.o): Replace target.h with $(TARGET_H).
2002
2003 2006-05-14  Alexandre Oliva  <aoliva@redhat.com>
2004
2005         * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
2006         COMPONENT_REF alone.
2007
2008 2006-05-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2009
2010         PR c++/27547
2011         * decl.c (copy_fn_p): Return early on non-member functions.
2012
2013 2006-05-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2014
2015         PR c++/27447
2016         * decl2.c (build_memfn_type): Skip invalid functions and class types.
2017
2018 2006-05-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2019
2020         PR c++/27427
2021         * pt.c (convert_nontype_argument): Return early on invalid arguments.
2022
2023         * pt.c (process_template_parm): Remove superfluous temporary.
2024
2025         PR c++/27430
2026         * pt.c (process_template_parm): Handle erroneous non-type parameters.
2027
2028         PR c++/27423
2029         * typeck.c (convert_for_initialization): Skip erroneous types.
2030
2031         PR c++/27422
2032         * typeck.c (convert_arguments): Return early on args with
2033         invalid types.
2034
2035 2006-05-03  Aldy Hernandez  <aldyh@redhat.com>
2036
2037         PR/21391
2038         * typeck.c (build_static_cast_1): Save casted types in used types
2039         hash table.
2040         (build_reinterpret_cast_1): Same.
2041         * rtti.c (build_dynamic_cast_1): Same.
2042
2043 2006-05-04  Jakub Jelinek  <jakub@redhat.com>
2044
2045         PR c++/27359
2046         * parser.c (cp_parser_omp_for_loop): Only call
2047         cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
2048         called.
2049
2050 2006-05-02  Mark Mitchell  <mark@codesourcery.com>
2051
2052         PR c++/27102
2053         * decl.c (grokdeclarator): Robustify checks for defining members
2054         of incomplete types.
2055
2056         PR c++/27309
2057         * class.c (add_method): Call grok_special_member_properties.
2058         * decl.c (grokdeclarator): Don't call it here.
2059         (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
2060         assignment operator.  Set TYPE_HAS_CONSTURCTOR if DECL is a
2061         constructor.
2062         (start_method): Don't call grok_special_member_properties.
2063         * method.c (implicitly_declare_fn): Likewise.
2064         * pt.c (instantiate_class_template): Likewise.
2065         * decl2.c (grokfield): Likewise.
2066
2067 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
2068
2069         PR middle-end/27337
2070         * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
2071         * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
2072         * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
2073
2074 2006-04-30  Mark Mitchell  <mark@codesourcery.com>
2075
2076         PR c++/27094
2077         * pt.c (tsubst_default_argument): Increment function_depth around
2078         call to tsubst_expr.
2079         * parser.c (cp_parser_parameter_declaration): Likewise.
2080         * decl2.c (mark_used): Tidy.
2081
2082 2006-04-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2083
2084         PR c++/27278
2085         * decl.c (grok_op_properties): Skip operators with invalid args
2086         when checking for class-type or enum-type args.
2087
2088 2006-04-29  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2089
2090         PR c++/27279
2091         * decl.c (copy_fn_p): Skip functions with invalid first arg.
2092
2093 2006-04-27  Mark Mitchell  <mark@codesourcery.com>
2094
2095         PR c++/27292
2096         * tree.c (rvalue): Convert bitfields to their declared types.
2097
2098         PR c++/27102
2099         * typeck2.c (cxx_incomplete_type_diagnostic): Handle
2100         TYPENAME_TYPE.
2101
2102 2006-04-24  Mark Mitchell  <mark@codesourcery.com>
2103
2104         PR c++/27292
2105         * typeck.c (decay_conversion): Don't adjust bitfield types.
2106         (perform_integral_promotions): Treat bitfield enums as enums, not
2107         as short integer types.
2108         * tree.c (rvalue): Convert bitfields to their correct types.
2109
2110 2006-04-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2111
2112         PR c++/19963
2113         * class.c (layout_class_type): Skip fields with invalid types.
2114
2115 2006-04-23  Mark Mitchell  <mark@codesourcery.com>
2116
2117         PR c++/26912
2118         * cp-tree.h (build_this_parm): Declare.
2119         (grok_method_quals): Remove.
2120         (build_memfn_type): Declare.
2121         (build_artificial_parm): Declare.
2122         (do_friend): Remove quals parameter.
2123         * decl.c (build_this_parm): New function.
2124         (grokfndecl): Use it.  Do not pass quals to grokclassfn.
2125         (grokdeclarator): Rename quals to memfn_quals.  Avoid allocating
2126         unnecessary TYPE_DECLs.  Correct qualification of member function
2127         types.  Tidy.
2128         * method.c (implicitly_declare_fn): Use build_this_parm.
2129         * friend.c (do_friend): Remove quals parameter.
2130         * decl2.c (grok_method_quals): Remove.
2131         (build_memfn_type): New function.
2132         (build_artificial_parm): Give it external linkage.
2133         (grokclassfn): Remove quals parameter.  Do not build "this"
2134         PARM_DECL here.
2135
2136         PR c++/26534
2137         * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
2138         * typeck.c (is_bitfield_expr_with_lowered_type): New function.
2139         (decay_conversion): Convert bitfield expressions to the correct
2140         type.
2141         (build_modify_expr): Remove spurious conversions.
2142         * class.c (layout_class_type): Modify the type of bitfields to
2143         indicate a limited range.
2144         * call.c (standard_conversion): Adjust the type of bitfield
2145         expressions used in an rvalue context.
2146         (build_conditional_expr): Likewise.
2147
2148 2006-04-22  Kazu Hirata  <kazu@codesourcery.com>
2149
2150         * decl.c: Fix comment typos.
2151
2152 2006-04-21  Eric Christopher  <echristo@apple.com>
2153
2154         * decl.c: Fix typo in function name.
2155
2156 2006-04-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2157
2158         PR c++/26558
2159         * parser.c (cp_parser_class_name): Check for invalid typenames.
2160         Rearrange code.
2161
2162         PR c++/26739
2163         * pt.c (tsubst_friend_function): Return early if
2164         pushdecl_namespace_level fails.
2165
2166         PR c++/26036
2167         * typeck.c (convert_arguments): Return error_mark_node instead of
2168         error_mark_list.
2169         * cp-tree.h (error_mark_list): Remove declaration.
2170         * decl.c (error_mark_list): Remove definition.
2171         (cxx_init_decl_processing): Do not initialize error_mark_list.
2172
2173         PR c++/10385
2174         * rtti.c (build_dynamic_cast_1): Check for invalid conversions
2175         before calling convert_to_reference.
2176         * cvt.c (convert_to_reference): Assert that reftype is a
2177         REFERENCE_TYPE.
2178
2179 2006-04-19  Mark Mitchell  <mark@codesourcery.com>
2180
2181         PR c++/27102
2182         * class.c (currently_open_class): Tidy.
2183         * decl.c (grokdeclarator): If we encounter an erroneous
2184         declarator, assume that we have already issued an error message
2185         and return.  Return error_mark_node instead of NULL_TREE in more
2186         places.  Issue errors about function definitions that do not have
2187         a function declarator.  Check for complete types for all function
2188         definitions.
2189         * cp-tree.h (cp_error_declarator): Remove.
2190         (currently_open_class): Change return type.
2191         * parser.c (cp_parser_id_expression): Add optional_p parameter.
2192         (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
2193         (cp_parser_id_expression): Likewise.
2194         (cp_parser_unqualified_id): If the name is optional, return
2195         NULL_TREE.
2196         (cp_parser_postfix_dot_deref_expression): Adjust calls.
2197         (cp_parser_type_parameter): Likewise.
2198         (cp_parser_unqualified_id): Likewise.
2199         (cp_parser_direct_declarator): Likewise.
2200         (cp_parser_declarator_id): Add optional_p parameter.
2201         (cp_parser_function_definition_from_specifiers_and_declarator):
2202         Assume that start_function indicates failure only if it has issued
2203         an error.
2204         (cp_parser_omp_var_list_no_open): Adjust calls.
2205
2206 2006-04-17  Janis Johnson  <janis187@us.ibm.com>
2207
2208         PR c++/26114, c++/26115
2209         * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
2210         * class.c (check_field_decls): Ditto.
2211
2212 2006-04-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2213
2214         * init.c (build_offset_ref): Remove superfluous temporary.
2215
2216 2006-04-16  Mark Mitchell  <mark@codesourcery.com>
2217
2218         PR c++/26365
2219         * typeck.c (finish_class_member_access_expr): Robustify
2220
2221 2006-04-15  Kazu Hirata  <kazu@codesourcery.com>
2222
2223         * Make-lang.in (cp/pt.o): Depend on vecprim.h.
2224         * pt.c: Include vecprim.h.
2225         (inline_parm_levels): Change the type to VEC(int,heap) *.
2226         (inline_parm_levels_used): Remove.
2227         (maybe_begin_member_template_processing,
2228         maybe_end_member_template_processing): Use VEC instead of
2229         VARRAY.
2230
2231         * cp/call.c: Fix comment typos.
2232
2233 2006-04-12  Mark Mitchell  <mark@codesourcery.com>
2234
2235         * parser.c (cp_parser_init_declarator): Initialize local variables
2236         aggressively.
2237
2238 2006-04-12  Roger Sayle  <roger@eyesopen.com>
2239
2240         * parser.c (cp_parser_init_declarator): Initialise
2241         is_parenthesized_init to false to avoid compiler warning.
2242
2243 2006-04-11  Mark Mitchell  <mark@codesourcery.com>
2244
2245         * cp-tree.h (build_operator_new_call): Adjust prototype.
2246         (build_new_method_call): Likewise.
2247         (build_op_delete_call): Likewise.
2248         * init.c (build_raw_new_expr): New function.
2249         (build_new_1): Pass information as parameters, rather than
2250         bundling it into a NEW_EXPR.
2251         (build_new): Adjust accordingly.
2252         (build_vec_delete_1): Adjust for changes to build_op_delete_call.
2253         (build_delete): Likewise.
2254         * decl.c (finish_destructor_body): Likewise.
2255         * call.c (build_operator_new_call): Return the allocation function
2256         used.
2257         (build_op_delete_call): Take allocation function as parameter.
2258         (build_special_member_call): Adjust call to build_new_method_call.
2259         (build_new_method_call): Return function called.
2260         * pt.c (tsubst_copy_and_build): Adjust call to
2261         build_new_method_call.
2262         * semantics.c (finish_call_expr): Likewise.
2263         * parser.c (cp_parser_postfix_expression): Likewise.
2264         * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
2265         "incomplete", not "undefined", types.
2266
2267         PR c++/26295
2268         * decl.c (grokdeclarator): Remove namespace-handling code for
2269         pointers-to-members.
2270         * parser.c (cp_parser_ptr_operator): Check for qualified names
2271         using namespaces.
2272
2273         PR c++/26122
2274         * parser.c (cp_parser_init_declarator): Adjust logic for deciding
2275         whether or not to look for a pure-specifier.
2276         (cp_parser_member_declaration): Likewise.
2277
2278 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
2279
2280         * decl2.c, pt.c, semantics.c: Fix comment typos.
2281
2282 2006-04-06  Roger Sayle  <roger@eyesopen.com>
2283
2284         * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
2285
2286 2006-04-05  Jason Merrill  <jason@redhat.com>
2287
2288         * name-lookup.c (push_namespace_with_attribs): Temporarily disable
2289         default hidden visibility for anonymous namespace.
2290
2291 2006-03-29  Roger Sayle  <roger@eyesopen.com>
2292
2293         PR c++/22494
2294         * init.c (build_vec_delete_1): Convert BASE pointer's type to
2295         the base pointer type to avoid a type mismatch in the EQ_EXPR.
2296
2297 2006-03-24  Carlos O'Donell  <carlos@codesourcery.com>
2298
2299         * search.c (maybe_suppress_debug_info): If
2300         flag_emit_class_debug_always then don't suppress.
2301
2302 2006-03-22  Jason Merrill  <jason@redhat.com>
2303
2304         * name-lookup.c (push_namespace_with_attribs): Only apply hidden
2305         visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
2306
2307 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
2308
2309         PR c++/26691
2310         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
2311
2312 2006-03-21  Jason Merrill  <jason@redhat.com>
2313
2314         PR c++/21581
2315         * parser.c (cp_parser_declaration): Support attributes on
2316         anonymous namespaces.
2317         * name-lookup.c (push_namespace_with_attribs): Anonymous
2318         namespaces default to hidden visibility.
2319
2320 2006-03-20  Jason Merrill  <jason@redhat.com>
2321
2322         PR c++/21764, c++/19238
2323         * decl.c (cp_finish_decl): Call determine_visibility later.
2324         (start_preparsed_function): Likewise.
2325         * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
2326         (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
2327         * name-lookup.h (struct cp_binding_level): Add has_visibility
2328         bitfield.
2329         * name-lookup.c: Include c-pragma.h.
2330         (push_namespace_with_attribs): Split out from push_namespace.
2331         Push visibility if appropriate.  Set TREE_PUBLIC on namespaces.
2332         (leave_scope): Pop visibility if appropriate.
2333         * decl2.c (determine_visibility_from_class): Split out from...
2334         (determine_visibility): ...here.  Handle function scope and
2335         nested classes.
2336         (import_export_decl): Move visibility handling to
2337         determine_visibility_from_class.
2338         * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
2339         attributes on namespace declarations.
2340
2341 2006-03-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2342
2343         PR c++/6634
2344         * decl.c (grokdeclarator): Do not accept long long double.
2345         Reorganize checks for invalid (combinations of) type modifiers.
2346         Quote modifiers in messages.
2347
2348 2006-03-09  Jason Merrill  <jason@redhat.com>
2349
2350         PR c++/16387, c++/16389
2351         * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
2352         (cxx_sizeof_or_alignof_expr): Split out from here.
2353
2354 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
2355
2356         Merge from gomp-20050608-branch
2357
2358         2006-02-02  Diego Novillo  <dnovillo@redhat.com>
2359
2360                 * decl.c (pop_labels_1): Use appropriate pointer casting.
2361                 (poplevel_named_label_1): Likewise.
2362                 (named_label_entry_hash): Likewise.
2363                 (named_label_entry_eq): Likewise.
2364                 (check_goto): Likewise.
2365                 (define_label): Likewise.
2366
2367         2006-01-26  Diego Novillo  <dnovillo@redhat.com>
2368
2369                 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
2370                 of TREE_BLOCK.
2371                 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
2372                 instead of TREE_CODE/TREE_OPERAND.
2373                 * semantics.c: Likewise.
2374                 * parser.c: Likewise.
2375
2376         2005-11-10  Diego Novillo  <dnovillo@redhat.com>
2377
2378                 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
2379                 target does not support TLS.
2380
2381         2005-11-09  Jakub Jelinek  <jakub@redhat.com>
2382
2383                 * decl.c (redeclaration_error_message): Don't error about
2384                 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
2385                 (olddecl).
2386
2387         2005-11-08  Jakub Jelinek  <jakub@redhat.com>
2388
2389                 PR c++/24735
2390                 * semantics.c (finish_omp_barrier, finish_omp_flush): New
2391                   functions.
2392                 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
2393                 (cp_parser_omp_flush): Call finish_omp_flush.
2394                 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
2395                   prototypes.
2396
2397                 PR c++/24734
2398                 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
2399
2400         2005-11-03  Jakub Jelinek  <jakub@redhat.com>
2401
2402                 * semantics.c (finish_omp_threadprivate): Error on class-scope
2403                 variables.
2404
2405         2005-11-02  Jakub Jelinek  <jakub@redhat.com>
2406
2407                 * parser.c (cp_parser_omp_all_clauses): If some clause
2408                 type is not allowed, don't remove just one of the
2409                 clauses, but all clauses added in that loop round.
2410
2411                 * semantics.c (finish_omp_clauses): Fix function
2412                 comment. Don't handle non-const or mutable specially,
2413                 as const and not mutable is predetermined shared and
2414                 that leads to double error. Don't ICE if copyin var is
2415                 PARM_DECL.
2416
2417                 PR c++/24613
2418                 * parser.c (cp_parser_pragma): Diagnose
2419                 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
2420                 construct.
2421
2422                 * semantics.c (finish_omp_threadprivate): Error if V
2423                   is automatic variable or has incomplete type.
2424
2425         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
2426
2427                 * parser.c (cp_parser_omp_all_clauses): Use
2428                 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
2429
2430         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
2431
2432                 * parser.c (cp_parser_omp_all_clauses): When emitting an
2433                 error message, remove the invalid clause from the list.
2434
2435         2005-10-31  Diego Novillo  <dnovillo@redhat.com>
2436
2437                 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
2438                 combined parallel+workshare directives.
2439
2440         2005-10-31  Richard Henderson  <rth@redhat.com>
2441
2442                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
2443                 Use cxx_omp_clause_dtor.
2444                 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
2445                 (cxx_omp_clause_dtor): New.
2446                 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
2447                 (cxx_omp_clause_default_ctor): Use it.
2448                 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
2449                 Likewise.
2450                 (cxx_omp_clause_dtor): New.
2451                 * semantics.c (finish_omp_clauses): Rewrite cdtor
2452                 checking to fill in CP_OMP_CLAUSE_INFO.  Don't
2453                 specialcase LASTPRIVATE for removal.
2454                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
2455                 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
2456
2457         2005-10-28  Jakub Jelinek  <jakub@redhat.com>
2458
2459                 * semantics.c (finish_omp_threadprivate): If
2460                   DECL_RTL_SET_P, call make_decl_rtl again so that
2461                   encode_section_info can update SYMBOL_REF's flags.
2462
2463         2005-10-26  Jakub Jelinek  <jakub@redhat.com>
2464
2465                 * semantics.c (finish_omp_for): Don't segfault if COND
2466                 or INCR is NULL.  If not calling c_finish_omp_for
2467                 right away and one of COND and INCR is NULL, issue
2468                 error and don't expand anything.
2469
2470                 PR c++/24512
2471                 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
2472                 * semantics.c (finish_omp_for): Likewise.  Set
2473                 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
2474                 into the current statement list if not processing
2475                 template decl or pass it to c_finish_omp_for.
2476
2477                 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
2478                 into PRE_BODY statement list.  Pass it to finish_omp_for.
2479                 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
2480                 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
2481                 finish_omp_for.  Put all the statements into sk_omp
2482                 scope.
2483
2484         2005-10-25  Jakub Jelinek  <jakub@redhat.com>
2485
2486                 PR c++/24516
2487                 * parser.c (struct cp_parser): Rename in_iteration_statement
2488                 field to in_statement.
2489                 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2490                 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
2491                 (cp_parser_new, cp_parser_begin_omp_structured_block,
2492                 cp_parser_end_omp_structured_block,
2493                 cp_parser_omp_for_loop): Adjust for
2494                 in_iteration_statement renaming.
2495                 (cp_parser_selection_statement): Save
2496                 parser->in_iteration, or it temporarily with
2497                 IN_SWITCH_STMT for the
2498                 cp_parser_implicitly_scoped_statement call.
2499                 (cp_parser_iteration_statement): Adjust for
2500                 in_iteration_statement renaming.  Use
2501                 IN_ITERATION_STMT rather than true.
2502                 (cp_parser_jump_statement): Adjust for
2503                 in_iteration_statement renaming and new values.  Don't
2504                 error on break in a switch statement within OMP_FOR or
2505                 OpenMP structured block.
2506
2507                 PR c++/24513
2508                 * parser.c (cp_parser_cache_group): Don't stop if next
2509                 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
2510                 well.  If current token is CPP_PRAGMA, consume
2511                 everything until CPP_PRAGMA_EOL inclusive.
2512
2513         2005-10-24  Jakub Jelinek  <jakub@redhat.com>
2514
2515                 PR c++/24502
2516                 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
2517                 addition to MODIFY_EXPR.
2518
2519         2005-10-23  Richard Henderson  <rth@redhat.com>
2520
2521                 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
2522                 (bc_label): New.
2523                 (begin_bc_block, finish_bc_block): Use it.
2524                 (push_context, pop_context): Remove.
2525                 (cp_genericize): Don't use them.  Assert bc_label is null.
2526                 * semantics.c (finish_omp_clauses): Create a fake data
2527                 element of TYPE for probing ctors.
2528
2529         2005-10-23  Richard Henderson  <rth@redhat.com>
2530
2531                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
2532                 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
2533                 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
2534                 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
2535                 * semantics.c (finish_omp_clauses): Look through
2536                 arrays when looking up special member calls.  Also
2537                 remove FIRSTPRIVATE when LASTPRIVATE fails.
2538                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
2539                 (cxx_omp_clause_assign_op): New.
2540                 * cp-tree.h: Declare them.
2541
2542         2005-10-21  Richard Henderson  <rth@redhat.com>
2543
2544                 * decl.c (check_previous_goto_1): Return false if error.
2545                 (check_switch_goto): Likewise.
2546                 (finish_case_label): Don't emit the case label on error.
2547                 * parser.c (struct cp_parser): Revert
2548                 in_switch_statement_p changes.
2549                 (cp_parser_labeled_statement,
2550                 cp_parser_selection_statement): Likewise.
2551                 (cp_parser_begin_omp_structured_block): Don't save...
2552                 (cp_parser_end_omp_structured_block): or restore
2553                 in_switch_statement_p.
2554
2555         2005-10-21  Richard Henderson  <rth@redhat.com>
2556
2557                 * semantics.c (finish_omp_threadprivate): Set
2558                 decl_flags.u2sel when necessary.
2559
2560         2005-10-21  Richard Henderson  <rth@redhat.com>
2561
2562                 * decl.c (poplevel_named_label_1): Restore creation of the
2563                 bad_decls list.
2564                 (decl_jump_unsafe): Check for error_mark_node types.
2565                 (check_goto): Don't check cdtor_label.  Don't use identify_goto.
2566                 * semantics.c (finish_return_stmt): Do check_omp_return before
2567                 converting to cdtor_label goto.
2568
2569         2005-10-21  Richard Henderson  <rth@redhat.com>
2570
2571                 PR c++/24451
2572                 * decl.c (check_omp_return): Return false on error.
2573                 * cp-tree.h (check_omp_return): Update decl.
2574                 * semantics.c (finish_return_stmt): Avoid adding
2575                 return on error.
2576
2577         2005-10-21  Richard Henderson  <rth@redhat.com>
2578
2579                 * cp-tree.h (struct language_function): Remove
2580                 x_named_label_uses.
2581                 Change x_named_labels to a hashtable.
2582                 (check_omp_return): Declare.
2583                 * decl.c (struct named_label_use_entry): Rename from
2584                 named_label_use_list.  Remove label_decl.
2585                 (struct named_label_entry): Rename from
2586                 named_label_list.  Remove old_value and next.  Change
2587                 in_try_scope and in_catch_scope to bool. Add
2588                 in_omp_scope.
2589                 (pop_labels_1): New.
2590                 (pop_labels): Use it.
2591                 (pop_local_label, poplevel_named_label_1): New.
2592                 (poplevel): Use them.
2593                 (named_label_entry_hash, named_label_entry_eq): New.
2594                 (make_label_decl): Create named_labels.  Move label
2595                 creation bits from lookup_label.
2596                 (declare_local_label): Tidy.
2597                 (identify_goto): Split out from ...
2598                 (check_previous_goto_1): Add exited_omp argument.
2599                 Handle omp scopes.
2600
2601                 (use_label): Merge into...
2602                 (check_goto): ... here.  Handle omp scopes.
2603                 (check_omp_return): New.
2604                 (check_previous_gotos): Merge into...
2605                 (define_label): ... here.
2606                 (save_function_data): Remove x_named_label_uses reference.
2607                 (finish_function): Likewise.
2608                 * name-lookup.h (sk_omp): New.
2609                 * name-lookup.c (begin_scope): Handle it.
2610                 * parser.c (cp_parser_omp_for): Don't create extra
2611                 compound stmt.
2612
2613                 (cp_parser_omp_sections): Likewise.
2614                 * semantics.c (finish_return_stmt): Call check_omp_return.
2615                 (begin_omp_structured_block): Use sk_omp.
2616                 (finish_omp_structured_block): Use do_poplevel.  Don't build a
2617                 MUST_NOT_THROW expression here.
2618                 (begin_omp_parallel, finish_omp_parallel): Don't create extra
2619                 compound statements.
2620
2621         2005-10-21  Diego Novillo  <dnovillo@redhat.com>
2622
2623                 PR 24455
2624                 * cp/cp-tree.h (struct lang_decl_flags): Add field
2625                 threadprivate_p.
2626                 (CP_DECL_IS_THREADPRIVATE): Define.
2627                 * cp/semantics.c (finish_omp_threadprivate): Set.  Do
2628                 not error out if CP_DECL_IS_THREADPRIVATE is set
2629                 already.
2630                 * cp/decl.c (duplicate_decls): Merge
2631                 CP_DECL_THREADPRIVATE_P.
2632
2633         2005-10-20  Richard Henderson  <rth@redhat.com>
2634
2635                 * cp-gimplify.c (cp_gimplify_omp_for): New.
2636                 (cp_gimplify_expr): Call it.
2637                 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
2638                 * parser.c (struct cp_parser): Rename
2639                 in_iteration_statement_p to in_iteration_statement and
2640                 change to unsigned char.  Similarly with
2641                 in_switch_statement.  Update all users.
2642                 (IN_OMP_BLOCK, IN_OMP_FOR): New.
2643                 (cp_parser_labeled_statement): Diagnose case labels
2644                 binding closer to an openmp block nested than the
2645                 switch.
2646                 (cp_parser_jump_statement): Diagnose break and
2647                 continue labels binding closer to an openmp block than
2648                 an iteration or switch.
2649                 (cp_parser_omp_for_loop): Mark in_iteration_statement
2650                 for an omp for.
2651                 (cp_parser_begin_omp_structured_block): New.
2652                 (cp_parser_end_omp_structured_block): New.
2653                 (cp_parser_omp_structured_block): Use them.
2654                 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
2655                 (cp_parser_omp_parallel): Likewise.
2656
2657         2005-10-20  Richard Henderson  <rth@redhat.com>
2658
2659                 * semantics.c (begin_omp_structured_block): New.
2660                 (finish_omp_structured_block): New.
2661                 (begin_omp_parallel, finish_omp_parallel): Use them.
2662                 * parser.c (cp_parser_omp_structured_block): Likewise.
2663                 (cp_parser_omp_for): Likewise.
2664                 (cp_parser_omp_sections_scope): Likewise.
2665                 * cp-tree.h: Declare them.
2666
2667         2005-10-20  Richard Henderson  <rth@redhat.com>
2668
2669                 * parser.c (cp_parser_omp_master): Return the statement.
2670                 (cp_parser_omp_ordered): Likewise.
2671                 (cp_parser_omp_construct): Set the locus for them.
2672
2673         2005-10-19  Richard Henderson  <rth@redhat.com>
2674
2675                 * semantics.c (finish_omp_atomic): Revert to
2676                 uses_template_parms.
2677
2678         2005-10-19  Richard Henderson  <rth@redhat.com>
2679
2680                 * semantics.c (finish_omp_clauses): Avoid
2681                 DECL_THREAD_LOCAL_P on a PARM_DECL.  Remove some
2682                 stub asserts guaranteed to fail.
2683
2684         2005-10-19  Richard Henderson  <rth@redhat.com>
2685
2686                 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
2687                 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
2688                 * parser.c (cp_parser_omp_clause_copyin): Remove.
2689                 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
2690                 Call finish_omp_clauses.
2691                 (cp_parser_omp_clause_if): Don't do error checking here.
2692                 (cp_parser_omp_clause_num_threads): Likewise.
2693                 (cp_parser_omp_clause_schedule): Likewise.
2694                 (cp_parser_omp_atomic): Use finish_omp_atomic.
2695                 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
2696                 Don't decompose assignment statment here.  Use
2697                 finish_omp_for.
2698
2699                 * pt.c (tsubst_omp_clauses): New.
2700                 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
2701                 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
2702                 * semantics.c (finish_omp_clauses): New.
2703                 (begin_omp_parallel, finish_omp_parallel): Know Less about the
2704                 internals of the stmt_list stack.
2705                 (finish_omp_for, finish_omp_atomic): New.
2706
2707         2005-10-18  Jakub Jelinek  <jakub@redhat.com>
2708
2709                 * semantics.c (cxx_omp_predetermined_sharing): New function.
2710                 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
2711                 * cp-objcp-common.h
2712                 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
2713
2714         2005-10-18  Richard Henderson  <rth@redhat.com>
2715
2716                 * parser.c (cp_parser_omp_single): Use make_node and accessors
2717                 instead of build.
2718
2719         2005-10-17  Richard Henderson  <rth@redhat.com>
2720
2721                 * parser.c (cp_parser_omp_for_loop): Handle declarations.
2722
2723         2005-10-12  Richard Henderson  <rth@redhat.com>
2724
2725                 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
2726                 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
2727                 (finish_omp_threadprivate): Declare.
2728                 * parser.c (struct cp_lexer): Add in_pragma.
2729                 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
2730                 when in_pragma.
2731                 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
2732                 (cp_parser_skip_to_end_of_statement): Likewise.
2733                 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2734                 (cp_parser_skip_to_closing_brace): Likewise.
2735                 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
2736                 (cp_parser_require_pragma_eol): New.
2737                 (cp_parser_statement): Add in_compound argument;
2738                 update all callers.
2739                 Restart if a non-statement pragma seen outside a
2740                 compound.
2741                 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
2742                 (cp_parser_declaration_seq_opt): Likewise.
2743                 (cp_parser_member_specification_opt): Likewise.
2744                 (cp_parser_function_definition_after_decl): Likewise.
2745                 (cp_parser_skip_until_found): Likewise.
2746                 (cp_parser_cache_group): Likewise.
2747                 (enum pragma_omp_clause, cp_parser_omp_clause_name,
2748                 check_no_duplicate_clause,
2749                 cp_parser_omp_var_list_no_open,
2750                 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
2751                 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
2752                 cp_parser_omp_clause_nowait,
2753                 cp_parser_omp_clause_num_threads,
2754                 cp_parser_omp_clause_ordered,
2755                 cp_parser_omp_clause_reduction,
2756                 cp_parser_omp_clause_schedule,
2757                 cp_parser_omp_all_clauses,
2758                 cp_parser_omp_structured_block, cp_parser_omp_atomic,
2759                 cp_parser_omp_barrier, cp_parser_omp_critical,
2760                 cp_parser_omp_flush, cp_parser_omp_for_loop,
2761                 cp_parser_omp_for, cp_parser_omp_master,
2762                 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
2763                 cp_parser_omp_sections, cp_parser_omp_parallel,
2764                 cp_parser_omp_single, cp_parser_omp_threadprivate,
2765                 cp_parser_omp_construct): New.
2766                 (cp_parser_pragma): Handle OpenMP pragmas.
2767                 * semantics.c (finish_omp_threadprivate): New.
2768                 (begin_omp_parallel, finish_omp_parallel): New.
2769
2770         2005-10-11  Richard Henderson  <rth@redhat.com>
2771
2772                 * parser.c (struct cp_token): Add pragma_kind.
2773                 (eof_token): Initialize it.
2774                 (cp_lexer_handle_pragma): Remove.
2775                 (cp_parser_initial_pragma): New.
2776                 (cp_lexer_new_main): Use it.
2777                 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
2778                 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
2779                 (cp_parser_skip_to_pragma_eol): New.
2780                 (cp_parser_error): Use it.
2781                 (pragma_lex): New.
2782
2783         2005-10-09  Richard Henderson  <rth@redhat.com>
2784
2785                 * lex.c (parse_strconst_pragma): Update for c_lex name change.
2786                 (handle_pragma_java_exceptions): Likewise.
2787                 * parser.c (cp_lexer_new_main): Likewise.
2788
2789         2005-10-06  Richard Henderson  <rth@redhat.com>
2790
2791                 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
2792                 (cp_lexer_handle_pragma): Comment out
2793                 cpp_handle_deferred_pragma.
2794
2795         2005-10-01  Richard Henderson  <rth@redhat.com>
2796
2797                 * name-lookup.c (lookup_name): Remove prefer_type argument.
2798                 (lookup_name_prefer_type): New function.
2799                 * name-lookup.h (lookup_name_prefer_type): Declare it.
2800                 * decl.c (lookup_and_check_tag): Use it.
2801                 * pt.c (tsubst_friend_class): Likewise. Update for
2802                 lookup_name change.
2803                 (lookup_template_class, tsubst_copy_and_build): Likewise.
2804
2805 2006-03-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2806
2807         PR c++/15759
2808         * tree.c (bot_manip): Don't call mark_used.
2809
2810 2006-03-02  Mike Stump  <mrs@apple.com>
2811
2812         * decl2.c (import_export_decl): Remove redundant call to
2813         targetm.cxx.key_method_may_be_inline ().
2814
2815 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
2816
2817         * decl.c (start_decl): Use have_global_bss_p when deciding
2818         whether to make the decl common.
2819
2820 2006-03-01  Mike Stump  <mrs@apple.com>
2821
2822         PR darwin/25908
2823         * decl2.c (import_export_decl): Fix ABI breakage on darwin.
2824
2825 2006-02-24  Geoffrey Keating  <geoffk@apple.com>
2826
2827         * except.c (expand_start_catch_block): Handle
2828         flag_use_cxa_get_exception_ptr.
2829
2830 2006-02-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2831
2832         PR c++/26291
2833         * decl.c (grok_op_properties): Check for ellipsis in arguments of
2834         operators.
2835
2836 2006-02-20  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2837
2838         * Make-lang.in (C++): Remove.
2839         (.PHONY): Remove C++.
2840
2841 2006-02-18  Mark Mitchell  <mark@codesourcery.com>
2842
2843         PR c++/26266
2844         * cp-tree.h (cp_finish_decl): Adjust declaration.
2845         (grokbitfield): Likewise.
2846         (finish_static_data_member_decl): Likewise.
2847         * init.c (constant_value_1): Ensure processing_template_decl when
2848         folding non-dependent initializers for static data members of
2849         dependent types.  Return error_mark_node for erroneous
2850         initailizers.
2851         * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
2852         * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
2853         (cp_finish_decl): Add init_const_expr_p parameter.  Set
2854         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2855         (finish_decl): Adjust call to cp_finish_decl.
2856         (compute_array_index_type): Robustify.
2857         (start_method): Use finish_decl, not cp_finish_decl.
2858         * rtti.c (emit_tinfo_decl): Likewise.
2859         * except.c (initialize_handler_parm): Adjust call to
2860         cp_finish_decl.
2861         (expand_start_catch_block): Likewise.
2862         * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
2863         * pt.c (instantiate_class_template): Adjust call to
2864         finish_static_data_member_decl.
2865         (tsubst_expr): Use finish_decl, not cp_finish_decl.
2866         (instantiate_decl): Adjust call to cp_finish_decl.
2867         * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
2868         cp_finish_decl.
2869         * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
2870         parameter.
2871         (grokfield): Likewise.
2872         * parser.c (cp_parser_condition): Check for constant initializers.
2873         (cp_parser_init_declarator): Adjust calls to grokfield and
2874         cp_finish_decl.  Don't set
2875         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2876         (cp_parser_member_declaration): Likewise.
2877         (cp_parser_objc_class_ivars): Likewise.
2878
2879 2006-02-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2880
2881         * call.c (standard_conversion): Return NULL instead of 0.
2882         (build_user_type_conversion_1): Likewise.
2883         (tourney): Likewise.
2884         * decl.c (redeclaration_error_message): Likewise.
2885         * error.c (language_to_string): Likewise.
2886
2887 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2888
2889         * cp-tree.h (warn_hidden): Remove prototype.
2890         * class.c (warn_hidden): Make static.
2891
2892         * cp-tree.h (build_type_conversion): Remove prototype.
2893         * cvt.c (build_type_conversion): Add prototype, make static.
2894
2895         * cp-tree.h (push_tinst_level): Remove prototype.
2896         (pop_tinst_level): Likewise.
2897         * pt.c (push_tinst_level): Add prototype, make static.
2898         (pop_tinst_level): Likewise.
2899
2900 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2901
2902         * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
2903         * typeck.c (unary_complex_lvalue): Likewise.
2904
2905 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2906
2907         * lex.c (parse_strconst_pragma): Return error_mark_node instead of
2908         "(tree)-1" to indicate failure.  Simplify.
2909         (handle_pragma_interface): Test for error_mark_node instead of
2910         "(tree)-1".
2911         (handle_pragma_implementation): Likewise.
2912
2913 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2914
2915         PR c++/26151
2916         * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
2917         decl-specifiers.  Remove extra check for duplicate 'friend'.
2918         * decl.c (grokdeclarator): Remove check for duplicate
2919         decl-specifiers.  Set longlong together with long_p.
2920
2921 2006-02-12  Jason Merrill  <jason@redhat.com>
2922
2923         PR c++/24996
2924         * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
2925         TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
2926
2927 2006-02-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2928
2929         * class.c (debug_class): Remove extern.
2930         (debug_thunks): Likewise.
2931
2932 2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2933
2934         * typeck.c (string_conv_p): Don't test for flag_const_strings.
2935
2936 2006-02-08  Jason Merrill  <jason@redhat.com>
2937
2938         PR c++/25979
2939         * cp-gimplify.c (cp_gimplify_expr): Don't call
2940         cp_gimplify_init_expr for MODIFY_EXPRs.
2941         * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
2942
2943 2006-02-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2944
2945         PR c++/26071
2946         * decl.c (grokdeclarator): Set dname also for destructor.
2947
2948         PR c++/26070
2949         * decl.c (grokdeclarator): Clear storage_class together with staticp.
2950
2951 2006-02-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2952
2953         * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
2954         (cp_build_qualified_type): Propogate renaming.
2955         * call.c (convert_like_real): Likewise.
2956         * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
2957         * decl.c (make_typename_type, grokdeclarator): Likewise.
2958         * pt.c (tsubst_friend_function, instantiate_class_template,
2959         tsubst_default_argument, instantiate_decl,
2960         tsubst_initializer_list, tsubst_enum): Likewise.
2961         * semantics.c (finish_template_type): Likewise.
2962         * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
2963
2964 2006-02-07  Dirk Mueller  <dmueller@suse.com>
2965
2966         * typeck.c (build_binary_op): Annotate div-by-zero
2967         warnings to make -Wno-div-by-zero have an effect.
2968
2969 2006-02-07  Mark Mitchell  <mark@codesourcery.com>
2970
2971         PR c++/9737
2972         * pt.c (coerce_template_template_parms): Do not templates with
2973         excess default arguments to match template template parameters
2974         with fewer parameters.
2975         (coerce_template_parms): Add use_default_args parameter; use
2976         default arguments only when true.
2977         (lookup_template_class): Adjust call to coerce_template_parms.
2978         (fn_type_unification): Likewise.
2979         (unify): Likewise.
2980         (get_bindings): Likewise.
2981         (dependent_type_p): Add assertions.
2982
2983 2006-02-06  Roger Sayle  <roger@eyesopen.com>
2984
2985         * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
2986         * rtti.c (typeinfo_in_lib_p): Likewise.
2987         * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
2988         * name-lookup.c (arg_assoc_type): Likewise.
2989
2990 2006-02-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2991
2992         * cp-tree.h (tf_warn_or_error): New substituion flag.
2993         (cp_build_qualified_type): Use it.
2994         * call.c (convert_like_real): Likewise.
2995         * cvt.c (cp_convert_to_pointer): Likewise.
2996         (convert_to_reference): Likewise.
2997         * decl.c (make_typename_type): Likewise.
2998         (grokdeclarator): Likewise.
2999         * pt.c (tsubst_friend_function): Likewise.
3000         (tsubst_friend_class): Likewise.
3001         (instantiate_class_template): Likewise.
3002         (tsubst_default_argument): Likewise.
3003         (instantiate_decl): Likewise.
3004         (tsubst_initializer_list): Likewise.
3005         (tsubst_enum): Likewise.
3006         * semantics.c (finish_template_type): Likewise.
3007         * typeck.c (build_ptrmemfunc): Likewise.
3008         (convert_for_assignment): Likewise.
3009
3010 2006-02-03  Lee Millward  <lee.millward@gmail.com>
3011
3012         * typeck.c (string_conv_p): Pass appropiate
3013         OPT_Wxxxx values when calling warning().
3014         (build_array_ref, cxx_mark_addressable): Likewise.
3015         (check_return_expr): Likewise.
3016
3017         * init.c (perform_member_init): Likewise.
3018         (sort_mem_initializers, emit_mem_initializers): Likewise.
3019
3020         * class.c (check_field_decls): Likewise.
3021         (warn_about_ambiguous_bases): Likewise.
3022
3023         * decl.c (pop_label, poplevel): Likewise.
3024         (duplicate_decls, grok_op_properties): Likewise.
3025         (start_preparsed_function, finish_function): Likewise.
3026
3027         * name-lookup.c (pushdecl_maybe_friend): Likewise.
3028         (pushdecl_maybe_friend): Likewise.
3029
3030         * parser.c (cp_parser_warn_min_max): Likewise.
3031         (cp_parser_cast_expression): Likewise.
3032
3033         * method.c (lazily_declare_fn): Likewise.
3034         * cvt.c (convert_to_void): Likewise.
3035         * mangle.c (finish_mangling): Likewise.
3036         * cp-gimplify.c (gimplify_expr_stmt): Likewise.
3037
3038 2006-02-03  Mark Mitchell  <mark@codesourcery.com>
3039
3040         * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
3041         not IDENTIFIER_OPNAME_P.
3042
3043 2006-01-31  Mark Mitchell  <mark@codesourcery.com>
3044
3045         PR c++/25342
3046         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
3047         documentation.
3048         * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
3049         not TREE_VALUE.
3050         (instantiate_class_template): Simplify.
3051         (verify_class_unification): Remove.
3052         (unify): Document parameters.  Use INNERMOST_TEMPLATE_ARGS to
3053         permit multiple levels of template arguments.
3054         (more_specialized_class): Simplify.
3055         (get_class_bindings): Pass full arguments to unify.  Fold
3056         verify_class_unification into this function.  Return full
3057         arguments.
3058         (most_specialized_class): Adjust for changes to
3059         get_class_bindings.  Issue errors here for ambiguity.  Return the
3060         fully deduced arguments for the most specialized class, in
3061         addition to the partial specialization.
3062
3063 2006-01-31  Ben Elliston  <bje@au.ibm.com>
3064
3065         * mangle.c: Comment fix.
3066
3067 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3068
3069         * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
3070         * repo.c (extract_string, afgets): Use cast when converting from
3071         void *.
3072
3073 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3074
3075         * call.c (alloc_conversion): Use cast when converting from void *.
3076         (alloc_conversions): Likewise.
3077         (add_candidate): Likewise.
3078         (print_z_candidates): Likewise.
3079         (add_warning): Likewise.
3080         * pt.c (retrieve_local_specialization): Likewise.
3081         (process_partial_specialization): Likewise.
3082         (mangle_class_name_for_template): Likewise.
3083         (tsubst_template_args): Likewise.
3084         * typeck2.c (pat_calc_hash): Likewise.
3085         (pat_compare): Likewise.
3086         (abstract_virtuals_error): Likewise.
3087         * class.c (method_name_cmp): Likewise.
3088         (resort_method_name_cmp): Likewise.
3089         (get_vfield_name): Likewise.
3090         * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
3091         * lex.c (init_reswords): Likewise.
3092         * rtti.c (create_pseudo_type_info): Likewise.
3093         * search.c (dfs_lookup_base): Likewise.
3094         (dfs_dcast_hint_pre): Likewise.
3095         (dfs_dcast_hint_post): Likewise.
3096         * tree.c (hash_tree_cons): Likewise.
3097         * repo.c (extract_string): Likewise.
3098         (afgets): Likewise.
3099         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
3100         * g++spec.c (lang_specific_driver): Likewise.
3101
3102 2006-01-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3103
3104         * call.c (joust): Pass option code to warning.  Use inform for
3105         explanation.
3106         * class.c (check_bases): Likewise.
3107         (maybe_warn_about_overly_private_class): Likewise.
3108         (check_field_decls): Likewise.
3109         (layout_empty_base): Likewise.
3110         (layout_virtual_bases): Likewise.
3111         (layout_class_type): Likewise.
3112
3113 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
3114
3115         PR c++/25999
3116         * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
3117         here, not ...
3118         (start_function): ... here.
3119
3120 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
3121
3122         PR c++/25855
3123         * class.c (resolve_address_of_overloaded_function): Adjust use of
3124         return value from most_specialized_instantiation.
3125         * pt.c (determine_specialization): Avoid multiple calls to
3126         get_bindings.
3127         (most_specialized_instantiation): When a tie occurs, set the
3128         current presumed champion to the next template.  Return the
3129         TREE_LIST node containing the template, rather than the template
3130         itself.
3131         (most_specialized): Remove.
3132         * name-lookup.c (push_overloaded_decl): When duplicate_decls
3133         indicates a failed redeclaration, report that to callers.
3134
3135 2006-01-26  Jason Merrill  <jason@redhat.com>
3136
3137         PR c++/16021
3138         * name-lookup.c (parse_using_directive): Require strong using to
3139         name a nested namespace.
3140
3141 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3142
3143         Revert:
3144         * cp-tree.h (do_poplevel): Remove prototype.
3145         * semantics.c (do_poplevel): Add prototype.  Make static.
3146
3147         Revert:
3148         * cp-tree.h (default_conversion): Remove prototype.
3149         * typeck.c (default_conversion): Make static.
3150
3151 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3152
3153         * cp-tree.h (get_primary_binfo): Remove prototype.
3154         (push_using_decl): Likewise.
3155         (current_template_args): Likewise.
3156         (more_specialized_class): Likewise.
3157         (mark_class_instantiated): Likewise.
3158         (default_conversion): Likewise.
3159         (pfn_from_ptrmemfunc): Likewise.
3160         * class.c (get_primary_binfo): Add prototype, make static, simplify.
3161         * name-lookup.c (push_using_decl): Make static.
3162         * pt.c (current_template_args): Likewise.
3163         (more_specialized_class): Likewise.
3164         (mark_class_instantiated): Likewise.
3165         * typeck.c (default_conversion): Make static.
3166         (pfn_from_ptrmemfunc): Add prototype, make static.
3167
3168 2006-01-24  Dirk Mueller  <dmueller@suse.de>
3169
3170         * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
3171
3172 2006-01-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3173
3174         PR c++/25552
3175         * parser.c (cp_parser_unqualified_id): Check that destructor name
3176         and scope match.
3177         * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
3178         Adjust comment.  Return early if possible.
3179         Use same_type_p to compare types.
3180         * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
3181
3182 2006-01-24  Mark Mitchell  <mark@codesourcery.com>
3183
3184         * semantics.c: Remove outdated comment.
3185
3186 2006-01-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3187
3188         * cp-tree.h (do_poplevel): Remove prototype.
3189         * semantics.c (do_poplevel): Add prototype.  Make static.
3190
3191         * cp-tree.h (original_type): Remove prototype.
3192         * typeck.c (original_type): Make static.
3193
3194         * cp-tree.h (declare_global_var): Remove prototype.
3195         * decl.c (declare_global_var): Make static.
3196
3197         * cp-tree.h (implicitly_declare_fn): Remove prototype.
3198         * method.c (implicitly_declare_fn): Make static.
3199
3200         * cp-tree.h (fold_decl_constant_value): Remove prototype.
3201         * pt.c (fold_decl_constant_value): Make static.
3202
3203         * cp-tree.h (build_x_delete): Remove prototype.
3204         * init.c (build_vec_delete_1): Call build_op_delete_call directly
3205         and not via build_x_delete.
3206         (build_x_delete): Remove.
3207
3208         * cp-tree.h (get_vtt_name): Remove prototype.
3209         * class.c (get_vtt_name): Remove.
3210         (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
3211
3212 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3213
3214         * rtti.c (build_dynamic_cast): Fix comment.
3215
3216 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3217
3218         PR c++/10891
3219         * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
3220         -fno-rtti.
3221
3222 2006-01-21  Mark Mitchell  <mark@codesourcery.com>
3223
3224         PR c++/25895
3225         * class.c (build_base_path): Generate a NOP_EXPR instead of a
3226         COMPONENT_REF if the base and derived classes are at the same
3227         address.
3228
3229         PR c++/25856
3230         * decl.c (begin_destructor_body): Robustify.
3231
3232         PR c++/25858
3233         * parser.c (cp_parser_direct_declarator): Robustify.
3234
3235 2006-01-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3236
3237         * parser.c (cp_lexer_next_token_is_keyword): Simplify.
3238
3239         * parser.c (clear_decl_specs): Remove prototype.
3240
3241         * parser.c (cp_parser_expression_fn): Remove.
3242
3243         * call.c (add_builtin_candidates): Remove superfluous return.
3244         * name-lookup.c (do_toplevel_using_decl): Likewise.
3245         * parser.c (cp_parser_type_specifier_seq): Likewise.
3246         (cp_parser_save_default_args): Likewise.
3247
3248 2006-01-20  Dirk Mueller  <dmueller@suse.com>
3249
3250         PR c++/5520
3251         * semantics.c (finish_if_stmt): Call empty_body_warning.
3252         * parser.c (cp_parser_implicitly_scoped_statement):
3253         Mark empty statement with an empty stmt.
3254
3255 2006-01-19  Mark Mitchell  <mark@codesourcery.com>
3256
3257         PR c++/22136
3258         * name-lookup.c (do_class_using_decl): Don't try to look up base
3259         classes in templates with dependent base types.
3260
3261 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3262
3263         PR c++/25854
3264         * pt.c (maybe_process_partial_specialization): Return early on
3265         error_mark_node.
3266
3267 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3268
3269         PR c++/16829
3270         * decl.c (start_preparsed_function): Check default arguments
3271         unconditionally.
3272         * name-lookup.c (pushdecl_maybe_friend): Check default arguments
3273         of all functions and function templates.
3274         * parser.c (cp_parser_late_parsing_default_args): Check default
3275         arguments.
3276         * decl2.c (check_default_args): Set missing default arguments to
3277         error_mark_node.
3278
3279 2006-01-18  Mark Mitchell  <mark@codesourcery.com>
3280
3281         PR c++/25836
3282         * cp-tree.h (push_class_stack): New function.
3283         (pop_class_stack): Likewise.
3284         * class.c (class_stack_node): Add hidden field.
3285         (pushclass): Clear it.
3286         (push_class_stack): New function.
3287         (pop_class_stack): Likewise.
3288         (currently_open_class): Ignore hidden classes.
3289         (currently_open_derived_class): Likewise.
3290         * name-lookup.c (push_to_top_level): Call push_class_stack.
3291         (pop_from_top_level): Call pop_class_stack.
3292
3293 2006-01-18  Kazu Hirata  <kazu@codesourcery.com>
3294
3295         * tree.c (find_tree_t, find_tree): Remove.
3296         * cp-tree.h: Remove the prototype for find_tree.
3297
3298 2006-01-18  Jakub Jelinek  <jakub@redhat.com>
3299
3300         * search.c (lookup_conversions_r): Fix a pasto.
3301
3302 2006-01-17  Eric Christopher  <echristo@apple.com>
3303
3304         * call.c (convert_like_real): When issuing conversion
3305         warnings, depend on OPT_Wconversion.
3306         * cvt.c (build_expr_type_conversion): Ditto.
3307
3308 2006-01-17  Kazu Hirata  <kazu@codesourcery.com>
3309
3310         * name-lookup.c (lookup_namespace_name): Remove.
3311         * name-lookup.h: Remove the prototype for
3312         lookup_namespace_name.
3313
3314 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
3315
3316         PR c/25682
3317         * decl.c (compute_array_index_type): After issuing not an integral
3318         constant-expression error, set size to 1 to avoid ICEs later on.
3319
3320 2006-01-16  Ian Lance Taylor  <ian@airs.com>
3321
3322         * parser.c: Include "cgraph.h".
3323         (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
3324         assemble_asm.
3325
3326 2006-01-16  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
3327
3328         * g++spec.c (lang_specific_spec_functions): Remove.
3329
3330 2006-01-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3331
3332         * decl.c (check_initializer): Fix thinko.
3333
3334 2006-01-14  Mark Mitchell  <mark@codesourcery.com>
3335
3336         PR c++/25663
3337         * parser.c (cp_parser_direct_declarator): Use cp_parser_error
3338         instead of error.
3339
3340 2006-01-13  Jason Merrill  <jason@redhat.com>
3341
3342         * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
3343
3344         * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
3345         * pt.c (check_explicit_specialization): Likewise.
3346
3347 2006-01-12  Jason Merrill  <jason@redhat.com>
3348
3349         PR libstdc++/24660
3350         * pt.c (check_explicit_specialization): Handle namespace
3351         association.
3352         * name-lookup.c (set_decl_namespace): Likewise.
3353
3354 2006-01-12  Nathan Sidwell  <nathan@codesourcery.com>
3355
3356         PR c++/24824
3357         * class.c (handle_using_decl): Pass correct scope to
3358         cp_emit_debug_info_for_using.
3359
3360 2006-01-11  Nathan Sidwell  <nathan@codesourcery.com>
3361
3362         PR c++/25386
3363         * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
3364         packedness.
3365
3366 2006-01-06  Gabriel Dos Reis  <gdr@integrablesolutions.net>
3367
3368         * parser.c (cp_parser_primary_expression): Document the grammar
3369         for the built-in offsetof, a GNU extension.
3370
3371 2006-01-04  Zdenek Dvorak <dvorakz@suse.cz>
3372
3373         PR c++/25632
3374         * init.c (constant_value_1): Unshare use of DECL_INITIAL.  Fix a typo
3375         in condition.
3376
3377 2006-01-04  Chris Lattner  <sabre@gnu.org>
3378
3379         * typeck2.c: update copyright to 2006
3380         (split_nonconstant_init_1):  Set TREE_CONSTANT to true.
3381
3382 2006-01-04  Mark Mitchell  <mark@codesourcery.com>
3383
3384         PR c++/24782
3385         * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
3386         checks, even when parsing tentatively.
3387
3388 2006-01-04  Richard Henderson  <rth@redhat.com>
3389
3390         Merge from gomp branch.
3391         * lex.c (handle_pragma_java_exceptions): Fix whitespace.
3392         * parser.c (struct cp_token): Add pragma_kind.
3393         (eof_token): Update to match.
3394         (struct cp_lexer): Add in_pragma; rearrange next for better packing.
3395         (cp_parser_initial_pragma): New.
3396         (cp_lexer_new_main): Use it.  Don't bother clearing
3397         c_lex_return_raw_strings.
3398         (cp_lexer_get_preprocessor_token): Always initialize keyword
3399         and pragma_kind fields.  Handle CPP_PRAGMA.
3400         (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
3401         in_pragma is set.
3402         (cp_lexer_handle_pragma): Remove.  Update callers to cp_parser_pragma.
3403         (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
3404         (cp_parser_skip_to_pragma_eol): New.
3405         (cp_parser_error): Use it.
3406         (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
3407         rearrange with switch statement.
3408         (cp_parser_skip_to_end_of_statement): Likewise.
3409         (cp_parser_skip_to_end_of_block_or_statement): Likewise.
3410         (cp_parser_skip_to_closing_brace): Likewise.
3411         (cp_parser_skip_until_found): Likewise.
3412         (cp_parser_statement): Add in_compound argument; update callers.
3413         Use it to decide how to handle pragma parsing.
3414         (cp_parser_labeled_statement): Add in_compound argument; pass
3415         it on to cp_parser_statement.
3416         (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
3417         (cp_parser_declaration_seq_opt): Likewise.
3418         (cp_parser_parameter_declaration): Likewise.
3419         (cp_parser_member_specification_opt): Likewise.
3420         (cp_parser_function_definition_after_decl): Likewise.
3421         (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
3422         (cp_parser_pragma): New.
3423         (pragma_lex): New.
3424
3425 2006-01-04  Dirk Mueller <dmueller@suse.com>
3426
3427         * decl.c (finish_constructor_body): create simple
3428         compound stmt instead of a if(1) { } construct.
3429
3430 2006-01-03  Mark Mitchell  <mark@codesourcery.com>
3431
3432         PR c++/25492
3433         * name-lookup.c (push_class_level_binding): When a derived class
3434         provides a type binding, eliminate any type binding from a base
3435         class.
3436
3437         PR c++/25625
3438         * repo.c (repo_emit_p): Always instantiate static data members
3439         initialized by constant expressions, so that there values are
3440         available.
3441
3442 2006-01-02  Mark Mitchell  <mark@codesourcery.com>
3443
3444         PR c++/25635
3445         * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
3446         conversion operator.
3447         * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
3448
3449         PR c++/25638
3450         * class.c (add_method): Never associate more than one destructor
3451         with a single class.
3452
3453         PR c++/25637
3454         * cp-tree.h (do_friend): Adjust prototype.
3455         * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
3456         (grokdeclarator): Likewise.  Refine check for invalid
3457         declarations/definitions of member functions outside of their own
3458         class.
3459         * friend.c (do_friend): Make funcdef_flag a bool, not an int.
3460
3461         PR c++/25633
3462         * parser.c (cp_parser_mem_initializer_list): Check result of
3463         cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
3464         (cp_parser_mem_initializer): Return error_mark_node for failure.
3465
3466         PR c++/25634
3467         * parser.c (cp_parser_template_parameter_list): Call
3468         begin_template_parm_list and end_template_parm_list here.
3469         (cp_parser_type_parameter): Not here.
3470         (cp_parser_template_declaration_after_export): Or here.
3471         (cp_parser_elaborated_type_specifier): Call
3472         cp_parser_check_template_parameters.
3473
3474         * tree.c (build_target_expr_with_type): Use force_target_expr.
3475
3476         * decl2.c (mark_used): Fix typo in comment.
3477
3478 2006-01-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3479
3480         * parser.c (cp_parser_using_declaration): Skip name-lookup on
3481         invalid scope.
3482
3483 2005-12-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3484
3485         * cxx-pretty-print.c (pp_cxx_constant): New.  Print
3486         string-literal in parens if input program says so.
3487         (pp_cxx_primary_expression): Hand off constant printing to
3488         pp_cxx_constant.
3489         (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
3490         (pp_cxx_expression): Use pp_cxx_constant for literals.
3491         * error.c (dump_expr): Use pp_constant for literals.
3492
3493 2005-12-29  Nathan Sidwell  <nathan@codesourcery.com>
3494
3495         * method.c (make_thunk): Don't set comdat_linkage here.
3496         (use_thunk): Make thunk one only here, if thunk target is
3497         DECL_ONE_ONLY.
3498
3499 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
3500
3501         PR c++/25439
3502         * decl.c (grokdeclarator): Remove dead code.
3503         * ptree.c (cxx_print_xnode): Handle BASELINK.
3504         * parser.c (make_id_declarator): Add sfk parameter.
3505         (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
3506         make_id_declarator.
3507         (cp_parser_declarator_id): Simplify BASELINKs here.
3508         (cp_parser_member_declaration): Adjust calls to
3509         make_id_declarator.
3510
3511 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
3512
3513         PR c++/23171, c++/23172, c++/25417.
3514         * typeck.c (build_unary_op): Create temporary variables for
3515         compound literals whose addresses are taken.
3516         * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
3517         * decl.c (reshape_init_vector): Likewise.
3518         (reshape_init): Give it external linkage.
3519         (check_initializer): Use COMPOUND_LITERAL_P.
3520         (initialize_artificial_var): Allow the initializer to be a
3521         CONSTRUCTOR.
3522         * call.c (make_temporary_var_for_ref_to_temp): Use
3523         create_temporary_var.
3524         * cp-tree.h (COMPOUND_LITERAL_P): New macro.
3525         (rehape_init): Declare.
3526         * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
3527         * semantics.c (finish_compound_literal): Use reshape_init.
3528
3529 2005-12-23  Mark Mitchell  <mark@codesourcery.com>
3530
3531         PR c++/24671
3532         * pt.c (instantiate_template): Handle SFINAE.
3533
3534 2005-12-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3535
3536         * decl.c (grokdeclarator): Improve diagnostic for friend
3537         declarations of class members.
3538
3539 2005-12-22  Mark Mitchell  <mark@codesourcery.com>
3540
3541         PR c++/25369
3542         * tree.c (really_overloaded_fn): Tweak comment.
3543         * pt.c (tsubst_call_declarator_parms): Remove.
3544         (tsubst_copy): Call mark_used on the member referenced by an
3545         OFFSET_REF.
3546         * semantics.c (finish_qualified_id_expr): Simplify.
3547         * decl2.c (mark_used): Accept BASELINKs.
3548
3549         PR c++/25364
3550         * typeck.c (build_unary_op): Pass DECLs not names to
3551         build_offset_refs.
3552         * init.c (build_offset_ref): Do not do name lookup.  Do not call
3553         mark_used.
3554         * call.c (build_call): Simplify and tidy.
3555         * semantics.c (finish_qualified_id_expr): Call mark_used.
3556
3557 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3558
3559         PR c++/23333
3560         * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
3561         identify a single '0'.
3562
3563 2005-12-20  Mark Mitchell  <mark@codesourcery.com>
3564
3565         PR c++/21228
3566         * decl.c (use_eh_spec_block): New function.
3567         (store_parm_decls): Use it.
3568         (finish_function): Likewise.
3569
3570 2005-12-19  Mark Mitchell  <mark@codesourcery.com>
3571
3572         PR c++/24278
3573         * init.c (expand_member_init): Print messages about baseclasses
3574         using %T rather than %D.
3575
3576         PR c++/24915
3577         * class.c (add_method): Do not treat templates as identical unless
3578         their return types are the same.
3579
3580 2005-12-12  Mark Mitchell  <mark@codesourcery.com>
3581
3582         PR c++/25300
3583         * tree.c (build_qualified_name): Return error_mark_node for
3584         erroneous input.
3585
3586 2005-12-10  Mark Mitchell  <mark@codesourcery.com>
3587
3588         PR c++/25337
3589         * pt.c (tsubst_copy_and_build): Permit dependent types for the
3590         object in a class member access expression.
3591
3592 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
3593
3594         PR java/9861
3595         * mangle.c (write_bare_function_type): Mangle return type for
3596         methods of Java classes
3597
3598 2005-12-08  Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3599
3600         * call.c (build_conditional_expr): Print types in error messages.
3601
3602 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3603
3604         * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
3605
3606 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3607
3608         * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
3609
3610 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
3611
3612         * Make-lang.in (c++.all.build, c++.install-normal): Remove.
3613
3614 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
3615
3616         * Make-lang.in: Remove all dependencies on s-gtype.
3617
3618 2005-12-06  Aldy Hernandez  <aldyh@redhat.com>
3619
3620         PR C++/24138
3621         * decl.c (reshape_init_array_1): Handle max_index of -1.
3622
3623 2005-12-06  Roger Sayle  <roger@eyesopen.com>
3624
3625         * typeck.c (build_binary_op): Issue warning if either operand of a
3626         comparison operator is a string literal, except for testing equality
3627         or inequality against NULL.
3628
3629 2005-12-06  Roger Sayle  <roger@eyesopen.com>
3630
3631         PR c++/25263
3632         * decl.c (compute_array_index_type): Check that itype is an
3633         INTEGER_CST node before testing/clearing TREE_OVERFLOW.
3634
3635 2005-12-05  Daniel Berlin  <dberlin@dberlin.org>
3636
3637         * ptree.c (cxx_print_decl): Update to check for decl_common
3638         structure.
3639
3640 2005-12-02  Mark Mitchell  <mark@codesourcery.com>
3641
3642         PR c++/24173
3643         * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
3644         clobbering newdecl.
3645
3646 2005-12-02  Richard Guenther  <rguenther@suse.de>
3647
3648         * semantics.c (simplify_aggr_init_expr): Use buildN instead
3649         of build.
3650
3651 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3652
3653         * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
3654         ggc_realloc.
3655         (cp_parser_template_argument_list): Use XRESIZEVEC instead of
3656         xrealloc.
3657         * class.c (pushclass): Likewise.
3658
3659 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3660
3661         * decl2.c (get_priority_info): Use XNEW, not xmalloc.
3662         * decl.c (push_switch): Likewise.
3663         * lex.c (handle_pragma_implementation): Likewise.
3664         * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
3665         not ggc_alloc.
3666         (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
3667         * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
3668         * g++spec.c (lang_specific_driver): Likewise.
3669         * mangle.c (save_partially_mangled_name): Likewise.
3670         * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
3671         (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
3672         (cp_parser_sizeof_operand): Likewise.
3673         * repo.c (open_repo_file, open_repo_file): Likewise.
3674
3675 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3676
3677         * parser.c (cp_parser_make_typename_type): Call make_typename_type
3678         with tf_none instead of magic value 0.
3679         (cp_parser_explicit_instantiation): Call do_type_instantiation
3680         with tf_error instead of magic value 1.
3681         (cp_parser_elaborated_type_specifier): Call make_typename_type
3682         with tf_error instead of magic value 1.
3683         (cp_parser_class_name): Likewise.
3684         (cp_parser_lookup_name): Likewise.
3685
3686 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3687
3688         * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
3689         not RID_MAX.
3690
3691 2005-11-30  Jason Merrill  <jason@redhat.com>
3692
3693         PR c++/21123
3694         * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
3695         parms in a thunk.
3696
3697 2005-11-30  Ben Elliston  <bje@au.ibm.com>
3698
3699         * typeck.c (build_x_unary_op): Correct spelling in error message.
3700
3701 2005-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3702
3703         PR c++/21166
3704         * class.c (check_field_decls): Only set DECL_PACKED on a field
3705         when its natural alignment is > BITS_PER_UNIT.
3706
3707 2005-11-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3708
3709         PR c++/24979
3710         * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
3711
3712 2005-11-26  Richard Henderson  <rth@redhat.com>
3713
3714         * lex.c: Update for pragma_lex rename.
3715         * parser.c: Likewise.
3716
3717 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3718
3719         PR c++/9278
3720         * decl.c (grokparms): Do not allow typedef-names in a '(void)'
3721         parmlist.
3722
3723 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3724
3725         * typeck2.c (process_init_constructor_union): Remove check for
3726         unnamed union members.
3727
3728 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3729
3730         * name-lookup.c (lookup_name_real): Merge two if's.
3731
3732 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3733
3734         * pt.c (instantiate_class_template): Clean-up.
3735
3736 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3737
3738         * pt.c (template_class_depth_real): Remove. Move functionality to ...
3739         (template_class_depth): ... here, replacing count_specializations
3740         with 0.  Adjust comment.
3741
3742 2005-11-24  Richard Guenther  <rguenther@suse.de>
3743         Dirk Mueller <dmueller@suse.de>
3744
3745         PR c++/14024
3746         * typeck.c (build_reinterpret_cast_1): Use
3747         strict_aliasing_warning.
3748
3749 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3750
3751         PR c++/24235
3752         * pt.c (check_instantiated_args): Reword diagnostic message about
3753         template argument involving local types.
3754
3755 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3756
3757         PR c++/21667
3758         * typeck.c (build_array_ref): Avoid code duplicate.  Use common
3759         C/C++ diagnostic function warn_array_subscript_with_type_char.
3760
3761 2005-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3762
3763         PR c++/22238
3764         * error.c (resolve_virtual_fun_from_obj_type_ref): New.
3765         (dump_expr): Use it in <case CALL_EXPR>.
3766
3767 2005-11-21  Richard Henderson  <rth@redhat.com>
3768
3769         * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
3770
3771         * name-lookup.c (lookup_name): Remove prefer_type argument.
3772         (lookup_name_prefer_type): New.
3773         * decl.c (lookup_and_check_tag): Use them.
3774         * pt.c (tsubst_friend_class): Likewise.
3775         (lookup_template_class): Likewise.
3776         (tsubst_copy_and_build): Likewise.
3777         * name-lookup.h (lookup_name_prefer_type): New.
3778         (lookup_name): Remove declaration.
3779
3780 2005-11-18  Mark Mitchell  <mark@codesourcery.com>
3781
3782         PR c++/8355
3783         * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
3784         set_decl_namespace.
3785         * name-lookup.c (set_decl_namespace):
3786
3787 2005-11-18  Mike Stump  <mrs@apple.com>
3788
3789         * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
3790         * name-lookup.c (lookup_name_two): Remove.
3791         (lookup_name_one): Add.
3792         * name-lookup.h (lookup_name_two): Remove.
3793         (lookup_name_one): Add.
3794
3795 2005-11-15  Jason Merrill  <jason@redhat.com>
3796
3797         PR c++/24580
3798         * method.c (locate_copy): Also use skip_artificial_parms here.
3799         (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
3800         for RECORD_TYPE.
3801         (locate_ctor): Abort if we fail to find a default constructor.
3802
3803 2005-11-15  Mike Stump  <mrs@apple.com>
3804
3805         * name-lookup.c (lookup_name_two): Add.
3806         * name-lookup.h: Likewise.
3807
3808 2005-11-15  Mark Mitchell  <mark@codesourcery.com>
3809
3810         PR c++/24667
3811         * typeck.c (check_for_casting_away_constness): Use the diag_fn.
3812         (build_const_cast_1): Call it, for C-style casts.
3813
3814 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
3815
3816         PR c++/24687
3817         * pt.c (check_explicit_specialization): Don't check for C linkage.
3818         (push_template_decl_real): Likewise.
3819         * parser.c (cp_parser_explicit_specialization): Check here.
3820         (cp_parser_template_declaration_after_export): And here.
3821
3822         * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
3823         field.
3824
3825 2005-11-14  Jason Merrill  <jason@redhat.com>
3826
3827         PR c++/24580
3828         * method.c (locate_ctor): Skip all artificial parms, not just
3829         'this'.
3830
3831 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
3832
3833         * parser.c (eof_token): Add initializer for ambiguous_p.
3834
3835 2005-11-13  Mark Mitchell  <mark@codesourcery.com>
3836
3837         PR c++/24817
3838         * decl.c (check_redeclaration_exception_specification): New
3839         function.
3840         (duplicate_decls): Use it.
3841         * error.c (fndecl_to_string): Print the template parameter list.
3842
3843         PR c++/20293
3844         * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
3845         for namespaces.
3846         (pp_cxx_original_namespace_definition): Likewise.
3847         * name-lookup.c (ambiguous_decl): Don't issue error messages;
3848         instead return lists of ambiguous candidates.
3849         (select_decl): Handle ambiguous namespace lookups.
3850         * parser.c (cp_token): Add ambiguous_p.
3851         (cp_lexer_get_preprocessor_token): Set it.
3852         (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
3853         when a qualified name uses an invalid scope.
3854         (cp_parser_primary_expression): Print ambiguous candidates.
3855         (cp_parser_type_parameter): Adjust comment to reflect new
3856         parameter name for cp_parser_lookup_name.
3857         (cp_parser_template_argument): Likewise.
3858         (cp_parser_elaborated_type_specifier): Likewise.
3859         (cp_parser_namespace_name): Likewise.
3860         (cp_parser_class_name): Print ambiguous candidates.
3861         (cp_parser_lookup_name): Rename ambiguous_p parameter to
3862         ambiguous_decls.  Use it to return a list of ambiguous candiates
3863         when a lookup is ambiguous.
3864         (cp_parser_lookup_name_simple): Adjust comment to reflect new
3865         parameter name for cp_parser_lookup_name.
3866
3867 2005-11-12  Jakub Jelinek  <jakub@redhat.com>
3868
3869         PR c++/24780
3870         * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
3871         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
3872         of array type.
3873
3874         PR c++/24761
3875         * pt.c (tsubst_copy_asm_operands): New function.
3876         (tsubst_expr) <case ASM_EXPR>: Use it.
3877
3878 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
3879
3880         PR c++/19450
3881         * decl.c (redeclaration_error_message): Issue diagnostics about
3882         olddecl and newdecl disagreement on __thread property.
3883         (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
3884
3885 2005-11-08  Jason Merrill  <jason@redhat.com>
3886
3887         PR c++/21123
3888         * method.c (use_thunk): Use build_cplus_new instead of
3889         force_target_expr.
3890
3891 2005-11-06  Jason Merrill  <jason@redhat.com>
3892             James A. Morrison <phython@gcc.gnu.org>
3893
3894         PR c++/17256
3895         * decl2.c (cp_finish_file): Fix conditions for undefined warning.
3896         Set TREE_NO_WARNING instead of TREE_PUBLIC.
3897         * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
3898         a warning on a function we didn't instantiate because of excessive
3899         recursion.
3900
3901 2005-11-06  Mark Mitchell  <mark@codesourcery.com>
3902
3903         * class.c (record_subobject_offsets): Don't record offsets past
3904         biggest empty class for non-empty base classes.
3905         (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
3906         keeping track of the size of emptyclasses.
3907
3908         PR c++/21308
3909         * class.c (sizeof_biggest_empty_class): New variable.
3910         (record_subobject_offsets): Don't record offsets past biggest
3911         empty class for data members.  Replace vbases_p parameter with
3912         is_data_member parameter.
3913         (build_base_field): Adjust call.
3914         (layout_class_type): Likewise.  Maintain
3915         sizeof_biggest_empty_class.
3916
3917 2005-11-05  Kazu Hirata  <kazu@codesourcery.com>
3918
3919         * decl2.c, init.c, typeck.c: Fix comment typos.
3920
3921 2005-11-04  Richard Guenther  <rguenther@suse.de>
3922
3923         PR c++/22487
3924         * init.c (build_vec_init): Build comparison of matching
3925         types.
3926
3927 2005-11-03  Josh Conner  <jconner@apple.com>
3928
3929         PR c++/19989
3930         pt.c (tsubst): Accept zero-length array if tf_error is set
3931         in complain flags.  Change error message for negative-
3932         length array.
3933
3934 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
3935
3936         * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
3937         parameter.
3938
3939 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
3940
3941         PR c++/17964
3942         * error.c (cp_cpp_error): New function.
3943         * cp-tree.h (cp_cpp_error): Declare.
3944         * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
3945         and error callback after lexing.
3946
3947 2005-11-03  Mark Mitchell  <mark@codesourcery.com>
3948
3949         PR c++/21627
3950         * pt.c (register_specialization): Update inline flags on clones.y
3951
3952 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
3953
3954         PR c++/24582
3955         * decl.c (declare_local_label): Return 0 for variables
3956         with error_mark_node as their types.
3957
3958 2005-11-02  Mark Mitchell  <mark@codesourcery.com>
3959
3960         PR c++/22434
3961         * call.c (build_conditional_expr): Do bad conversions, if there's
3962         no other choice.
3963
3964         PR c++/24560
3965         * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
3966         message for use of overloaded functions on LHS of "." operator.
3967
3968         PR c++/19253
3969         * parser.c (cp_parser_postfix_expression): Use
3970         cp_parser_elaborated_type_specifier to handle typename-types in
3971         functional casts.
3972         (cp_parser_enclosed_argument_list): Skip ahead to the end of the
3973         template argument list if the closing ">" is not found.
3974
3975         PR c++/24569
3976         * pt.c (instantiate_decl): Use cp_finish_decl, not
3977         finish_static_data_member_decl.
3978
3979 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3980
3981         * decl.c (grokfndecl): Remove the setting
3982         of the return type of the function type
3983         of main after erroring about must returning
3984         int.
3985
3986 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3987
3988         PR C++/23229
3989         * decl.c (grokfndecl): Create a new function type
3990         after erroring out about main not returning int.
3991
3992 2005-10-28  Josh Conner  <jconner@apple.com>
3993
3994         PR c++/22153
3995         * parser.c (cp_parser_member_declaration): Detect and handle
3996         a template specialization.
3997
3998 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3999
4000         PR C++/23426
4001         * decl.c (start_decl): Check that the decl is an
4002         error_mark_node before getting the type.
4003         Remove the check for the decl's type being an
4004         error_mark_node.
4005
4006 2005-10-21  Mark Mitchell  <mark@codesourcery.com>
4007
4008         PR c++/24260
4009         * parser.c (cp_parser_init_declarator): Pass attributes to
4010         grokfield.
4011
4012 2005-10-20  Mark Mitchell  <mark@codesourcery.com>
4013
4014         PR c++/22618
4015         * search.c (accessible_p): Check access in the outermost set of
4016         template parameters.
4017
4018 2005-10-20  Richard Guenther  <rguenther@suse.de>
4019
4020         * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
4021
4022 2005-10-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4023
4024         PR c++/22293
4025         * decl.c (grokdeclarator): Reject unqualified destructors in
4026         friend declarations.
4027
4028 2005-10-18  Mark Mitchell  <mark@codesourcery.com>
4029
4030         PR c++/23293
4031         * pt.c (convert_template_argument): Use canonical type variants in
4032         template specializations.
4033
4034 2005-10-18  Nathan Sidwell  <nathan@codesourcery.com>
4035
4036         PR c++/21383
4037         * name-lookup.c (arg_assoc): Template args can be null in a
4038         template-id-expr.
4039
4040         PR c++/22604
4041         * class.c (update_vtable_entry_for_fn): Don't process invalid
4042         covariant overriders.
4043
4044         PR c++/23118
4045         * cp-tree.h (add_method): Add return value.
4046         * class.c (add_method): Return success indicator.
4047         * semantics.c (finish_member_declaration): Don't add an invalid
4048         method to the method list.
4049
4050 2005-10-17  Mark Mitchell  <mark@codesourcery.com>
4051
4052         PR c++/21908
4053         * call.c (build_new_method_call): Do not show VTT parameters to
4054         the user.
4055
4056 2005-10-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4057
4058         PR c++/23440
4059         * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
4060         only complain about missing statement.
4061
4062 2005-10-17  Nathan Sidwell  <nathan@codesourcery.com>
4063
4064         PR c++/24386
4065         * cp-tree.h (BASELINK_QUALIFIED_P): New.
4066         * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
4067         * typeck.c (finish_class_member_access_expr): Set it.
4068
4069         PR c++/21353
4070         * decl.c (check_default_argument): Don't check
4071         processing_template_decl or uses_template_parms here.
4072         (grokparms): Only call check_default_argument when not processing
4073         a template decl.
4074         * parser.c (cp_parser_late_parsing_default_arg): Call
4075         check_default_argument when not processing a template decl.
4076
4077 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
4078
4079         PR c++/24389
4080         * decl2.c (mark_used): Use uses_template_parms instead of
4081         dependent_type_p.
4082         * init.c (constant_value_1): Handle uninstantiated templates
4083         specially.
4084         * pt.c (instantiate_decl): Add sanity check.
4085
4086 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
4087
4088         PR c++/22173
4089         * typeck.c (check_template_keyword): Fix thinko.
4090
4091 2005-10-16  Andrew Pinski  <pinskia@physics.uc.edu>
4092
4093         PR c++/23959
4094         * decl.c (pop_switch): Only call c_do_switch_warnings
4095         when not processing templates.
4096
4097 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
4098
4099         PR c++/22173
4100         * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
4101         (check_template_keyword): New function.
4102         (finish_id_expression): Change prototoype.
4103         (finish_qualified_id_expr): Change prototype.
4104         (build_qualified_name): New function.
4105         (finish_class_member_access_expr): Change prototype.
4106         * init.c (build_offset_ref): Use build_qualified_name.
4107         * mangle.c (write_expression): Likewise.
4108         * parser.c (cp_parser_primary_expression): Remove qualifying_class
4109         parameter.  Add address_p and template_arg_p.  Use
4110         build_qualified_name.
4111         (cp_parser_id_expression): Default *template_p to
4112         template_keyword_p.  Check for invalid uses of the template
4113         keyword.
4114         (cp_parser_postfix_expression): Eliminate special handling for
4115         qualified names.  Adjust call to cp_parser_primary_expression.
4116         (cp_parser_postfix_dot_deref_expression): Adjust call to
4117         cp_parser_id_expression and finish_class_member_access_expr.
4118         (cp_parser_template_argument_list): Add comment.
4119         (cp_parser_template_argument): Adjust use of
4120         cp_parser_primary_expression.  Remove call to
4121         finish_qualified_id_expr.
4122         (cp_parser_lookup_name): Use build_qualified_name.
4123         * pt.c (tsubst): Use build_qualified_name.
4124         (tsubst_qualified_id): Likewise.  Adjust call to
4125         finish_qualified_id_expr.
4126         (tsubst_copy): Use build_qualified_name.
4127         (tsubst_copy_and_build): Adjusts call to finish_id_expression and
4128         finish_class_member_access_expr.
4129         * semantics.c (finish_non_static_data_member): Use
4130         build_qualified_name.
4131         (finish_qualified_id_expr): Add template_p and template_arg_p
4132         parameters.
4133         (finish_id_expression): Remove qualifiying_class parameter.  Add
4134         template_p, done, address_p, and template_arg_p.  Use
4135         build_qualified_name.  Adjust calls to
4136         finish_class_member_acess_expr.
4137         * tree.c (build_qualified_name): New function.
4138         * typeck.c (check_template_keyword): New function.
4139         (finish_class_member_access_expr): Add template_p argument.  Check
4140         for invalid uses of the template keyword.
4141
4142 2005-10-15  Mark Mitchell  <mark@codesourcery.com>
4143
4144         PR c++/21347
4145         * class.c (maybe_warn_about_overly_private_class): Lazy
4146         constructors are public.
4147
4148 2005-10-14  Mark Mitchell  <mark@codesourcery.com>
4149
4150         PR c++/19565
4151         * call.c (convert_like_real): Rely on convert_and_check to issue
4152         warnings about overflow and conversion to unsigned.
4153         * decl.c (finish_enum): Use the location of the enumerators, not
4154         the closing brace of the enumeration, when reporting warnings
4155         about conversions.
4156         (build_enumerator): Use error_mark_node for erroneous values.
4157         * typeck2.c (digest_init): Remove reference to "signature pointer"
4158         from comment.
4159
4160 2005-10-14  Nathan Sidwell  <nathan@codesourcery.com>
4161
4162         PR c++/17796
4163         * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
4164         (maybe_clone_body): Track the first clone.
4165
4166 2005-10-13  Nathan Sidwell  <nathan@codesourcery.com>
4167
4168         PR c++/23984
4169         * class.c (build_base_path): The vtable is always the first thing
4170         in the vtt.
4171
4172 2005-10-13  Mark Mitchell  <mark@codesourcery.com>
4173
4174         PR c++/20721
4175         * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
4176         * decl.c (duplicate_decls): Merge it into new declarations.
4177         (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
4178         (cp_finish_decl): Set it, when appropriate.
4179
4180         PR c++/22180
4181         * call.c (build_new_method_call): Correct pretty-printing of
4182         destructor names.
4183         * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
4184         identifier.
4185
4186         PR c++/23694
4187         * decl.c (start_method): Return error_mark_node for errors.
4188
4189         PR c++/23307
4190         * pt.c (push_template_decl_real): Complain about attempts to
4191         declare template variables.
4192
4193         PR c++/22352
4194         * pt.c (tsubst_template_parms): Set processing_template_decl while
4195         processing the parameters.
4196         (tsubst_decl): Set processing_template_decl when substituting into
4197         a TEMPLATE_DECL.
4198
4199         PR c++/22405
4200         * pt.c (most_specialized_instantiation): Robustify.
4201
4202         PR c++/22464
4203         * semantics.c (finish_id_expression): Issue errors about uses of
4204         local variables in containing functions even in templates.
4205
4206 2005-10-12  Danny Smith  <dannysmith@users.sourceforge.net>
4207
4208         PR target/21801
4209         PR target/23589
4210         * class.c (finish_struct_1): Call
4211         targetm.cxx.adjust_class_at_definition.
4212
4213
4214 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
4215
4216         PR c++/21592
4217         * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
4218         with already looked up member functions.  Assert we're not
4219         returning a NON_DEPENDENT_EXPR with unknown type.
4220         * typeck.c (finish_class_member_access_expr):  We can get
4221         non-template-id-expr baselinks.  If the lookup finds a baselink,
4222         remember it even inside templates.
4223
4224         PR c++/23797
4225         * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
4226         TYPE_DECL.  Use dependent_type_p to check type.
4227         * pt.c (uses_template_parms_p): Use dependent_type_p for a
4228         TYPE_DECL.
4229         (type_dependent_expression_p): Assert we've not been given a
4230         TYPE_DECL.
4231
4232         PR c++/21117
4233         * decl.c (check_function_type): Correctly overwrite incomplete
4234         return type with void type.
4235         * typeck.c (check_return_expr): If the function's return type is
4236         void, don't try and convert a return expr.
4237
4238 2005-10-12  David Edelsohn  <edelsohn@gnu.org>
4239
4240         PR c++/23730
4241         * call.c (build_object_call): If BINFO is NULL, bypass
4242         lookup_fnfields and set fns to NULL_TREE.
4243
4244 2005-10-12  Paolo Bonzini  <bonzini@gnu.org>
4245
4246         PR c++/24052
4247         * error.c (dump_expr): Pass LABEL_DECL to dump_decl.  Print
4248         an ADDR_EXPR of a LABEL_DECL as &&.
4249
4250 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
4251
4252         PR c++/19964
4253         * class.c (walk_subobject_offsets): Don't walk error_mark_node.
4254
4255 2005-10-11  Ian Lance Taylor  <ian@airs.com>
4256
4257         PR c++/8057
4258         * cvt.c (convert_to_void): Don't warn about unused values when
4259         processing a template declaration.
4260
4261 2005-10-11  Mark Mitchell  <mark@codesourcery.com>
4262
4263         PR c++/21089
4264         * call.c (convert_like_real): Use decl_constant_value, not
4265         integral_constant_value.
4266         * init.c (constant_value_1): New function.
4267         (integral_constant_value): Use it.
4268         (decl_constant_value): Likewise.
4269         * typeck.c (decay_conversion): Use decl_constant_value, not
4270         integral_constant_value.
4271
4272         PR c++/21369
4273         * parser.c (cp_parser_elaborated_type_specifier): Don't treat
4274         class types as templates if the type is not appearing as part of a
4275         type definition or declaration.
4276
4277 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
4278
4279         PR c++/24277
4280         * pt.c (instantiate_decl): Call finish_static_data_member_decl for
4281         static data members.
4282
4283 2005-10-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4284             Mark Mitchell  <mark@codesourcery.com>
4285
4286         PR c++/23437
4287         * parser.c (cp_parser_template_argument_list): Do not treat
4288         contents of argument list as part of a constant expression.
4289
4290 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
4291
4292         PR c++/24139
4293         * decl.c (grokdeclarator): Do not require template parameter lists
4294         for explicitly specialized class.
4295         * error.c (dump_aggr_type): Do not dump template arguments for
4296         non-primary specializations.
4297         (dump_function_name): Likewise.
4298
4299         PR c++/24275
4300         * pt.c (instantiate_decl): Instantiate the initializer of
4301         a static data member in the namespace containing the class
4302         containing the static data member.
4303
4304 2005-10-08  James A. Morrison  <phython@gcc.gnu.org>
4305
4306         PR c++/22172
4307         * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
4308         scopes as nondependent.
4309
4310 2005-10-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4311
4312         * call.c (resolve_args): Remove redundant test.
4313
4314 2005-10-05  Paolo Bonzini  <bonzini@gnu.org>
4315
4316         PR tree-optimization/21419
4317         PR tree-optimization/24146
4318         PR tree-optimization/24151
4319
4320         * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
4321         read-only.  Set ASM_VOLATILE_P for asms without outputs.
4322
4323 2005-10-05  Nathan Sidwell  <nathan@codesourcery.com>
4324
4325         PR c++/23513
4326         * call.c (joust): Adjust length count to more_specialized_fn.
4327         * pt.c (more_specialized_fn): Cope with non-static member vs
4328         non-member.
4329
4330 2005-10-04  Andrew Pinski  <pinskia@physics.uc.edu>
4331
4332         PR middle-end/23125
4333         * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
4334         instead of change_decl_assembler_name.
4335
4336 2005-10-03  Alexandre Oliva  <aoliva@redhat.com>
4337
4338         * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
4339
4340 2005-10-03  Mark Mitchell  <mark@codesourcery.com>
4341
4342         PR c++/17775
4343         * repo.c: Include flags.h.
4344         (finish_repo): Add -frandom-seed to the arguments.
4345
4346 2005-10-02  Mark Mitchell  <mark@codesourcery.com>
4347
4348         PR c++/22621
4349         * parser.c (cp_parser_template_argument): Don't turn "T::f" into
4350         "(*this).T::f".
4351         * pt.c (convert_nontype_argument): Remove ??? comment.
4352
4353         PR c++/23840
4354         * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
4355         when class rvalues are lvalues.
4356
4357 2005-09-28  Mark Mitchell  <mark@codesourcery.com>
4358
4359         PR c++/16782
4360         * decl.c (grokdeclarator): Always pedwarn about overqualified
4361         member names.
4362
4363 2005-09-27  Mark Mitchell  <mark@codesourcery.com>
4364
4365         PR c++/22147
4366         * name-lookup.c (maybe_process_template_type_declaration): Don't
4367         treat forward declarations of classes as templates just because
4368         we're processing_template_decl.
4369         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
4370         functions.
4371
4372 2005-09-26  Jason Merrill  <jason@redhat.com>
4373
4374         PR c++/13764
4375         * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
4376         * name-lookup.c (pushdecl_maybe_friend): Check it.
4377         * decl.c (begin_function_body): Do nothing if it's false.
4378         (finish_function_body): Ditto.
4379         (outer_curly_brace_block): New fn.
4380         (finish_function): Use it.
4381
4382 2005-09-26  Richard Guenther  <rguenther@suse.de>
4383
4384         PR middle-end/15855
4385         * decl2.c (do_static_destruction): Remove.
4386         (finish_static_initialization_or_destruction): Likewise.
4387         (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
4388         (NEEDS_GUARD_P): Likewise.
4389         (do_static_initialization): Rename to
4390         do_static_initialization_or_destruction.  Process all
4391         initializers/destructors and handle common conditionalizing.
4392         (start_static_initialization_or_destruction): Rename to
4393         one_static_initialization_or_destruction.  Handle only
4394         decl-specific conditionalizing.
4395         (cp_finish_file): Call do_static_initialization_or_destruction.
4396
4397 2005-09-22  Jakub Jelinek  <jakub@redhat.com>
4398
4399         PR c++/21983
4400         * class.c (find_final_overrider): Move diagnostic about no unique final
4401         overrider to...
4402         (update_vtable_entry_for_fn): ... here.
4403
4404 2005-09-21  Mark Mitchell  <mark@codesourcery.com>
4405
4406         PR c++/23993
4407         * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
4408
4409 2005-09-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4410
4411         PR c++/23965
4412         * call.c (resolve_args): Return error_mark_node on arguments
4413         whose TREE_TYPE is error_mark_node.
4414
4415 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
4416
4417         PR c++/23947
4418         * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
4419         get_tinfo_ptr calls.
4420
4421 2005-09-16  Mark Mitchell  <mark@codesourcery.com>
4422
4423         PR c++/23914
4424         * parser.c (cp_parser_enclosed_template_argument_list): Make sure
4425         skip_evaluation is false when processing template arguments.
4426
4427         PR c++/21514
4428         * pt.c (check_instantiated_args): Treat uses of anonymous types as
4429         causing type-deduction failure.
4430
4431 2005-09-15  Jason Merrill  <jason@redhat.com>
4432
4433         PR c++/23357
4434         * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
4435         tcc_expression.
4436
4437 2005-09-15  Mark Mitchell  <mark@codesourcery.com>
4438
4439         PR c++/23896
4440         * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
4441         processing template arguments.
4442
4443         * pt.c (check_explicit_instantiation_namespace): Fix typo.
4444
4445         PR c++/13140
4446         * decl.c (check_class_member_definition_namespace): New function.
4447         (grokfndecl): Use it.
4448         (grokvardecl): Likewise.
4449         (grokdecl): Improve documentation.
4450         * pt.c (check_explicit_instantiation_namespace): New function.
4451         (register_specialization): Call check_specialization_namespace
4452         when replacing an implicitly instantiated function.
4453         (check_explicit_specialization): Ensure that DECL_CONTEXT is set
4454         correctly for namespace-scope specializations.
4455         (do_decl_instantiation): Use
4456         check_explicit_instantiation_namespace.
4457         (do_type_instantiation): Likewise.
4458
4459 2005-09-15  Nathan Sidwell  <nathan@codesourcery.com>
4460
4461         PR c++/23725
4462         * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
4463
4464 2005-09-13  Bastian Blank <waldi@debian.org>
4465
4466         PR c++/16171
4467         * mangle.c (find_substitution): Do not use special substitutions
4468         for identifiers not in std::.
4469
4470 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
4471
4472         PR c++/23839
4473         * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
4474         for VAR_DECLs.
4475
4476 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
4477
4478         PR c++/23842
4479         * pt.c (tsubst_default_argument): Do treat default argument
4480         expressions as occurring in the context of the function called.
4481
4482 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
4483
4484         PR c++/23841
4485         * parser.c (cp_parser_primary_expression): Recognize the closing
4486         ">" of a template-argument-list after a floating-point literal as
4487         the end of a cast expression.
4488
4489 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
4490
4491         PR c++/23789
4492         * cvt.c (perform_qualification_conversions): Don't create
4493         unnecessary NOP_EXPRs.
4494         * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
4495
4496 2005-09-12  Ian Lance Taylor  <ian@airs.com>
4497
4498         PR g++/7874
4499         * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
4500         bitfield.  Make dummy bitfield one bit smaller.
4501         (DECL_HIDDEN_FRIEND_P): Define.
4502         (pushdecl_maybe_friend): Declare.
4503         (pushdecl_top_level_maybe_friend): Declare.
4504         * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
4505         Change prototype and all callers.  Add assertion that a
4506         DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P.  Set
4507         DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
4508         appropriate.
4509         * name-lookup.c (supplement_binding): Don't ignore a
4510         DECL_HIDDEN_FRIEND_P.
4511         (pushdecl_maybe_friend): Break out contents of pushdecl.  Add
4512         is_friend parameter.  Set DECL_ANTICIPATED and
4513         DECL_HIDDEN_FRIEND_P for a friend function.
4514         (pushdecl): Just call pushdecl_maybe_friend.
4515         (pushdecl_with_scope): Add is_friend parameter.  Change prototype
4516         and all callers.
4517         (pushdecl_namespace_level): Likewise.
4518         (push_overloaded_decl): Likewise.  Check DECL_HIDDEN_FRIEND_P as
4519         well as DECL_ANTICIPATED when checking for a builtin.
4520         (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
4521         DECL_ANTICIPATED when checking for a builtin.
4522         (do_nonmember_using_decl): Likewise.
4523         (pushdecl_top_level_1): Add is_friend parameter.  Change all
4524         callers.
4525         (pushdecl_top_level_maybe_friend): New function.
4526         (remove_hidden_names): New function.
4527         (struct arg_lookup): Add args field.
4528         (friend_of_associated_class_p): New static function.
4529         (arg_assoc_namespace): Ignore hidden functions which are not
4530         friends of an associated class of some argument.
4531         (lookup_arg_dependent): Remove hidden functions from list passed
4532         in.  Initialize k.args.
4533         * name-lookup.h (remove_hidden_names): Declare.
4534         * friend.c (do_friend): Call pushdecl_maybe_friend instead of
4535         pushdecl.
4536         * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
4537         an assertion, with a check for DECL_HIDDEN_FRIEND_P.
4538         (build_new_function_call): Add koenig_p parameter.  Change
4539         prototype and callers.
4540         * pt.c (register_specialization): Add is_friend parameter.  Change
4541         all callers.
4542         (push_template_decl_real): Change is_friend parameter to bool.
4543         Change prototype and all callers.
4544         (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
4545         instead of pushdecl_top_level.
4546
4547 2005-09-11  Richard Henderson  <rth@redhat.com>
4548
4549         * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
4550         * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
4551
4552 2005-09-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4553
4554         * parser.c (cp_parser_translation_unit): Simplify.  The while-block
4555         was actually executed at most once.
4556
4557 2005-09-09  Richard Henderson  <rth@redhat.com>
4558
4559         PR debug/20998
4560         * cp-tree.def (ALIAS_DECL): Remove.
4561         * cp-lang.c (cp_init_ts): Remove support for it.
4562         * error.c (dump_decl): Likewise.
4563         * name-lookup.c (pushdecl): Likewise.
4564         * semantics.c (finish_id_expression): Likewise.
4565         * decl2.c (build_anon_union_vars): Use a VAR_DECL with
4566         DECL_VALUE_EXPR instead.
4567
4568 2005-09-09  Mark Mitchell  <mark@codesourcery.com>
4569
4570         PR c++/22252
4571         * decl.c (start_preparsed_function): Do not pay attention to
4572         #pragma interface for implicitly-defined methods.
4573         * decl2.c (cp_finish_file): Do not complain about uses of inline
4574         functions that have bodies, even if we decided not to emit the
4575         body in this translation unit.
4576         * semantics.c (note_decl_for_pch): Do not mess with linkage.
4577         (expand_or_defer_fn): Make inline, non-template functions COMDAT
4578         at this point.
4579
4580 2005-09-08  Richard Henderson  <rth@redhat.com>
4581
4582         PR debug/23190
4583         * decl.c (wrapup_globals_for_namespace): Call
4584         emit_debug_global_declarations.
4585         * decl2.c (cp_finish_file): Likewise.
4586
4587 2005-09-08  Mark Mitchell  <mark@codesourcery.com>
4588
4589         PR c++/23691
4590         * decl2.c (mark_used): Instantiate static data members initialized
4591         by constants, even in a template.
4592
4593 2005-09-08  Andrew Pinski  <pinskia@physics.uc.edu>
4594
4595         PR obj-c++/16816
4596         * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
4597         two CPP_COLON.
4598
4599 2005-09-07  Richard Guenther  <rguenther@suse.de>
4600
4601         * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
4602         for EMPTY_CLASS_EXPR.
4603
4604 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
4605
4606         PR c/23075
4607         * typeck.c (check_return_expr): Add no_warning argument.  Set
4608         *no_warning to true if "return-statement with no value, in function
4609         returning" warning has been issued.
4610         * cp-tree.h (check_return_expr): Adjust prototype.
4611         * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
4612         check_return_expr set *no_warning to true.
4613
4614 2005-09-06  Mark Mitchell  <mark@codesourcery.com>
4615
4616         * cp-tree.h (rvalue): New function.
4617         * call.c (build_conditional_expr): Use it.
4618         * init.c (build_new_1): Likewise.
4619         * rtti.c (build_dynamic_cast_1): Likewise.
4620         * tree.c (rvalue): New function.
4621         * typeck.c (build_unary_op): Use it.
4622         (build_static_cast_1): Likewise.
4623
4624         PR c++/9782
4625         * init.c (build_new_1): Make sure the entire array type is
4626         complete, not just its element types.
4627
4628 2005-09-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4629
4630         * decl.c (check_elaborated_type_specifier): Remove redundant check.
4631
4632 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
4633
4634         PR c++/23056
4635         * typeck.c (ignore_overflows): New helper function.
4636         (build_static_cast_1): Use it.
4637
4638 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
4639
4640         * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
4641         Follow spelling conventions.
4642
4643 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
4644
4645         PR c++/23667
4646         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
4647         copying a VAR_DECL.
4648
4649 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
4650
4651         PR c++/21440
4652         * semantics.c (finish_stmt_expr_expr): Add an explicit
4653         initialization to the last statement in the statement-expression.
4654         * (finish_stmt_expr): Adjust accordingly.
4655
4656 2005-09-03  Mark Mitchell  <mark@codesourcery.com>
4657
4658         PR c++/23699
4659         * decl2.c (mark_used): Always instantiate static data members
4660         initialized by constant expressions.
4661         * pt.c (instantiate_decl): Instantiate the initializers for static
4662         data members initialized by constant expressions.
4663
4664         PR c++/21687
4665         * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
4666         finishing processing for a template function in a local class.
4667         Revert:
4668         2005-09-02  Mark Mitchell  <mark@codesourcery.com>
4669         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
4670         around functions in local classes.
4671
4672 2005-09-02  Mark Mitchell  <mark@codesourcery.com>
4673
4674         PR c++/21687
4675         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
4676         around functions in local classes.
4677
4678 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
4679
4680         PR obj-c++/23640
4681         * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
4682         init, call generate_ctor_or_dtor_function.
4683
4684 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4685
4686         PR c++/13377
4687         * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
4688         lookup_name_real on final parse.
4689
4690 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4691
4692         PR c++/23639
4693         * semantics.c (qualified_name_lookup_error): Do not complain again
4694         on invalid scope.
4695
4696 2005-08-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4697
4698         PR c++/23586
4699         * parser.c (cp_parser_namespace_name): Move diagnostic for
4700         invalid namespace-name to here from ...
4701         * name-lookup.c (do_namespace_alias): ... here and ...
4702         (do_using_directive): ... here.  Remove dead code.
4703
4704 2005-08-28  Mark Mitchell  <mark@codesourcery.com>
4705
4706         PR c++/23099
4707         * cp-tree.h (saved_scope): Add skip_evaluation.
4708         * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
4709         DECL_INITIAL, to determine whether or not a static data member was
4710         initialized in the class-specifier.
4711         (cp_finish_decl): Add comment.
4712         * init.c (integral_constant_value): Subtitute into the
4713         initializers for static data members in templates.
4714         * name-lookup.c (push_to_top_level): Save skip_evaluation.
4715         (pop_from_top_level): Restore it.
4716         * pt.c (instantiate_class_template): Do not substitute into the
4717         intializers of static data members when instantiating a class.
4718         (regenerate_decl_from_template): Simplify.
4719         (instantiate_decl): Tidy.  Substitute into the initializer for a
4720         static data member even when the definition of the data member is
4721         not available.
4722
4723 2005-08-26  Mark Mitchell  <mark@codesourcery.com>
4724
4725         PR c++/19004
4726         * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
4727         (type_dependent_expression_p): Allow BASELINKs whose associated
4728         functions are simply a FUNCTION_DECL.
4729
4730         PR c++/23491
4731         * cp-tree.h (build_vec_init): Adjust prototype.
4732         * init.c (perform_member_init): Adjust call to build_vec_init.
4733         (build_aggr_init): Likewise.
4734         (build_new_1): Do not call build_default_init for array types.
4735         (build_vec_init): Add explicit_default_init_p parameter.  Perform
4736         default initialization of vector elements when set.
4737         * typeck.c (build_modify_expr): Adjust call to build_vec_init.
4738
4739 2005-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4740
4741         PR c++/20817
4742         * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
4743         ->*.
4744
4745 2005-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4746
4747         PR c++/22454
4748         * parser.c (cp_lexer_peek_nth_token): Relax assert.
4749
4750 2005-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4751
4752         PR c++/23044
4753         * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
4754
4755 2005-08-22  James E Wilson  <wilson@specifix.com>
4756
4757         PR tree-optimization/23426
4758         * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
4759         array size check.
4760
4761 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4762
4763         PR c++/22233
4764         * pt.c (push_template_decl_real): Return error_mark_node if the
4765         number of template parameters does not match previous definition.
4766
4767 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4768
4769         PR c++/23089
4770         * decl.c (require_complete_types_for_parms): Mark incomplete types
4771         as invalid.
4772
4773 2005-08-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4774
4775         * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
4776         Fix typo in leading comment.
4777
4778 2005-08-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4779
4780         * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
4781
4782 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
4783
4784         * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
4785         * call.c (add_template_candidate_real): Pass down 'flags' to
4786         fn_type_unification.
4787         (can_convert_arg): New 'flags' argument. Pass it to call to
4788         implicit_conversion instead of LOOKUP_NORMAL.
4789         (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
4790         * class.c (resolve_address_of_overloaded_function): Ditto.
4791         (resolve_address_of_overloaded_function): Ditto.
4792         * decl.c (reshape_init, check_default_argument): Ditto.
4793         * typeck.c (build_ptrmemfunc): Ditto.
4794         * pt.c (type_unification_real): Add 'flags' argument.
4795         (fn_type_unification): Pass 'flags' to type_unification_real.
4796         (type_unification_real): Pass new 'flags' argument to call to
4797         can_convert_arg.
4798
4799 2005-08-12  Giovanni Bajo  <giovannibajo@libero.it>
4800             Nathan Sidwell  <nathan@codesourcery.com>
4801
4802         PR c++/21799
4803         PR c++/8271
4804         * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
4805         explicitly.
4806
4807 2005-08-12  Nathan Sidwell  <nathan@codesourcery.com>
4808
4809         PR c++/21799
4810         Revert my 2005-07-08 patch
4811         * pt.c (type_unification_real): Remove is_method_argument and
4812         assoicated checks.
4813         (fn_type_unification, unify): Adjust type_unification_real calls.
4814
4815 2005-08-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4816
4817         PR c++/23266
4818         * decl2.c (grokfield): Check that method is not static before
4819         marking it as pure.
4820
4821 2005-08-11  Nathan Sidwell  <nathan@codesourcery.com>
4822
4823         PR c++/23219
4824         * name-lookup.c (pushtag): Process the template type before
4825         altering the identifier lookup fields.  Remove unreachable code
4826         creating an empty stub decl.
4827
4828 2005-08-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4829
4830         PR c++/20646
4831         * decl.c (grokdeclarator): Reset storage_class after error.
4832
4833 2005-08-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4834
4835         PR c++/22508
4836         * init.c (build_new_1): Check for empty candidate list.
4837
4838 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4839
4840         PR c++/23191
4841         * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
4842         before calling build_exception_variant.
4843
4844 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4845
4846         PR c++/19498
4847         * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
4848         if substitution of template args did not succeed.
4849
4850 2005-08-06  Michael Matz  <matz@suse.de>
4851
4852         * method.c (use_thunk): Call init_insn_lengths.
4853
4854 2005-08-05  James A. Morrison  <phython@gcc.gnu.org>
4855
4856         PR c++/22514
4857         * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
4858         sorrycount or errorcount are nonzero.
4859
4860 2005-08-05  Mark Mitchell  <mark@codesourcery.com>
4861
4862         * name-lookup.c (pushtag): Remove accidental commit from:
4863         2004-12-21  Mark Mitchell  <mark@codesourcery.com>
4864         PR c++/19063
4865         * decl.c (grokdeclarator): Return error_mark_node, not
4866         void_type_node, to indicate errors.
4867         * parser.c (cp_parser_template_parameter_list): Robustify.
4868         (cp_parser_template_parameter): Likewise.
4869
4870 2005-08-01  Kazu Hirata  <kazu@codesourcery.com>
4871
4872         * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
4873         Fix comment typos.
4874
4875 2005-07-29  Kazu Hirata  <kazu@codesourcery.com>
4876
4877         * method.c: Fix a comment typo.
4878
4879 2005-07-28  Mark Mitchell  <mark@codesourcery.com>
4880
4881         PR c++/22545
4882         * call.c (add_builtin_candidate): Adjust for changes in
4883         representation of pointer-to-member types.
4884
4885 2005-07-28  Mike Stump  <mrs@apple.com>
4886
4887         * pt.c (check_explicit_specialization): Add visibility logic.
4888         (lookup_template_class): Likewise.
4889         (instantiate_class_template): Likewise.
4890
4891 2005-07-27  Devang Patel  <dpatel@apple.com>
4892
4893         * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
4894
4895 2005-07-25  Ian Lance Taylor  <ian@airs.com>
4896
4897         * ptree.c (cxx_print_identifier): Print a leading space if the
4898         indent level is 0.
4899
4900 2005-07-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4901
4902         * call.c (convert_for_arg_passing): Check function pointers when
4903         -Wmissing-format-attribute is activated.
4904         * typeck.c (convert_for_assignment): Likewise.
4905
4906 2005-07-22  Manfred Hollstein  <mh@suse.com>
4907
4908         * parser.c (cp_parser_declaration): Fix unitialised warnings.
4909
4910 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
4911
4912         * class.c (build_base_path): Fix typo.
4913
4914 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
4915
4916         PR C++/22358
4917         * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
4918
4919 2005-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4920
4921         * call.c: Fix comment typo(s).
4922         * cxx-pretty-print.h: Likewise.
4923         * name-lookup.c: Likewise.
4924         * parser.c: Likewise.
4925
4926 2005-07-20  Douglas Gregor <doug.gregor@gmail.com>
4927
4928         PR c++/2922
4929         * semantics.c (perform_koenig_lookup): For dependent calls, just
4930         return the set of functions we've found so far. Later, it will be
4931         augmented by those found through argument-dependent lookup.
4932         * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing
4933         the optimization that skips namespaces where the functions were
4934         originally found.
4935
4936 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
4937
4938         Make CONSTRUCTOR use VEC to store initializers.
4939         * call.c (convert_default_arg): Update call to digest_init.
4940         * class.c (dump_class_hierarchy, dump_array): Update to cope with
4941         VEC in CONSTRUCTOR_ELTS.
4942         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
4943         (finish_compound_literal, digest_init): Update declaration.
4944         * decl.c (struct reshape_iter): New data type.
4945         (reshape_init_array): Rename to...
4946         (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
4947         (reshape_init): Rewrite from scratch. Split parts into...
4948         (reshape_init_array, reshape_init_vector, reshape_init_class,
4949         reshape_init_r): New functions.
4950         (check_initializer): Update call to reshape_init. Remove obsolete
4951         code.
4952         (initialize_artificial_var, cp_complete_array_type): Update to cope
4953         with VEC in CONSTRUCTOR_ELTS.
4954         * decl2.c (grokfield): Update calls to digest_init.
4955         (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
4956         * error.c (dump_expr_init_vec): New function.
4957         (dump_expr): Use dump_expr_init_vec.
4958         * init.c (build_zero_init, build_vec_init): Update to cope with VEC
4959         in CONSTRUCTOR_ELTS.
4960         (expand_default_init): Update call to digest_init.
4961         * parser.c  (cp_parser_postfix_expression): Use a VEC for the
4962         initializers.
4963         (cp_parser_initializer_list): Build a VEC of initializers.
4964         * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
4965         in CONSTRUCTOR_ELTS.
4966         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
4967         ptm_initializer, class_initializer, get_pseudo_ti_init): Use
4968         build_constructor_from_list instead of build_constructor.
4969         * semantics.c (finish_compound_literal): Update call to digest_init.
4970         * tree.c (stabilize_init): Update to cope with VEC in
4971         CONSTRUCTOR_ELTS.
4972         * typeck.c (build_ptrmemfunc1): Likewise.
4973         * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
4974         Likewise.
4975         (store_init_value): Use build_constructor_from_list and update call
4976         to digest_init.
4977         (digest_init): Rewrite.
4978         (process_init_constructor): Rewrite from scratch. Split into...
4979         (process_init_constructor_array, picflag_from_initializer,
4980         process_init_constructor_record, process_init_constructor_union):
4981         New functions.
4982         (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
4983         New macros.
4984         (build_functional_cast): Use build_constructor_from_list instead of
4985         build_constructor.
4986
4987 2005-07-18  Mark Mitchell  <mark@codesourcery.com>
4988
4989         PR c++/22263
4990         * cp-tree.h (instantiate_decl): Change prototype.
4991         * decl2.c (mark_used): Adjust accordingly.
4992         * pt.c (do_decl_instantiation): Likewise.
4993         (instantiate_class_member): Likewise.
4994         (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p.
4995         Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template
4996         that has no definition available.
4997         (instantiate_pending_templates): Adjust call to instantiate_decl.
4998
4999 2005-07-17  Mark Mitchell  <mark@codesourcery.com>
5000
5001         PR c++/22139
5002         * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation.
5003         * decl.c (duplicate_decls): Re-register template specializations
5004         for functions that have DECL_TEMLPLATE_INFO, even if they do not
5005         have DECL_TEMPLATE_INSTANTIATION set.
5006
5007 2005-07-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5008
5009         * call.c (diagnostic_fn_t): New.
5010         (build_temp, convert_like_real): Use diagnostic_fn_t.
5011
5012 2005-07-15  Mark Mitchell  <mark@codesourcery.com>
5013
5014         PR c++/22204
5015         * repo.c (repo_emit_p): Robustify.
5016
5017 2005-07-14  Daniel Berlin  <dberlin@dberlin.org>
5018
5019         Fix PR c++/22452
5020         * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
5021
5022 2005-07-15  Mark Mitchell  <mark@codesourcery.com>
5023
5024         PR c++/22132
5025         * call.c (implicit_conversion): Add c_cast_p parameter.
5026         (standard_conversion): Likewise.  Allow conversions between
5027         differently-qualified pointer types when performing a C-style
5028         cast.
5029         (add_function_candidate): Adjust callee.
5030         (build_builtin_candidate): Likewise.
5031         (build_user_type_conversion_1): Likewise.
5032         (conditional_conversion): Likewise.
5033         (can_convert_arg): Likewise.
5034         (can_convert_arg_bad): Likewise.
5035         (perform_implicit_conversion): Likewise.
5036         * cp-tree.h (comp_ptr_ttypes_const): Declare.
5037         * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
5038         Return bool.
5039
5040 2005-07-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5041             Nathan Sidwell  <nathan@codesourcery.com>
5042
5043         PR c++/20172
5044         * pt.c (tsubst_template_parms): Check for invalid non-type
5045         parameters.
5046
5047 2005-07-09  Andrew Pinski  <pinskia@physics.uc.edu>
5048
5049         * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
5050         decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
5051         (cp_init_ts): Call init_shadowed_var_for_decl.
5052         Remove include of gt-cp-cp-lang.h.
5053         * cp-objcp-common.c (shadowed_var_for_decl,
5054         decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
5055         cp-lang.c.
5056         (init_shadowed_var_for_decl): New function to initialize
5057         shadowed_var_for_decl.
5058         Include gt-cp-cp-objcp-common.h.
5059         * Make-lang.in (gt-cp-lang.h): Remove.
5060         (gt-cp-cp-objcp-common.h): Add.
5061         (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
5062         (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
5063         * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
5064         * cp-tree (init_shadowed_var_for_decl): Add prototype.
5065
5066 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
5067
5068         * Make-lang.in: Add gt-cp-lang.h.
5069         (cp-lang.o): Ditto.
5070         * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
5071         the field.
5072         * config-lang.in: Add cp-lang.c to gtfiles.
5073         * cp-lang.c: Include hashtab.h.
5074         (cp_init_ts): New function.
5075         (LANG_HOOK_INIT_TS): Use macro.
5076         (decl_shadowed_for_var_lookup): New function.
5077         (decl_shadowed_for_var_insert): Ditto.
5078         * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
5079         (NON_THUNK_FUNCTION_CHECK): Ditto.
5080         (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
5081         (DECL_INIT_PRIORITY): Ditto.
5082         (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
5083         (DECL_SHADOWED_FOR_VAR): Use hashtable.
5084         (SET_DECL_SHADOWED_FOR_VAR): Ditto.
5085         * decl.c (duplicate_decls): Update for new/updated structures.
5086         (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
5087         * decl2.c (start_static_initialization_or_destruction): Deal with
5088         priority.
5089         * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
5090         SET_DECL_RTL.
5091         * tree.c (handle_init_priority_attribute): Handle priority.
5092
5093 2005-07-08  Nathan Sidwell  <nathan@codesourcery.com>
5094
5095         PR c++/21799
5096         * pt.c (type_unification_real): Add is_method argument.  Use it
5097         for this pointer unification.
5098         (fn_type_unification): Adjust type_unification_real call.
5099         (unify): Likewise.
5100
5101 2005-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5102
5103         * pt.c (type_unification_real): Remove allow_incomplete argument.
5104         Remove unreachable code.
5105         (fn_type_unification): Adjust call to type_unification_real.
5106         (unify): Likewise.
5107
5108 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
5109
5110         * Makefile.in (class.o, decl2.o): Adjust dependencies.
5111         * class.c: Include tree-dump.h.
5112         * decl2.c: Include tree-dump.h.
5113
5114 2005-07-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5115
5116         * dump.c: Use dump_string_field.
5117
5118 2005-07-03  Joseph S. Myers  <joseph@codesourcery.com>
5119
5120         * cp-tree.h (GCC_DIAG_STYLE): #undef before defining.  Change
5121         minimum GCC version for format checking to 4.1.
5122
5123 2005-07-02  Kazu Hirata  <kazu@codesourcery.com>
5124
5125         * Make-lang.in (cc1plus-checksum.c): Use
5126         build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
5127
5128 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
5129
5130         * name-lookup.c, parser.c: Use %q, %< and %> to quote in
5131         diagnostics.
5132
5133 2005-07-02  Zack Weinberg  <zack@codesourcery.com>
5134             Joseph S. Myers  <joseph@codesourcery.com>
5135
5136         * error.c (location_of): Add comment.
5137         (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
5138         * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
5139         * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
5140         name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
5141         typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
5142         or cp_pedwarn_at.  Mark up some diagnostic strings with N_.
5143
5144 2005-06-30  Daniel Berlin  <dberlin@dberlin.org>
5145
5146         * decl.c (require_complete_types_for_parms): Call relayout_decl
5147         instead of layout_decl.
5148
5149 2005-06-30  Zack Weinberg  <zack@codesourcery.com>
5150             Jakub Jelinek  <jakub@redhat.com>
5151
5152         * cp-lang.c: No need to include cxx-pretty-print.h.
5153         * error.c (cp_printer): Update signature.  No need to process
5154         flags.
5155         (print_instantiation_partial_context): Output last newline
5156         with pp_base_newline.
5157         * Make-lang.in: Update dependencies.
5158
5159 2005-06-30  Steven Bosscher  <stevenb@suse.de>
5160
5161         * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
5162         DECL_THREAD_LOCAL_P.
5163         (cp_finish_decl): Likewise.
5164         (grokvardecl): Set the default DECL_TLS_MODEL here.
5165
5166 2005-06-28  Joseph S. Myers  <joseph@codesourcery.com>
5167
5168         * cvt.c (ocp_convert): Use invalid_conversion hook.
5169         * typeck.c (build_binary_op): Use invalid_binary_op hook.
5170         (build_unary_op): Use invalid_unary_op hook.
5171
5172 2005-06-28  Paul Brook  <paul@codesourcery.com>
5173
5174         * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
5175         * except.c: Include target.h.
5176         (init_exception_processing): Initialize unwind_resume_libfunc.
5177         * doc/tm.texi: Document TARGET_ASM_TTYPE
5178
5179 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5180
5181         * call.c (build_over_call): Pass in named argument list to
5182         `check_function_arguments'.
5183         * typeck.c (build_function_call): Likewise.
5184
5185 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5186
5187         * cp-tree.h (lang_check_failed): Add noreturn attribute.
5188
5189 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
5190
5191         * all files: Update FSF address in copyright headers.
5192
5193 2005-06-23  Jason Merrill  <jason@redhat.com>
5194
5195         PR c++/19317
5196         * semantics.c (simplify_aggr_init_expr): Use
5197         CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5198
5199 2005-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5200
5201         * pt.c (register_specialization): Remove superfluous assertion.
5202
5203 2005-06-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5204
5205         * call.c (convert_like_real): Add format attribute.
5206         * typeck.c (check_for_casting_away_constness,
5207         build_static_cast_1): Likewise.
5208         * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
5209         Likewise.
5210
5211 2005-06-17  Geoffrey Keating  <geoffk@apple.com>
5212
5213         PR c++/17413
5214         * pt.c (type_unification_real): Apply template type deduction even
5215         to procedure parameters that are not dependent on a template
5216         parameter.
5217
5218 2005-06-16  Nathan Sidwell  <nathan@codesourcery.com>
5219
5220         * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
5221         change.
5222         (create_pseudo_type_info): First parameter is an int.
5223
5224 2005-06-15  Nathan Sidwell  <nathan@codesourcery.com>
5225
5226         PR c++/20678
5227         * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
5228         null.
5229
5230         * Make-lang.in: Reformat some long lines.
5231         (gt-cp-rtti.h): New target.
5232         (cp/rtti.o): Add dependency.
5233         * config-lang.in (gtfiles): Add cp/rtti.c.
5234         * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
5235         CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
5236         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
5237         CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
5238         CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
5239         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5240         ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
5241         class_desc_type_node, si_class_desc_type_node,
5242         vmi_class_desc_type_node, ptm_desc_type_node,
5243         base_desc_type_node): Remove.
5244         * decl.c: Adjust documentation of global trees.
5245         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
5246         TINFO_REAL_NAME): Remove.
5247         (struct tinfo_s): New.
5248         (enum tinfo_kind): New.
5249         (tinfo_descs): New.
5250         (get_tinfo_decl): Adjust use of tinfo descriptor.
5251         (tinfo_base_init, generic_initializer, ptr_initializer,
5252         ptm_initializer, class_initializer): Likewise.
5253         (get_pseudo_ti_init): Take descriptor index. Adjust.
5254         (create_pseudo_type_info): Likewise.
5255         (get_pseudo_ti_desc): Return descriptor index. Adjust.
5256         (create_tinfo_types): Adjust use of create_pseudo_type_info.
5257         (emit_tinfo_decl): Adjust use of tinfo descriptor.
5258
5259 2005-06-14  Roger Sayle  <roger@eyesopen.com>
5260
5261         * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
5262
5263 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
5264
5265         * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
5266         (rule for installing g++.1 manpage): Does depend on installdirs.
5267
5268 2005-06-13  Nathan Sidwell  <nathan@codesourcery.com>
5269
5270         PR c++/20789
5271         * decl.c (cp_finish_decl): Clear runtime runtime initialization if
5272         in-class decl's initializer is bad.
5273
5274         PR c++/21929
5275         * parser.c (struct cp_parser): Document that scope could be
5276         error_mark.
5277         (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
5278         scope.
5279         (cp_parser_nested_name_specifier): Return NULL_TREE on error.
5280         (cp_parser_postfix_expression): Deal with null or error_mark
5281         scope.
5282         (cp_parser_elaborated_type_specifier): Adjust
5283         cp_parser_nested_name_specifier call.
5284
5285         * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
5286
5287 2005-06-12  Roger Sayle  <roger@eyesopen.com>
5288
5289         PR c++/21930
5290         * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
5291         Treat CONVERT_EXPR identically to NOP_EXPR.
5292
5293 2005-06-10  Aldy Hernandez  <aldyh@redhat.com>
5294
5295         PR c++/10611
5296         * cvt.c (build_expr_type_conversion): Same.
5297         * typeck.c (build_binary_op): Handle vectors.
5298         (common_type): Same.
5299         (type_after_usual_arithmetic_conversions): Same.
5300
5301 2005-06-08  Nathan Sidwell  <nathan@codesourcery.com>
5302
5303         PR c++/19497
5304         * cp-tree.def (USING_DECL): Update documentation.
5305         * cp-tree.h (DECL_DEPENDENT_P): New.
5306         (USING_DECL_DECLS, USING_DECL_SCOPE): New.
5307         * class.c (handle_using_decl): Move most of the processing to ...
5308         * name-lookup.c (do_class_using_decl): ... here.  Make stricter.
5309         (push_using_decl): Use USING_DECL_SCOPE.
5310         (cp_emit_debug_info_for_using): Make extern.
5311         * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
5312         * name-lookup.h (cp_emit_debug_info_for_using): Declare.
5313         * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
5314         when tsubsting.
5315         (tsubst_expr): Use USING_DECL_SCOPE.
5316         * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
5317         * semantics.c (finish_member_declaration): Likewise.
5318
5319 2005-06-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5320
5321         PR c++/19894
5322         * pt.c (tsubst): Reject pointer-to-member of type void.
5323
5324         PR c++/20563
5325         * parser.c (cp_parser_label_declaration): Deal with invalid/missing
5326         identifiers.
5327
5328 2005-06-07  Nathan Sidwell  <nathan@codesourcery.com>
5329
5330         * cp-tree.def (DEFAULT_ARG): Adjust documentation.
5331         * cp-tree.h (DEFARG_INSTANTIATIONS): New.
5332         (struct tree_default_arg): Add instantiations member.
5333         * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
5334         VEC.
5335         * pt.c (tsubst_arg_types): Likewise.
5336
5337         * parser.c (cp_parser_late_parsing_default_args): Fix overeager
5338         assert in previous patch.
5339
5340 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
5341
5342         * error.c (locate_error): Use gmsgid instead of msgid for argument
5343         name.
5344         (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
5345
5346 2005-06-06  Nathan Sidwell  <nathan@codesourcery.com>
5347
5348         PR 21903
5349         * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
5350         * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
5351         argument to any early instantiations.
5352         * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
5353
5354         PR c++/20637
5355         * cp-tree.h (add_method): Add using_decl parameter.
5356         * class.c (add_method): Add using_decl parameter.  Adjust error
5357         messages.
5358         (handle_using_decl): Pass the using decl to add_method.
5359         (clone_function_decl): Adjust add_member calls.
5360         * decl2.c (check_classfn): Likewise.
5361         * method.c (lazily_declare_fn): Likewise.
5362         * semantics.c (finish_member_declaration): Likewise.
5363
5364         * method.c (synthesize_method): Use inform, not warning.
5365
5366 2005-06-06  Hans-Peter Nilsson  <hp@axis.se>
5367
5368         * config-lang.in (target_libs): Remove target-gperf.
5369
5370 2005-06-05  Mark Mitchell  <mark@codesourcery.com>
5371
5372         PR c++/21619
5373         * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
5374         * parser.c (cp_parser_postfix_expression): Allow non-constant
5375         expressions as arguments to __builtin_constant_p.
5376         * tree.c (builtin_valid_in_constant_expr_p): Use
5377         DECL_IS_BUILTIN_CONSTANT_P.
5378
5379 2005-06-03  Mark Mitchell  <mark@codesourcery.com>
5380
5381         PR c++/21853
5382         * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
5383         the pointed-to type for a pointer-to-member.
5384
5385         PR c++/21336
5386         * cp-tree.h (grok_op_properties): Remove friendp parameter.
5387         * decl.c (grokfndecl): Adjust call.
5388         (grok_op_properties): Determine the class of which the function is
5389         a member by looking at its DECL_CONTEXT, not current_class_type.
5390         * pt.c (tsubst_decl): Adjust call to grok_op_properties.
5391
5392 2005-06-02  Nathan Sidwell  <nathan@codesourcery.com>
5393
5394         * method.c (synthesize_method): Add addtional arg to warning call.
5395
5396         PR c++/21280
5397         * Make-lang.in (method.o): Add diagnostic.h
5398         * decl.c (start_preparsed_function): Use decl's location for file
5399         info.
5400         * decl2.c (cp_finish_file): Set input_location before synthesizing
5401         a function.
5402         (mark_used): When deferring a synthesized function, save current
5403         location.  Do not set function's location when actually
5404         synthesizing it.
5405         * method.c: #include diagnostic.h.
5406         (synthesize_method): Set the functions source location.  Show
5407         needed location if errors are emitted.
5408
5409         * decl.c (start_decl): Simplify specialization handling. Remove
5410         unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
5411         * mangle.c (discriminator_for_local_entity): Use VEC_index.
5412
5413         PR c++/20350
5414         * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
5415
5416         PR c++/21151
5417         * name-lookup.c (pushtag): Push local class even in a template.
5418
5419 2005-05-31  Nathan Sidwell  <nathan@codesourcery.com>
5420
5421         PR c++/21165
5422         * init.c (integral_constant_value): Check the type of the
5423         initializer, not the decl.
5424
5425 2005-05-30  Mark Mitchell  <mark@codesourcery.com>
5426
5427         PR c++/21784
5428         * name-lookup.c (do_nonmember_using_decl): Ignore builtin
5429         functions, even when the used name is not a function.
5430
5431 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
5432
5433         * operators.def, optimize.c: Update copyright.
5434
5435 2005-05-28  Mark Mitchell  <mark@codesourcery.com>
5436
5437         PR c++/21210
5438         * call.c (standard_conversion): Permit conversions to complex
5439         types if conversion to the corresponding scalar type would be
5440         permitted.
5441
5442         PR c++/21340
5443         * method.c (implicitly_declare_fn): Clear processing_template_decl
5444         when generating implicit declaration.
5445
5446 2005-05-27  Mark Mitchell  <mark@codesourcery.com>
5447
5448         PR c++/21614
5449         * typeck.c (get_member_function_from_ptrfunc): Do not attempt
5450         conversions to base classes of incomplete types.
5451
5452 2005-05-27  Ian Lance Taylor  <ian@airs.com>
5453
5454         * semantics.c (add_stmt): Add C++ frontend specific version.
5455         * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
5456         (stmts_are_full_exprs_p): Declare.
5457
5458 2005-05-27  Roger Sayle  <roger@eyesopen.com>
5459             Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5460
5461         * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
5462         * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
5463         of CONVERT_EXPR.
5464         (cp_parser_unary_expression): Likewise.
5465         * typeck.c (build_unary_op): Likewise.
5466         * call.c (add_builtin_candidate, build_new_op): Likewise.
5467         * error.c (dump_expr): Likewise.
5468         * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
5469         * decl.c (ambi_op_p, grok_op_properties): Likewise.
5470         * dump.c (dump_op): Likewise.
5471         * lex.c (init_operators): Likewise.
5472         * operators.def ("+"): Likewise.
5473         * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
5474         conversion, if the result and argument types differ.
5475         * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
5476         like a NOP_EXPR when !processing_template_decl.
5477
5478         * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
5479         (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
5480
5481 2005-05-27  Nathan Sidwell  <nathan@codesourcery.com>
5482
5483         PR c++/21455
5484         * typeck.c (get_delta_difference): Cope with incomplete but equal
5485         classes.  Reorder if.
5486
5487         PR c++/21681
5488         * parser.c (cp_parser_late_parsing_for_member): Disable access
5489         checking for template functions.
5490
5491 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5492
5493         PR c++/21768
5494         * pt.c (redeclare_class_template): Change error message according
5495         to coding conventions.
5496
5497 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5498
5499         * call.c (build_op_delete_call): Fix quoting in error message.
5500
5501 2005-05-25  Richard Henderson  <rth@redhat.com>
5502
5503         PR libgcj/21692
5504         * cp-tree.h (make_alias_for): Declare.
5505         * decl2.c (build_java_method_aliases): New.
5506         (cp_finish_file): Call it.
5507         * method.c (make_alias_for): Split out from ...
5508         (make_alias_for_thunk): ... here.
5509
5510 2005-05-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5511
5512         PR c++/21686
5513         * semantics.c (finish_id_expression): Fix quoting in error message.
5514
5515 2005-05-25  DJ Delorie  <dj@redhat.com>
5516
5517         * decl.c (duplicate_decls): Move warning control from if() to
5518         warning(OPT_*).
5519         * name-lookup.c (parse_using_directive): Likewise.
5520         * parser.c (cp_parser_elaborated_type_specifier): Likewise.
5521         (cp_parser_init_declarator): Likewise.
5522         * tree.c (handle_com_interface_attribute): Likewise.
5523
5524 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
5525
5526         * class.c (layout_class_type): Do not issue C++ ABI warnings
5527         for ObjC structs.
5528         * decl.c (objc_mark_locals_volatile): Streamline by calling
5529         objc_volatilize_decl().
5530         * parser.c (cp_parser_objc_message_expression): Allow simple
5531         type specifiers (instead of merely type names) as message
5532         receivers.
5533         * pt.c (template_args_equal): Do not call objc_comptypes().
5534         * typeck.c (composite_pointer_type): If both pointers are
5535         ObjC-esque, arbitrarily choose the first; do not call
5536         objc_comptypes().
5537         (comptypes): Do not call objc_comptypes().
5538         (convert_for_assignment): Call objc_compare_types().
5539         (comp_ptr_ttypes_real): Call objc_type_quals_match() before
5540         concluding that types do not match.
5541
5542 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
5543
5544         PR C++/21645
5545         * optimize.c (update_cloned_parm): Copy the TYPE also from the
5546         original one.
5547
5548 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
5549
5550         PR c++/21495
5551         * decl.c (grokdeclarator): Fix "storage class specified for"
5552         error reporting.
5553
5554 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
5555
5556         * parser.c: Fix comment typos.
5557
5558 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
5559
5560         * Make-lang.in (cc1plus-dummy): New.
5561         (cc1plus-checksum.c): New.
5562         (cc1plus-checksum.o): New.
5563         (cc1plus): Add cc1plus-checksum.o.
5564
5565 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
5566
5567         PR C++/19664
5568         * decl2.c (determine_visibility): Don't set visibility to
5569         hidden if it has been set explicitly by user.
5570
5571 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
5572             Mike Stump  <mrs@apple.com>
5573
5574         Yet more Objective-C++...
5575
5576         * cp-objcp-common.h (cxx_get_alias_set): Move from
5577         here...
5578         (cxx_warn_unused_global_decl): Likewise.
5579         (cp_expr_size): Likewise.
5580         (cp_tree_size): Likewise.
5581         (cp_var_mod_type_p): Likewise.
5582         (cxx_initialize_diagnostics): Likewise.
5583         (cxx_types_compatible_p): Likewise.
5584         * cp-tree.h: to here.
5585         (do_poplevel): Add.
5586         * lex.c (D_OBJC): Add.
5587         (init_reswords): Add.
5588         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
5589         * parser.c: Add c-common.h include.
5590         * pt.c: Add c-common.h and cp-objcp-common.h includes.
5591         (template_args_equal): Use objc_comptypes as well.
5592         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
5593         * semantics.c (do_poplevel): Remove static.
5594
5595         * decl.c (objc_mark_locals_volatile): Don't change decls that are
5596         already ok.
5597         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
5598         Objective C++ early enough.
5599         * lex.c (struct resword reswords): Add Objective-C++ support.
5600         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
5601         (cp_parser_objc_message_receiver): Add.
5602         (cp_parser_objc_message_args): Likewise.
5603         (cp_parser_objc_message_expression): Likewise.
5604         (cp_parser_objc_encode_expression): Likewise.
5605         (cp_parser_objc_defs_expression): Likewise.
5606         (cp_parser_objc_protocol_expression): Likewise.
5607         (cp_parser_objc_selector_expression): Likewise.
5608         (cp_parser_objc_expression): Likewise.
5609         (cp_parser_objc_visibility_spec): Likewise.
5610         (cp_parser_objc_method_type): Likewise.
5611         (cp_parser_objc_protocol_qualifiers): Likewise.
5612         (cp_parser_objc_typename): Likewise.
5613         (cp_parser_objc_selector_p): Likewise.
5614         (cp_parser_objc_selector): Likewise.
5615         (cp_parser_objc_method_keyword_params): Likewise.
5616         (cp_parser_objc_method_tail_params_opt): Likewise.
5617         (cp_parser_objc_interstitial_code): Likewise.
5618         (cp_parser_objc_method_signature): Likewise.
5619         (cp_parser_objc_method_prototype_list): Likewise.
5620         (cp_parser_objc_method_definition_list): Likewise.
5621         (cp_parser_objc_class_ivars): Likewise.
5622         (cp_parser_objc_identifier_list): Likewise.
5623         (cp_parser_objc_alias_declaration): Likewise.
5624         (cp_parser_objc_class_declaration): Likewise.
5625         (cp_parser_objc_protocol_declaration): Likewise.
5626         (cp_parser_objc_protocol_refs_opt): Likewise.
5627         (cp_parser_objc_superclass_or_category): Likewise.
5628         (cp_parser_objc_class_interface): Likewise.
5629         (cp_parser_objc_class_implementation): Likewise.
5630         (cp_parser_objc_end_implementation): Likewise.
5631         (cp_parser_objc_declaration): Likewise.
5632         (cp_parser_objc_try_catch_finally_statement): Likewise.
5633         (cp_parser_objc_synchronized_statement): Likewise.
5634         (cp_parser_objc_throw_statement): Likewise.
5635         (cp_parser_objc_statement): Likewise.
5636         (cp_parser_primary_expression): Add Objective-C++.
5637         (cp_parser_statement): Likewise.
5638         (cp_parser_declaration): Likewise.
5639         (cp_parser_simple_type_specifier): Likewise.
5640         (cp_parser_type_name): Likewise.
5641         (cp_parser_parameter_declaration_list): Likewise.
5642         (cp_parser_member_declaration) Likewise.
5643         * tree.c: Include debug.h.
5644         * typeck.c (composite_pointer_type): Add Objective-C++ support.
5645         (finish_class_member_access_expr): Likewise.
5646         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
5647         (build_modify_expr): Allow objc to generate write barriers.
5648
5649         * Make-lang.in (cp/tree.o): Add debug.h.
5650         * tree.c (lvalue_p_1, case CONST_DECL): Add.
5651
5652 2005-05-18  Jan Hubicka  <jh@suse.cz>
5653
5654         * method.c: Include tree-pass.h
5655         (use_thunk): Lower body before expanding.
5656
5657 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
5658
5659         PR c++/21454
5660         * decl.c (maybe_deduce_size_from_array_init): Call
5661         cp_apply_type_quals_to_decl after completing array type.
5662
5663 2005-05-16  Richard Henderson  <rth@redhat.com>
5664
5665         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
5666         (build_library_fn): ... here.
5667
5668 2005-05-12  Ian Lance Taylor  <ian@airs.com>
5669
5670         * cp-tree.h (cp_stmt_codes): Don't define.
5671         (statement_code_p): Declare.
5672         (STATEMENT_CODE_P): Define.
5673         * lex.c (statement_code_p): Define.
5674         (cxx_init): Use actual codes in stmt_codes initializer, not
5675         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
5676         than using INIT_STATEMENT_CODES.
5677
5678 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
5679
5680         * typeck.c (build_unary_op): Do not resort to address arithmetic
5681         when taking the address of a COMPONENT_REF.
5682
5683 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
5684
5685         * class.c (vtbl_init_data_s): Change the type of fns to
5686         VEC(tree,gc)*.
5687         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
5688         Use VEC instead of VARRAY.
5689
5690 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
5691
5692         * mangle.c: Remove a reference to the MIPS -mint64 option.
5693
5694 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
5695
5696         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
5697         VARRAY.
5698         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
5699         * name-lookup.h (cp_binding_level): Change the type of
5700         static_decls to VEC(tree,gc)*.
5701
5702         * mangle.c (globals): Change the type of substitutions to
5703         VEC(tree,gc)*.
5704         (dump_substitution_candidates, add_substitution,
5705         find_substitution, finish_mangling, init_mangle): Use VEC
5706         instead of VARRAY.
5707
5708 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
5709
5710         * decl2.c (spew_debug): Remove.
5711
5712         * decl2.c (ssdf_decls, start_static_storage_duration_function,
5713         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
5714
5715         * decl2.c (pending_statics, note_vague_linkage_var,
5716         cp_finish_file): Use VEC instead of VARRAY.
5717         (pending_statics_used): Remove.
5718
5719 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
5720
5721         * decl2.c (deferred_fns, note_vague_linkage_fn,
5722         cp_finish_file): Use VEC instead of VARRAY.
5723
5724 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
5725
5726         PR c++/21352
5727         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
5728
5729 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
5730
5731         * pt.c: Fix a comment typo.
5732
5733 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
5734
5735         * cp-tree.h (language_function): Change the type of
5736         x_local_names to VEC.
5737         * decl.c (push_local_name): Adjust uses of local_names.
5738
5739 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
5740
5741         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
5742
5743 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
5744
5745         * class.c (local_classes, init_class_processing): Use VEC
5746         instead of VARRAY.
5747         * cp-tree.h (local_classes): Likewise.
5748         * mangle.c (discriminator_for_local_entity): Likewise.
5749         * name-lookup.c (pushtag): Likewise.
5750
5751         * class.c (current_lang_depth, push_lang_context,
5752         pop_lang_context): Use VEC instead of VARRAY.
5753         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
5754         VARRAY.
5755         * name-lookup.c (push_to_top_level): Use VEC instead of
5756         VARRAY.
5757
5758 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
5759
5760         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
5761         for BUILT_IN_MD built-ins.
5762
5763 2005-05-02  Michael Matz  <matz@suse.de>
5764
5765         PR c++/19542
5766         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
5767         common frontend.
5768         (null_node): Remove.
5769         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
5770
5771 2005-04-25  Ian Lance Taylor  <ian@airs.com>
5772
5773         * cp-tree.def: Add EXPR_STMT.
5774         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
5775         (EXPR_STMT_EXPR): Define.
5776         * cp-gimplify.c: Include "flags.h".
5777         (gimplify_expr_stmt): New static function.
5778         (cp_gimplify_expr): Handle EXPR_STMT.
5779         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
5780         rather than pp_expression.
5781         (pp_cxx_statement): Handle EXPR_STMT.
5782         * dump.c (cp_dump_tree): Handle EXPR_STMT.
5783         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
5784         initializer.
5785
5786 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
5787
5788         PR C++/21188
5789         * rtti.c (ifnonnull): Cast the zero comparison operand
5790         to the correct type.
5791
5792 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
5793
5794         PR middle-end/20991
5795         * class.c: Include cgraph.h.
5796         (cp_fold_obj_type_ref): Set node->local.vtable_method.
5797         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
5798
5799 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
5800
5801         * mangle.c (write_builtin_type): Handle integer types which are
5802         not one of the shared integer type nodes and emit a "vendor
5803         extended builtin type" with an encoding in the form of "u5int96".
5804
5805 2005-04-24  Ian Lance Taylor  <ian@airs.com>
5806
5807         * cp-tree.def (USING_STMT): Change class to tcc_statement.
5808         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
5809         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
5810         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
5811
5812 2005-04-23  DJ Delorie  <dj@redhat.com>
5813
5814         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
5815         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
5816         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
5817         callers.
5818
5819 2005-04-22  Per Bothner  <per@bothner.com>
5820
5821         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
5822         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
5823
5824 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
5825
5826         PR c++/21087
5827         * name-lookup.c (push_overloaded_decl): Do not overload with
5828         non-duplicate anticipated built-in.
5829
5830 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
5831
5832         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
5833         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
5834
5835 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
5836
5837         * cp-tree.h: Adjust for new VEC API.
5838         Define VEC(tree_pair_s,gc).
5839         (struct save_scope): Adjust.
5840         (struct lang_type_class): Adjust.
5841         (unemitted_tinfo_decls): Adjust.
5842         * class.c (add_method, resort_type_method_vec,
5843         finish_struct_methods, struct find_final_overrider_data,
5844         dfs_find_final_overrider_pre, find_final_overrider,
5845         get_vcall_index, warn_hidden, walk_subobject_offsets,
5846         check_methods, fixup_inline_methods, end_of_class,
5847         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
5848         add_vcall_offset): Adjust.
5849         * decl.c (xref_basetypes, finish_method): Adjust.
5850         * decl2.c (check_classfn): Adjust.
5851         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
5852         * method.c (do_build_copy_constructor): Adjust.
5853         * name-lookup.c (new_class_binding, store_binding,
5854         store_bindings, store_class_bindings): Adjust.
5855         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
5856         VEC(cp_class_binding,gc).
5857         (struct cp_binding_level): Adjust.
5858         * parser.c: Define VEC(cp_token_position,heap).
5859         (struct cp_lexer): Adjust.
5860         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
5861         cp_lexer_save_tokens): Adjust.
5862         * pt.c (retrieve_specialization,
5863         check_explicit_specialization): Adjust.
5864         * rtti.c (unemitted_tinfo_decls): Adjust.
5865         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
5866         get_pseudo_ti_desc): Adjust.
5867         * search.c (dfs_access_in_type, lookup_conversion_operator,
5868         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
5869         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
5870         * semantics.c: Define VEC(deferred_access,gc).
5871         (push_deferring_access_checks): Adjust.
5872         * typeck2.c (abstract_virtuals_error): Adjust.
5873
5874 2005-04-20  Ian Lance Taylor  <ian@airs.com>
5875
5876         * cp-tree.def: Add STMT_EXPR.
5877         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
5878         (STMT_EXPR_STMT): Define.
5879         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
5880         STMT_EXPR.
5881         (pp_cxx_expression): Likewise.
5882         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
5883         * dump.c (cp_dump_tree): Handle STMT_EXPR.
5884
5885 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
5886
5887         * decl.c (expand_static_init): Call build2 and build3 instead
5888         of build.
5889
5890         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
5891
5892 2005-04-17  Ian Lance Taylor  <ian@airs.com>
5893
5894         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
5895         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
5896         ARROW_EXPR.
5897         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
5898         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
5899         ALIGNOF_EXPR.
5900         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
5901         c_sizeof_or_alignof_type for change in parameter type.
5902
5903 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
5904
5905         PR c++/21025
5906         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
5907         which sizeof/alignof is dependent, rather than just whether we are
5908         processing_template_decl.
5909
5910 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
5911
5912         * cp-tree.h (LOOKUP_GLOBAL): Remove.
5913         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
5914         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
5915         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
5916         their values.
5917
5918 2005-04-15  Richard Henderson  <rth@redhat.com>
5919
5920         PR middle-end/14311
5921         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
5922
5923 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
5924
5925         * cp-tree.h (lang_type_class): Remove redefined.  Move
5926         java_interface into where redefined was.  Increment the width
5927         of dummy.
5928         (TYPE_REDEFINED): Remove.
5929
5930 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
5931
5932         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
5933         CLASSTYPE_TEMPLATE_LEVEL): Remove.
5934
5935 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
5936
5937         * decl2.c (determine_visibility): Don't use export_class_data.
5938         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
5939         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
5940
5941 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
5942
5943         * cp-tree.h (cxx_alignof): Remove.
5944
5945         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
5946
5947         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
5948         CONV_STATIC_CAST): Remove.
5949
5950         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
5951
5952         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
5953
5954         * cp-tree.h (cp_deprecated): Remove.
5955
5956 2005-04-08  Ian Lance Taylor  <ian@airs.com>
5957
5958         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
5959         CONTINUE_STMT, SWITCH_STMT.
5960         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
5961         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
5962         (WHILE_COND, WHILE_BODY): Define.
5963         (DO_COND, DO_BODY): Define.
5964         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
5965         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
5966         * cp-gimplify.c (enum bc_t): Define.
5967         (struct cp_gimplify_ctx, ctxp): Define.
5968         (push_context, pop_context): New static functions.
5969         (begin_bc_block, finish_bc_block): New static functions.
5970         (build_bc_goto): New static function.
5971         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
5972         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
5973         (gimplify_switch_stmt): Likewise.
5974         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
5975         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
5976         (cp_genericize): Call push_context and pop_context.
5977         * semantics.c (finish_break_stmt): Just call build_stmt
5978         (BREAK_STMT) rather than build_break_stmt.
5979         (finish_continue_stmt): Corresponding change.
5980         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
5981         parameters.
5982         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
5983         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
5984         * dump.c (cp_dump_tree): Likewise.
5985
5986 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
5987
5988         PR c++/20905
5989         * parser.c (cp_parser_type_specifier_seq): Add is_condition
5990         parameter.
5991         (cp_parser_new_type_id): Pass it.
5992         (cp_parser_condition): Likewise.
5993         (cp_parser_conversion_type_id): Likewise.
5994         (cp_parser_type_id): Likewise.
5995         (cp_parser_type_specifier_seq): In a condition, do not allow
5996         invalid type-specifier combinations.
5997         (cp_parser_exception_declaration): Adjust call to
5998         cp_parser_type_specifier_seq.
5999
6000         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
6001         * cp-tree.h (struct tinst_level): Add in_system_header_p.
6002         (TINST_IN_SYSTEM_HEADER_P): New macro.
6003         (make_tinst_level): Remove.
6004         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
6005         the instantiated class.
6006         (push_tinst_level): Do not use make_tinst_level.  Set
6007         TINST_IN_SYSTEM_HEADER_P.
6008         (pop_tinst_level): Likewise.
6009         (instantiate_class_template): Set in_system_header.
6010         (instantiate_pending_templates): Likewise.
6011         * tree.c (make_tinst_level): Remove.
6012
6013 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
6014
6015         * decl.c (start_decl): Apply pending #pragma weak regardless of
6016         scope.
6017
6018 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
6019
6020         PR c++/20212
6021         * pt.c (regenerate_decl_from_template): Copy attributes for
6022         parameters from the pattern to the instantiation.
6023
6024 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
6025
6026         PR c++/20734
6027         * cp-tree.def (OFFSET_REF): Correct comments.
6028         * init.c (build_offset_ref): Remove misleading comment.
6029         * typeck.c (build_unary_op): Handle pointer-to-member creation
6030         here, rather than ...
6031         (unary_complex_lvalue): ... here.
6032
6033 2005-04-06  Jason Merrill  <jason@redhat.com>
6034
6035         PR c++/19312
6036         * tree.c (stabilize_init): Don't bother trying to stabilize
6037         something with no side-effects.
6038
6039 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
6040
6041         PR c++/20763
6042         * decl.c (grokdeclarator): Correct attribute handling.
6043
6044 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
6045
6046         PR c++/19159
6047         * decl2.c (import_export_decl): Use non-COMDAT external linkage
6048         for virtual tables, typeinfo, etc. that will be emitted in only
6049         one translation unit on systems without weak symbols.
6050
6051 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
6052
6053         PR c++/20679
6054         * parser.c (cp_parser_template_name): Fix thinko.
6055
6056 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
6057
6058         PR c++/20746
6059         * method.c (use_thunk): Protect covariant pointer return
6060         adjustments from NULL pointers.
6061
6062 2005-04-04  Jan Hubicka  <jh@suse.cz>
6063
6064         * decl2.c (finish_objects): Revert my previous patch.
6065         (cp_finish_file): Likewise.
6066
6067 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
6068
6069         * pt.c: Fix comment typos.
6070
6071 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
6072
6073         PR c++/20723
6074         * pt.c (more_specialized_fn): Member functions are unordered wrt
6075         non-members.  Conversion operators are unordered wrt other
6076         functions.
6077
6078 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
6079
6080         * call.c (add_template_candidates_real): Remove length parameter
6081         from fn_type_unification call.
6082         * class.c (resolve_address_of_overloaded_function): Likewise
6083         * cp-tree.h (fn_type_unification): Remove length parameter.
6084         * pt.c (get_bindings_overload): Remove.
6085         (get_bindings_real): Rename to ...
6086         (get_bindings): ... here.  Remove length and strict
6087         parameters. Change return type flag to boolean.  Remove original
6088         forwarding function.
6089         (determine_specialization): Adjust get_bindings call.
6090         (fn_type_unification): Remove length parameter.  Adjust.
6091         (type_unification_real): Remove length parameter.  Adjust.
6092         (resolve_overloaded_unification): Adjust get_bindings call.
6093         (try_one_overload): Simplify confusing cascaded if control flow.
6094         (unify): Remove length paramter from type_unification_real call.
6095         (most_specialized_instantiation): Adjust get_bindings calls.
6096         (most_specialized): Likewise.
6097
6098 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
6099
6100         PR c++/19203, implement DR 214
6101         * call.c (joust): Use more_specialized_fn.
6102         * cp-tree.h (DEDUCE_ORDER): Remove.
6103         (more_specialized): Replace with ...
6104         (more_specialized_fn): ... this.
6105         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
6106         case.
6107         (type_unification_real): Remove DEDUCE_ORDER case.
6108         (more_specialized): Replace with ...
6109         (more_specialized_fn): ... this.  Implement DR 214.
6110         (most_specialized_instantiation): Use get_bindings_real directly.
6111
6112 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6113
6114         PR c++/18644
6115         * call.c (build_new_op): Remove check for -Wsynth.
6116
6117 2005-03-31  Jan Hubicka  <jh@suse.cz>
6118
6119         * decl2.c (finish_objects): Mark ctor as needed.
6120         (cp_finish_file): Output variables only in nonunit-at-a-time.
6121
6122 2005-03-29  Richard Henderson  <rth@redhat.com>
6123
6124         PR c/20519
6125         * decl.c (cp_complete_array_type): Rename from complete_array_type.
6126         Use the new complete_array_type in c-common.c.  Update all callers.
6127         * cp-tree.h (cp_complete_array_type): Update to match.
6128
6129 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
6130
6131         * typeck.c (build_static_cast_1): Allow scalar_cast between
6132         any integral, floating, or enumeration type.
6133
6134 2005-03-24  Steven Bosscher  <stevenb@suse.de>
6135
6136         * typeck.c (comptypes): First determine if the types are compatible
6137         from a target-independent point of view.  Check target attributes
6138         last.
6139
6140         * class.c (build_base_path):
6141         (build_vbase_offset_vtbl_entries):
6142         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
6143         * error.c (dump_expr): Likewise.
6144         * init.c (build_zero_init, expand_cleanup_for_base,
6145         build_vec_delete_1): Likewise.
6146         * mangle.c (write_integer_cst): Likewise.
6147         * method.c (thunk_adjust): Likewise.
6148         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
6149         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
6150         * typeck.c (build_ptrmemfunc_access_expr,
6151         (get_member_function_from_ptrfunc): Likewise.
6152
6153 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
6154
6155         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
6156
6157 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
6158
6159         * cp-tree.h (perform_integral_promotions): Remove.
6160         (default_conversion): Add.
6161
6162 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
6163
6164         * parser.c (cp_parser_warn_min_max): New function.
6165         (cp_parser_binary_expression): Use it.
6166         (cp_parser_assignment_operator_opt): Likewise.
6167         (cp_parser_operator): Likewise.
6168
6169 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6170
6171         PR c++/19980
6172         * decl.c (start_preparsed_function): Robustify.
6173
6174 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6175
6176         PR c++/20499
6177         * parser.c (cp_parser_class_head): Return NULL_TREE when
6178         encountering a redefinition.
6179
6180 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
6181
6182         PR c++/20465
6183         PR c++/20381
6184         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
6185         template.
6186
6187 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
6188
6189         PR c++/20461
6190         PR c++/20536
6191         * init.c (emit_mem_initializers): Don't crash on undefined
6192         types.
6193
6194 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
6195
6196         PR c++/20147
6197         * semantics.c (finish_stmt_expr_expr): Return immediately
6198         if error_operand_p (expr).
6199
6200 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
6201
6202         * cp-tree.h (lvalue_or_else, lvalue_p): New.
6203         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
6204
6205 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6206
6207         PR c++/20240
6208         * decl.c (decls_match): Compare context of VAR_DECL.
6209
6210 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6211
6212         PR c++/20333
6213         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
6214         Check the return value of cp_parser_nested_name_specifier.
6215
6216 2005-03-18  Dale Johannesen <dalej@apple.com>
6217
6218         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
6219
6220 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
6221
6222         PR c++/20463
6223         * parser.c (cp_parser_diagnose_invalid_type_name):
6224         Check TYPE_BINFO (current_class_type) before attempting
6225         to emit inform messages.
6226
6227 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
6228
6229         PR c++/19966
6230         * cp-tree.h (grok_op_properties): Change return type to void.
6231         * decl.c (grok_op_properties): Return early - don't check the
6232         arity - in case of a static member or an operator that cannot
6233         be non-member; tidy a bit.
6234
6235 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
6236
6237         PR c++/20186
6238         * pt.c (contains_dependent_cast_p): Remove.
6239         (fold_non_dependent_expr): Don't use it.
6240         (value_dependent_expression_p): Use a switch statement.
6241         reference_exprs can be dependent.
6242
6243 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6244
6245         PR c++/4403
6246         PR c++/9783, DR433
6247         * name-lookup.c (pushtag): Skip template parameter scope when
6248         scope is ts_global.  Don't push tag into template parameter
6249         scope.
6250         * pt.c (instantiate_class_template): Reorder friend class
6251         template substitution to handle non-dependent friend class
6252         that hasn't been previously declared.
6253
6254 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6255
6256         Friend class name lookup 5/n
6257         PR c++/1016
6258         * cp-tree.h (pushtag): Adjust declaration.
6259         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
6260         lookup_name fails.
6261         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
6262         (start_enum): Adjust call to pushtag.
6263         * name-lookup.c (ambiguous_decl): Ignore hidden names.
6264         (qualify_lookup): Change return type to bool.
6265         (hidden_name_p): New function.
6266         (lookup_namespace_name, unqualified_namespace_lookup,
6267         lookup_name_real): Use it.
6268         (lookup_type_scope): Update comments.
6269         (maybe_process_template_type_declaration): Change parameter name
6270         from globalize to is_friend.
6271         (pushtag): Change globalize parameter of type int to tag_scope.
6272         Hide name if introduced by friend declaration.
6273         * name-lookup.h (hidden_name_p): Add declaration.
6274         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
6275         here.
6276         * pt.c (push_template_decl_real): Make hidden class template
6277         visible.
6278         (lookup_template_class, instantiate_class_template): Adjust call
6279         to pushtag.
6280         * semantics.c (begin_class_definition): Likewise.
6281         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
6282         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
6283         ts_global.
6284
6285 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
6286
6287         PR c++/20157
6288         * pt.c (determine_specialization): Reject non-specializations.
6289
6290 2005-03-11  Per Bothner  <per@bothner.com>
6291
6292         * cp-tree.h (struct cp_declarator): New id_loc field.
6293         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
6294         location using c_lex_with_flags, instead of input_location.
6295         (cp_parser_direct_declarator): Set declarator's id_loc from
6296         cp_token's id_loc.
6297
6298 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
6299
6300         PR c++/18384, c++/18327
6301         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
6302         and index.  Convert max_index to size_type_node if it isn't
6303         host_integerp (, 1).
6304
6305 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
6306
6307         PR c++/20208
6308         * pt.c (tsubst_decl): Apply array-to-pointer and
6309         function-to-pointer conversions to function arguments.
6310         (regenerate_decl_from_template): Likewise.
6311
6312 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
6313
6314         PR c++/16859
6315         * decl.c (complete_array_type): In pedantic mode, return
6316         3 for an empty initializer list as the initializer for an
6317         array of unknown bound (8.5.1/4).
6318         (maybe_deduce_size_from_array_init): Fix final test to use
6319         the above.
6320
6321 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6322
6323         PR c++/20186
6324         * pt.c (contains_dependent_cast_p): New.
6325         (fold_non_dependent_expr): Call it.
6326
6327 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
6328
6329         PR c++/20142
6330         * cp-tree.h (target_type): Remove.
6331         * decl.c (layout_var_decl): Remove #if 0'd code.
6332         (cp_finish_decl): Remove dead code.
6333         * init.c (build_vec_init): When determining whether or not the
6334         element type has an asignment operator, look through all array
6335         dimensions.
6336         * typeck.c (target_type): Remove.
6337
6338 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
6339
6340         * class.c (finish_struct_1): Do not warn about non-virtual
6341         destructors in Java classes.
6342
6343 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6344
6345         PR c++/19311
6346         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
6347         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
6348         for OFFSET_TYPE.
6349         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
6350         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
6351         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
6352         template.
6353
6354 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
6355
6356         * name-lookup.c (push_overloaded_decl): Don't error if the new
6357         decl matches the old one.
6358         * decl.c (redeclaration_error_message): Likewise.
6359
6360 2005-03-01  Per Bothner  <per@bothner.com>
6361
6362         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
6363         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
6364
6365 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
6366
6367         PR c++/20232
6368         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
6369         covariancy.
6370
6371         * cp-tree.g (THUNK_TARGET): Expand comment.
6372         * method.c (use_thunk): Make sure we also use the target, if that
6373         is a thunk.
6374
6375 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
6376
6377         PR c++/20206
6378         * decl.c (cxx_comdat_group): Put thunks for
6379         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
6380         comdat group as the thunk target.
6381
6382 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6383
6384         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
6385         parser.c: Fix comment typo(s).
6386
6387 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
6388
6389         PR c++/20175
6390         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
6391         initializes a char/wchar_t array.
6392
6393 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
6394
6395         PR c++/19878
6396         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
6397         with internal linkage.
6398
6399 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
6400
6401         * decl.c (grokvardecl): Don't exempt anonymous types from having
6402         linkage for variables that have linkage other than "C".
6403
6404 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
6405
6406         * cp-objcp-common.h, error.c: Update copyright.
6407
6408 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
6409
6410         PR c++/20073
6411         * decl.c (start_decl_1): Don't clear TREE_READONLY.
6412         (cp_finish_decl): Likewise.
6413         (complete_vars): Call cp_apply_type_quals_to_decl.
6414         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
6415         cases where that's not valid.
6416
6417         PR c++/19991
6418         * init.c (integral_constant_value): Iterate if the value of a decl
6419         is itself a constant.
6420
6421         PR c++/20152
6422         * parser.c (cp_parser_class_head): Check for redefintions here.
6423         * semantics.c (begin_class_definition): Not here.
6424
6425         PR c++/20153
6426         * decl2.c (build_anon_union_vars): Add type parameter.
6427         (finish_anon_union): Pass it.
6428
6429         PR c++/20148
6430         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
6431         Handle STATEMENT_LIST.
6432
6433         PR c++/19883
6434         * parser.c (cp_parser_direct_declarator): Always complain about
6435         non-constant array bounds when in a function scope.
6436         * semantics.c (finish_id_expression): Do not mark dependent names
6437         as non-constant.
6438
6439 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
6440
6441         PR c++/19076
6442         PR c++/6628
6443         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
6444         * decl.c (grokdeclarator): Pedwarn about qualifying a function
6445         type.
6446         Add qualifiers when declaring a typedef of a function type.
6447         Member function pointers pick up the qualifiers of the typedef
6448         used to declare them.
6449         Don't complain about creating cv-qualified function types.
6450         Complain about qualified function typedefs that are used to
6451         declare non-static member functions or free functions.
6452         Use cp_apply_type_quals_to_decl.
6453         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
6454         (grokclassfn): Use cp_apply_type_quals_to_decl.
6455         * error.c (dump_type_suffix): Print qualifiers for function
6456         types.
6457         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
6458         (tsubst): When substituting a function type into a member
6459         pointer type, pass along the qualifiers.
6460         (unify): Unify member pointers to member function pointers.
6461         * tree.c (cp_build_qualified_type_real): Function types may be
6462         qualified. This includes restrict qualifiers.
6463         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
6464         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
6465         added to function types.
6466
6467 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
6468
6469         PR 18785
6470         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
6471         c_common_to_target_charset.  Delete bogus comment.
6472
6473 2005-02-18  Richard Henderson  <rth@redhat.com>
6474
6475         PR libstdc++/10606
6476         * except.c (do_get_exception_ptr): New.
6477         (expand_start_catch_block): Use it.
6478
6479 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
6480
6481         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
6482         if type is not error_mark_node.
6483
6484 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6485
6486         PR c++/19508
6487         * decl2.c (grokfield): Do not apply attributes to template parameters
6488         as they are ignored by tsubst anyway.
6489
6490 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
6491
6492         PR c++/19813
6493         * decl.c (start_decl_1): Clear TREE_READONLY flag if
6494         its type has TYPE_NEEDS_CONSTRUCTING.
6495         (complete_vars): Likewise.
6496
6497 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
6498
6499         PR c++/20028
6500         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
6501         template along with TYPE_SIZE.
6502
6503         PR c++/20022
6504         * semantics.c (perform_deferred_access_checks): Use
6505         get_deferred_access_checks to get the top of the stack.
6506
6507 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
6508
6509         PR c++/17788
6510         * class.c (add_implicitly_declared_members, check_field_decl)
6511         (check_field_decls, check_bases): Remove arguments, tests and
6512         assignments of cant_have_default_ctor-related variables.
6513
6514 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
6515
6516         * decl2.c (mark_used): Set the source location of the used decl to
6517         the current input location here...
6518         * method.c (synthesize_method): ... not here.  Set input_location
6519         from the decl instead.
6520
6521 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
6522
6523         PR c++/19608
6524         * parser.c (cp_parser_late_parsing_for_member): Use
6525         current_function_decl as scope to push to and from.
6526
6527         PR c++/19884
6528         * pt.c (check_explicit_specialization): Make sure namespace
6529         binding lookup found an overloaded function.
6530         (lookup_template_function): Just assert FNS is an overloaded
6531         function.
6532
6533         PR c++/19895
6534         * decl.c (grokdeclarator): Check for error mark node in ptrmem
6535         construction.
6536
6537 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
6538
6539         PR c++/17816
6540         * decl.c (redeclaration_error_message): Report redefinition of
6541         pure virtual function.
6542
6543 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
6544
6545         PR c++/19891
6546         * class.c (build_simple_base_path): Build the component_ref
6547         directly.
6548         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
6549         rather than using lookup_base.
6550         * search.c (dfs_walk_once): Add non-recursive assert check.
6551         * typeck.c (build_class_member_access_expr): It is possible for
6552         the member type to be both const and volatile.
6553
6554 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6555
6556         PR c++/14479
6557         PR c++/19487
6558         * pt.c (maybe_check_template_type): Remove.
6559         * cp-tree.h (maybe_check_template_type): Remove prototype.
6560         * name-lookup.c (maybe_process_template_type_declaration): Don't
6561         use maybe_check_template_type.
6562
6563 2005-02-11  Richard Henderson  <rth@redhat.com>
6564
6565         PR c++/19632
6566         * pt.c (get_mostly_instantiated_function_type): Save and restore
6567         flag_access_control instead of push/pop_access_scope.
6568
6569 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
6570
6571         PR c++/19755
6572         * decl.c (reshape_init): Issue warnings about missing braces.
6573
6574 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
6575
6576         * cp-tree.def, except.c, ptree.c: Update copyright.
6577
6578 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
6579
6580         PR c++/19811
6581         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
6582         attempting name lookup.
6583
6584         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
6585
6586         PR c++/19787
6587         * call.c (initialize_reference): Robustify.
6588
6589         PR ++/19732
6590         * decl.c (grokdeclarator): Check for invalid use of destructor
6591         names.
6592
6593         PR c++/19762
6594         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
6595         names with invalid types.
6596
6597         PR c++/19826
6598         * parser.c (cp_parser_direct_declarator): Allow type-dependent
6599         expressions as array bounds.
6600
6601         PR c++/19739
6602         * parser.c (cp_parser_attributes_list): Allow empty lists.
6603
6604 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
6605
6606         PR c++/19733
6607         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
6608         (check_bases): Give warnings about a base class with a
6609         non-virtual destructor, even if it is implicit.
6610         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
6611         (maybe_warn_about_overly_private_class): Don't use
6612         TYPE_HAS_DESTRUCTOR.
6613         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
6614         (check_for_override): Give it external linkage.
6615         (add_implicitly_declared_members): Generate destructors lazily.
6616         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
6617         TYPE_HAS_DESTRUCTOR.
6618         (check_bases_and_members): Call check_methods before
6619         check_field_decls.
6620         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
6621         TYPE_HAS_DESTRUCTOR.
6622         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
6623         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
6624         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
6625         (lang_type_class): Add lazy_destructor.
6626         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
6627         (CLASSTYPE_DESTRUCTORS): Robustify.
6628         (TYPE_HAS_DESTRUCTOR): Remove.
6629         (check_for_override): Declare.
6630         (build_vbase_delete): Remove.
6631         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
6632         expressions.
6633         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
6634         * except.c (dtor_nothrow): Lazily create destructors if necessary.
6635         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6636         * init.c (build_delete): Lazily create destructors, if necessary.
6637         (build_vbase_delete): Remove.
6638         * method.c (locate_dtor): Simplify.
6639         (implicitly_declare_fn): Add support for destructors.
6640         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
6641         necessary.
6642         * pt.c (check_explicit_specialization): Don't use
6643         TYPE_HAS_DESTRUCTOR.
6644         (instantiate_class_template): Likewise.
6645         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
6646         * rtti.c (emit_support_tinfos): Robustify.
6647         * search.c (lookup_fnfields_1): Lazily create destructors.
6648         * typeck.c (build_class_member_access_expr): Remove
6649         PSEUDO_DTOR_EXPR handling.
6650         (lookup_destructor): Likewise.
6651
6652 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
6653
6654         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
6655         copyright.
6656
6657 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
6658
6659         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
6660         on boolean variables.
6661         (cp_lexer_stop_debugging): Likewise.
6662
6663 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6664
6665         PR c++/17401
6666         * parser.c (cp_parser_pure_specifier): Emit a specific error
6667         message with an invalid pure specifier.
6668         * decl2.c (grok_function_init): Remove.
6669         (grokfield): An initializer for a method is a always a pure
6670         specifier.
6671
6672 2005-02-02  Matt Austern  <austern@apple.com>
6673
6674         PR c++/19628
6675         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
6676         * parser.c (cp_parser_postfix_expression): Accept function call in
6677         constant expression if builtin_valid_in_constant_expr_p is true
6678         for that function.
6679         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
6680         * semantics.c (finish_id_expression): Accept function call in constant
6681         expression if builtin_valid_in_constant_expr_p is true for that
6682         function.
6683         * tree.c (builtin_valid_in_constant_expr_p): New.
6684
6685 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6686
6687         PR c++/17413
6688         * pt.c (check_instantiated_args): Improve error message.
6689         Fix logic when to print its second part.
6690
6691 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6692
6693         * cp-tree.h (complete_type_or_else): Remove macro.
6694         (complete_type_or_diagnostic): Rename to complete_type_or_else
6695         and remove last argument.
6696         * typeck.c (complete_type_or_diagnostic): Rename to
6697         complete_type_or_else and remove last argument.
6698
6699 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6700
6701         * cp-tree.h (commonparms): Remove prototype.
6702         (convert_arguments): Likewise.
6703         (PFN_FROM_PTRMEMFUNC): Remove.
6704         * typeck.c (commonparms): Make static.
6705         (convert_arguments): Add prototype. Make static.
6706         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
6707
6708 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
6709
6710         * parser.c (cp_parser_primary_expression): Don't complain about
6711         floating-point literals in integral constant expressions when
6712         !pedantic.
6713
6714 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
6715
6716         * parser.c (cp_parser_template_id): Revert comment patch too.
6717
6718         PR c++/18757
6719         PR c++/19366
6720         PR c++/19499
6721         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
6722         Issue an error when creating the template id.
6723         * pt.c (fn_type_unification): Return early if the explicit
6724         template arg list is an error_mark_node.
6725
6726 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
6727
6728         * decl.c (build_enumerator): Do not issue duplicate error messages
6729         about invalid enumeration constants.
6730         * parser.c (cp_parser_non_integral_constant_expression): Always
6731         set parser->non_integral_constant_expression_p.
6732         (cp_parser_primary_expression): Add cast_p parameter.  Issue
6733         errors about invalid uses of floating-point literals in
6734         cast-expressions.
6735         (cp_parser_postfix_expression): Add cast_p parameter.
6736         (cp_parser_open_square_expression): Pass it.
6737         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
6738         (cp_parser_unary_expression): Likewise.
6739         (cp_parser_new_placement): Pass it.
6740         (cp_parser_direct_new_declarator): Likewise.
6741         (cp_parser_new_initializer): Likewise.
6742         (cp_parser_cast_expression): Add cast_p parameter.
6743         (cp_parser_binary_expression): Likewise.
6744         (cp_parser_question_colon_clause): Likewise.
6745         (cp_parser_assignment_expression): Likewise.
6746         (cp_parser_expression): Likewise.
6747         (cp_parser_constant_expression): If an integral constant
6748         expression is invalid, return error_mark_node.
6749         (cp_parser_expression_statement): Pass cast_p.
6750         (cp_parser_condition): Likewise.
6751         (cp_parser_iteration_statement): Likewise.
6752         (cp_parser_jump_statement): Likewise.
6753         (cp_parser_mem_initializer): Likewise.
6754         (cp_parser_template_argument): Likewise.
6755         (cp_parser_parameter_declaration): Likewise.
6756         (cp_parser_initializer): Likewise.
6757         (cp_parser_throw_expression): Likewise.
6758         (cp_parser_attribute_list): Likewise.
6759         (cp_parser_simple_cast_expression): Likewise.
6760         (cp_parser_functional_cast): Likewise.
6761         (cp_parser_late_parsing_default_args): Likewise.
6762         (cp_parser_sizeof_operand): Save/restore
6763         non_integral_constant_expression_p.
6764
6765 2005-01-31  Mike Stump  <mrs@apple.com>
6766
6767         * parser.c (cp_lexer_new_main): Get the first token, first, before
6768         doing anything.
6769
6770 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
6771
6772         * decl.c (start_decl): Add missing parentheses.
6773
6774 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
6775
6776         PR c++/19555
6777         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
6778         * decl.c (duplicate_decls): Do not discard
6779         DECL_IMPLICIT_INSTANTIATION when merging declarations.
6780         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
6781         variables that do not have DECL_USE_TEMPLATE.
6782
6783         PR c++/19395
6784         * decl.c (grokdeclarator): Refactor code so that qualified names
6785         are never allowed as the declarator in a typedef.
6786
6787         PR c++/19367
6788         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
6789         builtin declarations.
6790
6791         PR c++/19457
6792         * call.c (convert_like_real): Inline call to
6793         dubious_conversion_warnings here.
6794         * cp-tree.h (dubious_conversion_warnings): Remove.
6795         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
6796         setting TREE_NEGATED_INT.
6797         * typeck.c (dubious_conversion_warnings): Remove.
6798
6799         PR c++/19349
6800         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
6801         memory.
6802
6803 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
6804
6805         PR c++/19253
6806         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
6807         tentative parses.
6808
6809         PR c++/19667
6810         * pt.c (redeclare_class_template): Robustify.
6811
6812 2005-01-27  Steven Bosscher  <stevenb@suse.de>
6813
6814         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
6815         instead of SWITCH_EXPR ones.
6816         * pt.c (tsubst_expr): Likewise.
6817         * semantics.c (begin_switch_stmt, finish_switch_cond,
6818         finish_switch_stmt): Likewise.
6819
6820 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
6821
6822         PR c++/18370
6823         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
6824
6825 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
6826
6827         * class.c (abort_fndecl_addr): New variable.
6828         (build_vtbl_initializer): If we have a pure virtual function
6829         share the abort function's address.
6830         Include gt-cp-class.h at the end.
6831         * config-lang.in (gtfiles): Add cp/class.c.
6832
6833 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6834
6835         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
6836         (pp_cxx_function_definition): Make static.
6837         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
6838         (pp_cxx_function_definition): Likewise.
6839
6840 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6841
6842         * name-lookup.c (print_binding_level): Make static.
6843         (constructor_name_full): Make static inline.
6844         (current_decl_namespace): Make static.
6845         * name-lookup.h (constructor_name_full): Remove prototype.
6846         (print_binding_level): Likewise.
6847         (current_decl_namespace): Likewise.
6848
6849 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6850
6851         * decl.h (debug_bindings_indentation): Remove.
6852
6853 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
6854
6855         * typeck.c: Fix a comment typo.
6856
6857 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6858
6859         PR c++/19208
6860         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
6861         at least once.
6862         (tsubst): Use fold_decl_constant_value in place of a bare call to
6863         integral_constant_value.
6864
6865 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
6866
6867         * typeck.c (more_qualified_p): Remove.
6868         * cp-tree.h: Remove the corresponding prototype.
6869
6870 2005-01-19  Matt Austern  <austern@apple.com>
6871
6872         * typeck.c (comptypes): Handle return code from objc_comptypes
6873         correctly.
6874
6875 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
6876
6877         * cp-tree.h, name-lookup.h: Remove unused prototypes.
6878
6879 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6880
6881         PR c++/19375
6882         * semantics.c (finish_id_expression): Disable access checking for
6883         already lookuped FIELD_DECL.
6884
6885 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6886
6887         * decl.c (delete_block): Remove.
6888         * cp-tree.h: Remove the corresponding prototype.
6889
6890         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
6891         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
6892         Remove.
6893         * cp-tree.h: Remove the corresponding prototypes.
6894
6895         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
6896         cp_update_decl_after_saving, name_p): Remove.
6897         * cp-tree.h: Remove the corresponding prototypes.
6898
6899 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
6900
6901         PR c/19472
6902         * semantics.c (finish_asm_stmt): Strip nops off
6903         input memory operands.
6904
6905 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6906
6907         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
6908         typeck2.c: Update copyright.
6909
6910 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
6911
6912         * class.c (get_enclosing_class): Remove.
6913         * cp-tree.h: Remove the corresponding prototypes.
6914
6915         * cvt.c (convert_lvalue): Remove.
6916         * cp-tree.h: Remove the corresponding prototype.
6917
6918         * pt.c (tinst_for_decl): Remove.
6919         * cp-tree.h: Remove the corresponding prototypes.
6920
6921         * tree.c (hash_chainon): Remove.
6922         * cp-tree.h: Remove the corresponding prototypes.
6923
6924 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
6925
6926         PR c++/19263
6927         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
6928         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
6929
6930 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6931
6932         * Make-lang.in (cp-warn): Don't append $(WERROR).
6933
6934 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
6935
6936         * cp-tree.h: Fix a comment typo.
6937
6938 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
6939
6940         PR c++/19298
6941         * pt.c (tsubst_qualified_id): Call convert_from_reference.
6942
6943 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
6944
6945         PR c++/19244
6946         * class.c (add_implicitly_declared_members): Remove dead code.
6947         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
6948         DECL_CONSTRUCTOR_P.
6949         (grokdeclarator): Adjust calls to grokfndecl.
6950         * method.c (implicitly_declare_fn): Improve documentation.
6951         * parser.c (cp_parser_direct_declarator): Do not consider a
6952         function to be a constructor if the containing class was
6953         originally anonymous.
6954
6955 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6956
6957         PR c++/17154
6958         * search.c (lookup_field_1): Handle using declaration in
6959         class template partial specialization.
6960
6961 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6962
6963         PR c++/19258
6964         * pt.c (push_access_scope): Handle friend defined in class.
6965         (pop_access_scope): Likewise.
6966
6967 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
6968
6969         PR c++/19270
6970         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
6971         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
6972         array-new handling code.  Use build_x_binary_op.
6973
6974 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
6975
6976         PR c++/19030
6977         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
6978         * name-lookup.h (push_scope): Return pushed scope, not flag.
6979         * name-lookup.c (push_scope): Return scope that should be popped,
6980         not a flag.
6981         * decl.c (start_decl): Adjust.
6982         (grokfndecl): Adjust scope push and pop.
6983         * decl2.c (check_classfn): Likewise.
6984         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
6985         cp_parser_init_declarator, cp_parser_direct_declarator,
6986         cp_parser_class_specifier, cp_parser_class_head,
6987         cp_parser_lookup_name,
6988         cp_parser_constructor_declarator_p): Likewise.
6989         * pt.c (instantiate_class_template,
6990         resolve_typename_type): Likewise.
6991
6992 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6993
6994         PR c++/14136
6995         * parser.c (cp_parser_unqualified_id): Do not issue error message
6996         for typedef-name as destructor declarator when performing an
6997         uncommitted tentative parse.
6998
6999 2005-01-01  Steven Bosscher  <stevenb@suse.de>
7000
7001         PR middle-end/17544
7002         * decl.c (finish_function): Fix comment.  Annotate the compiler
7003         generated return with the current file name and line 0.