OSDN Git Service

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