PR c++/26696
[official-gcc.git] / gcc / cp / ChangeLog
blobcd1af6f8a9153b05ad0d11e3b005261ca2e794ec
1 2006-09-06  Jason Merrill  <jason@redhat.com>
3         PR c++/26696
4         * cvt.c (convert_to_void): Replace a subexpression with no side 
5         effects with void_zero_node.
6         * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
7         (get_first_fn): Ditto.
8         * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
10 2006-09-05  Jason Merrill  <jason@redhat.com>
12         PR c++/26571
13         * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
14         where the name is a type used incorrectly.
16         PR c++/26671
17         * typeck.c (maybe_warn_about_returning_address_of_local): Look 
18         through COMPONENT_REF and ARRAY_REF.    
20         PR c++/26102
21         * name-lookup.c (do_class_using_decl): Try to find the base even
22         if bases_dependent_p.
23         * pt.c (type_dependent_expression_p): A USING_DECL is dependent.        
25         PR c++/19809
26         * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
28 2006-09-04  Nathan Sidwell  <nathan@codesourcery.com>
30         PR 23287 Revert my 2006-09-01 patch.
31         * parser.c: Reverted.
32         * pt.c: Reverted.
34 2006-09-02  Lee Millward  <lee.millward@codesourcery.com>
36         PR c++/27670
37         PR c++/27493
38         PR c++/27494
39         PR c++/27397
40         * parser.c (cp_parser_template_parameter_list): Add
41         invalid template parameters to the parameter list as
42         error_mark_node.
44 2006-09-02  Jakub Jelinek  <jakub@redhat.com>
46         PR c++/28878
47         * except.c (build_throw): Only set current_function_returns_abnormally
48         if cfun is not NULL.
50         PR c++/26917
51         * repo.c (repo_file): Remove.
52         (open_repo_file, reopen_repo_file_for_write): Return fopened
53         FILE * instead of setting global repo_file variable.
54         (init_repo): Adjust caller.
55         (finish_repo): Likewise.  Return instead of goto out before
56         reopen_repo_file_for_write has been called.
58 2006-09-01  Nathan Sidwell  <nathan@codesourcery.com>
60         PR c++/28705
61         * semantics.c (finish_call_expr): Add assert.
62         * name-lookup.c (lookup_arg_dependent): Check we found an overload
63         or an object.
65         PR c++/23287
66         * parser.c (cp_parser_id_expression): Add member_p
67         argument. Update all callers.
68         (cp_parser_unqualified_id): Likewise.  Lookup a destructor name in
69         the object's scope, if valid.
70         (cp_parser_global_scope_opt): Add object_scope_valid_p.  Update
71         callers.
72         (cp_parser_postfix_dot_deref_expression): Set object_scope.
73         * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
75 2006-08-30  Jason Merrill  <jason@redhat.com>
77         PR c++/26670
78         * class.c (check_field_decls): Don't unset TYPE_PACKED until all
79         the fields have been processed.
81 2006-08-29  Andrew Pinski  <pinskia@physics.uc.edu>
83         PR C++/28349
84         * call.c (build_x_va_arg): Remove the reference type
85         from the type before creating the pointer type.
87 2006-08-29  J"orn Rennecke  <joern.rennecke@st.com>
89         PR c++/28139
90         * except.c (expand_start_catch_block): Use correct types for bitwise
91         copy.
93 2006-08-28  Jason Merrill  <jason@redhat.com>
95         PR c++/26670
96         * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
97         fields can't be packed.
99         PR c++/26577
100         * cvt.c (convert_to_void): Don't automatically load from volatiles 
101         of TREE_ADDRESSABLE type.
103 2006-08-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
105         PR c++/28860
106         * cp-tree.h (maybe_process_partial_specialization): Return
107         tree instead of void.
108         * parser.c (cp_parser_class_head): Use return value of
109         maybe_process_partial_specialization.
110         * pt.c (maybe_process_partial_specialization): Return error_mark_node
111         for broken specializations, TYPE otherwise.  Check for template
112         template parameters.
114 2006-08-27  Mark Mitchell  <mark@codesourcery.com>
116         PR c++/28058
117         * pt.c (register_specialization): Return error_mark_node for
118         specialization-after-instantiation.
119         * decl2.c (mark_used): Mark the main function used when one of its
120         clones is used.
121         
122 2006-08-27  Lee Millward  <lee.millward@codesourcery.com>
124         PR c++/26573
125         * class.c (check_field_decls): Don't issue error about
126         local classes containing static data members.
127         
128 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
130         PR c++/24009
131         * parser.c (struct cp_token): Add input_file_stack_index.
132         (eof_token): Update.
133         (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
134         (cp_lexer_set_source_position_from_token): Restore input file
135         stack.
137 2006-08-26  Lee Millward  <lee.millward@codesourcery.com>
139         PR c++/28736
140         PR c++/28737
141         PR c++/28738
142         * pt.c (process_template_parm): Store invalid template
143         parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
144         (push_inline_template_parms_recursive): Check for template
145         parameters having a TREE_VALUE of error_mark_node rather than
146         check the parameter itself.
147         (mangle_class_name_for_template): Likewise.
148         (comp_template_parms): When comparing the individual template
149         parameters, return 1 if either is error_mark_node.
150         (current_template_args): Robustify.
151         (redeclare_class_template): Likewise.
152         
153 2006-08-26  Mark Mitchell  <mark@codesourcery.com>
155         PR c++/28588
156         * class.c (resolve_address_of_overloaded_function): Add
157         access_path parameter.  Perform access checks.
158         (instantiate_type): Adjust call to
159         resolve_address_of_overloaded_function.  Remove unnecessary code.
160         * tree.c (is_overloaded_fn): Document.  Return 2 when there are
161         acutally multiple functions.
162         (really_overloaded_fn): Use is_overloaded_fn.
163         * mangle.c (write_expression): Handle BASELINKs.
164         * cp-tree.h (really_overloaded_fn): Return bool.
165         (baselink_for_fns): Declare.
166         * search.c (lookup_member): Check access for single static
167         functions here.
168         * pt.c (convert_nontype_argument_function): Handle BASELINKs.
169         (tsubst_copy_and_build): Generate BASELINKs for template-ids.
170         * semantics.c (finish_call_expr): Use baselink_for_fns.
171         (baselink_for_fns): New function.
172         (finish_id_expression): Use it.
173         * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
175         PR c++/28595
176         * pt.c (tsubst): Issue errors about attempts to create VLAs at
177         template-instantiation time.
179 2006-08-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
181         PR c++/28853
182         * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
183         template parameters.  Improve error message for template type
184         parameters.
186         PR c++/28852
187         * cp-tree.h (grok_op_properties): Return bool instead of void.
188         * decl.c (grokfndecl): Discard invalid operator declarations.
189         (copy_fn_p): Revert change for PR 27547.
190         (grok_op_properties): Return error status (true on success).
191         * pt.c (tsubst_decl): Discard invalid operator declarations.
193 2006-08-25  Mark Mitchell  <mark@codesourcery.com>
195         PR c++/28056
196         * decl.c (grokdeclarator): Disallow declarations with qualified
197         names in local scopes.
199 2006-08-25  Nathan Sidwell  <nathan@codesourcery.com>
201         PR c++/27787
202         * decl.c (make_typename_type): Only try and resolve it when
203         context is not dependent.  Refactor.
204         * decl2.c (check_classfn): Push to class scope before looking for
205         the function.
207 2006-08-24  Danny Smith   <dannysmith@users.sourceforge.net>
209         PR driver/28528
210         * g++spec.c (lang_specific_driver): Always check if we need to
211         swallow a space-separated  arg to '-x'.
212         * lang-specs.h: Don't create ouput files for '-xc++-header'
213         if -fsyntax-only.
215 2006-08-23  Jason Merrill  <jason@redhat.com>
217         PR c++/27714
218         * pt.c (push_template_decl_real): A friend template with class 
219         scope isn't primary.
221 2006-08-23  Benjamin Smedberg <benjamin@smedbergs.us>
223         PR c++/28687
224         * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
225         Move -fno-rtti check to be more specific.
227 2006-08-22  Jason Merrill  <jason@redhat.com>
229         PR c++/23372
230         * call.c (build_over_call): Don't make a copy here if build_call 
231         will make one too.
233 2006-08-22  Andrew Pinski  <pinskia@physics.uc.edu>
235         PR C++/28450
236         * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
237         COMPLEX_TYPEs.
239 2006-08-22  Simon Martin  <simartin@users.sourceforge.net>
241         PR c++/28420
242         * parser.c (cp_parser_postfix_expression): Make sure that the
243         saved value for parser->type_definition_forbidden_message is
244         restored before returning to avoid an invalid free().
246 2006-08-22  Jason Merrill  <jason@redhat.com>
248         PR c++/28659
249         * typeck.c (merge_types): If either of the types have the right 
250         attributes, return that one.
252         * tree.c (cp_build_type_attribute_variant): Make sure we aren't
253         doing this to class types.
254         * typeck.c (original_type): Deal with type quals properly.
256 2006-08-21  Jason Merrill  <jason@redhat.com>
258         PR c++/27115
259         * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
260         just leave the expression as it is.
261         (finish_stmt_expr): If the statement-expression has class type,
262         wrap it in a TARGET_EXPR.
263         * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
264         CLEANUP_POINT_EXPR.
265         * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
267 2006-08-21  Lee Millward  <lee.millward@codesourcery.com>
269         PR c++/26269
270         * decl.c (duplicate_decls): Return early if either
271         newdecl or olddecl is error_mark_node.
273          PR c++/28505
274         * decl.c (grokdeclarator): Return early after
275         issuing diagnostic about an incomplete type.
277         PR c++/28741
278         * tree.c (decl_anon_ns_mem_p): Robustify.
279         * decl2.c (determine_visibility): Likewise.
280         
281 2006-08-20  Mark Mitchell  <mark@codesourcery.com>
283         PR c++/28341
284         * tree.c (cast_valid_in_integral_constant_expression_p): New
285         function.
286         * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
287         * pt.c (tsubst_expr): Add integral_constant_expression_p
288         parameter.
289         (fold_non_dependent_expr): Adjust callers of
290         tsubst_{expr,copy_and_build}.
291         (tsubst_friend_function): Likewise.
292         (tsubst_template_arg): Likewise.
293         (tsubst_default_argument): Likewise.
294         (tsubst_decl): Likewise.
295         (tsubst): Likewise.
296         (tsubst_omp_clasuses): Likewise.
297         (regenerate_decl_fromp_template): Likewise.
298         (instantiate_decl): Likewise.
299         (tsubst_initializer_list): Likewise.
300         (tsubst_enum): Likewise.
301         (tsubst_expr): Use RECUR throughout.
302         (tsubst_copy_and_build): Change definition of RECUR.  Do not allow
303         invalid casts in integral constant expressions.
304         * parser.c (cp_parser_postfix_expression): Use
305         cast_valid_in_integral_constant_expression_p.
306         (cp_parser_cast_expression): Likewise.
307         (cp_parser_functional_cast): Likewise.
309         PR c++/28346
310         * pt.c (tsubst_qualified_id): Do not strip references from
311         OFFSET_REFs. 
313 2006-08-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
315         PR c++/28606
316         * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
317         Fix formatting.
318         (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
319         for valid type-names.
320         (cp_parser_unqualified_id): Fix error handling for destructors.
322         PR c++/28710
323         * decl.c (xref_tag): Improve error message.  Return early on error.
325         PR c++/28711
326         * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
328 2006-08-17  Paolo Bonzini  <bonzini@gnu.org>
330         PR c++/28573
331         * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
333 2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
335         PR c++/28302
336         * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
337         perform_integral_promotions for non integral type.
339 2006-08-16  Jason Merrill  <jason@redhat.com>
341         PR c++/28385
342         * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
343         if arg is a function.
345 2006-08-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
347         PR c++/28593
348         * init.c (build_new): Return early on invalid placement.
350 2006-08-15  Lee Millward  <lee.millward@codesourcery.com>
352         PR c++/28594
353         * pt.c (process_template_parm): Robustify.
354         
355 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
357         PR c++/28288
358         PR c++/14556
359         * operators.def: Remove <?, ?>, <?=, and >?= operators.
360         * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
361         (cp_parser_warn_min_max): Remove.
363 2006-08-11  Jason Merrill  <jason@redhat.com>
365         PR c++/28559
366         * parser.c (cp_parser_elaborated_type_specifier): Also ignore
367         attributes applied to a TYPENAME_TYPE.
369 2006-08-09  Lee Millward  <lee.millward@codesourcery.com>
371         PR c++/28637
372         * pt.c (coerce_template_parms): Copy across the
373         invalid template arguments to the new template inner arguments.
374         (retrieve_specialization): Robustify.
376         PR c++/28638
377         * pt.c (coerce_template_template_parms): Robustify.
379         PR c++/28639
380         * error.c (dump_template_parms): Robustify.
382         PR c++/28640
383         * pt.c (redeclare_class_template): Robustify.
385         PR c++/28641
386         * pt.c (type_unification_real): Robustify.
387         
388 2006-08-03  Lee Millward  <lee.millward@codesourcery.com>
390         PR c++/28347
391         * decl.c (start_decl): Return error_mark_node if a
392         diagnostic was issed for an invalid typedef initialization.
393         
394 2006-08-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
396         PR c++/27508
397         * parser.c (cp_parser_unqualified_id): Check for invalid scopes
398         when parsing destructor names.
400         PR c++/28274
401         * decl.c (duplicate_decls): Call check_default_args here.
402         (start_preparsed_function): Do not call check_default_args.
403         * name-lookup.c (pushdecl_maybe_friend): Only call
404         check_default_args if duplicate_decls got bypassed.
406 2006-08-02  Richard Guenther  <rguenther@suse.de>
408         PR c++/28479
409         Revert
410         2006-07-05  Richard Guenther  <rguenther@suse.de>
411         Andrew Pinski  <pinskia@gcc.gnu.org>
413         PR c++/27084
414         * cp-objcp-common.c (cxx_types_compatible_p): Ignore
415         top level qualifiers for pointer type comparisons.
417 2006-08-02  Mark Mitchell  <mark@codesourcery.com>
419         PR c++/28557
420         * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
422 2006-07-31  Mark Mitchell  <mark@codesourcery.com>
424         PR c++/28523
425         * tree.c (stabilize_expr): Tweak documentation.  Add assertion.
426         (stabilize_call): Tweak documentation.
427         (stabilize_init): Only call stabilize_call for calls.
429 2006-08-01  Steve Ellcey  <sje@cup.hp.com>
431         PR c++/28432
432         * decl2.c (check_classfn): Remove early return.
433         * search.c (lookup_member): Return NULL with bad type.
435 2006-08-01  Steve Ellcey  <sje@cup.hp.com>
437         PR c++/28256
438         * decl.c (check_initializer): Check for 1 initializer on scalar types.
440 2006-08-01  Daniel Jacobowitz  <dan@codesourcery.com>
442         PR debug/23336
443         * pt.c (tsubst_copy_and_build): Mark used enum types.
444         * semantics.c (finish_id_expression): Likewise.
446 2006-07-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
448         PR c++/6634
449         * decl.c (grokdeclarator): Check whether "long" or "short" was
450         specified for non-integral types.
452 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
454         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
456 2006-07-28  Lee Millward  <lee.millward@codesourcery.com>
458         PR c++/27668
459         PR c++/27962
460         * pt.c (process_template_parm) Store invalid template
461         parameters as error_mark_node in the paramater list.
462         (push_inline_template_parms_recursive): Handle invalid
463         template parameters.
464         (comp_template_parms): Likewise.
465         (check_default_tmpl_arg): Likewise.
466         (coerce_template_template_parms): Likewise.
467         (mangle_class_name_for_template): Likewise.
468         (tsubst_template_parms): Likewise.
469         * error.c (dump_template_argument_list): Likewise.
470         
471 2006-07-28  Kazu Hirata  <kazu@codesourcery.com>
473         * cp-tree.h: Fix a comment typo.
475 2006-07-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
477         PR c++/27572
478         * decl.c (grokdeclarator): Return error_mark_node after invalid
479         typedef.
481 2006-07-23  Daniel Jacobowitz  <dan@codesourcery.com>
483         PR c++/28460
484         * decl.c (grokvardecl): Use FROB_CONTEXT.
485         * pt.c (register_specialization): Likewise.
487 2006-07-23  Mark Mitchell  <mark@codesourcery.com>
489         PR c++/28025
490         * cp-tree.h (LOOKUP_HIDDEN): New macro.  Reformat comments.
491         * name-lookup.c (unqualified_namespace_lookup): There is no way to
492         have a hidden name in non-namespace scopes.
493         * pt.c (tsubst_friend_class): Look for hidden names.
494         * decl.c (lookup_and_check_tag): Fix typo in comment.
496         * semantics.c (finish_compound_literal): Fix typo in comment.
498 2006-07-21  Jason Merrill  <jason@redhat.com>
500         * decl2.c (determine_visibility): Don't propagate visibility from
501         type to decl.
502         (constrain_class_visibility): Don't warn in system headers.
503         Don't warn about pointer fields.
505 2006-07-20  Mike Stump  <mrs@apple.com>
507         * decl2.c (determine_visibility_from_class): Don't use hidden
508         visibility for explicit instantiations.
510 2006-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
512         PR c++/28250
513         * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
514         valid decls.  Cleanup.
516         PR c++/28363
517         * semantics.c (check_template_template_default_arg): Simplify
518         error handling.
520 2006-07-20  Jason Merrill  <jason@redhat.com>
522         PR c++/28407
523         * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
524         const variables with implicit internal linkage.
525         * tree.c (decl_linkage): Only return lk_external if it's set.
527         PR c++/28409
528         * decl2.c (constrain_visibility): Ignore the anonymous namespace 
529         for extern "C" decls.
530         (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
532         * decl2.c (constrain_visibility): Remove specified and reason 
533         parameters.  Don't touch decls that already have explicit visibility.
534         (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from 
535         template.
536         (determine_visibility_from_class): Reverse sense of 
537         DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
538         (constrain_class_visibility): Only complain about member visibility
539         if the member type is another class.  Don't change visibility of the
540         current class.
542 2006-07-19  Mark Mitchell  <mark@codesourcery.com>
544         PR c++/28338
545         * decl.c (layout_var_decl): Don't call push_local_name here.
546         (initialize_artificial_var): Assert artificiality.
547         (cp_finish_decl): Call push_local_name here.
549 2006-07-18  Mark Mitchell  <mark@codesourcery.com>
551         PR c++/28337
552         * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
553         templates.
555 2006-07-18  Mark Mitchell  <mark@codesourcery.com>
557         PR c++/28048
558         * semantics.c (check_accessibility_of_qualified_id): Robustify.
560         PR c++/28235
561         * pt.c (tsubst_decl): Handling substitutions into a static data
562         member from within the scope of the tempalte itself.
564 2006-07-18  Lee Millward  <lee.millward@gmail.com>
566         PR c++/28258
567         * method.c (locate_copy): Check for non_reference
568         returning error_mark_node.
570         PR c++/28260
571         * decl.c (duplicate_decls): Return error_mark_node
572         on ambiguous declaration.
573         
574 2006-07-18  Steve Ellcey  <sje@cup.hp.com>
576         PR c++/27495
577         * search.c (adjust_result_of_qualified_name_lookup): Change
578         assert to part of if statement.
580 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
582         PR c++/28291
583         * decl.c (reshape_init_class): Return error_mark_node on error.
585 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
587         PR c++/28304
588         * decl2.c (check_classfn): Return NULL_TREE on error.
590 2006-07-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
592         PR c++/28250
593         * name-lookup.c (pushdecl_maybe_friend): Return early on
594         error_mark_node.
595         * except.c (expand_start_catch_block): Use error_mark_node instead
596         of NULL_TREE for invalid decls.
597         * parser.c (cp_parser_exception_declaration): Return error_mark_node
598         on invalid catch parameter. Simplify.
600 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
602         PR c++/28370
603         * decl2.c (note_vague_linkage_var): Removed.
604         (finish_static_data_member_decl): Add decl to pending_statics vector
605         directly.  Do it even for non-public decls.
607 2006-07-15  Lee Millward  <lee.millward@gmail.com>
609         PR c++/28292
610         * decl2.c (acceptable_java_type): Robustify. Use
611         proper Boolean return type instead of return 1.
612         (check_java_method): Don't issue error about
613         type not being an acceptable Java parameter if 
614         it's error_mark_node.
615         
616         PR c++/28269
617         * parser.c (cp_parser_elaborated_type_specifier):
618         Return early if an invalid type was detected.
619         
620 2006-07-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
622         PR c++/28249
623         * parser.c (cp_parser_check_decl_spec): New function.
624         (cp_parser_decl_specifier_seq): Factor out check for repeated
625         decl-specifiers into cp_parser_check_decl_spec. Use it.
626         (cp_parser_type_specifier_seq): Use it.
628         PR c++/28294
629         * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
630         only.
632         PR c++/28387
633         * decl2.c (cplus_decl_attributes): Check for invalid decls.
635 2006-07-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
637         PR c++/28343
638         * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
639         * decl2.c (grokfield): Likewise.
641 2006-07-12  Geoffrey Keating  <geoffk@apple.com>
643         * decl2.c (determine_visibility): Don't change visibility of
644         function locals because of -fvisibility-inlines-hidden.
646 2006-07-12  Jason Merrill  <jason@redhat.com>
648         PR c++/28217
649         * semantics.c (note_decl_for_pch): Don't premangle templates.
651 2006-07-12  Martin Michlmayr  <tbm@cyrius.com>
653         * typeck.c (string_conv_p): Remove spurious quotation mark in
654         warning.
656 2006-07-07  Lee Millward  <lee.millward@gmail.com>
657             Andrew Pinski  <pinskia@gmail.com>
659         PR c++/27820
660         * decl.c (define_label): Return error_mark_node on error.
661         * semantics.c (finish_label_stmt): Don't call
662         add_stmt for invalid labels.
663         
664 2006-07-06  Jason Merrill  <jason@redhat.com>
666         PR c++/28279
667         * decl2.c (finish_static_data_member_decl): Don't assert
668         TREE_PUBLIC.
670 2006-07-05  Jason Merrill  <jason@redhat.com>
672         PR c++/13983
673         PR c++/17519
674         * class.c (check_field_decls): Check TYPE_PACKED after
675         stripping array types.
676         (finish_struct_bits): Don't copy TYPE_SIZE here.
678         PR c++/18681
679         * friend.c (is_friend): Fix DR 45 implementation.
681 2006-07-05  Richard Guenther  <rguenther@suse.de>
682         Andrew Pinski  <pinskia@gcc.gnu.org>
684         PR c++/27084
685         * cp-objcp-common.c (cxx_types_compatible_p): Ignore
686         top level qualifiers for pointer type comparisons.
688 2006-07-01  Jason Merrill  <jason@redhat.com>
690         PR c++/28215
691         * method.c (make_thunk): Unset DECL_USE_TEMPLATE and 
692         DECL_TEMPLATE_INFO.
694 2006-06-30  Jason Merrill  <jason@redhat.com>
696         PR c++/26577
697         * call.c (build_new_method_call): Force evaluation of the 
698         instance pointer, not the object.
700 2006-06-30  Kazu Hirata  <kazu@codesourcery.com>
702         * decl2.c: Fix a comment typo.
704 2006-06-30  Jason Merrill  <jason@redhat.com>
706         PR c++/18698
707         * decl2.c (grokfield): Only try to treat the decl as an access 
708         declaration if the scope is a class.
710 2006-06-29  Jason Merrill  <jason@redhat.com>
712         PR c++/26905
713         PR c++/26612
714         PR c++/27000
715         PR c++/26984
716         PR c++/19134
717         * decl2.c (determine_visibility): Overhaul.
718         (determine_visibility_from_class): Likewise.
719         (min_vis_r, type_visibility, constrain_visibility): New fns.
720         (constrain_visibility_for_template): Likewise.
721         (constrain_class_visibility): Likewise.
722         * decl.c (cp_finish_decl): Call determine_visibility for function
723         decls, too.
724         * name-lookup.c (pushtag): Call determine_visibility.
725         * decl.c (duplicate_decls): Don't copy visibility from template to
726         specialization.
727         * pt.c (check_explicit_specialization): Likewise.
728         (lookup_template_class, tsubst_decl): Call determine_visibility.
729         * class.c (finish_struct_1): Call constrain_class_visibility.
731         PR c++/26905
732         PR c++/21675
733         PR c++/17470
734         * parser.c (cp_parser_explicit_instantiation): Pass the attributes
735         to grokdeclarator.
736         (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
737         (cp_parser_enum_specifier): Likewise.
738         (cp_parser_elaborated_type_specifier): Apply attributes if this
739         declares only the class.
740         (cp_parser_class_specifier): Apply leading attributes immediately.
741         * semantics.c (begin_class_definition): Add attributes parameter,
742         apply them to the type.
744         PR c++/21581
745         PR c++/25915
746         * tree.c (decl_anon_ns_mem_p): New function.
747         * cp-tree.h: Declare it.
748         * decl2.c (determine_visibility): Make anonymous namespace
749         members static.
750         (min_vis_r, constrain_visibility): Likewise.
751         * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
752         pseudo-types.
753         * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
754         global_namespace.
755         * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
756         on anonymous namespaces.
758 2006-06-28  Jason Merrill  <jason@redhat.com>
760         PR c++/27424
761         * pt.c (convert_template_argument): Pass all template arguments 
762         on to coerce_template_template_parms.
764 2006-06-25  Lee Millward  <lee.millward@gmail.com>
765             Mark Mitchell <mark@codesuorcery.com>
767         PR c++/28054
768         * decl2.c (grokbitfied): Remove check for grokdeclarator
769         returning NULL_TREE, instead check for error_mark_node
770         to indicate failure.
771         * decl.c (grokdeclarator): Adjust block comment.
772         
773 2006-06-25  Lee Millward  <lee.millward@gmail.com>
775         PR c++/28051
776         * mangle.c (mangle_conv_op_name_for_type): Check for
777         invalid types.
778         * name-lookup.c (push_class_level_binding): Robustify.
779         (do_class_using_decl): Return early if name is error_mark_node.
780         
781 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
783         PR c++/28114
784         * name-lookup.c (pushtag): Return if we have error_mark_node.
786 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
788         PR c++/27019
789         * typeck2.c (process_init_constructor_array): Set ce->value on errors.
791 2006-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
793         PR c++/28112
794         * parser.c (cp_parser_attribute_list): Skip attributes with invalid
795         arguments.  Fix comment.
797         PR c++/11468
798         * init.c (build_new_1): Handle error_mark_nodes returned by
799         build_java_class_ref.
800         (build_java_class_ref): Do not abort compilation, but return
801         error_mark_node.  Improve error message.  Fix indentation.
803 2006-06-23  Danny Smith   <dannysmith@users.sourceforge.net>
805         PR target/27789
806         * decl.c (start_decl): Check that dllimports are not initialized.
808 2006-06-22  Lee Millward  <lee.millward@gmail.com>
810         PR c++/27805
811         * typeck2.c (build_m_component_ref): Use error_operand_p.
813         PR c++/27821
814         * decl.c (grokdeclarator): Return error_mark_node on
815         invalid uses of the scope resolution operator.
816         
817 2006-06-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
819         PR c++/28111
820         * pt.c (determine_specialization): Check for invalid decls.
822         PR c++/28110
823         * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
824         parameters.
826         PR c++/28109
827         * rtti.c (get_tinfo_decl_dynamic): Robustify.
829 2006-06-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
831         PR c++/28052
832         * init.c (push_base_cleanups): Skip members with invalid types.
833         * typeck.c (build_class_member_access_expr): Robustify.
835 2006-06-19  Mark Mitchell  <mark@codesourcery.com>
837         * pt.c (instantiate_template): Fix typo in comment.
839 2006-06-19  Richard Guenther  <rguenther@suse.de>
841         * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
842         power-of-two token vector size.
844 2006-06-16  Mark Mitchell  <mark@codesourcery.com>
846         PR c++/28016
847         * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
848         members.
850         PR c++/27979
851         * call.c (standard_conversion): Strip cv-qualifiers from bitfield
852         types.
854         PR c++/27884
855         * decl.c (have_extern_spec): Remove.
856         (start_decl): Do not check have_extern_spec.
857         (start_function): Likewise.
858         * cp-tree.h (have_extern_spec): Remove.
859         * parser.c (cp_parser_linkage_specification): Don't set
860         have_extern_spec.
861         (cp_parser_init_declarator): Likewise.
862         (cp_parser_parameter_declaration): Do not treat parameters as
863         within the scope of an unbraced linkage specification.
865 2006-06-15  Mark Mitchell  <mark@codesourcery.com>
867         PR c++/27689
868         * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
869         macro.
870         * pt.c (unify): Use it.
872         PR c++/27666
873         * call.c (build_conditional_expr): Robustify.
875         PR c++/27640
876         * pt.c (instantiate_template): Set processing_template_decl to
877         zero while performing substitutions.
879 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
881         PR c++/27665
882         * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
883         identify destructors.
884         (cp_parser_nested_name_specifier_opt): Remove invalid
885         optimization.
886         (cp_parser_template_id): Refine heuristic for determining whether
887         we are entering a scope.
889         PR c++/27648
890         * parser.c (cp_parser_declarator): Robustify.
892         PR c++/26559
893         * pt.c (tsubst_expr): Use finish_omp_atomic.
894         (value_dependent_expression_p): All CALL_EXPRs are dependent.
895         * semantics.c (finish_omp_atomic): Rework to use standard
896         paradigms for handling non-dependent expressions.
898 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
900         * typeck.c (build_modify_expr): Tidy diagnostic message.
902 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
904         PR c++/28018
905         * typeck.c (build_modify_expr): Disallow array assignment.
907 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
909         * cp-tree.def: Fix typo.
911 2006-06-13  Mark Mitchell  <mark@codesourcery.com>
913         PR c++/27227
914         * decl.c (decls_match): Allow an extern "C" variable declarations
915         from different namespaces to match.
916         (duplicate_decls): Disallow redeclaring a variable with a
917         different linkage specification.
919 2006-06-13  Jakub Jelinek  <jakub@redhat.com>
921         PR middle-end/27793
922         * cp-tree.h (cxx_int_tree_map): New struct.
923         (struct language_function): Add extern_decl_map field.
924         * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
925         to cp_function_chain->extern_decl_map hash table instead of
926         copying over DECL_UID.
927         * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
928         functions.
929         (cp_genericize_r): Remap DECL_EXTERN local decls using
930         cp_function_chain->extern_decl_map hash table.
931         * decl.c (finish_function): Clear extern_decl_map.
933 2006-06-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
935         PR c++/27601
936         * semantics.c (finish_offsetof): Handle pseudo-destructors.
938         PR c++/27933
939         * name-lookup.c (lookup_qualified_name): Always return error_mark_node
940         if lookup fails.
942         PR c++/27951
943         * decl2.c (finish_anon_union): Return early if build_anon_union_vars
944         fails.
946 2006-06-12  Roger Sayle  <roger@eyesopen.com>
948         PR c++/21210
949         * typeck2.c (build_functional_cast): Use cp_convert to construct
950         non-aggregate initializers instead of the user-level build_c_cast.
952 2006-06-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
954         PR c++/27601
955         * cp-tree.h (finish_offsetof): Add prototype.
956         * semantics.c (finish_offsetof): New function.
957         * parser.c (cp_parser_builtin_offsetof): Call it instead of
958         fold_offsetof.
959         * pt.c (tsubst_copy_and_build): Likewise.
961 2006-06-06  Mark Mitchell  <mark@codesourcery.com>
963         PR c++/27177
964         * call.c (standard_conversion): Require that the derived type be
965         complete when performing a derived-to-base conversion.
967 2006-06-04  Mark Mitchell  <mark@codesourcery.com>
969         PR c++/27819
970         * decl.c (cp_finish_decl): Process initializers for static data
971         members with non-dependent initializers, even in templates.
973         PR c++/27722
974         * decl.c (maybe_deduce_size_from_array_init): If the declaration
975         is erroneous, give it an erroneous type.
976         (layout_var_decl): If the type is erroneous, give up.
977         (check_initializer): Likewise.
979         PR c++/27807
980         * cp-tree.h (TYPE_OBJ_P): New macro.
981         (TYPE_PTROB_P): Use it.
982         (TYPE_REF_OBJ_P): Likewise.
983         * semantics.c (finish_compound_literal): Do not permit compound
984         literals of non-object types.
986         PR c++/27806
987         * typeck.c (original_type): Robustify.
989 2006-06-05  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
991         PR c++/27804
992         * init.c (constant_value_1): Return decl instead of error_mark_node
993         for invalid initializers.
995 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
997         PR c++/27592
998         * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
999         on operand of the COND_EXPR for the null pointer check.
1001 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
1003         PR c++/26740
1004         * typeck.c (build_unary_op): Mark the function as being used.
1006 2006-06-01  Alexandre Oliva  <aoliva@redhat.com>
1008         PR c++/26660
1009         * parser.c (cp_parser_initial_pragma): Read one more token for
1010         caller after reading PCH file in.
1012 2006-05-31  Mark Mitchell  <mark@codesourcery.com>
1014         PR c++/27801
1015         * call.c (perform_implicit_conversion): Do not actually perform
1016         conversions in templates.
1018         PR c++/26496
1019         * call.c (resolve_args): Check for invalid uses of bound
1020         non-static member functions.
1021         * init.c (build_offset_ref): Return error_mark_node for errors.
1023         PR c++/27385
1024         * decl.c (reshape_init): Robustify.
1025         (reshape_init_array_1): Likewise.
1027 2006-05-30  Mark Mitchell  <mark@codesourcery.com>
1029         PR c++/27808
1030         * parser.c (cp_parser_decl_specifier_seq): Issue errors about
1031         "friend" specifiers that do not appear in class scopes.
1033         PR c++/27803
1034         * class.c (check_bitfield_decl): Ensure that all bitfields have
1035         integral type.
1037 2006-05-29  Kazu Hirata  <kazu@codesourcery.com>
1039         * pt.c (convert_nontype_argument): Fix a typo in an error
1040         message.
1042 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
1044         * decl.c, decl2.c, parser.c: Fix comment typos.  Follow
1045         spelling conventions.
1047 2006-05-24  Mark Mitchell  <mark@codesourcery.com>
1049         PR c++/20103
1050         * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
1051         error_mark_node to indicate an initialization is OK.
1052         (start_decl): Likewise.  Adjust call to start_decl_1.
1053         (start_decl_1): Add initialized parameter.  Simplify.
1054         * except.c (initialize_handler_parm): Adjust call to
1055         setart_decl_1.
1056         (expand_start_catch_block): Let cp_finish_decl initialize catch
1057         parameters.
1058         * cp-tree.h (start_decl_1): Adjust prototype.
1059         * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
1060         (instantiate_decl): Let cp_finish_decl handle initialization.
1061         * semantics.c (finish_compound_literal): Create a temporary
1062         variable for the literal.
1063         * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
1064         cases.
1065         * decl2.c (finish_static_data_member_decl): Don't set
1066         DECL_INITIAL.
1067         (grokfield): Do not try to initialize functions.
1069 2006-05-23  Mark Mitchell  <mark@codesourcery.com>
1071         PR c++/20173
1072         * pt.c (determine_specialization): Disallow partial
1073         specializations of templates.
1075 2006-05-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1077         PR c++/27716
1078         * typeck.c (build_modify_expr): Test arguments for error_operand_p.
1080         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
1082 2006-05-21  Mark Mitchell  <mark@codesourcery.com>
1084         PR c++/27210
1085         * cp-tree.h (cp_save_expr): New function.
1086         * init.c (build_new): Correct logic for zero-element array
1087         warning.  Use cp_save_expr.
1088         * tree.c (cp_save_expr): New function.
1090 2006-05-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1092         PR c++/27398
1093         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
1094         or void_type_node.
1096 2006-05-19  Mike Stump  <mrs@apple.com>
1098         * typeck.c (default_conversion): Remove static.
1100 2006-05-19  Mark Mitchell  <mark@codesourcery.com>
1102         PR c++/26433
1103         * cp-tree.h (begin_function_try_block): Change prototype.
1104         (finish_function_handler_sequence): Likewise.
1105         * parser.c (cp_parser_function_try_block): Adjust calls.
1106         * pt.c (tsubst_expr): Adjust calls.
1107         * semantics.c (begin_function_try_block): Create an artificial
1108         outer scope.
1109         (finish_function_handler_sequence): Close it.
1111 2006-05-18  Mark Mitchell  <mark@codesourcery.com>
1113         PR c++/27471
1114         PR c++/27506
1115         * typeck.c (decay_conversion): Convert bitfields to their declared
1116         types here.  Improve documentation.  Avoid use of cp_convert.
1117         (default_conversion): Make it static.  Perform integral promotions
1118         before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
1119         conversions.
1120         * init.c (build_init): Remove.
1121         (expand_default_init): Do not call rvalue.
1122         * call.c (null_ptr_cst_p): Robustify.
1123         (build_conditional_expr): Tidy.
1124         * except.c (build_throw): Do not perform lvalue-to-rvalue
1125         conversion on operand before initializing temporary.
1126         * tree.c (convert.h): Include it.
1127         (convert_bitfield_to_declared_type): Use convert_to_integer, not
1128         cp_convert.
1129         (rvalue): Don't convert bitfields to their declared type here.
1130         * cp-tree.h (build_init): Remove.
1131         (default_conversion): Likewise.
1132         * typeck2.c (build_m_component_ref): Do not perform
1133         lvalue-to-rvalue, function-to-pointer, or array-to-pointer
1134         conversions here.  Correct error message.
1136 2006-05-17  Mark Mitchell  <mark@codesourcery.com>
1138         PR c++/26122
1139         * decl2.c (check_member_template): Remove checks for virtual
1140         functions.
1141         * parser.c (cp_parser_function_specifier_opt): Complain about
1142         virtual templates.
1143         (cp_parser_pure_specifier): Likewise.
1145         PR c++/26068
1146         * parser.c (cp_parser_set_storage_class): Check for
1147         invalid uses of storage classes on unbraced linkage
1148         specifications.
1149         (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
1150         to cp_parser_set_storage_class.
1152 2006-05-17  Jakub Jelinek  <jakub@redhat.com>
1154         PR c++/27491
1155         * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
1156         on CONSTRUCTORs.
1158         PR middle-end/27415
1159         * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1160         on combined parallel workshare constructs.
1161         * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
1163 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1165         PR driver/26885
1166         * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
1168 2006-05-15  Mark Mitchell  <mark@codesourcery.com>
1170         PR c++/27339
1171         * cp-tree.h (perform_access_checks): New function.
1172         * semantics.c (perform_access_checks): New function.
1173         (perform_deferred_access_checks): Use it.
1174         * parser.c (cp_parser_simple_declaration): Adjust call to
1175         cp_parser_init_declarator.
1176         (cp_parser_type_parameter): Do not defer checks in default
1177         arguments.
1178         (cp_parser_explicit_specialization): Adjust call to
1179         cp_parser_single_declaration.
1180         (cp_parser_init_declarator): Perform template-parameter access
1181         checks.
1182         (cp_parser_parameter_declaration): Do not defer checks for
1183         template parameter default arguments.
1184         (cp_parser_template_declaration_after_export): Gather access
1185         checks for template parameters, and pass them to
1186         cp_parser_single_declaration.
1187         (cp_parser_template_parameter_access_checks): New function.
1188         (cp_parser_single_declaration): Add checks parameter.
1190         PR c++/27505
1191         * call.c (convert_like_real): Convert bitfields to their declared
1192         types when forming an rvalue.
1193         * tree.c (convert_bitfield_to_declared_type): New function.
1194         (rvalue): Use it.
1195         * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
1197 2006-05-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1199         PR c++/27582
1200         * pt.c (any_dependent_template_arguments_p): Return early on invalid
1201         argument list.
1203         PR c++/27581
1204         * search.c (adjust_result_of_qualified_name_lookup): Skip on
1205         invalid context_class.
1207         PR c++/27315
1208         * pt.c (do_decl_instantiation): Return early on invalid decl.
1210         PR c++/27559
1211         * pt.c (push_template_decl_real): Return error_mark_node instead
1212         of broken decl.
1214         PR c++/27496
1215         * pt.c (tsubst_friend_class): Return early on invalid friend
1216         declarations.
1218 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1220         * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
1221         (cp/decl2.o): Likewise.
1222         (cp/typeck.o): Likewise.
1223         (cp/cvt.o): Likewise.
1224         (cp/parser.o): Likewise.
1225         (cp/call.o): Replace target.h with $(TARGET_H).
1227 2006-05-14  Alexandre Oliva  <aoliva@redhat.com>
1229         * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
1230         COMPONENT_REF alone.
1232 2006-05-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1234         PR c++/27547
1235         * decl.c (copy_fn_p): Return early on non-member functions.
1237 2006-05-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1239         PR c++/27447
1240         * decl2.c (build_memfn_type): Skip invalid functions and class types.
1242 2006-05-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1244         PR c++/27427
1245         * pt.c (convert_nontype_argument): Return early on invalid arguments.
1247         * pt.c (process_template_parm): Remove superfluous temporary.
1249         PR c++/27430
1250         * pt.c (process_template_parm): Handle erroneous non-type parameters.
1252         PR c++/27423
1253         * typeck.c (convert_for_initialization): Skip erroneous types.
1255         PR c++/27422
1256         * typeck.c (convert_arguments): Return early on args with
1257         invalid types.
1259 2006-05-03  Aldy Hernandez  <aldyh@redhat.com>
1261         PR/21391
1262         * typeck.c (build_static_cast_1): Save casted types in used types
1263         hash table.
1264         (build_reinterpret_cast_1): Same.
1265         * rtti.c (build_dynamic_cast_1): Same.
1267 2006-05-04  Jakub Jelinek  <jakub@redhat.com>
1269         PR c++/27359
1270         * parser.c (cp_parser_omp_for_loop): Only call
1271         cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
1272         called.
1274 2006-05-02  Mark Mitchell  <mark@codesourcery.com>
1276         PR c++/27102
1277         * decl.c (grokdeclarator): Robustify checks for defining members
1278         of incomplete types.
1280         PR c++/27309
1281         * class.c (add_method): Call grok_special_member_properties.
1282         * decl.c (grokdeclarator): Don't call it here.
1283         (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
1284         assignment operator.  Set TYPE_HAS_CONSTURCTOR if DECL is a
1285         constructor.
1286         (start_method): Don't call grok_special_member_properties.
1287         * method.c (implicitly_declare_fn): Likewise.
1288         * pt.c (instantiate_class_template): Likewise.
1289         * decl2.c (grokfield): Likewise.
1291 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
1293         PR middle-end/27337
1294         * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
1295         * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
1296         * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
1298 2006-04-30  Mark Mitchell  <mark@codesourcery.com>
1300         PR c++/27094
1301         * pt.c (tsubst_default_argument): Increment function_depth around
1302         call to tsubst_expr.
1303         * parser.c (cp_parser_parameter_declaration): Likewise.
1304         * decl2.c (mark_used): Tidy.
1306 2006-04-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1308         PR c++/27278
1309         * decl.c (grok_op_properties): Skip operators with invalid args
1310         when checking for class-type or enum-type args.
1312 2006-04-29  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1314         PR c++/27279
1315         * decl.c (copy_fn_p): Skip functions with invalid first arg.
1317 2006-04-27  Mark Mitchell  <mark@codesourcery.com>
1319         PR c++/27292
1320         * tree.c (rvalue): Convert bitfields to their declared types.
1322         PR c++/27102
1323         * typeck2.c (cxx_incomplete_type_diagnostic): Handle
1324         TYPENAME_TYPE.
1326 2006-04-24  Mark Mitchell  <mark@codesourcery.com>
1328         PR c++/27292
1329         * typeck.c (decay_conversion): Don't adjust bitfield types.
1330         (perform_integral_promotions): Treat bitfield enums as enums, not
1331         as short integer types.
1332         * tree.c (rvalue): Convert bitfields to their correct types.
1334 2006-04-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1336         PR c++/19963
1337         * class.c (layout_class_type): Skip fields with invalid types.
1339 2006-04-23  Mark Mitchell  <mark@codesourcery.com>
1341         PR c++/26912
1342         * cp-tree.h (build_this_parm): Declare.
1343         (grok_method_quals): Remove.
1344         (build_memfn_type): Declare.
1345         (build_artificial_parm): Declare.
1346         (do_friend): Remove quals parameter.
1347         * decl.c (build_this_parm): New function.
1348         (grokfndecl): Use it.  Do not pass quals to grokclassfn.
1349         (grokdeclarator): Rename quals to memfn_quals.  Avoid allocating
1350         unnecessary TYPE_DECLs.  Correct qualification of member function
1351         types.  Tidy.
1352         * method.c (implicitly_declare_fn): Use build_this_parm.
1353         * friend.c (do_friend): Remove quals parameter.
1354         * decl2.c (grok_method_quals): Remove.
1355         (build_memfn_type): New function.
1356         (build_artificial_parm): Give it external linkage.
1357         (grokclassfn): Remove quals parameter.  Do not build "this"
1358         PARM_DECL here.
1360         PR c++/26534
1361         * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
1362         * typeck.c (is_bitfield_expr_with_lowered_type): New function.
1363         (decay_conversion): Convert bitfield expressions to the correct
1364         type.
1365         (build_modify_expr): Remove spurious conversions.
1366         * class.c (layout_class_type): Modify the type of bitfields to
1367         indicate a limited range.
1368         * call.c (standard_conversion): Adjust the type of bitfield
1369         expressions used in an rvalue context.
1370         (build_conditional_expr): Likewise.
1372 2006-04-22  Kazu Hirata  <kazu@codesourcery.com>
1374         * decl.c: Fix comment typos.
1376 2006-04-21  Eric Christopher  <echristo@apple.com>
1378         * decl.c: Fix typo in function name.
1380 2006-04-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1382         PR c++/26558
1383         * parser.c (cp_parser_class_name): Check for invalid typenames.
1384         Rearrange code.
1386         PR c++/26739
1387         * pt.c (tsubst_friend_function): Return early if
1388         pushdecl_namespace_level fails.
1390         PR c++/26036
1391         * typeck.c (convert_arguments): Return error_mark_node instead of
1392         error_mark_list.
1393         * cp-tree.h (error_mark_list): Remove declaration.
1394         * decl.c (error_mark_list): Remove definition.
1395         (cxx_init_decl_processing): Do not initialize error_mark_list.
1397         PR c++/10385
1398         * rtti.c (build_dynamic_cast_1): Check for invalid conversions
1399         before calling convert_to_reference.
1400         * cvt.c (convert_to_reference): Assert that reftype is a
1401         REFERENCE_TYPE.
1403 2006-04-19  Mark Mitchell  <mark@codesourcery.com>
1405         PR c++/27102
1406         * class.c (currently_open_class): Tidy.
1407         * decl.c (grokdeclarator): If we encounter an erroneous
1408         declarator, assume that we have already issued an error message
1409         and return.  Return error_mark_node instead of NULL_TREE in more
1410         places.  Issue errors about function definitions that do not have
1411         a function declarator.  Check for complete types for all function
1412         definitions.
1413         * cp-tree.h (cp_error_declarator): Remove.
1414         (currently_open_class): Change return type.
1415         * parser.c (cp_parser_id_expression): Add optional_p parameter.
1416         (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
1417         (cp_parser_id_expression): Likewise.
1418         (cp_parser_unqualified_id): If the name is optional, return
1419         NULL_TREE.
1420         (cp_parser_postfix_dot_deref_expression): Adjust calls.
1421         (cp_parser_type_parameter): Likewise.
1422         (cp_parser_unqualified_id): Likewise.
1423         (cp_parser_direct_declarator): Likewise.
1424         (cp_parser_declarator_id): Add optional_p parameter.
1425         (cp_parser_function_definition_from_specifiers_and_declarator):
1426         Assume that start_function indicates failure only if it has issued
1427         an error.
1428         (cp_parser_omp_var_list_no_open): Adjust calls.
1430 2006-04-17  Janis Johnson  <janis187@us.ibm.com>
1432         PR c++/26114, c++/26115
1433         * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
1434         * class.c (check_field_decls): Ditto.
1436 2006-04-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1438         * init.c (build_offset_ref): Remove superfluous temporary.
1440 2006-04-16  Mark Mitchell  <mark@codesourcery.com>
1442         PR c++/26365
1443         * typeck.c (finish_class_member_access_expr): Robustify
1445 2006-04-15  Kazu Hirata  <kazu@codesourcery.com>
1447         * Make-lang.in (cp/pt.o): Depend on vecprim.h.
1448         * pt.c: Include vecprim.h.
1449         (inline_parm_levels): Change the type to VEC(int,heap) *.
1450         (inline_parm_levels_used): Remove.
1451         (maybe_begin_member_template_processing,
1452         maybe_end_member_template_processing): Use VEC instead of
1453         VARRAY.
1455         * cp/call.c: Fix comment typos.
1457 2006-04-12  Mark Mitchell  <mark@codesourcery.com>
1459         * parser.c (cp_parser_init_declarator): Initialize local variables
1460         aggressively.
1462 2006-04-12  Roger Sayle  <roger@eyesopen.com>
1464         * parser.c (cp_parser_init_declarator): Initialise
1465         is_parenthesized_init to false to avoid compiler warning.
1467 2006-04-11  Mark Mitchell  <mark@codesourcery.com>
1469         * cp-tree.h (build_operator_new_call): Adjust prototype.
1470         (build_new_method_call): Likewise.
1471         (build_op_delete_call): Likewise.
1472         * init.c (build_raw_new_expr): New function.
1473         (build_new_1): Pass information as parameters, rather than
1474         bundling it into a NEW_EXPR.
1475         (build_new): Adjust accordingly.
1476         (build_vec_delete_1): Adjust for changes to build_op_delete_call.
1477         (build_delete): Likewise.
1478         * decl.c (finish_destructor_body): Likewise.
1479         * call.c (build_operator_new_call): Return the allocation function
1480         used.
1481         (build_op_delete_call): Take allocation function as parameter.
1482         (build_special_member_call): Adjust call to build_new_method_call.
1483         (build_new_method_call): Return function called.
1484         * pt.c (tsubst_copy_and_build): Adjust call to
1485         build_new_method_call.
1486         * semantics.c (finish_call_expr): Likewise.
1487         * parser.c (cp_parser_postfix_expression): Likewise.
1488         * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
1489         "incomplete", not "undefined", types.
1491         PR c++/26295
1492         * decl.c (grokdeclarator): Remove namespace-handling code for
1493         pointers-to-members.
1494         * parser.c (cp_parser_ptr_operator): Check for qualified names
1495         using namespaces.
1497         PR c++/26122
1498         * parser.c (cp_parser_init_declarator): Adjust logic for deciding
1499         whether or not to look for a pure-specifier.
1500         (cp_parser_member_declaration): Likewise.
1502 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1504         * decl2.c, pt.c, semantics.c: Fix comment typos.
1506 2006-04-06  Roger Sayle  <roger@eyesopen.com>
1508         * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
1510 2006-04-05  Jason Merrill  <jason@redhat.com>
1512         * name-lookup.c (push_namespace_with_attribs): Temporarily disable
1513         default hidden visibility for anonymous namespace.
1515 2006-03-29  Roger Sayle  <roger@eyesopen.com>
1517         PR c++/22494
1518         * init.c (build_vec_delete_1): Convert BASE pointer's type to
1519         the base pointer type to avoid a type mismatch in the EQ_EXPR.
1521 2006-03-24  Carlos O'Donell  <carlos@codesourcery.com>
1523         * search.c (maybe_suppress_debug_info): If
1524         flag_emit_class_debug_always then don't suppress.
1526 2006-03-22  Jason Merrill  <jason@redhat.com>
1528         * name-lookup.c (push_namespace_with_attribs): Only apply hidden
1529         visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
1531 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
1533         PR c++/26691
1534         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
1536 2006-03-21  Jason Merrill  <jason@redhat.com>
1538         PR c++/21581
1539         * parser.c (cp_parser_declaration): Support attributes on
1540         anonymous namespaces.
1541         * name-lookup.c (push_namespace_with_attribs): Anonymous
1542         namespaces default to hidden visibility.
1544 2006-03-20  Jason Merrill  <jason@redhat.com>
1546         PR c++/21764, c++/19238
1547         * decl.c (cp_finish_decl): Call determine_visibility later.
1548         (start_preparsed_function): Likewise.
1549         * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
1550         (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
1551         * name-lookup.h (struct cp_binding_level): Add has_visibility
1552         bitfield.
1553         * name-lookup.c: Include c-pragma.h.
1554         (push_namespace_with_attribs): Split out from push_namespace.
1555         Push visibility if appropriate.  Set TREE_PUBLIC on namespaces.
1556         (leave_scope): Pop visibility if appropriate.
1557         * decl2.c (determine_visibility_from_class): Split out from...
1558         (determine_visibility): ...here.  Handle function scope and
1559         nested classes.
1560         (import_export_decl): Move visibility handling to
1561         determine_visibility_from_class.
1562         * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
1563         attributes on namespace declarations.
1565 2006-03-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1567         PR c++/6634
1568         * decl.c (grokdeclarator): Do not accept long long double.
1569         Reorganize checks for invalid (combinations of) type modifiers.
1570         Quote modifiers in messages.
1572 2006-03-09  Jason Merrill  <jason@redhat.com>
1574         PR c++/16387, c++/16389
1575         * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
1576         (cxx_sizeof_or_alignof_expr): Split out from here.
1578 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
1580         Merge from gomp-20050608-branch
1582         2006-02-02  Diego Novillo  <dnovillo@redhat.com>
1584                 * decl.c (pop_labels_1): Use appropriate pointer casting.
1585                 (poplevel_named_label_1): Likewise.
1586                 (named_label_entry_hash): Likewise.
1587                 (named_label_entry_eq): Likewise.
1588                 (check_goto): Likewise.
1589                 (define_label): Likewise.
1591         2006-01-26  Diego Novillo  <dnovillo@redhat.com>
1593                 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
1594                 of TREE_BLOCK.
1595                 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
1596                 instead of TREE_CODE/TREE_OPERAND.
1597                 * semantics.c: Likewise.
1598                 * parser.c: Likewise.
1600         2005-11-10  Diego Novillo  <dnovillo@redhat.com>
1602                 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
1603                 target does not support TLS.
1605         2005-11-09  Jakub Jelinek  <jakub@redhat.com>
1607                 * decl.c (redeclaration_error_message): Don't error about
1608                 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
1609                 (olddecl).
1611         2005-11-08  Jakub Jelinek  <jakub@redhat.com>
1613                 PR c++/24735
1614                 * semantics.c (finish_omp_barrier, finish_omp_flush): New
1615                   functions.
1616                 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
1617                 (cp_parser_omp_flush): Call finish_omp_flush.
1618                 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
1619                   prototypes.
1621                 PR c++/24734
1622                 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
1624         2005-11-03  Jakub Jelinek  <jakub@redhat.com>
1626                 * semantics.c (finish_omp_threadprivate): Error on class-scope
1627                 variables.
1629         2005-11-02  Jakub Jelinek  <jakub@redhat.com>
1631                 * parser.c (cp_parser_omp_all_clauses): If some clause
1632                 type is not allowed, don't remove just one of the
1633                 clauses, but all clauses added in that loop round.
1635                 * semantics.c (finish_omp_clauses): Fix function
1636                 comment. Don't handle non-const or mutable specially,
1637                 as const and not mutable is predetermined shared and
1638                 that leads to double error. Don't ICE if copyin var is
1639                 PARM_DECL.
1641                 PR c++/24613
1642                 * parser.c (cp_parser_pragma): Diagnose
1643                 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
1644                 construct.
1646                 * semantics.c (finish_omp_threadprivate): Error if V
1647                   is automatic variable or has incomplete type.
1649         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
1651                 * parser.c (cp_parser_omp_all_clauses): Use
1652                 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
1654         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
1656                 * parser.c (cp_parser_omp_all_clauses): When emitting an
1657                 error message, remove the invalid clause from the list.
1659         2005-10-31  Diego Novillo  <dnovillo@redhat.com>
1661                 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
1662                 combined parallel+workshare directives.
1664         2005-10-31  Richard Henderson  <rth@redhat.com>
1666                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
1667                 Use cxx_omp_clause_dtor.
1668                 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
1669                 (cxx_omp_clause_dtor): New.
1670                 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
1671                 (cxx_omp_clause_default_ctor): Use it.
1672                 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
1673                 Likewise.
1674                 (cxx_omp_clause_dtor): New.
1675                 * semantics.c (finish_omp_clauses): Rewrite cdtor
1676                 checking to fill in CP_OMP_CLAUSE_INFO.  Don't
1677                 specialcase LASTPRIVATE for removal.
1678                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1679                 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
1681         2005-10-28  Jakub Jelinek  <jakub@redhat.com>
1683                 * semantics.c (finish_omp_threadprivate): If
1684                   DECL_RTL_SET_P, call make_decl_rtl again so that
1685                   encode_section_info can update SYMBOL_REF's flags.
1687         2005-10-26  Jakub Jelinek  <jakub@redhat.com>
1689                 * semantics.c (finish_omp_for): Don't segfault if COND
1690                 or INCR is NULL.  If not calling c_finish_omp_for
1691                 right away and one of COND and INCR is NULL, issue
1692                 error and don't expand anything.
1694                 PR c++/24512
1695                 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
1696                 * semantics.c (finish_omp_for): Likewise.  Set
1697                 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
1698                 into the current statement list if not processing
1699                 template decl or pass it to c_finish_omp_for.
1701                 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
1702                 into PRE_BODY statement list.  Pass it to finish_omp_for.
1703                 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
1704                 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
1705                 finish_omp_for.  Put all the statements into sk_omp
1706                 scope.
1708         2005-10-25  Jakub Jelinek  <jakub@redhat.com>
1710                 PR c++/24516
1711                 * parser.c (struct cp_parser): Rename in_iteration_statement
1712                 field to in_statement.
1713                 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1714                 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
1715                 (cp_parser_new, cp_parser_begin_omp_structured_block,
1716                 cp_parser_end_omp_structured_block,
1717                 cp_parser_omp_for_loop): Adjust for
1718                 in_iteration_statement renaming.
1719                 (cp_parser_selection_statement): Save
1720                 parser->in_iteration, or it temporarily with
1721                 IN_SWITCH_STMT for the
1722                 cp_parser_implicitly_scoped_statement call.
1723                 (cp_parser_iteration_statement): Adjust for
1724                 in_iteration_statement renaming.  Use
1725                 IN_ITERATION_STMT rather than true.
1726                 (cp_parser_jump_statement): Adjust for
1727                 in_iteration_statement renaming and new values.  Don't
1728                 error on break in a switch statement within OMP_FOR or
1729                 OpenMP structured block.
1731                 PR c++/24513
1732                 * parser.c (cp_parser_cache_group): Don't stop if next
1733                 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
1734                 well.  If current token is CPP_PRAGMA, consume
1735                 everything until CPP_PRAGMA_EOL inclusive.
1737         2005-10-24  Jakub Jelinek  <jakub@redhat.com>
1739                 PR c++/24502
1740                 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
1741                 addition to MODIFY_EXPR.
1743         2005-10-23  Richard Henderson  <rth@redhat.com>
1745                 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
1746                 (bc_label): New.
1747                 (begin_bc_block, finish_bc_block): Use it.
1748                 (push_context, pop_context): Remove.
1749                 (cp_genericize): Don't use them.  Assert bc_label is null.
1750                 * semantics.c (finish_omp_clauses): Create a fake data
1751                 element of TYPE for probing ctors.
1753         2005-10-23  Richard Henderson  <rth@redhat.com>
1755                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
1756                 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
1757                 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
1758                 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
1759                 * semantics.c (finish_omp_clauses): Look through
1760                 arrays when looking up special member calls.  Also
1761                 remove FIRSTPRIVATE when LASTPRIVATE fails.
1762                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
1763                 (cxx_omp_clause_assign_op): New.
1764                 * cp-tree.h: Declare them.
1766         2005-10-21  Richard Henderson  <rth@redhat.com>
1768                 * decl.c (check_previous_goto_1): Return false if error.
1769                 (check_switch_goto): Likewise.
1770                 (finish_case_label): Don't emit the case label on error.
1771                 * parser.c (struct cp_parser): Revert
1772                 in_switch_statement_p changes.
1773                 (cp_parser_labeled_statement,
1774                 cp_parser_selection_statement): Likewise.
1775                 (cp_parser_begin_omp_structured_block): Don't save...
1776                 (cp_parser_end_omp_structured_block): or restore
1777                 in_switch_statement_p.
1779         2005-10-21  Richard Henderson  <rth@redhat.com>
1781                 * semantics.c (finish_omp_threadprivate): Set
1782                 decl_flags.u2sel when necessary.
1784         2005-10-21  Richard Henderson  <rth@redhat.com>
1786                 * decl.c (poplevel_named_label_1): Restore creation of the
1787                 bad_decls list.
1788                 (decl_jump_unsafe): Check for error_mark_node types.
1789                 (check_goto): Don't check cdtor_label.  Don't use identify_goto.
1790                 * semantics.c (finish_return_stmt): Do check_omp_return before
1791                 converting to cdtor_label goto.
1793         2005-10-21  Richard Henderson  <rth@redhat.com>
1795                 PR c++/24451
1796                 * decl.c (check_omp_return): Return false on error.
1797                 * cp-tree.h (check_omp_return): Update decl.
1798                 * semantics.c (finish_return_stmt): Avoid adding
1799                 return on error.
1801         2005-10-21  Richard Henderson  <rth@redhat.com>
1803                 * cp-tree.h (struct language_function): Remove
1804                 x_named_label_uses.
1805                 Change x_named_labels to a hashtable.
1806                 (check_omp_return): Declare.
1807                 * decl.c (struct named_label_use_entry): Rename from
1808                 named_label_use_list.  Remove label_decl.
1809                 (struct named_label_entry): Rename from
1810                 named_label_list.  Remove old_value and next.  Change
1811                 in_try_scope and in_catch_scope to bool. Add
1812                 in_omp_scope.
1813                 (pop_labels_1): New.
1814                 (pop_labels): Use it.
1815                 (pop_local_label, poplevel_named_label_1): New.
1816                 (poplevel): Use them.
1817                 (named_label_entry_hash, named_label_entry_eq): New.
1818                 (make_label_decl): Create named_labels.  Move label
1819                 creation bits from lookup_label.
1820                 (declare_local_label): Tidy.
1821                 (identify_goto): Split out from ...
1822                 (check_previous_goto_1): Add exited_omp argument.
1823                 Handle omp scopes.
1825                 (use_label): Merge into...
1826                 (check_goto): ... here.  Handle omp scopes.
1827                 (check_omp_return): New.
1828                 (check_previous_gotos): Merge into...
1829                 (define_label): ... here.
1830                 (save_function_data): Remove x_named_label_uses reference.
1831                 (finish_function): Likewise.
1832                 * name-lookup.h (sk_omp): New.
1833                 * name-lookup.c (begin_scope): Handle it.
1834                 * parser.c (cp_parser_omp_for): Don't create extra
1835                 compound stmt.
1837                 (cp_parser_omp_sections): Likewise.
1838                 * semantics.c (finish_return_stmt): Call check_omp_return.
1839                 (begin_omp_structured_block): Use sk_omp.
1840                 (finish_omp_structured_block): Use do_poplevel.  Don't build a
1841                 MUST_NOT_THROW expression here.
1842                 (begin_omp_parallel, finish_omp_parallel): Don't create extra
1843                 compound statements.
1845         2005-10-21  Diego Novillo  <dnovillo@redhat.com>
1847                 PR 24455
1848                 * cp/cp-tree.h (struct lang_decl_flags): Add field
1849                 threadprivate_p.
1850                 (CP_DECL_IS_THREADPRIVATE): Define.
1851                 * cp/semantics.c (finish_omp_threadprivate): Set.  Do
1852                 not error out if CP_DECL_IS_THREADPRIVATE is set
1853                 already.
1854                 * cp/decl.c (duplicate_decls): Merge
1855                 CP_DECL_THREADPRIVATE_P.
1857         2005-10-20  Richard Henderson  <rth@redhat.com>
1859                 * cp-gimplify.c (cp_gimplify_omp_for): New.
1860                 (cp_gimplify_expr): Call it.
1861                 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
1862                 * parser.c (struct cp_parser): Rename
1863                 in_iteration_statement_p to in_iteration_statement and
1864                 change to unsigned char.  Similarly with
1865                 in_switch_statement.  Update all users.
1866                 (IN_OMP_BLOCK, IN_OMP_FOR): New.
1867                 (cp_parser_labeled_statement): Diagnose case labels
1868                 binding closer to an openmp block nested than the
1869                 switch.
1870                 (cp_parser_jump_statement): Diagnose break and
1871                 continue labels binding closer to an openmp block than
1872                 an iteration or switch.
1873                 (cp_parser_omp_for_loop): Mark in_iteration_statement
1874                 for an omp for.
1875                 (cp_parser_begin_omp_structured_block): New.
1876                 (cp_parser_end_omp_structured_block): New.
1877                 (cp_parser_omp_structured_block): Use them.
1878                 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
1879                 (cp_parser_omp_parallel): Likewise.
1881         2005-10-20  Richard Henderson  <rth@redhat.com>
1883                 * semantics.c (begin_omp_structured_block): New.
1884                 (finish_omp_structured_block): New.
1885                 (begin_omp_parallel, finish_omp_parallel): Use them.
1886                 * parser.c (cp_parser_omp_structured_block): Likewise.
1887                 (cp_parser_omp_for): Likewise.
1888                 (cp_parser_omp_sections_scope): Likewise.
1889                 * cp-tree.h: Declare them.
1891         2005-10-20  Richard Henderson  <rth@redhat.com>
1893                 * parser.c (cp_parser_omp_master): Return the statement.
1894                 (cp_parser_omp_ordered): Likewise.
1895                 (cp_parser_omp_construct): Set the locus for them.
1897         2005-10-19  Richard Henderson  <rth@redhat.com>
1899                 * semantics.c (finish_omp_atomic): Revert to
1900                 uses_template_parms.
1902         2005-10-19  Richard Henderson  <rth@redhat.com>
1904                 * semantics.c (finish_omp_clauses): Avoid
1905                 DECL_THREAD_LOCAL_P on a PARM_DECL.  Remove some
1906                 stub asserts guaranteed to fail.
1908         2005-10-19  Richard Henderson  <rth@redhat.com>
1910                 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
1911                 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
1912                 * parser.c (cp_parser_omp_clause_copyin): Remove.
1913                 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
1914                 Call finish_omp_clauses.
1915                 (cp_parser_omp_clause_if): Don't do error checking here.
1916                 (cp_parser_omp_clause_num_threads): Likewise.
1917                 (cp_parser_omp_clause_schedule): Likewise.
1918                 (cp_parser_omp_atomic): Use finish_omp_atomic.
1919                 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
1920                 Don't decompose assignment statment here.  Use
1921                 finish_omp_for.
1923                 * pt.c (tsubst_omp_clauses): New.
1924                 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
1925                 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
1926                 * semantics.c (finish_omp_clauses): New.
1927                 (begin_omp_parallel, finish_omp_parallel): Know Less about the
1928                 internals of the stmt_list stack.
1929                 (finish_omp_for, finish_omp_atomic): New.
1931         2005-10-18  Jakub Jelinek  <jakub@redhat.com>
1933                 * semantics.c (cxx_omp_predetermined_sharing): New function.
1934                 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
1935                 * cp-objcp-common.h
1936                 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
1938         2005-10-18  Richard Henderson  <rth@redhat.com>
1940                 * parser.c (cp_parser_omp_single): Use make_node and accessors
1941                 instead of build.
1943         2005-10-17  Richard Henderson  <rth@redhat.com>
1945                 * parser.c (cp_parser_omp_for_loop): Handle declarations.
1947         2005-10-12  Richard Henderson  <rth@redhat.com>
1949                 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
1950                 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
1951                 (finish_omp_threadprivate): Declare.
1952                 * parser.c (struct cp_lexer): Add in_pragma.
1953                 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
1954                 when in_pragma.
1955                 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
1956                 (cp_parser_skip_to_end_of_statement): Likewise.
1957                 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
1958                 (cp_parser_skip_to_closing_brace): Likewise.
1959                 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
1960                 (cp_parser_require_pragma_eol): New.
1961                 (cp_parser_statement): Add in_compound argument;
1962                 update all callers.
1963                 Restart if a non-statement pragma seen outside a
1964                 compound.
1965                 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
1966                 (cp_parser_declaration_seq_opt): Likewise.
1967                 (cp_parser_member_specification_opt): Likewise.
1968                 (cp_parser_function_definition_after_decl): Likewise.
1969                 (cp_parser_skip_until_found): Likewise.
1970                 (cp_parser_cache_group): Likewise.
1971                 (enum pragma_omp_clause, cp_parser_omp_clause_name,
1972                 check_no_duplicate_clause,
1973                 cp_parser_omp_var_list_no_open,
1974                 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
1975                 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
1976                 cp_parser_omp_clause_nowait,
1977                 cp_parser_omp_clause_num_threads,
1978                 cp_parser_omp_clause_ordered,
1979                 cp_parser_omp_clause_reduction,
1980                 cp_parser_omp_clause_schedule,
1981                 cp_parser_omp_all_clauses,
1982                 cp_parser_omp_structured_block, cp_parser_omp_atomic,
1983                 cp_parser_omp_barrier, cp_parser_omp_critical,
1984                 cp_parser_omp_flush, cp_parser_omp_for_loop,
1985                 cp_parser_omp_for, cp_parser_omp_master,
1986                 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
1987                 cp_parser_omp_sections, cp_parser_omp_parallel,
1988                 cp_parser_omp_single, cp_parser_omp_threadprivate,
1989                 cp_parser_omp_construct): New.
1990                 (cp_parser_pragma): Handle OpenMP pragmas.
1991                 * semantics.c (finish_omp_threadprivate): New.
1992                 (begin_omp_parallel, finish_omp_parallel): New.
1994         2005-10-11  Richard Henderson  <rth@redhat.com>
1996                 * parser.c (struct cp_token): Add pragma_kind.
1997                 (eof_token): Initialize it.
1998                 (cp_lexer_handle_pragma): Remove.
1999                 (cp_parser_initial_pragma): New.
2000                 (cp_lexer_new_main): Use it.
2001                 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
2002                 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
2003                 (cp_parser_skip_to_pragma_eol): New.
2004                 (cp_parser_error): Use it.
2005                 (pragma_lex): New.
2007         2005-10-09  Richard Henderson  <rth@redhat.com>
2009                 * lex.c (parse_strconst_pragma): Update for c_lex name change.
2010                 (handle_pragma_java_exceptions): Likewise.
2011                 * parser.c (cp_lexer_new_main): Likewise.
2013         2005-10-06  Richard Henderson  <rth@redhat.com>
2015                 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
2016                 (cp_lexer_handle_pragma): Comment out
2017                 cpp_handle_deferred_pragma.
2019         2005-10-01  Richard Henderson  <rth@redhat.com>
2021                 * name-lookup.c (lookup_name): Remove prefer_type argument.
2022                 (lookup_name_prefer_type): New function.
2023                 * name-lookup.h (lookup_name_prefer_type): Declare it.
2024                 * decl.c (lookup_and_check_tag): Use it.
2025                 * pt.c (tsubst_friend_class): Likewise. Update for
2026                 lookup_name change.
2027                 (lookup_template_class, tsubst_copy_and_build): Likewise.
2029 2006-03-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2031         PR c++/15759
2032         * tree.c (bot_manip): Don't call mark_used.
2034 2006-03-02  Mike Stump  <mrs@apple.com>
2036         * decl2.c (import_export_decl): Remove redundant call to
2037         targetm.cxx.key_method_may_be_inline ().
2039 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
2041         * decl.c (start_decl): Use have_global_bss_p when deciding
2042         whether to make the decl common.
2044 2006-03-01  Mike Stump  <mrs@apple.com>
2046         PR darwin/25908
2047         * decl2.c (import_export_decl): Fix ABI breakage on darwin.
2049 2006-02-24  Geoffrey Keating  <geoffk@apple.com>
2051         * except.c (expand_start_catch_block): Handle
2052         flag_use_cxa_get_exception_ptr.
2054 2006-02-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2056         PR c++/26291
2057         * decl.c (grok_op_properties): Check for ellipsis in arguments of
2058         operators.
2060 2006-02-20  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2062         * Make-lang.in (C++): Remove.
2063         (.PHONY): Remove C++.
2065 2006-02-18  Mark Mitchell  <mark@codesourcery.com>
2067         PR c++/26266
2068         * cp-tree.h (cp_finish_decl): Adjust declaration.
2069         (grokbitfield): Likewise.
2070         (finish_static_data_member_decl): Likewise.
2071         * init.c (constant_value_1): Ensure processing_template_decl when
2072         folding non-dependent initializers for static data members of
2073         dependent types.  Return error_mark_node for erroneous
2074         initailizers.
2075         * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
2076         * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
2077         (cp_finish_decl): Add init_const_expr_p parameter.  Set
2078         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2079         (finish_decl): Adjust call to cp_finish_decl.
2080         (compute_array_index_type): Robustify.
2081         (start_method): Use finish_decl, not cp_finish_decl.
2082         * rtti.c (emit_tinfo_decl): Likewise.
2083         * except.c (initialize_handler_parm): Adjust call to
2084         cp_finish_decl.
2085         (expand_start_catch_block): Likewise.
2086         * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
2087         * pt.c (instantiate_class_template): Adjust call to
2088         finish_static_data_member_decl.
2089         (tsubst_expr): Use finish_decl, not cp_finish_decl.
2090         (instantiate_decl): Adjust call to cp_finish_decl.
2091         * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
2092         cp_finish_decl.
2093         * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
2094         parameter.
2095         (grokfield): Likewise.
2096         * parser.c (cp_parser_condition): Check for constant initializers.
2097         (cp_parser_init_declarator): Adjust calls to grokfield and
2098         cp_finish_decl.  Don't set
2099         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2100         (cp_parser_member_declaration): Likewise.
2101         (cp_parser_objc_class_ivars): Likewise.
2103 2006-02-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2105         * call.c (standard_conversion): Return NULL instead of 0.
2106         (build_user_type_conversion_1): Likewise.
2107         (tourney): Likewise.
2108         * decl.c (redeclaration_error_message): Likewise.
2109         * error.c (language_to_string): Likewise.
2111 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2113         * cp-tree.h (warn_hidden): Remove prototype.
2114         * class.c (warn_hidden): Make static.
2116         * cp-tree.h (build_type_conversion): Remove prototype.
2117         * cvt.c (build_type_conversion): Add prototype, make static.
2119         * cp-tree.h (push_tinst_level): Remove prototype.
2120         (pop_tinst_level): Likewise.
2121         * pt.c (push_tinst_level): Add prototype, make static.
2122         (pop_tinst_level): Likewise.
2124 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2126         * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
2127         * typeck.c (unary_complex_lvalue): Likewise.
2129 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2131         * lex.c (parse_strconst_pragma): Return error_mark_node instead of
2132         "(tree)-1" to indicate failure.  Simplify.
2133         (handle_pragma_interface): Test for error_mark_node instead of
2134         "(tree)-1".
2135         (handle_pragma_implementation): Likewise.
2137 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2139         PR c++/26151
2140         * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
2141         decl-specifiers.  Remove extra check for duplicate 'friend'.
2142         * decl.c (grokdeclarator): Remove check for duplicate
2143         decl-specifiers.  Set longlong together with long_p.
2145 2006-02-12  Jason Merrill  <jason@redhat.com>
2147         PR c++/24996
2148         * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
2149         TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
2151 2006-02-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2153         * class.c (debug_class): Remove extern.
2154         (debug_thunks): Likewise.
2156 2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2158         * typeck.c (string_conv_p): Don't test for flag_const_strings.
2160 2006-02-08  Jason Merrill  <jason@redhat.com>
2162         PR c++/25979
2163         * cp-gimplify.c (cp_gimplify_expr): Don't call
2164         cp_gimplify_init_expr for MODIFY_EXPRs.
2165         * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
2167 2006-02-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2169         PR c++/26071
2170         * decl.c (grokdeclarator): Set dname also for destructor.
2172         PR c++/26070
2173         * decl.c (grokdeclarator): Clear storage_class together with staticp.
2175 2006-02-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2177         * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
2178         (cp_build_qualified_type): Propogate renaming.
2179         * call.c (convert_like_real): Likewise.
2180         * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
2181         * decl.c (make_typename_type, grokdeclarator): Likewise.
2182         * pt.c (tsubst_friend_function, instantiate_class_template,
2183         tsubst_default_argument, instantiate_decl,
2184         tsubst_initializer_list, tsubst_enum): Likewise.
2185         * semantics.c (finish_template_type): Likewise.
2186         * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
2188 2006-02-07  Dirk Mueller  <dmueller@suse.com>
2190         * typeck.c (build_binary_op): Annotate div-by-zero
2191         warnings to make -Wno-div-by-zero have an effect.
2193 2006-02-07  Mark Mitchell  <mark@codesourcery.com>
2195         PR c++/9737
2196         * pt.c (coerce_template_template_parms): Do not templates with
2197         excess default arguments to match template template parameters
2198         with fewer parameters.
2199         (coerce_template_parms): Add use_default_args parameter; use
2200         default arguments only when true.
2201         (lookup_template_class): Adjust call to coerce_template_parms.
2202         (fn_type_unification): Likewise.
2203         (unify): Likewise.
2204         (get_bindings): Likewise.
2205         (dependent_type_p): Add assertions.
2207 2006-02-06  Roger Sayle  <roger@eyesopen.com>
2209         * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
2210         * rtti.c (typeinfo_in_lib_p): Likewise.
2211         * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
2212         * name-lookup.c (arg_assoc_type): Likewise.
2214 2006-02-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2216         * cp-tree.h (tf_warn_or_error): New substituion flag.
2217         (cp_build_qualified_type): Use it.
2218         * call.c (convert_like_real): Likewise.
2219         * cvt.c (cp_convert_to_pointer): Likewise.
2220         (convert_to_reference): Likewise.
2221         * decl.c (make_typename_type): Likewise.
2222         (grokdeclarator): Likewise.
2223         * pt.c (tsubst_friend_function): Likewise.
2224         (tsubst_friend_class): Likewise.
2225         (instantiate_class_template): Likewise.
2226         (tsubst_default_argument): Likewise.
2227         (instantiate_decl): Likewise.
2228         (tsubst_initializer_list): Likewise.
2229         (tsubst_enum): Likewise.
2230         * semantics.c (finish_template_type): Likewise.
2231         * typeck.c (build_ptrmemfunc): Likewise.
2232         (convert_for_assignment): Likewise.
2234 2006-02-03  Lee Millward  <lee.millward@gmail.com>
2236         * typeck.c (string_conv_p): Pass appropiate
2237         OPT_Wxxxx values when calling warning().
2238         (build_array_ref, cxx_mark_addressable): Likewise.
2239         (check_return_expr): Likewise.
2241         * init.c (perform_member_init): Likewise.
2242         (sort_mem_initializers, emit_mem_initializers): Likewise.
2244         * class.c (check_field_decls): Likewise.
2245         (warn_about_ambiguous_bases): Likewise.
2247         * decl.c (pop_label, poplevel): Likewise.
2248         (duplicate_decls, grok_op_properties): Likewise.
2249         (start_preparsed_function, finish_function): Likewise.
2251         * name-lookup.c (pushdecl_maybe_friend): Likewise.
2252         (pushdecl_maybe_friend): Likewise.
2254         * parser.c (cp_parser_warn_min_max): Likewise.
2255         (cp_parser_cast_expression): Likewise.
2257         * method.c (lazily_declare_fn): Likewise.
2258         * cvt.c (convert_to_void): Likewise.
2259         * mangle.c (finish_mangling): Likewise.
2260         * cp-gimplify.c (gimplify_expr_stmt): Likewise.
2262 2006-02-03  Mark Mitchell  <mark@codesourcery.com>
2264         * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
2265         not IDENTIFIER_OPNAME_P.
2267 2006-01-31  Mark Mitchell  <mark@codesourcery.com>
2269         PR c++/25342
2270         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
2271         documentation.
2272         * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
2273         not TREE_VALUE.
2274         (instantiate_class_template): Simplify.
2275         (verify_class_unification): Remove.
2276         (unify): Document parameters.  Use INNERMOST_TEMPLATE_ARGS to
2277         permit multiple levels of template arguments.
2278         (more_specialized_class): Simplify.
2279         (get_class_bindings): Pass full arguments to unify.  Fold
2280         verify_class_unification into this function.  Return full
2281         arguments.
2282         (most_specialized_class): Adjust for changes to
2283         get_class_bindings.  Issue errors here for ambiguity.  Return the
2284         fully deduced arguments for the most specialized class, in
2285         addition to the partial specialization.
2287 2006-01-31  Ben Elliston  <bje@au.ibm.com>
2289         * mangle.c: Comment fix.
2291 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2293         * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
2294         * repo.c (extract_string, afgets): Use cast when converting from
2295         void *.
2297 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2299         * call.c (alloc_conversion): Use cast when converting from void *.
2300         (alloc_conversions): Likewise.
2301         (add_candidate): Likewise.
2302         (print_z_candidates): Likewise.
2303         (add_warning): Likewise.
2304         * pt.c (retrieve_local_specialization): Likewise.
2305         (process_partial_specialization): Likewise.
2306         (mangle_class_name_for_template): Likewise.
2307         (tsubst_template_args): Likewise.
2308         * typeck2.c (pat_calc_hash): Likewise.
2309         (pat_compare): Likewise.
2310         (abstract_virtuals_error): Likewise.
2311         * class.c (method_name_cmp): Likewise.
2312         (resort_method_name_cmp): Likewise.
2313         (get_vfield_name): Likewise.
2314         * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
2315         * lex.c (init_reswords): Likewise.
2316         * rtti.c (create_pseudo_type_info): Likewise.
2317         * search.c (dfs_lookup_base): Likewise.
2318         (dfs_dcast_hint_pre): Likewise.
2319         (dfs_dcast_hint_post): Likewise.
2320         * tree.c (hash_tree_cons): Likewise.
2321         * repo.c (extract_string): Likewise.
2322         (afgets): Likewise.
2323         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
2324         * g++spec.c (lang_specific_driver): Likewise.
2326 2006-01-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2328         * call.c (joust): Pass option code to warning.  Use inform for
2329         explanation.
2330         * class.c (check_bases): Likewise.
2331         (maybe_warn_about_overly_private_class): Likewise.
2332         (check_field_decls): Likewise.
2333         (layout_empty_base): Likewise.
2334         (layout_virtual_bases): Likewise.
2335         (layout_class_type): Likewise.
2337 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
2339         PR c++/25999
2340         * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
2341         here, not ...
2342         (start_function): ... here.
2344 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
2346         PR c++/25855
2347         * class.c (resolve_address_of_overloaded_function): Adjust use of
2348         return value from most_specialized_instantiation.
2349         * pt.c (determine_specialization): Avoid multiple calls to
2350         get_bindings.
2351         (most_specialized_instantiation): When a tie occurs, set the
2352         current presumed champion to the next template.  Return the
2353         TREE_LIST node containing the template, rather than the template
2354         itself.
2355         (most_specialized): Remove.
2356         * name-lookup.c (push_overloaded_decl): When duplicate_decls
2357         indicates a failed redeclaration, report that to callers.
2359 2006-01-26  Jason Merrill  <jason@redhat.com>
2361         PR c++/16021
2362         * name-lookup.c (parse_using_directive): Require strong using to
2363         name a nested namespace.
2365 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2367         Revert:
2368         * cp-tree.h (do_poplevel): Remove prototype.
2369         * semantics.c (do_poplevel): Add prototype.  Make static.
2371         Revert:
2372         * cp-tree.h (default_conversion): Remove prototype.
2373         * typeck.c (default_conversion): Make static.
2375 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2377         * cp-tree.h (get_primary_binfo): Remove prototype.
2378         (push_using_decl): Likewise.
2379         (current_template_args): Likewise.
2380         (more_specialized_class): Likewise.
2381         (mark_class_instantiated): Likewise.
2382         (default_conversion): Likewise.
2383         (pfn_from_ptrmemfunc): Likewise.
2384         * class.c (get_primary_binfo): Add prototype, make static, simplify.
2385         * name-lookup.c (push_using_decl): Make static.
2386         * pt.c (current_template_args): Likewise.
2387         (more_specialized_class): Likewise.
2388         (mark_class_instantiated): Likewise.
2389         * typeck.c (default_conversion): Make static.
2390         (pfn_from_ptrmemfunc): Add prototype, make static.
2392 2006-01-24  Dirk Mueller  <dmueller@suse.de>
2394         * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
2396 2006-01-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2398         PR c++/25552
2399         * parser.c (cp_parser_unqualified_id): Check that destructor name
2400         and scope match.
2401         * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
2402         Adjust comment.  Return early if possible.
2403         Use same_type_p to compare types.
2404         * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
2406 2006-01-24  Mark Mitchell  <mark@codesourcery.com>
2408         * semantics.c: Remove outdated comment.
2410 2006-01-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2412         * cp-tree.h (do_poplevel): Remove prototype.
2413         * semantics.c (do_poplevel): Add prototype.  Make static.
2415         * cp-tree.h (original_type): Remove prototype.
2416         * typeck.c (original_type): Make static.
2418         * cp-tree.h (declare_global_var): Remove prototype.
2419         * decl.c (declare_global_var): Make static.
2421         * cp-tree.h (implicitly_declare_fn): Remove prototype.
2422         * method.c (implicitly_declare_fn): Make static.
2424         * cp-tree.h (fold_decl_constant_value): Remove prototype.
2425         * pt.c (fold_decl_constant_value): Make static.
2427         * cp-tree.h (build_x_delete): Remove prototype.
2428         * init.c (build_vec_delete_1): Call build_op_delete_call directly
2429         and not via build_x_delete.
2430         (build_x_delete): Remove.
2432         * cp-tree.h (get_vtt_name): Remove prototype.
2433         * class.c (get_vtt_name): Remove.
2434         (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
2436 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2438         * rtti.c (build_dynamic_cast): Fix comment.
2440 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2442         PR c++/10891
2443         * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
2444         -fno-rtti.
2446 2006-01-21  Mark Mitchell  <mark@codesourcery.com>
2448         PR c++/25895
2449         * class.c (build_base_path): Generate a NOP_EXPR instead of a
2450         COMPONENT_REF if the base and derived classes are at the same
2451         address.
2453         PR c++/25856
2454         * decl.c (begin_destructor_body): Robustify.
2456         PR c++/25858
2457         * parser.c (cp_parser_direct_declarator): Robustify.
2459 2006-01-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2461         * parser.c (cp_lexer_next_token_is_keyword): Simplify.
2463         * parser.c (clear_decl_specs): Remove prototype.
2465         * parser.c (cp_parser_expression_fn): Remove.
2467         * call.c (add_builtin_candidates): Remove superfluous return.
2468         * name-lookup.c (do_toplevel_using_decl): Likewise.
2469         * parser.c (cp_parser_type_specifier_seq): Likewise.
2470         (cp_parser_save_default_args): Likewise.
2472 2006-01-20  Dirk Mueller  <dmueller@suse.com>
2474         PR c++/5520
2475         * semantics.c (finish_if_stmt): Call empty_body_warning.
2476         * parser.c (cp_parser_implicitly_scoped_statement):
2477         Mark empty statement with an empty stmt.
2479 2006-01-19  Mark Mitchell  <mark@codesourcery.com>
2481         PR c++/22136
2482         * name-lookup.c (do_class_using_decl): Don't try to look up base
2483         classes in templates with dependent base types.
2485 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2487         PR c++/25854
2488         * pt.c (maybe_process_partial_specialization): Return early on
2489         error_mark_node.
2491 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2493         PR c++/16829
2494         * decl.c (start_preparsed_function): Check default arguments
2495         unconditionally.
2496         * name-lookup.c (pushdecl_maybe_friend): Check default arguments
2497         of all functions and function templates.
2498         * parser.c (cp_parser_late_parsing_default_args): Check default
2499         arguments.
2500         * decl2.c (check_default_args): Set missing default arguments to
2501         error_mark_node.
2503 2006-01-18  Mark Mitchell  <mark@codesourcery.com>
2505         PR c++/25836
2506         * cp-tree.h (push_class_stack): New function.
2507         (pop_class_stack): Likewise.
2508         * class.c (class_stack_node): Add hidden field.
2509         (pushclass): Clear it.
2510         (push_class_stack): New function.
2511         (pop_class_stack): Likewise.
2512         (currently_open_class): Ignore hidden classes.
2513         (currently_open_derived_class): Likewise.
2514         * name-lookup.c (push_to_top_level): Call push_class_stack.
2515         (pop_from_top_level): Call pop_class_stack.
2517 2006-01-18  Kazu Hirata  <kazu@codesourcery.com>
2519         * tree.c (find_tree_t, find_tree): Remove.
2520         * cp-tree.h: Remove the prototype for find_tree.
2522 2006-01-18  Jakub Jelinek  <jakub@redhat.com>
2524         * search.c (lookup_conversions_r): Fix a pasto.
2526 2006-01-17  Eric Christopher  <echristo@apple.com>
2528         * call.c (convert_like_real): When issuing conversion
2529         warnings, depend on OPT_Wconversion.
2530         * cvt.c (build_expr_type_conversion): Ditto.
2532 2006-01-17  Kazu Hirata  <kazu@codesourcery.com>
2534         * name-lookup.c (lookup_namespace_name): Remove.
2535         * name-lookup.h: Remove the prototype for
2536         lookup_namespace_name.
2538 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
2540         PR c/25682
2541         * decl.c (compute_array_index_type): After issuing not an integral
2542         constant-expression error, set size to 1 to avoid ICEs later on.
2544 2006-01-16  Ian Lance Taylor  <ian@airs.com>
2546         * parser.c: Include "cgraph.h".
2547         (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
2548         assemble_asm.
2550 2006-01-16  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
2552         * g++spec.c (lang_specific_spec_functions): Remove.
2554 2006-01-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2556         * decl.c (check_initializer): Fix thinko.
2558 2006-01-14  Mark Mitchell  <mark@codesourcery.com>
2560         PR c++/25663
2561         * parser.c (cp_parser_direct_declarator): Use cp_parser_error
2562         instead of error.
2564 2006-01-13  Jason Merrill  <jason@redhat.com>
2566         * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
2568         * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
2569         * pt.c (check_explicit_specialization): Likewise.
2571 2006-01-12  Jason Merrill  <jason@redhat.com>
2573         PR libstdc++/24660
2574         * pt.c (check_explicit_specialization): Handle namespace
2575         association.
2576         * name-lookup.c (set_decl_namespace): Likewise.
2578 2006-01-12  Nathan Sidwell  <nathan@codesourcery.com>
2580         PR c++/24824
2581         * class.c (handle_using_decl): Pass correct scope to
2582         cp_emit_debug_info_for_using.
2584 2006-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2586         PR c++/25386
2587         * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
2588         packedness.
2590 2006-01-06  Gabriel Dos Reis  <gdr@integrablesolutions.net>
2592         * parser.c (cp_parser_primary_expression): Document the grammar
2593         for the built-in offsetof, a GNU extension.
2595 2006-01-04  Zdenek Dvorak <dvorakz@suse.cz>
2597         PR c++/25632
2598         * init.c (constant_value_1): Unshare use of DECL_INITIAL.  Fix a typo
2599         in condition.
2601 2006-01-04  Chris Lattner  <sabre@gnu.org>
2603         * typeck2.c: update copyright to 2006
2604         (split_nonconstant_init_1):  Set TREE_CONSTANT to true.
2606 2006-01-04  Mark Mitchell  <mark@codesourcery.com>
2608         PR c++/24782
2609         * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
2610         checks, even when parsing tentatively.
2612 2006-01-04  Richard Henderson  <rth@redhat.com>
2614         Merge from gomp branch.
2615         * lex.c (handle_pragma_java_exceptions): Fix whitespace.
2616         * parser.c (struct cp_token): Add pragma_kind.
2617         (eof_token): Update to match.
2618         (struct cp_lexer): Add in_pragma; rearrange next for better packing.
2619         (cp_parser_initial_pragma): New.
2620         (cp_lexer_new_main): Use it.  Don't bother clearing
2621         c_lex_return_raw_strings.
2622         (cp_lexer_get_preprocessor_token): Always initialize keyword
2623         and pragma_kind fields.  Handle CPP_PRAGMA.
2624         (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
2625         in_pragma is set.
2626         (cp_lexer_handle_pragma): Remove.  Update callers to cp_parser_pragma.
2627         (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
2628         (cp_parser_skip_to_pragma_eol): New.
2629         (cp_parser_error): Use it.
2630         (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
2631         rearrange with switch statement.
2632         (cp_parser_skip_to_end_of_statement): Likewise.
2633         (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2634         (cp_parser_skip_to_closing_brace): Likewise.
2635         (cp_parser_skip_until_found): Likewise.
2636         (cp_parser_statement): Add in_compound argument; update callers.
2637         Use it to decide how to handle pragma parsing.
2638         (cp_parser_labeled_statement): Add in_compound argument; pass
2639         it on to cp_parser_statement.
2640         (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
2641         (cp_parser_declaration_seq_opt): Likewise.
2642         (cp_parser_parameter_declaration): Likewise.
2643         (cp_parser_member_specification_opt): Likewise.
2644         (cp_parser_function_definition_after_decl): Likewise.
2645         (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
2646         (cp_parser_pragma): New.
2647         (pragma_lex): New.
2649 2006-01-04  Dirk Mueller <dmueller@suse.com>
2651         * decl.c (finish_constructor_body): create simple
2652         compound stmt instead of a if(1) { } construct.
2654 2006-01-03  Mark Mitchell  <mark@codesourcery.com>
2656         PR c++/25492
2657         * name-lookup.c (push_class_level_binding): When a derived class
2658         provides a type binding, eliminate any type binding from a base
2659         class.
2661         PR c++/25625
2662         * repo.c (repo_emit_p): Always instantiate static data members
2663         initialized by constant expressions, so that there values are
2664         available.
2666 2006-01-02  Mark Mitchell  <mark@codesourcery.com>
2668         PR c++/25635
2669         * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
2670         conversion operator.
2671         * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
2673         PR c++/25638
2674         * class.c (add_method): Never associate more than one destructor
2675         with a single class.
2677         PR c++/25637
2678         * cp-tree.h (do_friend): Adjust prototype.
2679         * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
2680         (grokdeclarator): Likewise.  Refine check for invalid
2681         declarations/definitions of member functions outside of their own
2682         class.
2683         * friend.c (do_friend): Make funcdef_flag a bool, not an int.
2685         PR c++/25633
2686         * parser.c (cp_parser_mem_initializer_list): Check result of
2687         cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
2688         (cp_parser_mem_initializer): Return error_mark_node for failure.
2690         PR c++/25634
2691         * parser.c (cp_parser_template_parameter_list): Call
2692         begin_template_parm_list and end_template_parm_list here.
2693         (cp_parser_type_parameter): Not here.
2694         (cp_parser_template_declaration_after_export): Or here.
2695         (cp_parser_elaborated_type_specifier): Call
2696         cp_parser_check_template_parameters.
2698         * tree.c (build_target_expr_with_type): Use force_target_expr.
2700         * decl2.c (mark_used): Fix typo in comment.
2702 2006-01-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2704         * parser.c (cp_parser_using_declaration): Skip name-lookup on
2705         invalid scope.
2707 2005-12-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2709         * cxx-pretty-print.c (pp_cxx_constant): New.  Print
2710         string-literal in parens if input program says so.
2711         (pp_cxx_primary_expression): Hand off constant printing to
2712         pp_cxx_constant.
2713         (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
2714         (pp_cxx_expression): Use pp_cxx_constant for literals.
2715         * error.c (dump_expr): Use pp_constant for literals.
2717 2005-12-29  Nathan Sidwell  <nathan@codesourcery.com>
2719         * method.c (make_thunk): Don't set comdat_linkage here.
2720         (use_thunk): Make thunk one only here, if thunk target is
2721         DECL_ONE_ONLY.
2723 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
2725         PR c++/25439
2726         * decl.c (grokdeclarator): Remove dead code.
2727         * ptree.c (cxx_print_xnode): Handle BASELINK.
2728         * parser.c (make_id_declarator): Add sfk parameter.
2729         (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
2730         make_id_declarator.
2731         (cp_parser_declarator_id): Simplify BASELINKs here.
2732         (cp_parser_member_declaration): Adjust calls to
2733         make_id_declarator.
2735 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
2737         PR c++/23171, c++/23172, c++/25417.
2738         * typeck.c (build_unary_op): Create temporary variables for
2739         compound literals whose addresses are taken.
2740         * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
2741         * decl.c (reshape_init_vector): Likewise.
2742         (reshape_init): Give it external linkage.
2743         (check_initializer): Use COMPOUND_LITERAL_P.
2744         (initialize_artificial_var): Allow the initializer to be a
2745         CONSTRUCTOR.
2746         * call.c (make_temporary_var_for_ref_to_temp): Use
2747         create_temporary_var.
2748         * cp-tree.h (COMPOUND_LITERAL_P): New macro.
2749         (rehape_init): Declare.
2750         * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
2751         * semantics.c (finish_compound_literal): Use reshape_init.
2753 2005-12-23  Mark Mitchell  <mark@codesourcery.com>
2755         PR c++/24671
2756         * pt.c (instantiate_template): Handle SFINAE.
2758 2005-12-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2760         * decl.c (grokdeclarator): Improve diagnostic for friend
2761         declarations of class members.
2763 2005-12-22  Mark Mitchell  <mark@codesourcery.com>
2765         PR c++/25369
2766         * tree.c (really_overloaded_fn): Tweak comment.
2767         * pt.c (tsubst_call_declarator_parms): Remove.
2768         (tsubst_copy): Call mark_used on the member referenced by an
2769         OFFSET_REF.
2770         * semantics.c (finish_qualified_id_expr): Simplify.
2771         * decl2.c (mark_used): Accept BASELINKs.
2773         PR c++/25364
2774         * typeck.c (build_unary_op): Pass DECLs not names to
2775         build_offset_refs.
2776         * init.c (build_offset_ref): Do not do name lookup.  Do not call
2777         mark_used.
2778         * call.c (build_call): Simplify and tidy.
2779         * semantics.c (finish_qualified_id_expr): Call mark_used.
2781 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2783         PR c++/23333
2784         * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
2785         identify a single '0'.
2787 2005-12-20  Mark Mitchell  <mark@codesourcery.com>
2789         PR c++/21228
2790         * decl.c (use_eh_spec_block): New function.
2791         (store_parm_decls): Use it.
2792         (finish_function): Likewise.
2794 2005-12-19  Mark Mitchell  <mark@codesourcery.com>
2796         PR c++/24278
2797         * init.c (expand_member_init): Print messages about baseclasses
2798         using %T rather than %D.
2800         PR c++/24915
2801         * class.c (add_method): Do not treat templates as identical unless
2802         their return types are the same.
2804 2005-12-12  Mark Mitchell  <mark@codesourcery.com>
2806         PR c++/25300
2807         * tree.c (build_qualified_name): Return error_mark_node for
2808         erroneous input.
2810 2005-12-10  Mark Mitchell  <mark@codesourcery.com>
2812         PR c++/25337
2813         * pt.c (tsubst_copy_and_build): Permit dependent types for the
2814         object in a class member access expression.
2816 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2818         PR java/9861
2819         * mangle.c (write_bare_function_type): Mangle return type for
2820         methods of Java classes
2822 2005-12-08  Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2824         * call.c (build_conditional_expr): Print types in error messages.
2826 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2828         * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
2830 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2832         * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
2834 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
2836         * Make-lang.in (c++.all.build, c++.install-normal): Remove.
2838 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
2840         * Make-lang.in: Remove all dependencies on s-gtype.
2842 2005-12-06  Aldy Hernandez  <aldyh@redhat.com>
2844         PR C++/24138
2845         * decl.c (reshape_init_array_1): Handle max_index of -1.
2847 2005-12-06  Roger Sayle  <roger@eyesopen.com>
2849         * typeck.c (build_binary_op): Issue warning if either operand of a
2850         comparison operator is a string literal, except for testing equality
2851         or inequality against NULL.
2853 2005-12-06  Roger Sayle  <roger@eyesopen.com>
2855         PR c++/25263
2856         * decl.c (compute_array_index_type): Check that itype is an
2857         INTEGER_CST node before testing/clearing TREE_OVERFLOW.
2859 2005-12-05  Daniel Berlin  <dberlin@dberlin.org>
2861         * ptree.c (cxx_print_decl): Update to check for decl_common
2862         structure.
2864 2005-12-02  Mark Mitchell  <mark@codesourcery.com>
2866         PR c++/24173
2867         * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
2868         clobbering newdecl.
2870 2005-12-02  Richard Guenther  <rguenther@suse.de>
2872         * semantics.c (simplify_aggr_init_expr): Use buildN instead
2873         of build.
2875 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2877         * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
2878         ggc_realloc.
2879         (cp_parser_template_argument_list): Use XRESIZEVEC instead of
2880         xrealloc.
2881         * class.c (pushclass): Likewise.
2883 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2885         * decl2.c (get_priority_info): Use XNEW, not xmalloc.
2886         * decl.c (push_switch): Likewise.
2887         * lex.c (handle_pragma_implementation): Likewise.
2888         * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
2889         not ggc_alloc.
2890         (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
2891         * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
2892         * g++spec.c (lang_specific_driver): Likewise.
2893         * mangle.c (save_partially_mangled_name): Likewise.
2894         * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
2895         (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
2896         (cp_parser_sizeof_operand): Likewise.
2897         * repo.c (open_repo_file, open_repo_file): Likewise.
2899 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2901         * parser.c (cp_parser_make_typename_type): Call make_typename_type
2902         with tf_none instead of magic value 0.
2903         (cp_parser_explicit_instantiation): Call do_type_instantiation
2904         with tf_error instead of magic value 1.
2905         (cp_parser_elaborated_type_specifier): Call make_typename_type
2906         with tf_error instead of magic value 1.
2907         (cp_parser_class_name): Likewise.
2908         (cp_parser_lookup_name): Likewise.
2910 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2912         * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
2913         not RID_MAX.
2915 2005-11-30  Jason Merrill  <jason@redhat.com>
2917         PR c++/21123
2918         * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
2919         parms in a thunk.
2921 2005-11-30  Ben Elliston  <bje@au.ibm.com>
2923         * typeck.c (build_x_unary_op): Correct spelling in error message.
2925 2005-11-28  Nathan Sidwell  <nathan@codesourcery.com>
2927         PR c++/21166
2928         * class.c (check_field_decls): Only set DECL_PACKED on a field
2929         when its natural alignment is > BITS_PER_UNIT.
2931 2005-11-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2933         PR c++/24979
2934         * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
2936 2005-11-26  Richard Henderson  <rth@redhat.com>
2938         * lex.c: Update for pragma_lex rename.
2939         * parser.c: Likewise.
2941 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2943         PR c++/9278
2944         * decl.c (grokparms): Do not allow typedef-names in a '(void)'
2945         parmlist.
2947 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2949         * typeck2.c (process_init_constructor_union): Remove check for
2950         unnamed union members.
2952 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2954         * name-lookup.c (lookup_name_real): Merge two if's.
2956 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2958         * pt.c (instantiate_class_template): Clean-up.
2960 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2962         * pt.c (template_class_depth_real): Remove. Move functionality to ...
2963         (template_class_depth): ... here, replacing count_specializations
2964         with 0.  Adjust comment.
2966 2005-11-24  Richard Guenther  <rguenther@suse.de>
2967         Dirk Mueller <dmueller@suse.de>
2969         PR c++/14024
2970         * typeck.c (build_reinterpret_cast_1): Use
2971         strict_aliasing_warning.
2973 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2975         PR c++/24235
2976         * pt.c (check_instantiated_args): Reword diagnostic message about
2977         template argument involving local types.
2979 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2981         PR c++/21667
2982         * typeck.c (build_array_ref): Avoid code duplicate.  Use common
2983         C/C++ diagnostic function warn_array_subscript_with_type_char.
2985 2005-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2987         PR c++/22238
2988         * error.c (resolve_virtual_fun_from_obj_type_ref): New.
2989         (dump_expr): Use it in <case CALL_EXPR>.
2991 2005-11-21  Richard Henderson  <rth@redhat.com>
2993         * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
2995         * name-lookup.c (lookup_name): Remove prefer_type argument.
2996         (lookup_name_prefer_type): New.
2997         * decl.c (lookup_and_check_tag): Use them.
2998         * pt.c (tsubst_friend_class): Likewise.
2999         (lookup_template_class): Likewise.
3000         (tsubst_copy_and_build): Likewise.
3001         * name-lookup.h (lookup_name_prefer_type): New.
3002         (lookup_name): Remove declaration.
3004 2005-11-18  Mark Mitchell  <mark@codesourcery.com>
3006         PR c++/8355
3007         * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
3008         set_decl_namespace.
3009         * name-lookup.c (set_decl_namespace):
3011 2005-11-18  Mike Stump  <mrs@apple.com>
3013         * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
3014         * name-lookup.c (lookup_name_two): Remove.
3015         (lookup_name_one): Add.
3016         * name-lookup.h (lookup_name_two): Remove.
3017         (lookup_name_one): Add.
3019 2005-11-15  Jason Merrill  <jason@redhat.com>
3021         PR c++/24580
3022         * method.c (locate_copy): Also use skip_artificial_parms here.
3023         (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
3024         for RECORD_TYPE.
3025         (locate_ctor): Abort if we fail to find a default constructor.
3027 2005-11-15  Mike Stump  <mrs@apple.com>
3029         * name-lookup.c (lookup_name_two): Add.
3030         * name-lookup.h: Likewise.
3032 2005-11-15  Mark Mitchell  <mark@codesourcery.com>
3034         PR c++/24667
3035         * typeck.c (check_for_casting_away_constness): Use the diag_fn.
3036         (build_const_cast_1): Call it, for C-style casts.
3038 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
3040         PR c++/24687
3041         * pt.c (check_explicit_specialization): Don't check for C linkage.
3042         (push_template_decl_real): Likewise.
3043         * parser.c (cp_parser_explicit_specialization): Check here.
3044         (cp_parser_template_declaration_after_export): And here.
3046         * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
3047         field.
3049 2005-11-14  Jason Merrill  <jason@redhat.com>
3051         PR c++/24580
3052         * method.c (locate_ctor): Skip all artificial parms, not just
3053         'this'.
3055 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
3057         * parser.c (eof_token): Add initializer for ambiguous_p.
3059 2005-11-13  Mark Mitchell  <mark@codesourcery.com>
3061         PR c++/24817
3062         * decl.c (check_redeclaration_exception_specification): New
3063         function.
3064         (duplicate_decls): Use it.
3065         * error.c (fndecl_to_string): Print the template parameter list.
3067         PR c++/20293
3068         * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
3069         for namespaces.
3070         (pp_cxx_original_namespace_definition): Likewise.
3071         * name-lookup.c (ambiguous_decl): Don't issue error messages;
3072         instead return lists of ambiguous candidates.
3073         (select_decl): Handle ambiguous namespace lookups.
3074         * parser.c (cp_token): Add ambiguous_p.
3075         (cp_lexer_get_preprocessor_token): Set it.
3076         (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
3077         when a qualified name uses an invalid scope.
3078         (cp_parser_primary_expression): Print ambiguous candidates.
3079         (cp_parser_type_parameter): Adjust comment to reflect new
3080         parameter name for cp_parser_lookup_name.
3081         (cp_parser_template_argument): Likewise.
3082         (cp_parser_elaborated_type_specifier): Likewise.
3083         (cp_parser_namespace_name): Likewise.
3084         (cp_parser_class_name): Print ambiguous candidates.
3085         (cp_parser_lookup_name): Rename ambiguous_p parameter to
3086         ambiguous_decls.  Use it to return a list of ambiguous candiates
3087         when a lookup is ambiguous.
3088         (cp_parser_lookup_name_simple): Adjust comment to reflect new
3089         parameter name for cp_parser_lookup_name.
3091 2005-11-12  Jakub Jelinek  <jakub@redhat.com>
3093         PR c++/24780
3094         * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
3095         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
3096         of array type.
3098         PR c++/24761
3099         * pt.c (tsubst_copy_asm_operands): New function.
3100         (tsubst_expr) <case ASM_EXPR>: Use it.
3102 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
3104         PR c++/19450
3105         * decl.c (redeclaration_error_message): Issue diagnostics about
3106         olddecl and newdecl disagreement on __thread property.
3107         (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
3109 2005-11-08  Jason Merrill  <jason@redhat.com>
3111         PR c++/21123
3112         * method.c (use_thunk): Use build_cplus_new instead of
3113         force_target_expr.
3115 2005-11-06  Jason Merrill  <jason@redhat.com>
3116             James A. Morrison <phython@gcc.gnu.org>
3118         PR c++/17256
3119         * decl2.c (cp_finish_file): Fix conditions for undefined warning.
3120         Set TREE_NO_WARNING instead of TREE_PUBLIC.
3121         * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
3122         a warning on a function we didn't instantiate because of excessive
3123         recursion.
3125 2005-11-06  Mark Mitchell  <mark@codesourcery.com>
3127         * class.c (record_subobject_offsets): Don't record offsets past
3128         biggest empty class for non-empty base classes.
3129         (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
3130         keeping track of the size of emptyclasses.
3132         PR c++/21308
3133         * class.c (sizeof_biggest_empty_class): New variable.
3134         (record_subobject_offsets): Don't record offsets past biggest
3135         empty class for data members.  Replace vbases_p parameter with
3136         is_data_member parameter.
3137         (build_base_field): Adjust call.
3138         (layout_class_type): Likewise.  Maintain
3139         sizeof_biggest_empty_class.
3141 2005-11-05  Kazu Hirata  <kazu@codesourcery.com>
3143         * decl2.c, init.c, typeck.c: Fix comment typos.
3145 2005-11-04  Richard Guenther  <rguenther@suse.de>
3147         PR c++/22487
3148         * init.c (build_vec_init): Build comparison of matching
3149         types.
3151 2005-11-03  Josh Conner  <jconner@apple.com>
3153         PR c++/19989
3154         pt.c (tsubst): Accept zero-length array if tf_error is set
3155         in complain flags.  Change error message for negative-
3156         length array.
3158 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
3160         * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
3161         parameter.
3163 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
3165         PR c++/17964
3166         * error.c (cp_cpp_error): New function.
3167         * cp-tree.h (cp_cpp_error): Declare.
3168         * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
3169         and error callback after lexing.
3171 2005-11-03  Mark Mitchell  <mark@codesourcery.com>
3173         PR c++/21627
3174         * pt.c (register_specialization): Update inline flags on clones.y
3176 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
3178         PR c++/24582
3179         * decl.c (declare_local_label): Return 0 for variables
3180         with error_mark_node as their types.
3182 2005-11-02  Mark Mitchell  <mark@codesourcery.com>
3184         PR c++/22434
3185         * call.c (build_conditional_expr): Do bad conversions, if there's
3186         no other choice.
3188         PR c++/24560
3189         * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
3190         message for use of overloaded functions on LHS of "." operator.
3192         PR c++/19253
3193         * parser.c (cp_parser_postfix_expression): Use
3194         cp_parser_elaborated_type_specifier to handle typename-types in
3195         functional casts.
3196         (cp_parser_enclosed_argument_list): Skip ahead to the end of the
3197         template argument list if the closing ">" is not found.
3199         PR c++/24569
3200         * pt.c (instantiate_decl): Use cp_finish_decl, not
3201         finish_static_data_member_decl.
3203 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3205         * decl.c (grokfndecl): Remove the setting
3206         of the return type of the function type
3207         of main after erroring about must returning
3208         int.
3210 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3212         PR C++/23229
3213         * decl.c (grokfndecl): Create a new function type
3214         after erroring out about main not returning int.
3216 2005-10-28  Josh Conner  <jconner@apple.com>
3218         PR c++/22153
3219         * parser.c (cp_parser_member_declaration): Detect and handle
3220         a template specialization.
3222 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3224         PR C++/23426
3225         * decl.c (start_decl): Check that the decl is an
3226         error_mark_node before getting the type.
3227         Remove the check for the decl's type being an
3228         error_mark_node.
3230 2005-10-21  Mark Mitchell  <mark@codesourcery.com>
3232         PR c++/24260
3233         * parser.c (cp_parser_init_declarator): Pass attributes to
3234         grokfield.
3236 2005-10-20  Mark Mitchell  <mark@codesourcery.com>
3238         PR c++/22618
3239         * search.c (accessible_p): Check access in the outermost set of
3240         template parameters.
3242 2005-10-20  Richard Guenther  <rguenther@suse.de>
3244         * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
3246 2005-10-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3248         PR c++/22293
3249         * decl.c (grokdeclarator): Reject unqualified destructors in
3250         friend declarations.
3252 2005-10-18  Mark Mitchell  <mark@codesourcery.com>
3254         PR c++/23293
3255         * pt.c (convert_template_argument): Use canonical type variants in
3256         template specializations.
3258 2005-10-18  Nathan Sidwell  <nathan@codesourcery.com>
3260         PR c++/21383
3261         * name-lookup.c (arg_assoc): Template args can be null in a
3262         template-id-expr.
3264         PR c++/22604
3265         * class.c (update_vtable_entry_for_fn): Don't process invalid
3266         covariant overriders.
3268         PR c++/23118
3269         * cp-tree.h (add_method): Add return value.
3270         * class.c (add_method): Return success indicator.
3271         * semantics.c (finish_member_declaration): Don't add an invalid
3272         method to the method list.
3274 2005-10-17  Mark Mitchell  <mark@codesourcery.com>
3276         PR c++/21908
3277         * call.c (build_new_method_call): Do not show VTT parameters to
3278         the user.
3280 2005-10-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3282         PR c++/23440
3283         * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
3284         only complain about missing statement.
3286 2005-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3288         PR c++/24386
3289         * cp-tree.h (BASELINK_QUALIFIED_P): New.
3290         * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
3291         * typeck.c (finish_class_member_access_expr): Set it.
3293         PR c++/21353
3294         * decl.c (check_default_argument): Don't check
3295         processing_template_decl or uses_template_parms here.
3296         (grokparms): Only call check_default_argument when not processing
3297         a template decl.
3298         * parser.c (cp_parser_late_parsing_default_arg): Call
3299         check_default_argument when not processing a template decl.
3301 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
3303         PR c++/24389
3304         * decl2.c (mark_used): Use uses_template_parms instead of
3305         dependent_type_p.
3306         * init.c (constant_value_1): Handle uninstantiated templates
3307         specially.
3308         * pt.c (instantiate_decl): Add sanity check.
3310 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
3312         PR c++/22173
3313         * typeck.c (check_template_keyword): Fix thinko.
3315 2005-10-16  Andrew Pinski  <pinskia@physics.uc.edu>
3317         PR c++/23959
3318         * decl.c (pop_switch): Only call c_do_switch_warnings
3319         when not processing templates.
3321 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
3323         PR c++/22173
3324         * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
3325         (check_template_keyword): New function.
3326         (finish_id_expression): Change prototoype.
3327         (finish_qualified_id_expr): Change prototype.
3328         (build_qualified_name): New function.
3329         (finish_class_member_access_expr): Change prototype.
3330         * init.c (build_offset_ref): Use build_qualified_name.
3331         * mangle.c (write_expression): Likewise.
3332         * parser.c (cp_parser_primary_expression): Remove qualifying_class
3333         parameter.  Add address_p and template_arg_p.  Use
3334         build_qualified_name.
3335         (cp_parser_id_expression): Default *template_p to
3336         template_keyword_p.  Check for invalid uses of the template
3337         keyword.
3338         (cp_parser_postfix_expression): Eliminate special handling for
3339         qualified names.  Adjust call to cp_parser_primary_expression.
3340         (cp_parser_postfix_dot_deref_expression): Adjust call to
3341         cp_parser_id_expression and finish_class_member_access_expr.
3342         (cp_parser_template_argument_list): Add comment.
3343         (cp_parser_template_argument): Adjust use of
3344         cp_parser_primary_expression.  Remove call to
3345         finish_qualified_id_expr.
3346         (cp_parser_lookup_name): Use build_qualified_name.
3347         * pt.c (tsubst): Use build_qualified_name.
3348         (tsubst_qualified_id): Likewise.  Adjust call to
3349         finish_qualified_id_expr.
3350         (tsubst_copy): Use build_qualified_name.
3351         (tsubst_copy_and_build): Adjusts call to finish_id_expression and
3352         finish_class_member_access_expr.
3353         * semantics.c (finish_non_static_data_member): Use
3354         build_qualified_name.
3355         (finish_qualified_id_expr): Add template_p and template_arg_p
3356         parameters.
3357         (finish_id_expression): Remove qualifiying_class parameter.  Add
3358         template_p, done, address_p, and template_arg_p.  Use
3359         build_qualified_name.  Adjust calls to
3360         finish_class_member_acess_expr.
3361         * tree.c (build_qualified_name): New function.
3362         * typeck.c (check_template_keyword): New function.
3363         (finish_class_member_access_expr): Add template_p argument.  Check
3364         for invalid uses of the template keyword.
3366 2005-10-15  Mark Mitchell  <mark@codesourcery.com>
3368         PR c++/21347
3369         * class.c (maybe_warn_about_overly_private_class): Lazy
3370         constructors are public.
3372 2005-10-14  Mark Mitchell  <mark@codesourcery.com>
3374         PR c++/19565
3375         * call.c (convert_like_real): Rely on convert_and_check to issue
3376         warnings about overflow and conversion to unsigned.
3377         * decl.c (finish_enum): Use the location of the enumerators, not
3378         the closing brace of the enumeration, when reporting warnings
3379         about conversions.
3380         (build_enumerator): Use error_mark_node for erroneous values.
3381         * typeck2.c (digest_init): Remove reference to "signature pointer"
3382         from comment.
3384 2005-10-14  Nathan Sidwell  <nathan@codesourcery.com>
3386         PR c++/17796
3387         * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
3388         (maybe_clone_body): Track the first clone.
3390 2005-10-13  Nathan Sidwell  <nathan@codesourcery.com>
3392         PR c++/23984
3393         * class.c (build_base_path): The vtable is always the first thing
3394         in the vtt.
3396 2005-10-13  Mark Mitchell  <mark@codesourcery.com>
3398         PR c++/20721
3399         * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
3400         * decl.c (duplicate_decls): Merge it into new declarations.
3401         (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
3402         (cp_finish_decl): Set it, when appropriate.
3404         PR c++/22180
3405         * call.c (build_new_method_call): Correct pretty-printing of
3406         destructor names.
3407         * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
3408         identifier.
3410         PR c++/23694
3411         * decl.c (start_method): Return error_mark_node for errors.
3413         PR c++/23307
3414         * pt.c (push_template_decl_real): Complain about attempts to
3415         declare template variables.
3417         PR c++/22352
3418         * pt.c (tsubst_template_parms): Set processing_template_decl while
3419         processing the parameters.
3420         (tsubst_decl): Set processing_template_decl when substituting into
3421         a TEMPLATE_DECL.
3423         PR c++/22405
3424         * pt.c (most_specialized_instantiation): Robustify.
3426         PR c++/22464
3427         * semantics.c (finish_id_expression): Issue errors about uses of
3428         local variables in containing functions even in templates.
3430 2005-10-12  Danny Smith  <dannysmith@users.sourceforge.net>
3432         PR target/21801
3433         PR target/23589
3434         * class.c (finish_struct_1): Call
3435         targetm.cxx.adjust_class_at_definition.
3438 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3440         PR c++/21592
3441         * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
3442         with already looked up member functions.  Assert we're not
3443         returning a NON_DEPENDENT_EXPR with unknown type.
3444         * typeck.c (finish_class_member_access_expr):  We can get
3445         non-template-id-expr baselinks.  If the lookup finds a baselink,
3446         remember it even inside templates.
3448         PR c++/23797
3449         * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
3450         TYPE_DECL.  Use dependent_type_p to check type.
3451         * pt.c (uses_template_parms_p): Use dependent_type_p for a
3452         TYPE_DECL.
3453         (type_dependent_expression_p): Assert we've not been given a
3454         TYPE_DECL.
3456         PR c++/21117
3457         * decl.c (check_function_type): Correctly overwrite incomplete
3458         return type with void type.
3459         * typeck.c (check_return_expr): If the function's return type is
3460         void, don't try and convert a return expr.
3462 2005-10-12  David Edelsohn  <edelsohn@gnu.org>
3464         PR c++/23730
3465         * call.c (build_object_call): If BINFO is NULL, bypass
3466         lookup_fnfields and set fns to NULL_TREE.
3468 2005-10-12  Paolo Bonzini  <bonzini@gnu.org>
3470         PR c++/24052
3471         * error.c (dump_expr): Pass LABEL_DECL to dump_decl.  Print
3472         an ADDR_EXPR of a LABEL_DECL as &&.
3474 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3476         PR c++/19964
3477         * class.c (walk_subobject_offsets): Don't walk error_mark_node.
3479 2005-10-11  Ian Lance Taylor  <ian@airs.com>
3481         PR c++/8057
3482         * cvt.c (convert_to_void): Don't warn about unused values when
3483         processing a template declaration.
3485 2005-10-11  Mark Mitchell  <mark@codesourcery.com>
3487         PR c++/21089
3488         * call.c (convert_like_real): Use decl_constant_value, not
3489         integral_constant_value.
3490         * init.c (constant_value_1): New function.
3491         (integral_constant_value): Use it.
3492         (decl_constant_value): Likewise.
3493         * typeck.c (decay_conversion): Use decl_constant_value, not
3494         integral_constant_value.
3496         PR c++/21369
3497         * parser.c (cp_parser_elaborated_type_specifier): Don't treat
3498         class types as templates if the type is not appearing as part of a
3499         type definition or declaration.
3501 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
3503         PR c++/24277
3504         * pt.c (instantiate_decl): Call finish_static_data_member_decl for
3505         static data members.
3507 2005-10-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3508             Mark Mitchell  <mark@codesourcery.com>
3510         PR c++/23437
3511         * parser.c (cp_parser_template_argument_list): Do not treat
3512         contents of argument list as part of a constant expression.
3514 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
3516         PR c++/24139
3517         * decl.c (grokdeclarator): Do not require template parameter lists
3518         for explicitly specialized class.
3519         * error.c (dump_aggr_type): Do not dump template arguments for
3520         non-primary specializations.
3521         (dump_function_name): Likewise.
3523         PR c++/24275
3524         * pt.c (instantiate_decl): Instantiate the initializer of
3525         a static data member in the namespace containing the class
3526         containing the static data member.
3528 2005-10-08  James A. Morrison  <phython@gcc.gnu.org>
3530         PR c++/22172
3531         * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
3532         scopes as nondependent.
3534 2005-10-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3536         * call.c (resolve_args): Remove redundant test.
3538 2005-10-05  Paolo Bonzini  <bonzini@gnu.org>
3540         PR tree-optimization/21419
3541         PR tree-optimization/24146
3542         PR tree-optimization/24151
3544         * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
3545         read-only.  Set ASM_VOLATILE_P for asms without outputs.
3547 2005-10-05  Nathan Sidwell  <nathan@codesourcery.com>
3549         PR c++/23513
3550         * call.c (joust): Adjust length count to more_specialized_fn.
3551         * pt.c (more_specialized_fn): Cope with non-static member vs
3552         non-member.
3554 2005-10-04  Andrew Pinski  <pinskia@physics.uc.edu>
3556         PR middle-end/23125
3557         * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
3558         instead of change_decl_assembler_name.
3560 2005-10-03  Alexandre Oliva  <aoliva@redhat.com>
3562         * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
3564 2005-10-03  Mark Mitchell  <mark@codesourcery.com>
3566         PR c++/17775
3567         * repo.c: Include flags.h.
3568         (finish_repo): Add -frandom-seed to the arguments.
3570 2005-10-02  Mark Mitchell  <mark@codesourcery.com>
3572         PR c++/22621
3573         * parser.c (cp_parser_template_argument): Don't turn "T::f" into
3574         "(*this).T::f".
3575         * pt.c (convert_nontype_argument): Remove ??? comment.
3577         PR c++/23840
3578         * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
3579         when class rvalues are lvalues.
3581 2005-09-28  Mark Mitchell  <mark@codesourcery.com>
3583         PR c++/16782
3584         * decl.c (grokdeclarator): Always pedwarn about overqualified
3585         member names.
3587 2005-09-27  Mark Mitchell  <mark@codesourcery.com>
3589         PR c++/22147
3590         * name-lookup.c (maybe_process_template_type_declaration): Don't
3591         treat forward declarations of classes as templates just because
3592         we're processing_template_decl.
3593         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
3594         functions.
3596 2005-09-26  Jason Merrill  <jason@redhat.com>
3598         PR c++/13764
3599         * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
3600         * name-lookup.c (pushdecl_maybe_friend): Check it.
3601         * decl.c (begin_function_body): Do nothing if it's false.
3602         (finish_function_body): Ditto.
3603         (outer_curly_brace_block): New fn.
3604         (finish_function): Use it.
3606 2005-09-26  Richard Guenther  <rguenther@suse.de>
3608         PR middle-end/15855
3609         * decl2.c (do_static_destruction): Remove.
3610         (finish_static_initialization_or_destruction): Likewise.
3611         (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
3612         (NEEDS_GUARD_P): Likewise.
3613         (do_static_initialization): Rename to
3614         do_static_initialization_or_destruction.  Process all
3615         initializers/destructors and handle common conditionalizing.
3616         (start_static_initialization_or_destruction): Rename to
3617         one_static_initialization_or_destruction.  Handle only
3618         decl-specific conditionalizing.
3619         (cp_finish_file): Call do_static_initialization_or_destruction.
3621 2005-09-22  Jakub Jelinek  <jakub@redhat.com>
3623         PR c++/21983
3624         * class.c (find_final_overrider): Move diagnostic about no unique final
3625         overrider to...
3626         (update_vtable_entry_for_fn): ... here.
3628 2005-09-21  Mark Mitchell  <mark@codesourcery.com>
3630         PR c++/23993
3631         * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
3633 2005-09-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3635         PR c++/23965
3636         * call.c (resolve_args): Return error_mark_node on arguments
3637         whose TREE_TYPE is error_mark_node.
3639 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
3641         PR c++/23947
3642         * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
3643         get_tinfo_ptr calls.
3645 2005-09-16  Mark Mitchell  <mark@codesourcery.com>
3647         PR c++/23914
3648         * parser.c (cp_parser_enclosed_template_argument_list): Make sure
3649         skip_evaluation is false when processing template arguments.
3651         PR c++/21514
3652         * pt.c (check_instantiated_args): Treat uses of anonymous types as
3653         causing type-deduction failure.
3655 2005-09-15  Jason Merrill  <jason@redhat.com>
3657         PR c++/23357
3658         * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
3659         tcc_expression.
3661 2005-09-15  Mark Mitchell  <mark@codesourcery.com>
3663         PR c++/23896
3664         * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
3665         processing template arguments.
3667         * pt.c (check_explicit_instantiation_namespace): Fix typo.
3669         PR c++/13140
3670         * decl.c (check_class_member_definition_namespace): New function.
3671         (grokfndecl): Use it.
3672         (grokvardecl): Likewise.
3673         (grokdecl): Improve documentation.
3674         * pt.c (check_explicit_instantiation_namespace): New function.
3675         (register_specialization): Call check_specialization_namespace
3676         when replacing an implicitly instantiated function.
3677         (check_explicit_specialization): Ensure that DECL_CONTEXT is set
3678         correctly for namespace-scope specializations.
3679         (do_decl_instantiation): Use
3680         check_explicit_instantiation_namespace.
3681         (do_type_instantiation): Likewise.
3683 2005-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3685         PR c++/23725
3686         * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
3688 2005-09-13  Bastian Blank <waldi@debian.org>
3690         PR c++/16171
3691         * mangle.c (find_substitution): Do not use special substitutions
3692         for identifiers not in std::.
3694 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
3696         PR c++/23839
3697         * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
3698         for VAR_DECLs.
3700 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
3702         PR c++/23842
3703         * pt.c (tsubst_default_argument): Do treat default argument
3704         expressions as occurring in the context of the function called.
3706 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
3708         PR c++/23841
3709         * parser.c (cp_parser_primary_expression): Recognize the closing
3710         ">" of a template-argument-list after a floating-point literal as
3711         the end of a cast expression.
3713 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
3715         PR c++/23789
3716         * cvt.c (perform_qualification_conversions): Don't create
3717         unnecessary NOP_EXPRs.
3718         * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
3720 2005-09-12  Ian Lance Taylor  <ian@airs.com>
3722         PR g++/7874
3723         * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
3724         bitfield.  Make dummy bitfield one bit smaller.
3725         (DECL_HIDDEN_FRIEND_P): Define.
3726         (pushdecl_maybe_friend): Declare.
3727         (pushdecl_top_level_maybe_friend): Declare.
3728         * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
3729         Change prototype and all callers.  Add assertion that a
3730         DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P.  Set
3731         DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
3732         appropriate.
3733         * name-lookup.c (supplement_binding): Don't ignore a
3734         DECL_HIDDEN_FRIEND_P.
3735         (pushdecl_maybe_friend): Break out contents of pushdecl.  Add
3736         is_friend parameter.  Set DECL_ANTICIPATED and
3737         DECL_HIDDEN_FRIEND_P for a friend function.
3738         (pushdecl): Just call pushdecl_maybe_friend.
3739         (pushdecl_with_scope): Add is_friend parameter.  Change prototype
3740         and all callers.
3741         (pushdecl_namespace_level): Likewise.
3742         (push_overloaded_decl): Likewise.  Check DECL_HIDDEN_FRIEND_P as
3743         well as DECL_ANTICIPATED when checking for a builtin.
3744         (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
3745         DECL_ANTICIPATED when checking for a builtin.
3746         (do_nonmember_using_decl): Likewise.
3747         (pushdecl_top_level_1): Add is_friend parameter.  Change all
3748         callers.
3749         (pushdecl_top_level_maybe_friend): New function.
3750         (remove_hidden_names): New function.
3751         (struct arg_lookup): Add args field.
3752         (friend_of_associated_class_p): New static function.
3753         (arg_assoc_namespace): Ignore hidden functions which are not
3754         friends of an associated class of some argument.
3755         (lookup_arg_dependent): Remove hidden functions from list passed
3756         in.  Initialize k.args.
3757         * name-lookup.h (remove_hidden_names): Declare.
3758         * friend.c (do_friend): Call pushdecl_maybe_friend instead of
3759         pushdecl.
3760         * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
3761         an assertion, with a check for DECL_HIDDEN_FRIEND_P.
3762         (build_new_function_call): Add koenig_p parameter.  Change
3763         prototype and callers.
3764         * pt.c (register_specialization): Add is_friend parameter.  Change
3765         all callers.
3766         (push_template_decl_real): Change is_friend parameter to bool.
3767         Change prototype and all callers.
3768         (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
3769         instead of pushdecl_top_level.
3771 2005-09-11  Richard Henderson  <rth@redhat.com>
3773         * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
3774         * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
3776 2005-09-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3778         * parser.c (cp_parser_translation_unit): Simplify.  The while-block
3779         was actually executed at most once.
3781 2005-09-09  Richard Henderson  <rth@redhat.com>
3783         PR debug/20998
3784         * cp-tree.def (ALIAS_DECL): Remove.
3785         * cp-lang.c (cp_init_ts): Remove support for it.
3786         * error.c (dump_decl): Likewise.
3787         * name-lookup.c (pushdecl): Likewise.
3788         * semantics.c (finish_id_expression): Likewise.
3789         * decl2.c (build_anon_union_vars): Use a VAR_DECL with
3790         DECL_VALUE_EXPR instead.
3792 2005-09-09  Mark Mitchell  <mark@codesourcery.com>
3794         PR c++/22252
3795         * decl.c (start_preparsed_function): Do not pay attention to
3796         #pragma interface for implicitly-defined methods.
3797         * decl2.c (cp_finish_file): Do not complain about uses of inline
3798         functions that have bodies, even if we decided not to emit the
3799         body in this translation unit.
3800         * semantics.c (note_decl_for_pch): Do not mess with linkage.
3801         (expand_or_defer_fn): Make inline, non-template functions COMDAT
3802         at this point.
3804 2005-09-08  Richard Henderson  <rth@redhat.com>
3806         PR debug/23190
3807         * decl.c (wrapup_globals_for_namespace): Call
3808         emit_debug_global_declarations.
3809         * decl2.c (cp_finish_file): Likewise.
3811 2005-09-08  Mark Mitchell  <mark@codesourcery.com>
3813         PR c++/23691
3814         * decl2.c (mark_used): Instantiate static data members initialized
3815         by constants, even in a template.
3817 2005-09-08  Andrew Pinski  <pinskia@physics.uc.edu>
3819         PR obj-c++/16816
3820         * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
3821         two CPP_COLON.
3823 2005-09-07  Richard Guenther  <rguenther@suse.de>
3825         * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
3826         for EMPTY_CLASS_EXPR.
3828 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
3830         PR c/23075
3831         * typeck.c (check_return_expr): Add no_warning argument.  Set
3832         *no_warning to true if "return-statement with no value, in function
3833         returning" warning has been issued.
3834         * cp-tree.h (check_return_expr): Adjust prototype.
3835         * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
3836         check_return_expr set *no_warning to true.
3838 2005-09-06  Mark Mitchell  <mark@codesourcery.com>
3840         * cp-tree.h (rvalue): New function.
3841         * call.c (build_conditional_expr): Use it.
3842         * init.c (build_new_1): Likewise.
3843         * rtti.c (build_dynamic_cast_1): Likewise.
3844         * tree.c (rvalue): New function.
3845         * typeck.c (build_unary_op): Use it.
3846         (build_static_cast_1): Likewise.
3848         PR c++/9782
3849         * init.c (build_new_1): Make sure the entire array type is
3850         complete, not just its element types.
3852 2005-09-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3854         * decl.c (check_elaborated_type_specifier): Remove redundant check.
3856 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
3858         PR c++/23056
3859         * typeck.c (ignore_overflows): New helper function.
3860         (build_static_cast_1): Use it.
3862 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3864         * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
3865         Follow spelling conventions.
3867 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
3869         PR c++/23667
3870         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
3871         copying a VAR_DECL.
3873 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
3875         PR c++/21440
3876         * semantics.c (finish_stmt_expr_expr): Add an explicit
3877         initialization to the last statement in the statement-expression.
3878         * (finish_stmt_expr): Adjust accordingly.
3880 2005-09-03  Mark Mitchell  <mark@codesourcery.com>
3882         PR c++/23699
3883         * decl2.c (mark_used): Always instantiate static data members
3884         initialized by constant expressions.
3885         * pt.c (instantiate_decl): Instantiate the initializers for static
3886         data members initialized by constant expressions.
3888         PR c++/21687
3889         * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
3890         finishing processing for a template function in a local class.
3891         Revert:
3892         2005-09-02  Mark Mitchell  <mark@codesourcery.com>
3893         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
3894         around functions in local classes.
3896 2005-09-02  Mark Mitchell  <mark@codesourcery.com>
3898         PR c++/21687
3899         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
3900         around functions in local classes.
3902 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
3904         PR obj-c++/23640
3905         * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
3906         init, call generate_ctor_or_dtor_function.
3908 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3910         PR c++/13377
3911         * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
3912         lookup_name_real on final parse.
3914 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3916         PR c++/23639
3917         * semantics.c (qualified_name_lookup_error): Do not complain again
3918         on invalid scope.
3920 2005-08-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3922         PR c++/23586
3923         * parser.c (cp_parser_namespace_name): Move diagnostic for
3924         invalid namespace-name to here from ...
3925         * name-lookup.c (do_namespace_alias): ... here and ...
3926         (do_using_directive): ... here.  Remove dead code.
3928 2005-08-28  Mark Mitchell  <mark@codesourcery.com>
3930         PR c++/23099
3931         * cp-tree.h (saved_scope): Add skip_evaluation.
3932         * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
3933         DECL_INITIAL, to determine whether or not a static data member was
3934         initialized in the class-specifier.
3935         (cp_finish_decl): Add comment.
3936         * init.c (integral_constant_value): Subtitute into the
3937         initializers for static data members in templates.
3938         * name-lookup.c (push_to_top_level): Save skip_evaluation.
3939         (pop_from_top_level): Restore it.
3940         * pt.c (instantiate_class_template): Do not substitute into the
3941         intializers of static data members when instantiating a class.
3942         (regenerate_decl_from_template): Simplify.
3943         (instantiate_decl): Tidy.  Substitute into the initializer for a
3944         static data member even when the definition of the data member is
3945         not available.
3947 2005-08-26  Mark Mitchell  <mark@codesourcery.com>
3949         PR c++/19004
3950         * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
3951         (type_dependent_expression_p): Allow BASELINKs whose associated
3952         functions are simply a FUNCTION_DECL.
3954         PR c++/23491
3955         * cp-tree.h (build_vec_init): Adjust prototype.
3956         * init.c (perform_member_init): Adjust call to build_vec_init.
3957         (build_aggr_init): Likewise.
3958         (build_new_1): Do not call build_default_init for array types.
3959         (build_vec_init): Add explicit_default_init_p parameter.  Perform
3960         default initialization of vector elements when set.
3961         * typeck.c (build_modify_expr): Adjust call to build_vec_init.
3963 2005-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3965         PR c++/20817
3966         * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
3967         ->*.
3969 2005-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3971         PR c++/22454
3972         * parser.c (cp_lexer_peek_nth_token): Relax assert.
3974 2005-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3976         PR c++/23044
3977         * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
3979 2005-08-22  James E Wilson  <wilson@specifix.com>
3981         PR tree-optimization/23426
3982         * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
3983         array size check.
3985 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3987         PR c++/22233
3988         * pt.c (push_template_decl_real): Return error_mark_node if the
3989         number of template parameters does not match previous definition.
3991 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3993         PR c++/23089
3994         * decl.c (require_complete_types_for_parms): Mark incomplete types
3995         as invalid.
3997 2005-08-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3999         * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
4000         Fix typo in leading comment.
4002 2005-08-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4004         * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
4006 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
4008         * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
4009         * call.c (add_template_candidate_real): Pass down 'flags' to
4010         fn_type_unification.
4011         (can_convert_arg): New 'flags' argument. Pass it to call to
4012         implicit_conversion instead of LOOKUP_NORMAL.
4013         (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
4014         * class.c (resolve_address_of_overloaded_function): Ditto.
4015         (resolve_address_of_overloaded_function): Ditto.
4016         * decl.c (reshape_init, check_default_argument): Ditto.
4017         * typeck.c (build_ptrmemfunc): Ditto.
4018         * pt.c (type_unification_real): Add 'flags' argument.
4019         (fn_type_unification): Pass 'flags' to type_unification_real.
4020         (type_unification_real): Pass new 'flags' argument to call to
4021         can_convert_arg.
4023 2005-08-12  Giovanni Bajo  <giovannibajo@libero.it>
4024             Nathan Sidwell  <nathan@codesourcery.com>
4026         PR c++/21799
4027         PR c++/8271
4028         * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
4029         explicitly.
4031 2005-08-12  Nathan Sidwell  <nathan@codesourcery.com>
4033         PR c++/21799
4034         Revert my 2005-07-08 patch
4035         * pt.c (type_unification_real): Remove is_method_argument and
4036         assoicated checks.
4037         (fn_type_unification, unify): Adjust type_unification_real calls.
4039 2005-08-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4041         PR c++/23266
4042         * decl2.c (grokfield): Check that method is not static before
4043         marking it as pure.
4045 2005-08-11  Nathan Sidwell  <nathan@codesourcery.com>
4047         PR c++/23219
4048         * name-lookup.c (pushtag): Process the template type before
4049         altering the identifier lookup fields.  Remove unreachable code
4050         creating an empty stub decl.
4052 2005-08-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4054         PR c++/20646
4055         * decl.c (grokdeclarator): Reset storage_class after error.
4057 2005-08-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4059         PR c++/22508
4060         * init.c (build_new_1): Check for empty candidate list.
4062 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4064         PR c++/23191
4065         * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
4066         before calling build_exception_variant.
4068 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4070         PR c++/19498
4071         * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
4072         if substitution of template args did not succeed.
4074 2005-08-06  Michael Matz  <matz@suse.de>
4076         * method.c (use_thunk): Call init_insn_lengths.
4078 2005-08-05  James A. Morrison  <phython@gcc.gnu.org>
4080         PR c++/22514
4081         * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
4082         sorrycount or errorcount are nonzero.
4084 2005-08-05  Mark Mitchell  <mark@codesourcery.com>
4086         * name-lookup.c (pushtag): Remove accidental commit from:
4087         2004-12-21  Mark Mitchell  <mark@codesourcery.com>
4088         PR c++/19063
4089         * decl.c (grokdeclarator): Return error_mark_node, not
4090         void_type_node, to indicate errors.
4091         * parser.c (cp_parser_template_parameter_list): Robustify.
4092         (cp_parser_template_parameter): Likewise.
4094 2005-08-01  Kazu Hirata  <kazu@codesourcery.com>
4096         * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
4097         Fix comment typos.
4099 2005-07-29  Kazu Hirata  <kazu@codesourcery.com>
4101         * method.c: Fix a comment typo.
4103 2005-07-28  Mark Mitchell  <mark@codesourcery.com>
4105         PR c++/22545
4106         * call.c (add_builtin_candidate): Adjust for changes in
4107         representation of pointer-to-member types.
4109 2005-07-28  Mike Stump  <mrs@apple.com>
4111         * pt.c (check_explicit_specialization): Add visibility logic.
4112         (lookup_template_class): Likewise.
4113         (instantiate_class_template): Likewise.
4115 2005-07-27  Devang Patel  <dpatel@apple.com>
4117         * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
4119 2005-07-25  Ian Lance Taylor  <ian@airs.com>
4121         * ptree.c (cxx_print_identifier): Print a leading space if the
4122         indent level is 0.
4124 2005-07-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4126         * call.c (convert_for_arg_passing): Check function pointers when
4127         -Wmissing-format-attribute is activated.
4128         * typeck.c (convert_for_assignment): Likewise.
4130 2005-07-22  Manfred Hollstein  <mh@suse.com>
4132         * parser.c (cp_parser_declaration): Fix unitialised warnings.
4134 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
4136         * class.c (build_base_path): Fix typo.
4138 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
4140         PR C++/22358
4141         * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
4143 2005-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4145         * call.c: Fix comment typo(s).
4146         * cxx-pretty-print.h: Likewise.
4147         * name-lookup.c: Likewise.
4148         * parser.c: Likewise.
4150 2005-07-20  Douglas Gregor <doug.gregor@gmail.com>
4152         PR c++/2922
4153         * semantics.c (perform_koenig_lookup): For dependent calls, just
4154         return the set of functions we've found so far. Later, it will be
4155         augmented by those found through argument-dependent lookup.
4156         * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing
4157         the optimization that skips namespaces where the functions were
4158         originally found.
4160 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
4162         Make CONSTRUCTOR use VEC to store initializers.
4163         * call.c (convert_default_arg): Update call to digest_init.
4164         * class.c (dump_class_hierarchy, dump_array): Update to cope with
4165         VEC in CONSTRUCTOR_ELTS.
4166         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
4167         (finish_compound_literal, digest_init): Update declaration.
4168         * decl.c (struct reshape_iter): New data type.
4169         (reshape_init_array): Rename to...
4170         (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
4171         (reshape_init): Rewrite from scratch. Split parts into...
4172         (reshape_init_array, reshape_init_vector, reshape_init_class,
4173         reshape_init_r): New functions.
4174         (check_initializer): Update call to reshape_init. Remove obsolete
4175         code.
4176         (initialize_artificial_var, cp_complete_array_type): Update to cope
4177         with VEC in CONSTRUCTOR_ELTS.
4178         * decl2.c (grokfield): Update calls to digest_init.
4179         (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
4180         * error.c (dump_expr_init_vec): New function.
4181         (dump_expr): Use dump_expr_init_vec.
4182         * init.c (build_zero_init, build_vec_init): Update to cope with VEC
4183         in CONSTRUCTOR_ELTS.
4184         (expand_default_init): Update call to digest_init.
4185         * parser.c  (cp_parser_postfix_expression): Use a VEC for the
4186         initializers.
4187         (cp_parser_initializer_list): Build a VEC of initializers.
4188         * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
4189         in CONSTRUCTOR_ELTS.
4190         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
4191         ptm_initializer, class_initializer, get_pseudo_ti_init): Use
4192         build_constructor_from_list instead of build_constructor.
4193         * semantics.c (finish_compound_literal): Update call to digest_init.
4194         * tree.c (stabilize_init): Update to cope with VEC in
4195         CONSTRUCTOR_ELTS.
4196         * typeck.c (build_ptrmemfunc1): Likewise.
4197         * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
4198         Likewise.
4199         (store_init_value): Use build_constructor_from_list and update call
4200         to digest_init.
4201         (digest_init): Rewrite.
4202         (process_init_constructor): Rewrite from scratch. Split into...
4203         (process_init_constructor_array, picflag_from_initializer,
4204         process_init_constructor_record, process_init_constructor_union):
4205         New functions.
4206         (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
4207         New macros.
4208         (build_functional_cast): Use build_constructor_from_list instead of
4209         build_constructor.
4211 2005-07-18  Mark Mitchell  <mark@codesourcery.com>
4213         PR c++/22263
4214         * cp-tree.h (instantiate_decl): Change prototype.
4215         * decl2.c (mark_used): Adjust accordingly.
4216         * pt.c (do_decl_instantiation): Likewise.
4217         (instantiate_class_member): Likewise.
4218         (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p.
4219         Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template
4220         that has no definition available.
4221         (instantiate_pending_templates): Adjust call to instantiate_decl.
4223 2005-07-17  Mark Mitchell  <mark@codesourcery.com>
4225         PR c++/22139
4226         * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation.
4227         * decl.c (duplicate_decls): Re-register template specializations
4228         for functions that have DECL_TEMLPLATE_INFO, even if they do not
4229         have DECL_TEMPLATE_INSTANTIATION set.
4231 2005-07-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4233         * call.c (diagnostic_fn_t): New.
4234         (build_temp, convert_like_real): Use diagnostic_fn_t.
4236 2005-07-15  Mark Mitchell  <mark@codesourcery.com>
4238         PR c++/22204
4239         * repo.c (repo_emit_p): Robustify.
4241 2005-07-14  Daniel Berlin  <dberlin@dberlin.org>
4243         Fix PR c++/22452
4244         * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
4246 2005-07-15  Mark Mitchell  <mark@codesourcery.com>
4248         PR c++/22132
4249         * call.c (implicit_conversion): Add c_cast_p parameter.
4250         (standard_conversion): Likewise.  Allow conversions between
4251         differently-qualified pointer types when performing a C-style
4252         cast.
4253         (add_function_candidate): Adjust callee.
4254         (build_builtin_candidate): Likewise.
4255         (build_user_type_conversion_1): Likewise.
4256         (conditional_conversion): Likewise.
4257         (can_convert_arg): Likewise.
4258         (can_convert_arg_bad): Likewise.
4259         (perform_implicit_conversion): Likewise.
4260         * cp-tree.h (comp_ptr_ttypes_const): Declare.
4261         * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
4262         Return bool.
4264 2005-07-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4265             Nathan Sidwell  <nathan@codesourcery.com>
4267         PR c++/20172
4268         * pt.c (tsubst_template_parms): Check for invalid non-type
4269         parameters.
4271 2005-07-09  Andrew Pinski  <pinskia@physics.uc.edu>
4273         * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
4274         decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
4275         (cp_init_ts): Call init_shadowed_var_for_decl.
4276         Remove include of gt-cp-cp-lang.h.
4277         * cp-objcp-common.c (shadowed_var_for_decl,
4278         decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
4279         cp-lang.c.
4280         (init_shadowed_var_for_decl): New function to initialize
4281         shadowed_var_for_decl.
4282         Include gt-cp-cp-objcp-common.h.
4283         * Make-lang.in (gt-cp-lang.h): Remove.
4284         (gt-cp-cp-objcp-common.h): Add.
4285         (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
4286         (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
4287         * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
4288         * cp-tree (init_shadowed_var_for_decl): Add prototype.
4290 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
4292         * Make-lang.in: Add gt-cp-lang.h.
4293         (cp-lang.o): Ditto.
4294         * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
4295         the field.
4296         * config-lang.in: Add cp-lang.c to gtfiles.
4297         * cp-lang.c: Include hashtab.h.
4298         (cp_init_ts): New function.
4299         (LANG_HOOK_INIT_TS): Use macro.
4300         (decl_shadowed_for_var_lookup): New function.
4301         (decl_shadowed_for_var_insert): Ditto.
4302         * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
4303         (NON_THUNK_FUNCTION_CHECK): Ditto.
4304         (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
4305         (DECL_INIT_PRIORITY): Ditto.
4306         (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
4307         (DECL_SHADOWED_FOR_VAR): Use hashtable.
4308         (SET_DECL_SHADOWED_FOR_VAR): Ditto.
4309         * decl.c (duplicate_decls): Update for new/updated structures.
4310         (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
4311         * decl2.c (start_static_initialization_or_destruction): Deal with
4312         priority.
4313         * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
4314         SET_DECL_RTL.
4315         * tree.c (handle_init_priority_attribute): Handle priority.
4317 2005-07-08  Nathan Sidwell  <nathan@codesourcery.com>
4319         PR c++/21799
4320         * pt.c (type_unification_real): Add is_method argument.  Use it
4321         for this pointer unification.
4322         (fn_type_unification): Adjust type_unification_real call.
4323         (unify): Likewise.
4325 2005-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4327         * pt.c (type_unification_real): Remove allow_incomplete argument.
4328         Remove unreachable code.
4329         (fn_type_unification): Adjust call to type_unification_real.
4330         (unify): Likewise.
4332 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
4334         * Makefile.in (class.o, decl2.o): Adjust dependencies.
4335         * class.c: Include tree-dump.h.
4336         * decl2.c: Include tree-dump.h.
4338 2005-07-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4340         * dump.c: Use dump_string_field.
4342 2005-07-03  Joseph S. Myers  <joseph@codesourcery.com>
4344         * cp-tree.h (GCC_DIAG_STYLE): #undef before defining.  Change
4345         minimum GCC version for format checking to 4.1.
4347 2005-07-02  Kazu Hirata  <kazu@codesourcery.com>
4349         * Make-lang.in (cc1plus-checksum.c): Use
4350         build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
4352 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
4354         * name-lookup.c, parser.c: Use %q, %< and %> to quote in
4355         diagnostics.
4357 2005-07-02  Zack Weinberg  <zack@codesourcery.com>
4358             Joseph S. Myers  <joseph@codesourcery.com>
4360         * error.c (location_of): Add comment.
4361         (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
4362         * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
4363         * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
4364         name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
4365         typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
4366         or cp_pedwarn_at.  Mark up some diagnostic strings with N_.
4368 2005-06-30  Daniel Berlin  <dberlin@dberlin.org>
4370         * decl.c (require_complete_types_for_parms): Call relayout_decl
4371         instead of layout_decl.
4373 2005-06-30  Zack Weinberg  <zack@codesourcery.com>
4374             Jakub Jelinek  <jakub@redhat.com>
4376         * cp-lang.c: No need to include cxx-pretty-print.h.
4377         * error.c (cp_printer): Update signature.  No need to process
4378         flags.
4379         (print_instantiation_partial_context): Output last newline
4380         with pp_base_newline.
4381         * Make-lang.in: Update dependencies.
4383 2005-06-30  Steven Bosscher  <stevenb@suse.de>
4385         * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
4386         DECL_THREAD_LOCAL_P.
4387         (cp_finish_decl): Likewise.
4388         (grokvardecl): Set the default DECL_TLS_MODEL here.
4390 2005-06-28  Joseph S. Myers  <joseph@codesourcery.com>
4392         * cvt.c (ocp_convert): Use invalid_conversion hook.
4393         * typeck.c (build_binary_op): Use invalid_binary_op hook.
4394         (build_unary_op): Use invalid_unary_op hook.
4396 2005-06-28  Paul Brook  <paul@codesourcery.com>
4398         * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
4399         * except.c: Include target.h.
4400         (init_exception_processing): Initialize unwind_resume_libfunc.
4401         * doc/tm.texi: Document TARGET_ASM_TTYPE
4403 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4405         * call.c (build_over_call): Pass in named argument list to
4406         `check_function_arguments'.
4407         * typeck.c (build_function_call): Likewise.
4409 2005-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4411         * cp-tree.h (lang_check_failed): Add noreturn attribute.
4413 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
4415         * all files: Update FSF address in copyright headers.
4417 2005-06-23  Jason Merrill  <jason@redhat.com>
4419         PR c++/19317
4420         * semantics.c (simplify_aggr_init_expr): Use
4421         CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
4423 2005-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4425         * pt.c (register_specialization): Remove superfluous assertion.
4427 2005-06-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4429         * call.c (convert_like_real): Add format attribute.
4430         * typeck.c (check_for_casting_away_constness,
4431         build_static_cast_1): Likewise.
4432         * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
4433         Likewise.
4435 2005-06-17  Geoffrey Keating  <geoffk@apple.com>
4437         PR c++/17413
4438         * pt.c (type_unification_real): Apply template type deduction even
4439         to procedure parameters that are not dependent on a template
4440         parameter.
4442 2005-06-16  Nathan Sidwell  <nathan@codesourcery.com>
4444         * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
4445         change.
4446         (create_pseudo_type_info): First parameter is an int.
4448 2005-06-15  Nathan Sidwell  <nathan@codesourcery.com>
4450         PR c++/20678
4451         * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
4452         null.
4454         * Make-lang.in: Reformat some long lines.
4455         (gt-cp-rtti.h): New target.
4456         (cp/rtti.o): Add dependency.
4457         * config-lang.in (gtfiles): Add cp/rtti.c.
4458         * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
4459         CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
4460         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
4461         CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
4462         CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
4463         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
4464         ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
4465         class_desc_type_node, si_class_desc_type_node,
4466         vmi_class_desc_type_node, ptm_desc_type_node,
4467         base_desc_type_node): Remove.
4468         * decl.c: Adjust documentation of global trees.
4469         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
4470         TINFO_REAL_NAME): Remove.
4471         (struct tinfo_s): New.
4472         (enum tinfo_kind): New.
4473         (tinfo_descs): New.
4474         (get_tinfo_decl): Adjust use of tinfo descriptor.
4475         (tinfo_base_init, generic_initializer, ptr_initializer,
4476         ptm_initializer, class_initializer): Likewise.
4477         (get_pseudo_ti_init): Take descriptor index. Adjust.
4478         (create_pseudo_type_info): Likewise.
4479         (get_pseudo_ti_desc): Return descriptor index. Adjust.
4480         (create_tinfo_types): Adjust use of create_pseudo_type_info.
4481         (emit_tinfo_decl): Adjust use of tinfo descriptor.
4483 2005-06-14  Roger Sayle  <roger@eyesopen.com>
4485         * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
4487 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
4489         * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
4490         (rule for installing g++.1 manpage): Does depend on installdirs.
4492 2005-06-13  Nathan Sidwell  <nathan@codesourcery.com>
4494         PR c++/20789
4495         * decl.c (cp_finish_decl): Clear runtime runtime initialization if
4496         in-class decl's initializer is bad.
4498         PR c++/21929
4499         * parser.c (struct cp_parser): Document that scope could be
4500         error_mark.
4501         (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
4502         scope.
4503         (cp_parser_nested_name_specifier): Return NULL_TREE on error.
4504         (cp_parser_postfix_expression): Deal with null or error_mark
4505         scope.
4506         (cp_parser_elaborated_type_specifier): Adjust
4507         cp_parser_nested_name_specifier call.
4509         * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
4511 2005-06-12  Roger Sayle  <roger@eyesopen.com>
4513         PR c++/21930
4514         * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
4515         Treat CONVERT_EXPR identically to NOP_EXPR.
4517 2005-06-10  Aldy Hernandez  <aldyh@redhat.com>
4519         PR c++/10611
4520         * cvt.c (build_expr_type_conversion): Same.
4521         * typeck.c (build_binary_op): Handle vectors.
4522         (common_type): Same.
4523         (type_after_usual_arithmetic_conversions): Same.
4525 2005-06-08  Nathan Sidwell  <nathan@codesourcery.com>
4527         PR c++/19497
4528         * cp-tree.def (USING_DECL): Update documentation.
4529         * cp-tree.h (DECL_DEPENDENT_P): New.
4530         (USING_DECL_DECLS, USING_DECL_SCOPE): New.
4531         * class.c (handle_using_decl): Move most of the processing to ...
4532         * name-lookup.c (do_class_using_decl): ... here.  Make stricter.
4533         (push_using_decl): Use USING_DECL_SCOPE.
4534         (cp_emit_debug_info_for_using): Make extern.
4535         * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
4536         * name-lookup.h (cp_emit_debug_info_for_using): Declare.
4537         * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
4538         when tsubsting.
4539         (tsubst_expr): Use USING_DECL_SCOPE.
4540         * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
4541         * semantics.c (finish_member_declaration): Likewise.
4543 2005-06-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4545         PR c++/19894
4546         * pt.c (tsubst): Reject pointer-to-member of type void.
4548         PR c++/20563
4549         * parser.c (cp_parser_label_declaration): Deal with invalid/missing
4550         identifiers.
4552 2005-06-07  Nathan Sidwell  <nathan@codesourcery.com>
4554         * cp-tree.def (DEFAULT_ARG): Adjust documentation.
4555         * cp-tree.h (DEFARG_INSTANTIATIONS): New.
4556         (struct tree_default_arg): Add instantiations member.
4557         * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
4558         VEC.
4559         * pt.c (tsubst_arg_types): Likewise.
4561         * parser.c (cp_parser_late_parsing_default_args): Fix overeager
4562         assert in previous patch.
4564 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
4566         * error.c (locate_error): Use gmsgid instead of msgid for argument
4567         name.
4568         (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
4570 2005-06-06  Nathan Sidwell  <nathan@codesourcery.com>
4572         PR 21903
4573         * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
4574         * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
4575         argument to any early instantiations.
4576         * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
4578         PR c++/20637
4579         * cp-tree.h (add_method): Add using_decl parameter.
4580         * class.c (add_method): Add using_decl parameter.  Adjust error
4581         messages.
4582         (handle_using_decl): Pass the using decl to add_method.
4583         (clone_function_decl): Adjust add_member calls.
4584         * decl2.c (check_classfn): Likewise.
4585         * method.c (lazily_declare_fn): Likewise.
4586         * semantics.c (finish_member_declaration): Likewise.
4588         * method.c (synthesize_method): Use inform, not warning.
4590 2005-06-06  Hans-Peter Nilsson  <hp@axis.se>
4592         * config-lang.in (target_libs): Remove target-gperf.
4594 2005-06-05  Mark Mitchell  <mark@codesourcery.com>
4596         PR c++/21619
4597         * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
4598         * parser.c (cp_parser_postfix_expression): Allow non-constant
4599         expressions as arguments to __builtin_constant_p.
4600         * tree.c (builtin_valid_in_constant_expr_p): Use
4601         DECL_IS_BUILTIN_CONSTANT_P.
4603 2005-06-03  Mark Mitchell  <mark@codesourcery.com>
4605         PR c++/21853
4606         * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
4607         the pointed-to type for a pointer-to-member.
4609         PR c++/21336
4610         * cp-tree.h (grok_op_properties): Remove friendp parameter.
4611         * decl.c (grokfndecl): Adjust call.
4612         (grok_op_properties): Determine the class of which the function is
4613         a member by looking at its DECL_CONTEXT, not current_class_type.
4614         * pt.c (tsubst_decl): Adjust call to grok_op_properties.
4616 2005-06-02  Nathan Sidwell  <nathan@codesourcery.com>
4618         * method.c (synthesize_method): Add addtional arg to warning call.
4620         PR c++/21280
4621         * Make-lang.in (method.o): Add diagnostic.h
4622         * decl.c (start_preparsed_function): Use decl's location for file
4623         info.
4624         * decl2.c (cp_finish_file): Set input_location before synthesizing
4625         a function.
4626         (mark_used): When deferring a synthesized function, save current
4627         location.  Do not set function's location when actually
4628         synthesizing it.
4629         * method.c: #include diagnostic.h.
4630         (synthesize_method): Set the functions source location.  Show
4631         needed location if errors are emitted.
4633         * decl.c (start_decl): Simplify specialization handling. Remove
4634         unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
4635         * mangle.c (discriminator_for_local_entity): Use VEC_index.
4637         PR c++/20350
4638         * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
4640         PR c++/21151
4641         * name-lookup.c (pushtag): Push local class even in a template.
4643 2005-05-31  Nathan Sidwell  <nathan@codesourcery.com>
4645         PR c++/21165
4646         * init.c (integral_constant_value): Check the type of the
4647         initializer, not the decl.
4649 2005-05-30  Mark Mitchell  <mark@codesourcery.com>
4651         PR c++/21784
4652         * name-lookup.c (do_nonmember_using_decl): Ignore builtin
4653         functions, even when the used name is not a function.
4655 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
4657         * operators.def, optimize.c: Update copyright.
4659 2005-05-28  Mark Mitchell  <mark@codesourcery.com>
4661         PR c++/21210
4662         * call.c (standard_conversion): Permit conversions to complex
4663         types if conversion to the corresponding scalar type would be
4664         permitted.
4666         PR c++/21340
4667         * method.c (implicitly_declare_fn): Clear processing_template_decl
4668         when generating implicit declaration.
4670 2005-05-27  Mark Mitchell  <mark@codesourcery.com>
4672         PR c++/21614
4673         * typeck.c (get_member_function_from_ptrfunc): Do not attempt
4674         conversions to base classes of incomplete types.
4676 2005-05-27  Ian Lance Taylor  <ian@airs.com>
4678         * semantics.c (add_stmt): Add C++ frontend specific version.
4679         * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
4680         (stmts_are_full_exprs_p): Declare.
4682 2005-05-27  Roger Sayle  <roger@eyesopen.com>
4683             Giovanni Bajo  <giovannibajo@gcc.gnu.org>
4685         * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
4686         * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
4687         of CONVERT_EXPR.
4688         (cp_parser_unary_expression): Likewise.
4689         * typeck.c (build_unary_op): Likewise.
4690         * call.c (add_builtin_candidate, build_new_op): Likewise.
4691         * error.c (dump_expr): Likewise.
4692         * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
4693         * decl.c (ambi_op_p, grok_op_properties): Likewise.
4694         * dump.c (dump_op): Likewise.
4695         * lex.c (init_operators): Likewise.
4696         * operators.def ("+"): Likewise.
4697         * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
4698         conversion, if the result and argument types differ.
4699         * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
4700         like a NOP_EXPR when !processing_template_decl.
4702         * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
4703         (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
4705 2005-05-27  Nathan Sidwell  <nathan@codesourcery.com>
4707         PR c++/21455
4708         * typeck.c (get_delta_difference): Cope with incomplete but equal
4709         classes.  Reorder if.
4711         PR c++/21681
4712         * parser.c (cp_parser_late_parsing_for_member): Disable access
4713         checking for template functions.
4715 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4717         PR c++/21768
4718         * pt.c (redeclare_class_template): Change error message according
4719         to coding conventions.
4721 2005-05-26  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4723         * call.c (build_op_delete_call): Fix quoting in error message.
4725 2005-05-25  Richard Henderson  <rth@redhat.com>
4727         PR libgcj/21692
4728         * cp-tree.h (make_alias_for): Declare.
4729         * decl2.c (build_java_method_aliases): New.
4730         (cp_finish_file): Call it.
4731         * method.c (make_alias_for): Split out from ...
4732         (make_alias_for_thunk): ... here.
4734 2005-05-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
4736         PR c++/21686
4737         * semantics.c (finish_id_expression): Fix quoting in error message.
4739 2005-05-25  DJ Delorie  <dj@redhat.com>
4741         * decl.c (duplicate_decls): Move warning control from if() to
4742         warning(OPT_*).
4743         * name-lookup.c (parse_using_directive): Likewise.
4744         * parser.c (cp_parser_elaborated_type_specifier): Likewise.
4745         (cp_parser_init_declarator): Likewise.
4746         * tree.c (handle_com_interface_attribute): Likewise.
4748 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
4750         * class.c (layout_class_type): Do not issue C++ ABI warnings
4751         for ObjC structs.
4752         * decl.c (objc_mark_locals_volatile): Streamline by calling
4753         objc_volatilize_decl().
4754         * parser.c (cp_parser_objc_message_expression): Allow simple
4755         type specifiers (instead of merely type names) as message
4756         receivers.
4757         * pt.c (template_args_equal): Do not call objc_comptypes().
4758         * typeck.c (composite_pointer_type): If both pointers are
4759         ObjC-esque, arbitrarily choose the first; do not call
4760         objc_comptypes().
4761         (comptypes): Do not call objc_comptypes().
4762         (convert_for_assignment): Call objc_compare_types().
4763         (comp_ptr_ttypes_real): Call objc_type_quals_match() before
4764         concluding that types do not match.
4766 2005-05-24  Andrew Pinski  <pinskia@physics.uc.edu>
4768         PR C++/21645
4769         * optimize.c (update_cloned_parm): Copy the TYPE also from the
4770         original one.
4772 2005-05-19  Jakub Jelinek  <jakub@redhat.com>
4774         PR c++/21495
4775         * decl.c (grokdeclarator): Fix "storage class specified for"
4776         error reporting.
4778 2005-05-19  Kazu Hirata  <kazu@cs.umass.edu>
4780         * parser.c: Fix comment typos.
4782 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
4784         * Make-lang.in (cc1plus-dummy): New.
4785         (cc1plus-checksum.c): New.
4786         (cc1plus-checksum.o): New.
4787         (cc1plus): Add cc1plus-checksum.o.
4789 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
4791         PR C++/19664
4792         * decl2.c (determine_visibility): Don't set visibility to
4793         hidden if it has been set explicitly by user.
4795 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
4796             Mike Stump  <mrs@apple.com>
4798         Yet more Objective-C++...
4800         * cp-objcp-common.h (cxx_get_alias_set): Move from
4801         here...
4802         (cxx_warn_unused_global_decl): Likewise.
4803         (cp_expr_size): Likewise.
4804         (cp_tree_size): Likewise.
4805         (cp_var_mod_type_p): Likewise.
4806         (cxx_initialize_diagnostics): Likewise.
4807         (cxx_types_compatible_p): Likewise.
4808         * cp-tree.h: to here.
4809         (do_poplevel): Add.
4810         * lex.c (D_OBJC): Add.
4811         (init_reswords): Add.
4812         * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
4813         * parser.c: Add c-common.h include.
4814         * pt.c: Add c-common.h and cp-objcp-common.h includes.
4815         (template_args_equal): Use objc_comptypes as well.
4816         (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
4817         * semantics.c (do_poplevel): Remove static.
4819         * decl.c (objc_mark_locals_volatile): Don't change decls that are
4820         already ok.
4821         * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
4822         Objective C++ early enough.
4823         * lex.c (struct resword reswords): Add Objective-C++ support.
4824         * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
4825         (cp_parser_objc_message_receiver): Add.
4826         (cp_parser_objc_message_args): Likewise.
4827         (cp_parser_objc_message_expression): Likewise.
4828         (cp_parser_objc_encode_expression): Likewise.
4829         (cp_parser_objc_defs_expression): Likewise.
4830         (cp_parser_objc_protocol_expression): Likewise.
4831         (cp_parser_objc_selector_expression): Likewise.
4832         (cp_parser_objc_expression): Likewise.
4833         (cp_parser_objc_visibility_spec): Likewise.
4834         (cp_parser_objc_method_type): Likewise.
4835         (cp_parser_objc_protocol_qualifiers): Likewise.
4836         (cp_parser_objc_typename): Likewise.
4837         (cp_parser_objc_selector_p): Likewise.
4838         (cp_parser_objc_selector): Likewise.
4839         (cp_parser_objc_method_keyword_params): Likewise.
4840         (cp_parser_objc_method_tail_params_opt): Likewise.
4841         (cp_parser_objc_interstitial_code): Likewise.
4842         (cp_parser_objc_method_signature): Likewise.
4843         (cp_parser_objc_method_prototype_list): Likewise.
4844         (cp_parser_objc_method_definition_list): Likewise.
4845         (cp_parser_objc_class_ivars): Likewise.
4846         (cp_parser_objc_identifier_list): Likewise.
4847         (cp_parser_objc_alias_declaration): Likewise.
4848         (cp_parser_objc_class_declaration): Likewise.
4849         (cp_parser_objc_protocol_declaration): Likewise.
4850         (cp_parser_objc_protocol_refs_opt): Likewise.
4851         (cp_parser_objc_superclass_or_category): Likewise.
4852         (cp_parser_objc_class_interface): Likewise.
4853         (cp_parser_objc_class_implementation): Likewise.
4854         (cp_parser_objc_end_implementation): Likewise.
4855         (cp_parser_objc_declaration): Likewise.
4856         (cp_parser_objc_try_catch_finally_statement): Likewise.
4857         (cp_parser_objc_synchronized_statement): Likewise.
4858         (cp_parser_objc_throw_statement): Likewise.
4859         (cp_parser_objc_statement): Likewise.
4860         (cp_parser_primary_expression): Add Objective-C++.
4861         (cp_parser_statement): Likewise.
4862         (cp_parser_declaration): Likewise.
4863         (cp_parser_simple_type_specifier): Likewise.
4864         (cp_parser_type_name): Likewise.
4865         (cp_parser_parameter_declaration_list): Likewise.
4866         (cp_parser_member_declaration) Likewise.
4867         * tree.c: Include debug.h.
4868         * typeck.c (composite_pointer_type): Add Objective-C++ support.
4869         (finish_class_member_access_expr): Likewise.
4870         (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
4871         (build_modify_expr): Allow objc to generate write barriers.
4873         * Make-lang.in (cp/tree.o): Add debug.h.
4874         * tree.c (lvalue_p_1, case CONST_DECL): Add.
4876 2005-05-18  Jan Hubicka  <jh@suse.cz>
4878         * method.c: Include tree-pass.h
4879         (use_thunk): Lower body before expanding.
4881 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
4883         PR c++/21454
4884         * decl.c (maybe_deduce_size_from_array_init): Call
4885         cp_apply_type_quals_to_decl after completing array type.
4887 2005-05-16  Richard Henderson  <rth@redhat.com>
4889         * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
4890         (build_library_fn): ... here.
4892 2005-05-12  Ian Lance Taylor  <ian@airs.com>
4894         * cp-tree.h (cp_stmt_codes): Don't define.
4895         (statement_code_p): Declare.
4896         (STATEMENT_CODE_P): Define.
4897         * lex.c (statement_code_p): Define.
4898         (cxx_init): Use actual codes in stmt_codes initializer, not
4899         cp_stmt_codes macro.  Initialize statement_code_p directly, rather
4900         than using INIT_STATEMENT_CODES.
4902 2005-05-09  Mark Mitchell  <mark@codesourcery.com>
4904         * typeck.c (build_unary_op): Do not resort to address arithmetic
4905         when taking the address of a COMPONENT_REF.
4907 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
4909         * class.c (vtbl_init_data_s): Change the type of fns to
4910         VEC(tree,gc)*.
4911         (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
4912         Use VEC instead of VARRAY.
4914 2005-05-07  Richard Sandiford  <rsandifo@redhat.com>
4916         * mangle.c: Remove a reference to the MIPS -mint64 option.
4918 2005-05-07  Kazu Hirata  <kazu@cs.umass.edu>
4920         * decl.c (wrapup_globals_for_namespace): Use VEC instead of
4921         VARRAY.
4922         * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
4923         * name-lookup.h (cp_binding_level): Change the type of
4924         static_decls to VEC(tree,gc)*.
4926         * mangle.c (globals): Change the type of substitutions to
4927         VEC(tree,gc)*.
4928         (dump_substitution_candidates, add_substitution,
4929         find_substitution, finish_mangling, init_mangle): Use VEC
4930         instead of VARRAY.
4932 2005-05-06  Kazu Hirata  <kazu@cs.umass.edu>
4934         * decl2.c (spew_debug): Remove.
4936         * decl2.c (ssdf_decls, start_static_storage_duration_function,
4937         generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
4939         * decl2.c (pending_statics, note_vague_linkage_var,
4940         cp_finish_file): Use VEC instead of VARRAY.
4941         (pending_statics_used): Remove.
4943 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
4945         * decl2.c (deferred_fns, note_vague_linkage_fn,
4946         cp_finish_file): Use VEC instead of VARRAY.
4948 2005-05-05  Mark Mitchell  <mark@codesourcery.com>
4950         PR c++/21352
4951         * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
4953 2005-05-05  Kazu Hirata  <kazu@cs.umass.edu>
4955         * pt.c: Fix a comment typo.
4957 2005-05-04  Kazu Hirata  <kazu@cs.umass.edu>
4959         * cp-tree.h (language_function): Change the type of
4960         x_local_names to VEC.
4961         * decl.c (push_local_name): Adjust uses of local_names.
4963 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
4965         * friend.c, lex.c, mangle.c, repo.c: Update copyright.
4967 2005-05-02  Kazu Hirata  <kazu@cs.umass.edu>
4969         * class.c (local_classes, init_class_processing): Use VEC
4970         instead of VARRAY.
4971         * cp-tree.h (local_classes): Likewise.
4972         * mangle.c (discriminator_for_local_entity): Likewise.
4973         * name-lookup.c (pushtag): Likewise.
4975         * class.c (current_lang_depth, push_lang_context,
4976         pop_lang_context): Use VEC instead of VARRAY.
4977         * cp-tree.h (saved_scope): Use VEC for lang_base instead of
4978         VARRAY.
4979         * name-lookup.c (push_to_top_level): Use VEC instead of
4980         VARRAY.
4982 2005-05-02  Paolo Bonzini  <bonzini@gnu.org>
4984         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
4985         for BUILT_IN_MD built-ins.
4987 2005-05-02  Michael Matz  <matz@suse.de>
4989         PR c++/19542
4990         * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
4991         common frontend.
4992         (null_node): Remove.
4993         * lex.c (cxx_init): Move null_node initialisation to C common frontend.
4995 2005-04-25  Ian Lance Taylor  <ian@airs.com>
4997         * cp-tree.def: Add EXPR_STMT.
4998         * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
4999         (EXPR_STMT_EXPR): Define.
5000         * cp-gimplify.c: Include "flags.h".
5001         (gimplify_expr_stmt): New static function.
5002         (cp_gimplify_expr): Handle EXPR_STMT.
5003         * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
5004         rather than pp_expression.
5005         (pp_cxx_statement): Handle EXPR_STMT.
5006         * dump.c (cp_dump_tree): Handle EXPR_STMT.
5007         * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
5008         initializer.
5010 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
5012         PR C++/21188
5013         * rtti.c (ifnonnull): Cast the zero comparison operand
5014         to the correct type.
5016 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
5018         PR middle-end/20991
5019         * class.c: Include cgraph.h.
5020         (cp_fold_obj_type_ref): Set node->local.vtable_method.
5021         * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
5023 2005-04-12  Markus F.X.J. Oberhumer  <markus@oberhumer.com>
5025         * mangle.c (write_builtin_type): Handle integer types which are
5026         not one of the shared integer type nodes and emit a "vendor
5027         extended builtin type" with an encoding in the form of "u5int96".
5029 2005-04-24  Ian Lance Taylor  <ian@airs.com>
5031         * cp-tree.def (USING_STMT): Change class to tcc_statement.
5032         (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
5033         (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
5034         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
5036 2005-04-23  DJ Delorie  <dj@redhat.com>
5038         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
5039         init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
5040         repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
5041         callers.
5043 2005-04-22  Per Bothner  <per@bothner.com>
5045         * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
5046         input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
5048 2005-04-22  Alexandre Oliva  <aoliva@redhat.com>
5050         PR c++/21087
5051         * name-lookup.c (push_overloaded_decl): Do not overload with
5052         non-duplicate anticipated built-in.
5054 2005-04-21  Kazu Hirata  <kazu@cs.umass.edu>
5056         * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
5057         VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
5059 2005-04-21  Nathan Sidwell  <nathan@codesourcery.com>
5061         * cp-tree.h: Adjust for new VEC API.
5062         Define VEC(tree_pair_s,gc).
5063         (struct save_scope): Adjust.
5064         (struct lang_type_class): Adjust.
5065         (unemitted_tinfo_decls): Adjust.
5066         * class.c (add_method, resort_type_method_vec,
5067         finish_struct_methods, struct find_final_overrider_data,
5068         dfs_find_final_overrider_pre, find_final_overrider,
5069         get_vcall_index, warn_hidden, walk_subobject_offsets,
5070         check_methods, fixup_inline_methods, end_of_class,
5071         warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
5072         add_vcall_offset): Adjust.
5073         * decl.c (xref_basetypes, finish_method): Adjust.
5074         * decl2.c (check_classfn): Adjust.
5075         * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
5076         * method.c (do_build_copy_constructor): Adjust.
5077         * name-lookup.c (new_class_binding, store_binding,
5078         store_bindings, store_class_bindings): Adjust.
5079         * name-lookup.h: Define VEC(cxx_saved_binding,gc),
5080         VEC(cp_class_binding,gc).
5081         (struct cp_binding_level): Adjust.
5082         * parser.c: Define VEC(cp_token_position,heap).
5083         (struct cp_lexer): Adjust.
5084         (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
5085         cp_lexer_save_tokens): Adjust.
5086         * pt.c (retrieve_specialization,
5087         check_explicit_specialization): Adjust.
5088         * rtti.c (unemitted_tinfo_decls): Adjust.
5089         (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
5090         get_pseudo_ti_desc): Adjust.
5091         * search.c (dfs_access_in_type, lookup_conversion_operator,
5092         lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
5093         dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
5094         * semantics.c: Define VEC(deferred_access,gc).
5095         (push_deferring_access_checks): Adjust.
5096         * typeck2.c (abstract_virtuals_error): Adjust.
5098 2005-04-20  Ian Lance Taylor  <ian@airs.com>
5100         * cp-tree.def: Add STMT_EXPR.
5101         * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
5102         (STMT_EXPR_STMT): Define.
5103         * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
5104         STMT_EXPR.
5105         (pp_cxx_expression): Likewise.
5106         (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
5107         * dump.c (cp_dump_tree): Handle STMT_EXPR.
5109 2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>
5111         * decl.c (expand_static_init): Call build2 and build3 instead
5112         of build.
5114         * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
5116 2005-04-17  Ian Lance Taylor  <ian@airs.com>
5118         * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
5119         * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
5120         ARROW_EXPR.
5121         (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
5122         (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
5123         ALIGNOF_EXPR.
5124         * typeck.c (cxx_sizeof_or_alignof_type): Update call to
5125         c_sizeof_or_alignof_type for change in parameter type.
5127 2005-04-16  Mark Mitchell  <mark@codesourcery.com>
5129         PR c++/21025
5130         * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
5131         which sizeof/alignof is dependent, rather than just whether we are
5132         processing_template_decl.
5134 2005-04-17  Kazu Hirata  <kazu@cs.umass.edu>
5136         * cp-tree.h (LOOKUP_GLOBAL): Remove.
5137         (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
5138         LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
5139         LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
5140         their values.
5142 2005-04-15  Richard Henderson  <rth@redhat.com>
5144         PR middle-end/14311
5145         * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
5147 2005-04-15  Kazu Hirata  <kazu@cs.umass.edu>
5149         * cp-tree.h (lang_type_class): Remove redefined.  Move
5150         java_interface into where redefined was.  Increment the width
5151         of dummy.
5152         (TYPE_REDEFINED): Remove.
5154 2005-04-14  Kazu Hirata  <kazu@cs.umass.edu>
5156         * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
5157         CLASSTYPE_TEMPLATE_LEVEL): Remove.
5159 2005-04-11  Mark Mitchell  <mark@codesourcery.com>
5161         * decl2.c (determine_visibility): Don't use export_class_data.
5162         (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
5163         TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
5165 2005-04-09  Kazu Hirata  <kazu@cs.umass.edu>
5167         * cp-tree.h (cxx_alignof): Remove.
5169         * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
5171         * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
5172         CONV_STATIC_CAST): Remove.
5174         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
5176         * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
5178         * cp-tree.h (cp_deprecated): Remove.
5180 2005-04-08  Ian Lance Taylor  <ian@airs.com>
5182         * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
5183         CONTINUE_STMT, SWITCH_STMT.
5184         * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
5185         BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
5186         (WHILE_COND, WHILE_BODY): Define.
5187         (DO_COND, DO_BODY): Define.
5188         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
5189         (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
5190         * cp-gimplify.c (enum bc_t): Define.
5191         (struct cp_gimplify_ctx, ctxp): Define.
5192         (push_context, pop_context): New static functions.
5193         (begin_bc_block, finish_bc_block): New static functions.
5194         (build_bc_goto): New static function.
5195         (gimplify_cp_loop, gimplify_for_stmt): New static functions.
5196         (gimplify_while_stmt, gimplify_do_stmt): Likewise.
5197         (gimplify_switch_stmt): Likewise.
5198         (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
5199         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
5200         (cp_genericize): Call push_context and pop_context.
5201         * semantics.c (finish_break_stmt): Just call build_stmt
5202         (BREAK_STMT) rather than build_break_stmt.
5203         (finish_continue_stmt): Corresponding change.
5204         * decl.c (pop_switch): Update call to c_do_switch_warnings for new
5205         parameters.
5206         * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
5207         WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
5208         * dump.c (cp_dump_tree): Likewise.
5210 2005-04-08  Mark Mitchell  <mark@codesourcery.com>
5212         PR c++/20905
5213         * parser.c (cp_parser_type_specifier_seq): Add is_condition
5214         parameter.
5215         (cp_parser_new_type_id): Pass it.
5216         (cp_parser_condition): Likewise.
5217         (cp_parser_conversion_type_id): Likewise.
5218         (cp_parser_type_id): Likewise.
5219         (cp_parser_type_specifier_seq): In a condition, do not allow
5220         invalid type-specifier combinations.
5221         (cp_parser_exception_declaration): Adjust call to
5222         cp_parser_type_specifier_seq.
5224         * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
5225         * cp-tree.h (struct tinst_level): Add in_system_header_p.
5226         (TINST_IN_SYSTEM_HEADER_P): New macro.
5227         (make_tinst_level): Remove.
5228         * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
5229         the instantiated class.
5230         (push_tinst_level): Do not use make_tinst_level.  Set
5231         TINST_IN_SYSTEM_HEADER_P.
5232         (pop_tinst_level): Likewise.
5233         (instantiate_class_template): Set in_system_header.
5234         (instantiate_pending_templates): Likewise.
5235         * tree.c (make_tinst_level): Remove.
5237 2005-04-06  Joseph S. Myers  <joseph@codesourcery.com>
5239         * decl.c (start_decl): Apply pending #pragma weak regardless of
5240         scope.
5242 2005-04-06  Mark Mitchell  <mark@codesourcery.com>
5244         PR c++/20212
5245         * pt.c (regenerate_decl_from_template): Copy attributes for
5246         parameters from the pattern to the instantiation.
5248 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
5250         PR c++/20734
5251         * cp-tree.def (OFFSET_REF): Correct comments.
5252         * init.c (build_offset_ref): Remove misleading comment.
5253         * typeck.c (build_unary_op): Handle pointer-to-member creation
5254         here, rather than ...
5255         (unary_complex_lvalue): ... here.
5257 2005-04-06  Jason Merrill  <jason@redhat.com>
5259         PR c++/19312
5260         * tree.c (stabilize_init): Don't bother trying to stabilize
5261         something with no side-effects.
5263 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
5265         PR c++/20763
5266         * decl.c (grokdeclarator): Correct attribute handling.
5268 2005-04-05  Mark Mitchell  <mark@codesourcery.com>
5270         PR c++/19159
5271         * decl2.c (import_export_decl): Use non-COMDAT external linkage
5272         for virtual tables, typeinfo, etc. that will be emitted in only
5273         one translation unit on systems without weak symbols.
5275 2005-04-04  Mark Mitchell  <mark@codesourcery.com>
5277         PR c++/20679
5278         * parser.c (cp_parser_template_name): Fix thinko.
5280 2005-04-04  Nathan Sidwell  <nathan@codesourcery.com>
5282         PR c++/20746
5283         * method.c (use_thunk): Protect covariant pointer return
5284         adjustments from NULL pointers.
5286 2005-04-04  Jan Hubicka  <jh@suse.cz>
5288         * decl2.c (finish_objects): Revert my previous patch.
5289         (cp_finish_file): Likewise.
5291 2005-04-03  Kazu Hirata  <kazu@cs.umass.edu>
5293         * pt.c: Fix comment typos.
5295 2005-04-03  Nathan Sidwell  <nathan@codesourcery.com>
5297         PR c++/20723
5298         * pt.c (more_specialized_fn): Member functions are unordered wrt
5299         non-members.  Conversion operators are unordered wrt other
5300         functions.
5302 2005-04-01  Nathan Sidwell  <nathan@codesourcery.com>
5304         * call.c (add_template_candidates_real): Remove length parameter
5305         from fn_type_unification call.
5306         * class.c (resolve_address_of_overloaded_function): Likewise
5307         * cp-tree.h (fn_type_unification): Remove length parameter.
5308         * pt.c (get_bindings_overload): Remove.
5309         (get_bindings_real): Rename to ...
5310         (get_bindings): ... here.  Remove length and strict
5311         parameters. Change return type flag to boolean.  Remove original
5312         forwarding function.
5313         (determine_specialization): Adjust get_bindings call.
5314         (fn_type_unification): Remove length parameter.  Adjust.
5315         (type_unification_real): Remove length parameter.  Adjust.
5316         (resolve_overloaded_unification): Adjust get_bindings call.
5317         (try_one_overload): Simplify confusing cascaded if control flow.
5318         (unify): Remove length paramter from type_unification_real call.
5319         (most_specialized_instantiation): Adjust get_bindings calls.
5320         (most_specialized): Likewise.
5322 2005-03-31  Nathan Sidwell  <nathan@codesourcery.com>
5324         PR c++/19203, implement DR 214
5325         * call.c (joust): Use more_specialized_fn.
5326         * cp-tree.h (DEDUCE_ORDER): Remove.
5327         (more_specialized): Replace with ...
5328         (more_specialized_fn): ... this.
5329         * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
5330         case.
5331         (type_unification_real): Remove DEDUCE_ORDER case.
5332         (more_specialized): Replace with ...
5333         (more_specialized_fn): ... this.  Implement DR 214.
5334         (most_specialized_instantiation): Use get_bindings_real directly.
5336 2005-03-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5338         PR c++/18644
5339         * call.c (build_new_op): Remove check for -Wsynth.
5341 2005-03-31  Jan Hubicka  <jh@suse.cz>
5343         * decl2.c (finish_objects): Mark ctor as needed.
5344         (cp_finish_file): Output variables only in nonunit-at-a-time.
5346 2005-03-29  Richard Henderson  <rth@redhat.com>
5348         PR c/20519
5349         * decl.c (cp_complete_array_type): Rename from complete_array_type.
5350         Use the new complete_array_type in c-common.c.  Update all callers.
5351         * cp-tree.h (cp_complete_array_type): Update to match.
5353 2005-03-24  Geoffrey Keating  <geoffk@apple.com>
5355         * typeck.c (build_static_cast_1): Allow scalar_cast between
5356         any integral, floating, or enumeration type.
5358 2005-03-24  Steven Bosscher  <stevenb@suse.de>
5360         * typeck.c (comptypes): First determine if the types are compatible
5361         from a target-independent point of view.  Check target attributes
5362         last.
5364         * class.c (build_base_path):
5365         (build_vbase_offset_vtbl_entries):
5366         (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
5367         * error.c (dump_expr): Likewise.
5368         * init.c (build_zero_init, expand_cleanup_for_base,
5369         build_vec_delete_1): Likewise.
5370         * mangle.c (write_integer_cst): Likewise.
5371         * method.c (thunk_adjust): Likewise.
5372         * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
5373         * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
5374         * typeck.c (build_ptrmemfunc_access_expr,
5375         (get_member_function_from_ptrfunc): Likewise.
5377 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
5379         * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
5381 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
5383         * cp-tree.h (perform_integral_promotions): Remove.
5384         (default_conversion): Add.
5386 2005-03-22  Mark Mitchell  <mark@codesourcery.com>
5388         * parser.c (cp_parser_warn_min_max): New function.
5389         (cp_parser_binary_expression): Use it.
5390         (cp_parser_assignment_operator_opt): Likewise.
5391         (cp_parser_operator): Likewise.
5393 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5395         PR c++/19980
5396         * decl.c (start_preparsed_function): Robustify.
5398 2005-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5400         PR c++/20499
5401         * parser.c (cp_parser_class_head): Return NULL_TREE when
5402         encountering a redefinition.
5404 2005-03-22  Nathan Sidwell  <nathan@codesourcery.com>
5406         PR c++/20465
5407         PR c++/20381
5408         * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
5409         template.
5411 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
5413         PR c++/20461
5414         PR c++/20536
5415         * init.c (emit_mem_initializers): Don't crash on undefined
5416         types.
5418 2005-03-21  Paolo Carlini  <pcarlini@suse.de>
5420         PR c++/20147
5421         * semantics.c (finish_stmt_expr_expr): Return immediately
5422         if error_operand_p (expr).
5424 2005-03-21  Joseph S. Myers  <joseph@codesourcery.com>
5426         * cp-tree.h (lvalue_or_else, lvalue_p): New.
5427         * typeck.c (lvalue_or_else): New.  Call lvalue_error.
5429 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5431         PR c++/20240
5432         * decl.c (decls_match): Compare context of VAR_DECL.
5434 2005-03-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5436         PR c++/20333
5437         * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
5438         Check the return value of cp_parser_nested_name_specifier.
5440 2005-03-18  Dale Johannesen <dalej@apple.com>
5442         * cp/tree.c (cp_tree_equal):  Handle SSA_NAME.
5444 2005-03-18  Paolo Carlini  <pcarlini@suse.de>
5446         PR c++/20463
5447         * parser.c (cp_parser_diagnose_invalid_type_name):
5448         Check TYPE_BINFO (current_class_type) before attempting
5449         to emit inform messages.
5451 2005-03-17  Paolo Carlini  <pcarlini@suse.de>
5453         PR c++/19966
5454         * cp-tree.h (grok_op_properties): Change return type to void.
5455         * decl.c (grok_op_properties): Return early - don't check the
5456         arity - in case of a static member or an operator that cannot
5457         be non-member; tidy a bit.
5459 2005-03-17  Nathan Sidwell  <nathan@codesourcery.com>
5461         PR c++/20186
5462         * pt.c (contains_dependent_cast_p): Remove.
5463         (fold_non_dependent_expr): Don't use it.
5464         (value_dependent_expression_p): Use a switch statement.
5465         reference_exprs can be dependent.
5467 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5469         PR c++/4403
5470         PR c++/9783, DR433
5471         * name-lookup.c (pushtag): Skip template parameter scope when
5472         scope is ts_global.  Don't push tag into template parameter
5473         scope.
5474         * pt.c (instantiate_class_template): Reorder friend class
5475         template substitution to handle non-dependent friend class
5476         that hasn't been previously declared.
5478 2005-03-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5480         Friend class name lookup 5/n
5481         PR c++/1016
5482         * cp-tree.h (pushtag): Adjust declaration.
5483         * decl.c (lookup_and_check_tag): Call lookup_type_scope if
5484         lookup_name fails.
5485         (xref_tag): Adjust call to pushtag.  Make hidden class visible.
5486         (start_enum): Adjust call to pushtag.
5487         * name-lookup.c (ambiguous_decl): Ignore hidden names.
5488         (qualify_lookup): Change return type to bool.
5489         (hidden_name_p): New function.
5490         (lookup_namespace_name, unqualified_namespace_lookup,
5491         lookup_name_real): Use it.
5492         (lookup_type_scope): Update comments.
5493         (maybe_process_template_type_declaration): Change parameter name
5494         from globalize to is_friend.
5495         (pushtag): Change globalize parameter of type int to tag_scope.
5496         Hide name if introduced by friend declaration.
5497         * name-lookup.h (hidden_name_p): Add declaration.
5498         * parser.c (cp_parser_lookup_name): Don't deal with hidden name
5499         here.
5500         * pt.c (push_template_decl_real): Make hidden class template
5501         visible.
5502         (lookup_template_class, instantiate_class_template): Adjust call
5503         to pushtag.
5504         * semantics.c (begin_class_definition): Likewise.
5505         * rtti.c (init_rtti_processing, build_dynamic_cast_1,
5506         tinfo_base_init, emit_support_tinfos): Use ts_current instead of
5507         ts_global.
5509 2005-03-13  Mark Mitchell  <mark@codesourcery.com>
5511         PR c++/20157
5512         * pt.c (determine_specialization): Reject non-specializations.
5514 2005-03-11  Per Bothner  <per@bothner.com>
5516         * cp-tree.h (struct cp_declarator): New id_loc field.
5517         * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
5518         location using c_lex_with_flags, instead of input_location.
5519         (cp_parser_direct_declarator): Set declarator's id_loc from
5520         cp_token's id_loc.
5522 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5524         PR c++/18384, c++/18327
5525         * decl.c (reshape_init_array): Use UHWI type for max_index_cst
5526         and index.  Convert max_index to size_type_node if it isn't
5527         host_integerp (, 1).
5529 2005-03-09  Mark Mitchell  <mark@codesourcery.com>
5531         PR c++/20208
5532         * pt.c (tsubst_decl): Apply array-to-pointer and
5533         function-to-pointer conversions to function arguments.
5534         (regenerate_decl_from_template): Likewise.
5536 2005-03-09  Paolo Carlini  <pcarlini@suse.de>
5538         PR c++/16859
5539         * decl.c (complete_array_type): In pedantic mode, return
5540         3 for an empty initializer list as the initializer for an
5541         array of unknown bound (8.5.1/4).
5542         (maybe_deduce_size_from_array_init): Fix final test to use
5543         the above.
5545 2005-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5547         PR c++/20186
5548         * pt.c (contains_dependent_cast_p): New.
5549         (fold_non_dependent_expr): Call it.
5551 2005-03-08  Mark Mitchell  <mark@codesourcery.com>
5553         PR c++/20142
5554         * cp-tree.h (target_type): Remove.
5555         * decl.c (layout_var_decl): Remove #if 0'd code.
5556         (cp_finish_decl): Remove dead code.
5557         * init.c (build_vec_init): When determining whether or not the
5558         element type has an asignment operator, look through all array
5559         dimensions.
5560         * typeck.c (target_type): Remove.
5562 2005-03-07  Mark Mitchell  <mark@codesourcery.com>
5564         * class.c (finish_struct_1): Do not warn about non-virtual
5565         destructors in Java classes.
5567 2005-03-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5569         PR c++/19311
5570         * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
5571         * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
5572         for OFFSET_TYPE.
5573         * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
5574         Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
5575         (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
5576         template.
5578 2005-03-02  Alexandre Oliva  <aoliva@redhat.com>
5580         * name-lookup.c (push_overloaded_decl): Don't error if the new
5581         decl matches the old one.
5582         * decl.c (redeclaration_error_message): Likewise.
5584 2005-03-01  Per Bothner  <per@bothner.com>
5586         * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
5587         unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
5589 2005-03-01  Nathan Sidwell  <nathan@codesourcery.com>
5591         PR c++/20232
5592         * class.c (update_vtable_entry_for_fn): Don't crash on invalid
5593         covariancy.
5595         * cp-tree.g (THUNK_TARGET): Expand comment.
5596         * method.c (use_thunk): Make sure we also use the target, if that
5597         is a thunk.
5599 2005-02-27  Jakub Jelinek  <jakub@redhat.com>
5601         PR c++/20206
5602         * decl.c (cxx_comdat_group): Put thunks for
5603         TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
5604         comdat group as the thunk target.
5606 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5608         * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
5609         parser.c: Fix comment typo(s).
5611 2005-02-24  Jakub Jelinek  <jakub@redhat.com>
5613         PR c++/20175
5614         * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
5615         initializes a char/wchar_t array.
5617 2005-02-23  Mark Mitchell  <mark@codesourcery.com>
5619         PR c++/19878
5620         * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
5621         with internal linkage.
5623 2005-02-23  Alexandre Oliva  <aoliva@redhat.com>
5625         * decl.c (grokvardecl): Don't exempt anonymous types from having
5626         linkage for variables that have linkage other than "C".
5628 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
5630         * cp-objcp-common.h, error.c: Update copyright.
5632 2005-02-22  Mark Mitchell  <mark@codesourcery.com>
5634         PR c++/20073
5635         * decl.c (start_decl_1): Don't clear TREE_READONLY.
5636         (cp_finish_decl): Likewise.
5637         (complete_vars): Call cp_apply_type_quals_to_decl.
5638         * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
5639         cases where that's not valid.
5641         PR c++/19991
5642         * init.c (integral_constant_value): Iterate if the value of a decl
5643         is itself a constant.
5645         PR c++/20152
5646         * parser.c (cp_parser_class_head): Check for redefintions here.
5647         * semantics.c (begin_class_definition): Not here.
5649         PR c++/20153
5650         * decl2.c (build_anon_union_vars): Add type parameter.
5651         (finish_anon_union): Pass it.
5653         PR c++/20148
5654         * error.c (dump_expr): Do not print the body of a BIND_EXPR.
5655         Handle STATEMENT_LIST.
5657         PR c++/19883
5658         * parser.c (cp_parser_direct_declarator): Always complain about
5659         non-constant array bounds when in a function scope.
5660         * semantics.c (finish_id_expression): Do not mark dependent names
5661         as non-constant.
5663 2005-02-21  Douglas Gregor  <dgregor@cs.indiana.edu>
5665         PR c++/19076
5666         PR c++/6628
5667         * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
5668         * decl.c (grokdeclarator): Pedwarn about qualifying a function
5669         type.
5670         Add qualifiers when declaring a typedef of a function type.
5671         Member function pointers pick up the qualifiers of the typedef
5672         used to declare them.
5673         Don't complain about creating cv-qualified function types.
5674         Complain about qualified function typedefs that are used to
5675         declare non-static member functions or free functions.
5676         Use cp_apply_type_quals_to_decl.
5677         (start_preparsed_function): Use cp_apply_type_quals_to_decl.
5678         (grokclassfn): Use cp_apply_type_quals_to_decl.
5679         * error.c (dump_type_suffix): Print qualifiers for function
5680         types.
5681         * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
5682         (tsubst): When substituting a function type into a member
5683         pointer type, pass along the qualifiers.
5684         (unify): Unify member pointers to member function pointers.
5685         * tree.c (cp_build_qualified_type_real): Function types may be
5686         qualified. This includes restrict qualifiers.
5687         * typeck.c (cp_apply_type_quals_to_decl): New function to replace
5688         use of c_apply_type_quals_to_decl. Drops qualifiers that are being
5689         added to function types.
5691 2005-02-20  Zack Weinberg  <zack@codesourcery.com>
5693         PR 18785
5694         * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
5695         c_common_to_target_charset.  Delete bogus comment.
5697 2005-02-18  Richard Henderson  <rth@redhat.com>
5699         PR libstdc++/10606
5700         * except.c (do_get_exception_ptr): New.
5701         (expand_start_catch_block): Use it.
5703 2005-02-19  Jakub Jelinek  <jakub@redhat.com>
5705         * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
5706         if type is not error_mark_node.
5708 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5710         PR c++/19508
5711         * decl2.c (grokfield): Do not apply attributes to template parameters
5712         as they are ignored by tsubst anyway.
5714 2005-02-18  Jakub Jelinek  <jakub@redhat.com>
5716         PR c++/19813
5717         * decl.c (start_decl_1): Clear TREE_READONLY flag if
5718         its type has TYPE_NEEDS_CONSTRUCTING.
5719         (complete_vars): Likewise.
5721 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
5723         PR c++/20028
5724         * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
5725         template along with TYPE_SIZE.
5727         PR c++/20022
5728         * semantics.c (perform_deferred_access_checks): Use
5729         get_deferred_access_checks to get the top of the stack.
5731 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
5733         PR c++/17788
5734         * class.c (add_implicitly_declared_members, check_field_decl)
5735         (check_field_decls, check_bases): Remove arguments, tests and
5736         assignments of cant_have_default_ctor-related variables.
5738 2005-02-15  Alexandre Oliva  <aoliva@redhat.com>
5740         * decl2.c (mark_used): Set the source location of the used decl to
5741         the current input location here...
5742         * method.c (synthesize_method): ... not here.  Set input_location
5743         from the decl instead.
5745 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5747         PR c++/19608
5748         * parser.c (cp_parser_late_parsing_for_member): Use
5749         current_function_decl as scope to push to and from.
5751         PR c++/19884
5752         * pt.c (check_explicit_specialization): Make sure namespace
5753         binding lookup found an overloaded function.
5754         (lookup_template_function): Just assert FNS is an overloaded
5755         function.
5757         PR c++/19895
5758         * decl.c (grokdeclarator): Check for error mark node in ptrmem
5759         construction.
5761 2005-02-14  Alexandre Oliva  <aoliva@redhat.com>
5763         PR c++/17816
5764         * decl.c (redeclaration_error_message): Report redefinition of
5765         pure virtual function.
5767 2005-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5769         PR c++/19891
5770         * class.c (build_simple_base_path): Build the component_ref
5771         directly.
5772         (update_vtable_entry_for_fn): Walk the covariant's binfo chain
5773         rather than using lookup_base.
5774         * search.c (dfs_walk_once): Add non-recursive assert check.
5775         * typeck.c (build_class_member_access_expr): It is possible for
5776         the member type to be both const and volatile.
5778 2005-02-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5780         PR c++/14479
5781         PR c++/19487
5782         * pt.c (maybe_check_template_type): Remove.
5783         * cp-tree.h (maybe_check_template_type): Remove prototype.
5784         * name-lookup.c (maybe_process_template_type_declaration): Don't
5785         use maybe_check_template_type.
5787 2005-02-11  Richard Henderson  <rth@redhat.com>
5789         PR c++/19632
5790         * pt.c (get_mostly_instantiated_function_type): Save and restore
5791         flag_access_control instead of push/pop_access_scope.
5793 2005-02-10  Mark Mitchell  <mark@codesourcery.com>
5795         PR c++/19755
5796         * decl.c (reshape_init): Issue warnings about missing braces.
5798 2005-02-11  Kazu Hirata  <kazu@cs.umass.edu>
5800         * cp-tree.def, except.c, ptree.c: Update copyright.
5802 2005-02-09  Mark Mitchell  <mark@codesourcery.com>
5804         PR c++/19811
5805         * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
5806         attempting name lookup.
5808         * parser.c (cp_parser_unqualified_id): Initialize type_decl.
5810         PR c++/19787
5811         * call.c (initialize_reference): Robustify.
5813         PR ++/19732
5814         * decl.c (grokdeclarator): Check for invalid use of destructor
5815         names.
5817         PR c++/19762
5818         * parser.c (cp_parser_unqualified_id): Avoid creating destructor
5819         names with invalid types.
5821         PR c++/19826
5822         * parser.c (cp_parser_direct_declarator): Allow type-dependent
5823         expressions as array bounds.
5825         PR c++/19739
5826         * parser.c (cp_parser_attributes_list): Allow empty lists.
5828 2005-02-08  Mark Mitchell  <mark@codesourcery.com>
5830         PR c++/19733
5831         * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
5832         (check_bases): Give warnings about a base class with a
5833         non-virtual destructor, even if it is implicit.
5834         (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
5835         (maybe_warn_about_overly_private_class): Don't use
5836         TYPE_HAS_DESTRUCTOR.
5837         (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
5838         (check_for_override): Give it external linkage.
5839         (add_implicitly_declared_members): Generate destructors lazily.
5840         (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
5841         TYPE_HAS_DESTRUCTOR.
5842         (check_bases_and_members): Call check_methods before
5843         check_field_decls.
5844         (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
5845         TYPE_HAS_DESTRUCTOR.
5846         (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
5847         * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
5848         * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
5849         (lang_type_class): Add lazy_destructor.
5850         (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
5851         (CLASSTYPE_DESTRUCTORS): Robustify.
5852         (TYPE_HAS_DESTRUCTOR): Remove.
5853         (check_for_override): Declare.
5854         (build_vbase_delete): Remove.
5855         * cvt.c (convert_to_void): Issue errors about pseudo-destructor
5856         expressions.
5857         * decl.c (cxx_maybe_build_cleanup): Remove dead code.
5858         * except.c (dtor_nothrow): Lazily create destructors if necessary.
5859         (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5860         * init.c (build_delete): Lazily create destructors, if necessary.
5861         (build_vbase_delete): Remove.
5862         * method.c (locate_dtor): Simplify.
5863         (implicitly_declare_fn): Add support for destructors.
5864         * parser.c (cp_parser_lookup_name): Lazily create destructors, if
5865         necessary.
5866         * pt.c (check_explicit_specialization): Don't use
5867         TYPE_HAS_DESTRUCTOR.
5868         (instantiate_class_template): Likewise.
5869         * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
5870         * rtti.c (emit_support_tinfos): Robustify.
5871         * search.c (lookup_fnfields_1): Lazily create destructors.
5872         * typeck.c (build_class_member_access_expr): Remove
5873         PSEUDO_DTOR_EXPR handling.
5874         (lookup_destructor): Likewise.
5876 2005-02-08  Kazu Hirata  <kazu@cs.umass.edu>
5878         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
5879         copyright.
5881 2005-02-07  Mark Mitchell  <mark@codesourcery.com>
5883         * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
5884         on boolean variables.
5885         (cp_lexer_stop_debugging): Likewise.
5887 2005-02-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
5889         PR c++/17401
5890         * parser.c (cp_parser_pure_specifier): Emit a specific error
5891         message with an invalid pure specifier.
5892         * decl2.c (grok_function_init): Remove.
5893         (grokfield): An initializer for a method is a always a pure
5894         specifier.
5896 2005-02-02  Matt Austern  <austern@apple.com>
5898         PR c++/19628
5899         * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
5900         * parser.c (cp_parser_postfix_expression): Accept function call in
5901         constant expression if builtin_valid_in_constant_expr_p is true
5902         for that function.
5903         * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
5904         * semantics.c (finish_id_expression): Accept function call in constant
5905         expression if builtin_valid_in_constant_expr_p is true for that
5906         function.
5907         * tree.c (builtin_valid_in_constant_expr_p): New.
5909 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5911         PR c++/17413
5912         * pt.c (check_instantiated_args): Improve error message.
5913         Fix logic when to print its second part.
5915 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5917         * cp-tree.h (complete_type_or_else): Remove macro.
5918         (complete_type_or_diagnostic): Rename to complete_type_or_else
5919         and remove last argument.
5920         * typeck.c (complete_type_or_diagnostic): Rename to
5921         complete_type_or_else and remove last argument.
5923 2005-02-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5925         * cp-tree.h (commonparms): Remove prototype.
5926         (convert_arguments): Likewise.
5927         (PFN_FROM_PTRMEMFUNC): Remove.
5928         * typeck.c (commonparms): Make static.
5929         (convert_arguments): Add prototype. Make static.
5930         (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
5932 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
5934         * parser.c (cp_parser_primary_expression): Don't complain about
5935         floating-point literals in integral constant expressions when
5936         !pedantic.
5938 2005-02-01  Alexandre Oliva  <aoliva@redhat.com>
5940         * parser.c (cp_parser_template_id): Revert comment patch too.
5942         PR c++/18757
5943         PR c++/19366
5944         PR c++/19499
5945         * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
5946         Issue an error when creating the template id.
5947         * pt.c (fn_type_unification): Return early if the explicit
5948         template arg list is an error_mark_node.
5950 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
5952         * decl.c (build_enumerator): Do not issue duplicate error messages
5953         about invalid enumeration constants.
5954         * parser.c (cp_parser_non_integral_constant_expression): Always
5955         set parser->non_integral_constant_expression_p.
5956         (cp_parser_primary_expression): Add cast_p parameter.  Issue
5957         errors about invalid uses of floating-point literals in
5958         cast-expressions.
5959         (cp_parser_postfix_expression): Add cast_p parameter.
5960         (cp_parser_open_square_expression): Pass it.
5961         (cp_parser_parenthesized_expression_list): Add cast_p parameter.
5962         (cp_parser_unary_expression): Likewise.
5963         (cp_parser_new_placement): Pass it.
5964         (cp_parser_direct_new_declarator): Likewise.
5965         (cp_parser_new_initializer): Likewise.
5966         (cp_parser_cast_expression): Add cast_p parameter.
5967         (cp_parser_binary_expression): Likewise.
5968         (cp_parser_question_colon_clause): Likewise.
5969         (cp_parser_assignment_expression): Likewise.
5970         (cp_parser_expression): Likewise.
5971         (cp_parser_constant_expression): If an integral constant
5972         expression is invalid, return error_mark_node.
5973         (cp_parser_expression_statement): Pass cast_p.
5974         (cp_parser_condition): Likewise.
5975         (cp_parser_iteration_statement): Likewise.
5976         (cp_parser_jump_statement): Likewise.
5977         (cp_parser_mem_initializer): Likewise.
5978         (cp_parser_template_argument): Likewise.
5979         (cp_parser_parameter_declaration): Likewise.
5980         (cp_parser_initializer): Likewise.
5981         (cp_parser_throw_expression): Likewise.
5982         (cp_parser_attribute_list): Likewise.
5983         (cp_parser_simple_cast_expression): Likewise.
5984         (cp_parser_functional_cast): Likewise.
5985         (cp_parser_late_parsing_default_args): Likewise.
5986         (cp_parser_sizeof_operand): Save/restore
5987         non_integral_constant_expression_p.
5989 2005-01-31  Mike Stump  <mrs@apple.com>
5991         * parser.c (cp_lexer_new_main): Get the first token, first, before
5992         doing anything.
5994 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
5996         * decl.c (start_decl): Add missing parentheses.
5998 2005-01-30  Mark Mitchell  <mark@codesourcery.com>
6000         PR c++/19555
6001         * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
6002         * decl.c (duplicate_decls): Do not discard
6003         DECL_IMPLICIT_INSTANTIATION when merging declarations.
6004         (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
6005         variables that do not have DECL_USE_TEMPLATE.
6007         PR c++/19395
6008         * decl.c (grokdeclarator): Refactor code so that qualified names
6009         are never allowed as the declarator in a typedef.
6011         PR c++/19367
6012         * name-lookup.c (do_nonmember_using_decl): Avoid overloading
6013         builtin declarations.
6015         PR c++/19457
6016         * call.c (convert_like_real): Inline call to
6017         dubious_conversion_warnings here.
6018         * cp-tree.h (dubious_conversion_warnings): Remove.
6019         * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
6020         setting TREE_NEGATED_INT.
6021         * typeck.c (dubious_conversion_warnings): Remove.
6023         PR c++/19349
6024         * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
6025         memory.
6027 2005-01-28  Mark Mitchell  <mark@codesourcery.com>
6029         PR c++/19253
6030         * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
6031         tentative parses.
6033         PR c++/19667
6034         * pt.c (redeclare_class_template): Robustify.
6036 2005-01-27  Steven Bosscher  <stevenb@suse.de>
6038         * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
6039         instead of SWITCH_EXPR ones.
6040         * pt.c (tsubst_expr): Likewise.
6041         * semantics.c (begin_switch_stmt, finish_switch_cond,
6042         finish_switch_stmt): Likewise.
6044 2005-01-26  J"orn Rennecke <joern.rennecke@st.com>
6046         PR c++/18370
6047         * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
6049 2005-01-25  Andrew Pinski  <pinskia@physics.uc.edu>
6051         * class.c (abort_fndecl_addr): New variable.
6052         (build_vtbl_initializer): If we have a pure virtual function
6053         share the abort function's address.
6054         Include gt-cp-class.h at the end.
6055         * config-lang.in (gtfiles): Add cp/class.c.
6057 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6059         * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
6060         (pp_cxx_function_definition): Make static.
6061         * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
6062         (pp_cxx_function_definition): Likewise.
6064 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6066         * name-lookup.c (print_binding_level): Make static.
6067         (constructor_name_full): Make static inline.
6068         (current_decl_namespace): Make static.
6069         * name-lookup.h (constructor_name_full): Remove prototype.
6070         (print_binding_level): Likewise.
6071         (current_decl_namespace): Likewise.
6073 2005-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6075         * decl.h (debug_bindings_indentation): Remove.
6077 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
6079         * typeck.c: Fix a comment typo.
6081 2005-01-21  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
6083         PR c++/19208
6084         * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
6085         at least once.
6086         (tsubst): Use fold_decl_constant_value in place of a bare call to
6087         integral_constant_value.
6089 2005-01-20  Kazu Hirata  <kazu@cs.umass.edu>
6091         * typeck.c (more_qualified_p): Remove.
6092         * cp-tree.h: Remove the corresponding prototype.
6094 2005-01-19  Matt Austern  <austern@apple.com>
6096         * typeck.c (comptypes): Handle return code from objc_comptypes
6097         correctly.
6099 2005-01-19  Kazu Hirata  <kazu@cs.umass.edu>
6101         * cp-tree.h, name-lookup.h: Remove unused prototypes.
6103 2005-01-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6105         PR c++/19375
6106         * semantics.c (finish_id_expression): Disable access checking for
6107         already lookuped FIELD_DECL.
6109 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6111         * decl.c (delete_block): Remove.
6112         * cp-tree.h: Remove the corresponding prototype.
6114         * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
6115         walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
6116         Remove.
6117         * cp-tree.h: Remove the corresponding prototypes.
6119         * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
6120         cp_update_decl_after_saving, name_p): Remove.
6121         * cp-tree.h: Remove the corresponding prototypes.
6123 2005-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
6125         PR c/19472
6126         * semantics.c (finish_asm_stmt): Strip nops off
6127         input memory operands.
6129 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6131         * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
6132         typeck2.c: Update copyright.
6134 2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>
6136         * class.c (get_enclosing_class): Remove.
6137         * cp-tree.h: Remove the corresponding prototypes.
6139         * cvt.c (convert_lvalue): Remove.
6140         * cp-tree.h: Remove the corresponding prototype.
6142         * pt.c (tinst_for_decl): Remove.
6143         * cp-tree.h: Remove the corresponding prototypes.
6145         * tree.c (hash_chainon): Remove.
6146         * cp-tree.h: Remove the corresponding prototypes.
6148 2005-01-15  Jakub Jelinek  <jakub@redhat.com>
6150         PR c++/19263
6151         * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
6152         of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
6154 2005-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6156         * Make-lang.in (cp-warn): Don't append $(WERROR).
6158 2005-01-10  Kazu Hirata  <kazu@cs.umass.edu>
6160         * cp-tree.h: Fix a comment typo.
6162 2005-01-07  Nathan Sidwell  <nathan@codesourcery.com>
6164         PR c++/19298
6165         * pt.c (tsubst_qualified_id): Call convert_from_reference.
6167 2005-01-06  Mark Mitchell  <mark@codesourcery.com>
6169         PR c++/19244
6170         * class.c (add_implicitly_declared_members): Remove dead code.
6171         * decl.c (grokfndecl): Add sfk parameter.  Use it do set
6172         DECL_CONSTRUCTOR_P.
6173         (grokdeclarator): Adjust calls to grokfndecl.
6174         * method.c (implicitly_declare_fn): Improve documentation.
6175         * parser.c (cp_parser_direct_declarator): Do not consider a
6176         function to be a constructor if the containing class was
6177         originally anonymous.
6179 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6181         PR c++/17154
6182         * search.c (lookup_field_1): Handle using declaration in
6183         class template partial specialization.
6185 2005-01-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6187         PR c++/19258
6188         * pt.c (push_access_scope): Handle friend defined in class.
6189         (pop_access_scope): Likewise.
6191 2005-01-06  Nathan Sidwell  <nathan@codesourcery.com>
6193         PR c++/19270
6194         * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
6195         (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
6196         array-new handling code.  Use build_x_binary_op.
6198 2005-01-05  Nathan Sidwell  <nathan@codesourcery.com>
6200         PR c++/19030
6201         * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
6202         * name-lookup.h (push_scope): Return pushed scope, not flag.
6203         * name-lookup.c (push_scope): Return scope that should be popped,
6204         not a flag.
6205         * decl.c (start_decl): Adjust.
6206         (grokfndecl): Adjust scope push and pop.
6207         * decl2.c (check_classfn): Likewise.
6208         * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
6209         cp_parser_init_declarator, cp_parser_direct_declarator,
6210         cp_parser_class_specifier, cp_parser_class_head,
6211         cp_parser_lookup_name,
6212         cp_parser_constructor_declarator_p): Likewise.
6213         * pt.c (instantiate_class_template,
6214         resolve_typename_type): Likewise.
6216 2005-01-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
6218         PR c++/14136
6219         * parser.c (cp_parser_unqualified_id): Do not issue error message
6220         for typedef-name as destructor declarator when performing an
6221         uncommitted tentative parse.
6223 2005-01-01  Steven Bosscher  <stevenb@suse.de>
6225         PR middle-end/17544
6226         * decl.c (finish_function): Fix comment.  Annotate the compiler
6227         generated return with the current file name and line 0.