OSDN Git Service

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