OSDN Git Service

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