OSDN Git Service

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