OSDN Git Service

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