OSDN Git Service

84c02edf5f0541ae5adf6b3c570c6c85e924965d
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2006-08-28  Jason Merrill  <jason@redhat.com>
2
3         PR c++/26670
4         * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
5         fields can't be packed.
6
7         PR c++/26577
8         * cvt.c (convert_to_void): Don't automatically load from volatiles 
9         of TREE_ADDRESSABLE type.
10
11 2006-08-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
12
13         PR c++/28860
14         * cp-tree.h (maybe_process_partial_specialization): Return
15         tree instead of void.
16         * parser.c (cp_parser_class_head): Use return value of
17         maybe_process_partial_specialization.
18         * pt.c (maybe_process_partial_specialization): Return error_mark_node
19         for broken specializations, TYPE otherwise.  Check for template
20         template parameters.
21
22 2006-08-27  Mark Mitchell  <mark@codesourcery.com>
23
24         PR c++/28058
25         * pt.c (register_specialization): Return error_mark_node for
26         specialization-after-instantiation.
27         * decl2.c (mark_used): Mark the main function used when one of its
28         clones is used.
29         
30 2006-08-27  Lee Millward  <lee.millward@codesourcery.com>
31
32         PR c++/26573
33         * class.c (check_field_decls): Don't issue error about
34         local classes containing static data members.
35         
36 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
37
38         PR c++/24009
39         * parser.c (struct cp_token): Add input_file_stack_index.
40         (eof_token): Update.
41         (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
42         (cp_lexer_set_source_position_from_token): Restore input file
43         stack.
44
45 2006-08-26  Lee Millward  <lee.millward@codesourcery.com>
46
47         PR c++/28736
48         PR c++/28737
49         PR c++/28738
50         * pt.c (process_template_parm): Store invalid template
51         parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
52         (push_inline_template_parms_recursive): Check for template
53         parameters having a TREE_VALUE of error_mark_node rather than
54         check the parameter itself.
55         (mangle_class_name_for_template): Likewise.
56         (comp_template_parms): When comparing the individual template
57         parameters, return 1 if either is error_mark_node.
58         (current_template_args): Robustify.
59         (redeclare_class_template): Likewise.
60         
61 2006-08-26  Mark Mitchell  <mark@codesourcery.com>
62
63         PR c++/28588
64         * class.c (resolve_address_of_overloaded_function): Add
65         access_path parameter.  Perform access checks.
66         (instantiate_type): Adjust call to
67         resolve_address_of_overloaded_function.  Remove unnecessary code.
68         * tree.c (is_overloaded_fn): Document.  Return 2 when there are
69         acutally multiple functions.
70         (really_overloaded_fn): Use is_overloaded_fn.
71         * mangle.c (write_expression): Handle BASELINKs.
72         * cp-tree.h (really_overloaded_fn): Return bool.
73         (baselink_for_fns): Declare.
74         * search.c (lookup_member): Check access for single static
75         functions here.
76         * pt.c (convert_nontype_argument_function): Handle BASELINKs.
77         (tsubst_copy_and_build): Generate BASELINKs for template-ids.
78         * semantics.c (finish_call_expr): Use baselink_for_fns.
79         (baselink_for_fns): New function.
80         (finish_id_expression): Use it.
81         * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
82
83         PR c++/28595
84         * pt.c (tsubst): Issue errors about attempts to create VLAs at
85         template-instantiation time.
86
87 2006-08-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
88
89         PR c++/28853
90         * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
91         template parameters.  Improve error message for template type
92         parameters.
93
94         PR c++/28852
95         * cp-tree.h (grok_op_properties): Return bool instead of void.
96         * decl.c (grokfndecl): Discard invalid operator declarations.
97         (copy_fn_p): Revert change for PR 27547.
98         (grok_op_properties): Return error status (true on success).
99         * pt.c (tsubst_decl): Discard invalid operator declarations.
100
101 2006-08-25  Mark Mitchell  <mark@codesourcery.com>
102
103         PR c++/28056
104         * decl.c (grokdeclarator): Disallow declarations with qualified
105         names in local scopes.
106
107 2006-08-25  Nathan Sidwell  <nathan@codesourcery.com>
108
109         PR c++/27787
110         * decl.c (make_typename_type): Only try and resolve it when
111         context is not dependent.  Refactor.
112         * decl2.c (check_classfn): Push to class scope before looking for
113         the function.
114
115 2006-08-24  Danny Smith   <dannysmith@users.sourceforge.net>
116
117         PR driver/28528
118         * g++spec.c (lang_specific_driver): Always check if we need to
119         swallow a space-separated  arg to '-x'.
120         * lang-specs.h: Don't create ouput files for '-xc++-header'
121         if -fsyntax-only.
122
123 2006-08-23  Jason Merrill  <jason@redhat.com>
124
125         PR c++/27714
126         * pt.c (push_template_decl_real): A friend template with class 
127         scope isn't primary.
128
129 2006-08-23  Benjamin Smedberg <benjamin@smedbergs.us>
130
131         PR c++/28687
132         * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
133         Move -fno-rtti check to be more specific.
134
135 2006-08-22  Jason Merrill  <jason@redhat.com>
136
137         PR c++/23372
138         * call.c (build_over_call): Don't make a copy here if build_call 
139         will make one too.
140
141 2006-08-22  Andrew Pinski  <pinskia@physics.uc.edu>
142
143         PR C++/28450
144         * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
145         COMPLEX_TYPEs.
146
147 2006-08-22  Simon Martin  <simartin@users.sourceforge.net>
148
149         PR c++/28420
150         * parser.c (cp_parser_postfix_expression): Make sure that the
151         saved value for parser->type_definition_forbidden_message is
152         restored before returning to avoid an invalid free().
153
154 2006-08-22  Jason Merrill  <jason@redhat.com>
155
156         PR c++/28659
157         * typeck.c (merge_types): If either of the types have the right 
158         attributes, return that one.
159
160         * tree.c (cp_build_type_attribute_variant): Make sure we aren't
161         doing this to class types.
162         * typeck.c (original_type): Deal with type quals properly.
163
164 2006-08-21  Jason Merrill  <jason@redhat.com>
165
166         PR c++/27115
167         * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
168         just leave the expression as it is.
169         (finish_stmt_expr): If the statement-expression has class type,
170         wrap it in a TARGET_EXPR.
171         * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
172         CLEANUP_POINT_EXPR.
173         * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
174
175 2006-08-21  Lee Millward  <lee.millward@codesourcery.com>
176
177         PR c++/26269
178         * decl.c (duplicate_decls): Return early if either
179         newdecl or olddecl is error_mark_node.
180
181          PR c++/28505
182         * decl.c (grokdeclarator): Return early after
183         issuing diagnostic about an incomplete type.
184
185         PR c++/28741
186         * tree.c (decl_anon_ns_mem_p): Robustify.
187         * decl2.c (determine_visibility): Likewise.
188         
189 2006-08-20  Mark Mitchell  <mark@codesourcery.com>
190
191         PR c++/28341
192         * tree.c (cast_valid_in_integral_constant_expression_p): New
193         function.
194         * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
195         * pt.c (tsubst_expr): Add integral_constant_expression_p
196         parameter.
197         (fold_non_dependent_expr): Adjust callers of
198         tsubst_{expr,copy_and_build}.
199         (tsubst_friend_function): Likewise.
200         (tsubst_template_arg): Likewise.
201         (tsubst_default_argument): Likewise.
202         (tsubst_decl): Likewise.
203         (tsubst): Likewise.
204         (tsubst_omp_clasuses): Likewise.
205         (regenerate_decl_fromp_template): Likewise.
206         (instantiate_decl): Likewise.
207         (tsubst_initializer_list): Likewise.
208         (tsubst_enum): Likewise.
209         (tsubst_expr): Use RECUR throughout.
210         (tsubst_copy_and_build): Change definition of RECUR.  Do not allow
211         invalid casts in integral constant expressions.
212         * parser.c (cp_parser_postfix_expression): Use
213         cast_valid_in_integral_constant_expression_p.
214         (cp_parser_cast_expression): Likewise.
215         (cp_parser_functional_cast): Likewise.
216
217         PR c++/28346
218         * pt.c (tsubst_qualified_id): Do not strip references from
219         OFFSET_REFs. 
220
221 2006-08-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
222
223         PR c++/28606
224         * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
225         Fix formatting.
226         (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
227         for valid type-names.
228         (cp_parser_unqualified_id): Fix error handling for destructors.
229
230         PR c++/28710
231         * decl.c (xref_tag): Improve error message.  Return early on error.
232
233         PR c++/28711
234         * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
235
236 2006-08-17  Paolo Bonzini  <bonzini@gnu.org>
237
238         PR c++/28573
239         * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
240
241 2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
242
243         PR c++/28302
244         * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
245         perform_integral_promotions for non integral type.
246
247 2006-08-16  Jason Merrill  <jason@redhat.com>
248
249         PR c++/28385
250         * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
251         if arg is a function.
252
253 2006-08-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
254
255         PR c++/28593
256         * init.c (build_new): Return early on invalid placement.
257
258 2006-08-15  Lee Millward  <lee.millward@codesourcery.com>
259
260         PR c++/28594
261         * pt.c (process_template_parm): Robustify.
262         
263 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
264
265         PR c++/28288
266         PR c++/14556
267         * operators.def: Remove <?, ?>, <?=, and >?= operators.
268         * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
269         (cp_parser_warn_min_max): Remove.
270
271 2006-08-11  Jason Merrill  <jason@redhat.com>
272
273         PR c++/28559
274         * parser.c (cp_parser_elaborated_type_specifier): Also ignore
275         attributes applied to a TYPENAME_TYPE.
276
277 2006-08-09  Lee Millward  <lee.millward@codesourcery.com>
278
279         PR c++/28637
280         * pt.c (coerce_template_parms): Copy across the
281         invalid template arguments to the new template inner arguments.
282         (retrieve_specialization): Robustify.
283
284         PR c++/28638
285         * pt.c (coerce_template_template_parms): Robustify.
286
287         PR c++/28639
288         * error.c (dump_template_parms): Robustify.
289
290         PR c++/28640
291         * pt.c (redeclare_class_template): Robustify.
292
293         PR c++/28641
294         * pt.c (type_unification_real): Robustify.
295         
296 2006-08-03  Lee Millward  <lee.millward@codesourcery.com>
297
298         PR c++/28347
299         * decl.c (start_decl): Return error_mark_node if a
300         diagnostic was issed for an invalid typedef initialization.
301         
302 2006-08-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
303
304         PR c++/27508
305         * parser.c (cp_parser_unqualified_id): Check for invalid scopes
306         when parsing destructor names.
307
308         PR c++/28274
309         * decl.c (duplicate_decls): Call check_default_args here.
310         (start_preparsed_function): Do not call check_default_args.
311         * name-lookup.c (pushdecl_maybe_friend): Only call
312         check_default_args if duplicate_decls got bypassed.
313
314 2006-08-02  Richard Guenther  <rguenther@suse.de>
315
316         PR c++/28479
317         Revert
318         2006-07-05  Richard Guenther  <rguenther@suse.de>
319         Andrew Pinski  <pinskia@gcc.gnu.org>
320
321         PR c++/27084
322         * cp-objcp-common.c (cxx_types_compatible_p): Ignore
323         top level qualifiers for pointer type comparisons.
324
325 2006-08-02  Mark Mitchell  <mark@codesourcery.com>
326
327         PR c++/28557
328         * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
329
330 2006-07-31  Mark Mitchell  <mark@codesourcery.com>
331
332         PR c++/28523
333         * tree.c (stabilize_expr): Tweak documentation.  Add assertion.
334         (stabilize_call): Tweak documentation.
335         (stabilize_init): Only call stabilize_call for calls.
336
337 2006-08-01  Steve Ellcey  <sje@cup.hp.com>
338
339         PR c++/28432
340         * decl2.c (check_classfn): Remove early return.
341         * search.c (lookup_member): Return NULL with bad type.
342
343 2006-08-01  Steve Ellcey  <sje@cup.hp.com>
344
345         PR c++/28256
346         * decl.c (check_initializer): Check for 1 initializer on scalar types.
347
348 2006-08-01  Daniel Jacobowitz  <dan@codesourcery.com>
349
350         PR debug/23336
351         * pt.c (tsubst_copy_and_build): Mark used enum types.
352         * semantics.c (finish_id_expression): Likewise.
353
354 2006-07-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
355
356         PR c++/6634
357         * decl.c (grokdeclarator): Check whether "long" or "short" was
358         specified for non-integral types.
359
360 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
361
362         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
363
364 2006-07-28  Lee Millward  <lee.millward@codesourcery.com>
365
366         PR c++/27668
367         PR c++/27962
368         * pt.c (process_template_parm) Store invalid template
369         parameters as error_mark_node in the paramater list.
370         (push_inline_template_parms_recursive): Handle invalid
371         template parameters.
372         (comp_template_parms): Likewise.
373         (check_default_tmpl_arg): Likewise.
374         (coerce_template_template_parms): Likewise.
375         (mangle_class_name_for_template): Likewise.
376         (tsubst_template_parms): Likewise.
377         * error.c (dump_template_argument_list): Likewise.
378         
379 2006-07-28  Kazu Hirata  <kazu@codesourcery.com>
380
381         * cp-tree.h: Fix a comment typo.
382
383 2006-07-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
384
385         PR c++/27572
386         * decl.c (grokdeclarator): Return error_mark_node after invalid
387         typedef.
388
389 2006-07-23  Daniel Jacobowitz  <dan@codesourcery.com>
390
391         PR c++/28460
392         * decl.c (grokvardecl): Use FROB_CONTEXT.
393         * pt.c (register_specialization): Likewise.
394
395 2006-07-23  Mark Mitchell  <mark@codesourcery.com>
396
397         PR c++/28025
398         * cp-tree.h (LOOKUP_HIDDEN): New macro.  Reformat comments.
399         * name-lookup.c (unqualified_namespace_lookup): There is no way to
400         have a hidden name in non-namespace scopes.
401         * pt.c (tsubst_friend_class): Look for hidden names.
402         * decl.c (lookup_and_check_tag): Fix typo in comment.
403
404         * semantics.c (finish_compound_literal): Fix typo in comment.
405
406 2006-07-21  Jason Merrill  <jason@redhat.com>
407
408         * decl2.c (determine_visibility): Don't propagate visibility from
409         type to decl.
410         (constrain_class_visibility): Don't warn in system headers.
411         Don't warn about pointer fields.
412
413 2006-07-20  Mike Stump  <mrs@apple.com>
414
415         * decl2.c (determine_visibility_from_class): Don't use hidden
416         visibility for explicit instantiations.
417
418 2006-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
419
420         PR c++/28250
421         * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
422         valid decls.  Cleanup.
423
424         PR c++/28363
425         * semantics.c (check_template_template_default_arg): Simplify
426         error handling.
427
428 2006-07-20  Jason Merrill  <jason@redhat.com>
429
430         PR c++/28407
431         * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
432         const variables with implicit internal linkage.
433         * tree.c (decl_linkage): Only return lk_external if it's set.
434
435         PR c++/28409
436         * decl2.c (constrain_visibility): Ignore the anonymous namespace 
437         for extern "C" decls.
438         (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
439
440         * decl2.c (constrain_visibility): Remove specified and reason 
441         parameters.  Don't touch decls that already have explicit visibility.
442         (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from 
443         template.
444         (determine_visibility_from_class): Reverse sense of 
445         DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
446         (constrain_class_visibility): Only complain about member visibility
447         if the member type is another class.  Don't change visibility of the
448         current class.
449
450 2006-07-19  Mark Mitchell  <mark@codesourcery.com>
451
452         PR c++/28338
453         * decl.c (layout_var_decl): Don't call push_local_name here.
454         (initialize_artificial_var): Assert artificiality.
455         (cp_finish_decl): Call push_local_name here.
456
457 2006-07-18  Mark Mitchell  <mark@codesourcery.com>
458
459         PR c++/28337
460         * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
461         templates.
462
463 2006-07-18  Mark Mitchell  <mark@codesourcery.com>
464
465         PR c++/28048
466         * semantics.c (check_accessibility_of_qualified_id): Robustify.
467
468         PR c++/28235
469         * pt.c (tsubst_decl): Handling substitutions into a static data
470         member from within the scope of the tempalte itself.
471
472 2006-07-18  Lee Millward  <lee.millward@gmail.com>
473
474         PR c++/28258
475         * method.c (locate_copy): Check for non_reference
476         returning error_mark_node.
477
478         PR c++/28260
479         * decl.c (duplicate_decls): Return error_mark_node
480         on ambiguous declaration.
481         
482 2006-07-18  Steve Ellcey  <sje@cup.hp.com>
483
484         PR c++/27495
485         * search.c (adjust_result_of_qualified_name_lookup): Change
486         assert to part of if statement.
487
488 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
489
490         PR c++/28291
491         * decl.c (reshape_init_class): Return error_mark_node on error.
492
493 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
494
495         PR c++/28304
496         * decl2.c (check_classfn): Return NULL_TREE on error.
497
498 2006-07-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
499
500         PR c++/28250
501         * name-lookup.c (pushdecl_maybe_friend): Return early on
502         error_mark_node.
503         * except.c (expand_start_catch_block): Use error_mark_node instead
504         of NULL_TREE for invalid decls.
505         * parser.c (cp_parser_exception_declaration): Return error_mark_node
506         on invalid catch parameter. Simplify.
507
508 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
509
510         PR c++/28370
511         * decl2.c (note_vague_linkage_var): Removed.
512         (finish_static_data_member_decl): Add decl to pending_statics vector
513         directly.  Do it even for non-public decls.
514
515 2006-07-15  Lee Millward  <lee.millward@gmail.com>
516
517         PR c++/28292
518         * decl2.c (acceptable_java_type): Robustify. Use
519         proper Boolean return type instead of return 1.
520         (check_java_method): Don't issue error about
521         type not being an acceptable Java parameter if 
522         it's error_mark_node.
523         
524         PR c++/28269
525         * parser.c (cp_parser_elaborated_type_specifier):
526         Return early if an invalid type was detected.
527         
528 2006-07-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
529
530         PR c++/28249
531         * parser.c (cp_parser_check_decl_spec): New function.
532         (cp_parser_decl_specifier_seq): Factor out check for repeated
533         decl-specifiers into cp_parser_check_decl_spec. Use it.
534         (cp_parser_type_specifier_seq): Use it.
535
536         PR c++/28294
537         * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
538         only.
539
540         PR c++/28387
541         * decl2.c (cplus_decl_attributes): Check for invalid decls.
542
543 2006-07-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
544
545         PR c++/28343
546         * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
547         * decl2.c (grokfield): Likewise.
548
549 2006-07-12  Geoffrey Keating  <geoffk@apple.com>
550
551         * decl2.c (determine_visibility): Don't change visibility of
552         function locals because of -fvisibility-inlines-hidden.
553
554 2006-07-12  Jason Merrill  <jason@redhat.com>
555
556         PR c++/28217
557         * semantics.c (note_decl_for_pch): Don't premangle templates.
558
559 2006-07-12  Martin Michlmayr  <tbm@cyrius.com>
560
561         * typeck.c (string_conv_p): Remove spurious quotation mark in
562         warning.
563
564 2006-07-07  Lee Millward  <lee.millward@gmail.com>
565             Andrew Pinski  <pinskia@gmail.com>
566
567         PR c++/27820
568         * decl.c (define_label): Return error_mark_node on error.
569         * semantics.c (finish_label_stmt): Don't call
570         add_stmt for invalid labels.
571         
572 2006-07-06  Jason Merrill  <jason@redhat.com>
573
574         PR c++/28279
575         * decl2.c (finish_static_data_member_decl): Don't assert
576         TREE_PUBLIC.
577
578 2006-07-05  Jason Merrill  <jason@redhat.com>
579
580         PR c++/13983
581         PR c++/17519
582         * class.c (check_field_decls): Check TYPE_PACKED after
583         stripping array types.
584         (finish_struct_bits): Don't copy TYPE_SIZE here.
585
586         PR c++/18681
587         * friend.c (is_friend): Fix DR 45 implementation.
588
589 2006-07-05  Richard Guenther  <rguenther@suse.de>
590         Andrew Pinski  <pinskia@gcc.gnu.org>
591
592         PR c++/27084
593         * cp-objcp-common.c (cxx_types_compatible_p): Ignore
594         top level qualifiers for pointer type comparisons.
595
596 2006-07-01  Jason Merrill  <jason@redhat.com>
597
598         PR c++/28215
599         * method.c (make_thunk): Unset DECL_USE_TEMPLATE and 
600         DECL_TEMPLATE_INFO.
601
602 2006-06-30  Jason Merrill  <jason@redhat.com>
603
604         PR c++/26577
605         * call.c (build_new_method_call): Force evaluation of the 
606         instance pointer, not the object.
607
608 2006-06-30  Kazu Hirata  <kazu@codesourcery.com>
609
610         * decl2.c: Fix a comment typo.
611
612 2006-06-30  Jason Merrill  <jason@redhat.com>
613
614         PR c++/18698
615         * decl2.c (grokfield): Only try to treat the decl as an access 
616         declaration if the scope is a class.
617
618 2006-06-29  Jason Merrill  <jason@redhat.com>
619
620         PR c++/26905
621         PR c++/26612
622         PR c++/27000
623         PR c++/26984
624         PR c++/19134
625         * decl2.c (determine_visibility): Overhaul.
626         (determine_visibility_from_class): Likewise.
627         (min_vis_r, type_visibility, constrain_visibility): New fns.
628         (constrain_visibility_for_template): Likewise.
629         (constrain_class_visibility): Likewise.
630         * decl.c (cp_finish_decl): Call determine_visibility for function
631         decls, too.
632         * name-lookup.c (pushtag): Call determine_visibility.
633         * decl.c (duplicate_decls): Don't copy visibility from template to
634         specialization.
635         * pt.c (check_explicit_specialization): Likewise.
636         (lookup_template_class, tsubst_decl): Call determine_visibility.
637         * class.c (finish_struct_1): Call constrain_class_visibility.
638
639         PR c++/26905
640         PR c++/21675
641         PR c++/17470
642         * parser.c (cp_parser_explicit_instantiation): Pass the attributes
643         to grokdeclarator.
644         (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
645         (cp_parser_enum_specifier): Likewise.
646         (cp_parser_elaborated_type_specifier): Apply attributes if this
647         declares only the class.
648         (cp_parser_class_specifier): Apply leading attributes immediately.
649         * semantics.c (begin_class_definition): Add attributes parameter,
650         apply them to the type.
651
652         PR c++/21581
653         PR c++/25915
654         * tree.c (decl_anon_ns_mem_p): New function.
655         * cp-tree.h: Declare it.
656         * decl2.c (determine_visibility): Make anonymous namespace
657         members static.
658         (min_vis_r, constrain_visibility): Likewise.
659         * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
660         pseudo-types.
661         * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
662         global_namespace.
663         * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
664         on anonymous namespaces.
665
666 2006-06-28  Jason Merrill  <jason@redhat.com>
667
668         PR c++/27424
669         * pt.c (convert_template_argument): Pass all template arguments 
670         on to coerce_template_template_parms.
671
672 2006-06-25  Lee Millward  <lee.millward@gmail.com>
673             Mark Mitchell <mark@codesuorcery.com>
674
675         PR c++/28054
676         * decl2.c (grokbitfied): Remove check for grokdeclarator
677         returning NULL_TREE, instead check for error_mark_node
678         to indicate failure.
679         * decl.c (grokdeclarator): Adjust block comment.
680         
681 2006-06-25  Lee Millward  <lee.millward@gmail.com>
682
683         PR c++/28051
684         * mangle.c (mangle_conv_op_name_for_type): Check for
685         invalid types.
686         * name-lookup.c (push_class_level_binding): Robustify.
687         (do_class_using_decl): Return early if name is error_mark_node.
688         
689 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
690
691         PR c++/28114
692         * name-lookup.c (pushtag): Return if we have error_mark_node.
693
694 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
695
696         PR c++/27019
697         * typeck2.c (process_init_constructor_array): Set ce->value on errors.
698
699 2006-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
700
701         PR c++/28112
702         * parser.c (cp_parser_attribute_list): Skip attributes with invalid
703         arguments.  Fix comment.
704
705         PR c++/11468
706         * init.c (build_new_1): Handle error_mark_nodes returned by
707         build_java_class_ref.
708         (build_java_class_ref): Do not abort compilation, but return
709         error_mark_node.  Improve error message.  Fix indentation.
710
711 2006-06-23  Danny Smith   <dannysmith@users.sourceforge.net>
712
713         PR target/27789
714         * decl.c (start_decl): Check that dllimports are not initialized.
715
716 2006-06-22  Lee Millward  <lee.millward@gmail.com>
717
718         PR c++/27805
719         * typeck2.c (build_m_component_ref): Use error_operand_p.
720
721         PR c++/27821
722         * decl.c (grokdeclarator): Return error_mark_node on
723         invalid uses of the scope resolution operator.
724         
725 2006-06-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
726
727         PR c++/28111
728         * pt.c (determine_specialization): Check for invalid decls.
729
730         PR c++/28110
731         * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
732         parameters.
733
734         PR c++/28109
735         * rtti.c (get_tinfo_decl_dynamic): Robustify.
736
737 2006-06-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
738
739         PR c++/28052
740         * init.c (push_base_cleanups): Skip members with invalid types.
741         * typeck.c (build_class_member_access_expr): Robustify.
742
743 2006-06-19  Mark Mitchell  <mark@codesourcery.com>
744
745         * pt.c (instantiate_template): Fix typo in comment.
746
747 2006-06-19  Richard Guenther  <rguenther@suse.de>
748
749         * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
750         power-of-two token vector size.
751
752 2006-06-16  Mark Mitchell  <mark@codesourcery.com>
753
754         PR c++/28016
755         * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
756         members.
757
758         PR c++/27979
759         * call.c (standard_conversion): Strip cv-qualifiers from bitfield
760         types.
761
762         PR c++/27884
763         * decl.c (have_extern_spec): Remove.
764         (start_decl): Do not check have_extern_spec.
765         (start_function): Likewise.
766         * cp-tree.h (have_extern_spec): Remove.
767         * parser.c (cp_parser_linkage_specification): Don't set
768         have_extern_spec.
769         (cp_parser_init_declarator): Likewise.
770         (cp_parser_parameter_declaration): Do not treat parameters as
771         within the scope of an unbraced linkage specification.
772
773 2006-06-15  Mark Mitchell  <mark@codesourcery.com>
774
775         PR c++/27689
776         * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
777         macro.
778         * pt.c (unify): Use it.
779
780         PR c++/27666
781         * call.c (build_conditional_expr): Robustify.
782
783         PR c++/27640
784         * pt.c (instantiate_template): Set processing_template_decl to
785         zero while performing substitutions.
786
787 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
788
789         PR c++/27665
790         * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
791         identify destructors.
792         (cp_parser_nested_name_specifier_opt): Remove invalid
793         optimization.
794         (cp_parser_template_id): Refine heuristic for determining whether
795         we are entering a scope.
796
797         PR c++/27648
798         * parser.c (cp_parser_declarator): Robustify.
799
800         PR c++/26559
801         * pt.c (tsubst_expr): Use finish_omp_atomic.
802         (value_dependent_expression_p): All CALL_EXPRs are dependent.
803         * semantics.c (finish_omp_atomic): Rework to use standard
804         paradigms for handling non-dependent expressions.
805
806 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
807
808         * typeck.c (build_modify_expr): Tidy diagnostic message.
809
810 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
811
812         PR c++/28018
813         * typeck.c (build_modify_expr): Disallow array assignment.
814
815 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
816
817         * cp-tree.def: Fix typo.
818
819 2006-06-13  Mark Mitchell  <mark@codesourcery.com>
820
821         PR c++/27227
822         * decl.c (decls_match): Allow an extern "C" variable declarations
823         from different namespaces to match.
824         (duplicate_decls): Disallow redeclaring a variable with a
825         different linkage specification.
826
827 2006-06-13  Jakub Jelinek  <jakub@redhat.com>
828
829         PR middle-end/27793
830         * cp-tree.h (cxx_int_tree_map): New struct.
831         (struct language_function): Add extern_decl_map field.
832         * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
833         to cp_function_chain->extern_decl_map hash table instead of
834         copying over DECL_UID.
835         * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
836         functions.
837         (cp_genericize_r): Remap DECL_EXTERN local decls using
838         cp_function_chain->extern_decl_map hash table.
839         * decl.c (finish_function): Clear extern_decl_map.
840
841 2006-06-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
842
843         PR c++/27601
844         * semantics.c (finish_offsetof): Handle pseudo-destructors.
845
846         PR c++/27933
847         * name-lookup.c (lookup_qualified_name): Always return error_mark_node
848         if lookup fails.
849
850         PR c++/27951
851         * decl2.c (finish_anon_union): Return early if build_anon_union_vars
852         fails.
853
854 2006-06-12  Roger Sayle  <roger@eyesopen.com>
855
856         PR c++/21210
857         * typeck2.c (build_functional_cast): Use cp_convert to construct
858         non-aggregate initializers instead of the user-level build_c_cast.
859
860 2006-06-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
861
862         PR c++/27601
863         * cp-tree.h (finish_offsetof): Add prototype.
864         * semantics.c (finish_offsetof): New function.
865         * parser.c (cp_parser_builtin_offsetof): Call it instead of
866         fold_offsetof.
867         * pt.c (tsubst_copy_and_build): Likewise.
868
869 2006-06-06  Mark Mitchell  <mark@codesourcery.com>
870
871         PR c++/27177
872         * call.c (standard_conversion): Require that the derived type be
873         complete when performing a derived-to-base conversion.
874
875 2006-06-04  Mark Mitchell  <mark@codesourcery.com>
876
877         PR c++/27819
878         * decl.c (cp_finish_decl): Process initializers for static data
879         members with non-dependent initializers, even in templates.
880
881         PR c++/27722
882         * decl.c (maybe_deduce_size_from_array_init): If the declaration
883         is erroneous, give it an erroneous type.
884         (layout_var_decl): If the type is erroneous, give up.
885         (check_initializer): Likewise.
886
887         PR c++/27807
888         * cp-tree.h (TYPE_OBJ_P): New macro.
889         (TYPE_PTROB_P): Use it.
890         (TYPE_REF_OBJ_P): Likewise.
891         * semantics.c (finish_compound_literal): Do not permit compound
892         literals of non-object types.
893
894         PR c++/27806
895         * typeck.c (original_type): Robustify.
896
897 2006-06-05  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
898
899         PR c++/27804
900         * init.c (constant_value_1): Return decl instead of error_mark_node
901         for invalid initializers.
902
903 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
904
905         PR c++/27592
906         * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
907         on operand of the COND_EXPR for the null pointer check.
908
909 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
910
911         PR c++/26740
912         * typeck.c (build_unary_op): Mark the function as being used.
913
914 2006-06-01  Alexandre Oliva  <aoliva@redhat.com>
915
916         PR c++/26660
917         * parser.c (cp_parser_initial_pragma): Read one more token for
918         caller after reading PCH file in.
919
920 2006-05-31  Mark Mitchell  <mark@codesourcery.com>
921
922         PR c++/27801
923         * call.c (perform_implicit_conversion): Do not actually perform
924         conversions in templates.
925
926         PR c++/26496
927         * call.c (resolve_args): Check for invalid uses of bound
928         non-static member functions.
929         * init.c (build_offset_ref): Return error_mark_node for errors.
930
931         PR c++/27385
932         * decl.c (reshape_init): Robustify.
933         (reshape_init_array_1): Likewise.
934
935 2006-05-30  Mark Mitchell  <mark@codesourcery.com>
936
937         PR c++/27808
938         * parser.c (cp_parser_decl_specifier_seq): Issue errors about
939         "friend" specifiers that do not appear in class scopes.
940
941         PR c++/27803
942         * class.c (check_bitfield_decl): Ensure that all bitfields have
943         integral type.
944
945 2006-05-29  Kazu Hirata  <kazu@codesourcery.com>
946
947         * pt.c (convert_nontype_argument): Fix a typo in an error
948         message.
949
950 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
951
952         * decl.c, decl2.c, parser.c: Fix comment typos.  Follow
953         spelling conventions.
954
955 2006-05-24  Mark Mitchell  <mark@codesourcery.com>
956
957         PR c++/20103
958         * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
959         error_mark_node to indicate an initialization is OK.
960         (start_decl): Likewise.  Adjust call to start_decl_1.
961         (start_decl_1): Add initialized parameter.  Simplify.
962         * except.c (initialize_handler_parm): Adjust call to
963         setart_decl_1.
964         (expand_start_catch_block): Let cp_finish_decl initialize catch
965         parameters.
966         * cp-tree.h (start_decl_1): Adjust prototype.
967         * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
968         (instantiate_decl): Let cp_finish_decl handle initialization.
969         * semantics.c (finish_compound_literal): Create a temporary
970         variable for the literal.
971         * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
972         cases.
973         * decl2.c (finish_static_data_member_decl): Don't set
974         DECL_INITIAL.
975         (grokfield): Do not try to initialize functions.
976
977 2006-05-23  Mark Mitchell  <mark@codesourcery.com>
978
979         PR c++/20173
980         * pt.c (determine_specialization): Disallow partial
981         specializations of templates.
982
983 2006-05-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
984
985         PR c++/27716
986         * typeck.c (build_modify_expr): Test arguments for error_operand_p.
987
988         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
989
990 2006-05-21  Mark Mitchell  <mark@codesourcery.com>
991
992         PR c++/27210
993         * cp-tree.h (cp_save_expr): New function.
994         * init.c (build_new): Correct logic for zero-element array
995         warning.  Use cp_save_expr.
996         * tree.c (cp_save_expr): New function.
997
998 2006-05-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
999
1000         PR c++/27398
1001         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
1002         or void_type_node.
1003
1004 2006-05-19  Mike Stump  <mrs@apple.com>
1005
1006         * typeck.c (default_conversion): Remove static.
1007
1008 2006-05-19  Mark Mitchell  <mark@codesourcery.com>
1009
1010         PR c++/26433
1011         * cp-tree.h (begin_function_try_block): Change prototype.
1012         (finish_function_handler_sequence): Likewise.
1013         * parser.c (cp_parser_function_try_block): Adjust calls.
1014         * pt.c (tsubst_expr): Adjust calls.
1015         * semantics.c (begin_function_try_block): Create an artificial
1016         outer scope.
1017         (finish_function_handler_sequence): Close it.
1018
1019 2006-05-18  Mark Mitchell  <mark@codesourcery.com>
1020
1021         PR c++/27471
1022         PR c++/27506
1023         * typeck.c (decay_conversion): Convert bitfields to their declared
1024         types here.  Improve documentation.  Avoid use of cp_convert.
1025         (default_conversion): Make it static.  Perform integral promotions
1026         before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
1027         conversions.
1028         * init.c (build_init): Remove.
1029         (expand_default_init): Do not call rvalue.
1030         * call.c (null_ptr_cst_p): Robustify.
1031         (build_conditional_expr): Tidy.
1032         * except.c (build_throw): Do not perform lvalue-to-rvalue
1033         conversion on operand before initializing temporary.
1034         * tree.c (convert.h): Include it.
1035         (convert_bitfield_to_declared_type): Use convert_to_integer, not
1036         cp_convert.
1037         (rvalue): Don't convert bitfields to their declared type here.
1038         * cp-tree.h (build_init): Remove.
1039         (default_conversion): Likewise.
1040         * typeck2.c (build_m_component_ref): Do not perform
1041         lvalue-to-rvalue, function-to-pointer, or array-to-pointer
1042         conversions here.  Correct error message.
1043
1044 2006-05-17  Mark Mitchell  <mark@codesourcery.com>
1045
1046         PR c++/26122
1047         * decl2.c (check_member_template): Remove checks for virtual
1048         functions.
1049         * parser.c (cp_parser_function_specifier_opt): Complain about
1050         virtual templates.
1051         (cp_parser_pure_specifier): Likewise.
1052
1053         PR c++/26068
1054         * parser.c (cp_parser_set_storage_class): Check for
1055         invalid uses of storage classes on unbraced linkage
1056         specifications.
1057         (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
1058         to cp_parser_set_storage_class.
1059
1060 2006-05-17  Jakub Jelinek  <jakub@redhat.com>
1061
1062         PR c++/27491
1063         * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
1064         on CONSTRUCTORs.
1065
1066         PR middle-end/27415
1067         * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1068         on combined parallel workshare constructs.
1069         * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
1070
1071 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1072
1073         PR driver/26885
1074         * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
1075
1076 2006-05-15  Mark Mitchell  <mark@codesourcery.com>
1077
1078         PR c++/27339
1079         * cp-tree.h (perform_access_checks): New function.
1080         * semantics.c (perform_access_checks): New function.
1081         (perform_deferred_access_checks): Use it.
1082         * parser.c (cp_parser_simple_declaration): Adjust call to
1083         cp_parser_init_declarator.
1084         (cp_parser_type_parameter): Do not defer checks in default
1085         arguments.
1086         (cp_parser_explicit_specialization): Adjust call to
1087         cp_parser_single_declaration.
1088         (cp_parser_init_declarator): Perform template-parameter access
1089         checks.
1090         (cp_parser_parameter_declaration): Do not defer checks for
1091         template parameter default arguments.
1092         (cp_parser_template_declaration_after_export): Gather access
1093         checks for template parameters, and pass them to
1094         cp_parser_single_declaration.
1095         (cp_parser_template_parameter_access_checks): New function.
1096         (cp_parser_single_declaration): Add checks parameter.
1097
1098         PR c++/27505
1099         * call.c (convert_like_real): Convert bitfields to their declared
1100         types when forming an rvalue.
1101         * tree.c (convert_bitfield_to_declared_type): New function.
1102         (rvalue): Use it.
1103         * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
1104
1105 2006-05-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1106
1107         PR c++/27582
1108         * pt.c (any_dependent_template_arguments_p): Return early on invalid
1109         argument list.
1110
1111         PR c++/27581
1112         * search.c (adjust_result_of_qualified_name_lookup): Skip on
1113         invalid context_class.
1114
1115         PR c++/27315
1116         * pt.c (do_decl_instantiation): Return early on invalid decl.
1117
1118         PR c++/27559
1119         * pt.c (push_template_decl_real): Return error_mark_node instead
1120         of broken decl.
1121
1122         PR c++/27496
1123         * pt.c (tsubst_friend_class): Return early on invalid friend
1124         declarations.
1125
1126 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1127
1128         * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
1129         (cp/decl2.o): Likewise.
1130         (cp/typeck.o): Likewise.
1131         (cp/cvt.o): Likewise.
1132         (cp/parser.o): Likewise.
1133         (cp/call.o): Replace target.h with $(TARGET_H).
1134
1135 2006-05-14  Alexandre Oliva  <aoliva@redhat.com>
1136
1137         * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
1138         COMPONENT_REF alone.
1139
1140 2006-05-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1141
1142         PR c++/27547
1143         * decl.c (copy_fn_p): Return early on non-member functions.
1144
1145 2006-05-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1146
1147         PR c++/27447
1148         * decl2.c (build_memfn_type): Skip invalid functions and class types.
1149
1150 2006-05-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1151
1152         PR c++/27427
1153         * pt.c (convert_nontype_argument): Return early on invalid arguments.
1154
1155         * pt.c (process_template_parm): Remove superfluous temporary.
1156
1157         PR c++/27430
1158         * pt.c (process_template_parm): Handle erroneous non-type parameters.
1159
1160         PR c++/27423
1161         * typeck.c (convert_for_initialization): Skip erroneous types.
1162
1163         PR c++/27422
1164         * typeck.c (convert_arguments): Return early on args with
1165         invalid types.
1166
1167 2006-05-03  Aldy Hernandez  <aldyh@redhat.com>
1168
1169         PR/21391
1170         * typeck.c (build_static_cast_1): Save casted types in used types
1171         hash table.
1172         (build_reinterpret_cast_1): Same.
1173         * rtti.c (build_dynamic_cast_1): Same.
1174
1175 2006-05-04  Jakub Jelinek  <jakub@redhat.com>
1176
1177         PR c++/27359
1178         * parser.c (cp_parser_omp_for_loop): Only call
1179         cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
1180         called.
1181
1182 2006-05-02  Mark Mitchell  <mark@codesourcery.com>
1183
1184         PR c++/27102
1185         * decl.c (grokdeclarator): Robustify checks for defining members
1186         of incomplete types.
1187
1188         PR c++/27309
1189         * class.c (add_method): Call grok_special_member_properties.
1190         * decl.c (grokdeclarator): Don't call it here.
1191         (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
1192         assignment operator.  Set TYPE_HAS_CONSTURCTOR if DECL is a
1193         constructor.
1194         (start_method): Don't call grok_special_member_properties.
1195         * method.c (implicitly_declare_fn): Likewise.
1196         * pt.c (instantiate_class_template): Likewise.
1197         * decl2.c (grokfield): Likewise.
1198
1199 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
1200
1201         PR middle-end/27337
1202         * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
1203         * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
1204         * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
1205
1206 2006-04-30  Mark Mitchell  <mark@codesourcery.com>
1207
1208         PR c++/27094
1209         * pt.c (tsubst_default_argument): Increment function_depth around
1210         call to tsubst_expr.
1211         * parser.c (cp_parser_parameter_declaration): Likewise.
1212         * decl2.c (mark_used): Tidy.
1213
1214 2006-04-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1215
1216         PR c++/27278
1217         * decl.c (grok_op_properties): Skip operators with invalid args
1218         when checking for class-type or enum-type args.
1219
1220 2006-04-29  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1221
1222         PR c++/27279
1223         * decl.c (copy_fn_p): Skip functions with invalid first arg.
1224
1225 2006-04-27  Mark Mitchell  <mark@codesourcery.com>
1226
1227         PR c++/27292
1228         * tree.c (rvalue): Convert bitfields to their declared types.
1229
1230         PR c++/27102
1231         * typeck2.c (cxx_incomplete_type_diagnostic): Handle
1232         TYPENAME_TYPE.
1233
1234 2006-04-24  Mark Mitchell  <mark@codesourcery.com>
1235
1236         PR c++/27292
1237         * typeck.c (decay_conversion): Don't adjust bitfield types.
1238         (perform_integral_promotions): Treat bitfield enums as enums, not
1239         as short integer types.
1240         * tree.c (rvalue): Convert bitfields to their correct types.
1241
1242 2006-04-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1243
1244         PR c++/19963
1245         * class.c (layout_class_type): Skip fields with invalid types.
1246
1247 2006-04-23  Mark Mitchell  <mark@codesourcery.com>
1248
1249         PR c++/26912
1250         * cp-tree.h (build_this_parm): Declare.
1251         (grok_method_quals): Remove.
1252         (build_memfn_type): Declare.
1253         (build_artificial_parm): Declare.
1254         (do_friend): Remove quals parameter.
1255         * decl.c (build_this_parm): New function.
1256         (grokfndecl): Use it.  Do not pass quals to grokclassfn.
1257         (grokdeclarator): Rename quals to memfn_quals.  Avoid allocating
1258         unnecessary TYPE_DECLs.  Correct qualification of member function
1259         types.  Tidy.
1260         * method.c (implicitly_declare_fn): Use build_this_parm.
1261         * friend.c (do_friend): Remove quals parameter.
1262         * decl2.c (grok_method_quals): Remove.
1263         (build_memfn_type): New function.
1264         (build_artificial_parm): Give it external linkage.
1265         (grokclassfn): Remove quals parameter.  Do not build "this"
1266         PARM_DECL here.
1267
1268         PR c++/26534
1269         * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
1270         * typeck.c (is_bitfield_expr_with_lowered_type): New function.
1271         (decay_conversion): Convert bitfield expressions to the correct
1272         type.
1273         (build_modify_expr): Remove spurious conversions.
1274         * class.c (layout_class_type): Modify the type of bitfields to
1275         indicate a limited range.
1276         * call.c (standard_conversion): Adjust the type of bitfield
1277         expressions used in an rvalue context.
1278         (build_conditional_expr): Likewise.
1279
1280 2006-04-22  Kazu Hirata  <kazu@codesourcery.com>
1281
1282         * decl.c: Fix comment typos.
1283
1284 2006-04-21  Eric Christopher  <echristo@apple.com>
1285
1286         * decl.c: Fix typo in function name.
1287
1288 2006-04-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1289
1290         PR c++/26558
1291         * parser.c (cp_parser_class_name): Check for invalid typenames.
1292         Rearrange code.
1293
1294         PR c++/26739
1295         * pt.c (tsubst_friend_function): Return early if
1296         pushdecl_namespace_level fails.
1297
1298         PR c++/26036
1299         * typeck.c (convert_arguments): Return error_mark_node instead of
1300         error_mark_list.
1301         * cp-tree.h (error_mark_list): Remove declaration.
1302         * decl.c (error_mark_list): Remove definition.
1303         (cxx_init_decl_processing): Do not initialize error_mark_list.
1304
1305         PR c++/10385
1306         * rtti.c (build_dynamic_cast_1): Check for invalid conversions
1307         before calling convert_to_reference.
1308         * cvt.c (convert_to_reference): Assert that reftype is a
1309         REFERENCE_TYPE.
1310
1311 2006-04-19  Mark Mitchell  <mark@codesourcery.com>
1312
1313         PR c++/27102
1314         * class.c (currently_open_class): Tidy.
1315         * decl.c (grokdeclarator): If we encounter an erroneous
1316         declarator, assume that we have already issued an error message
1317         and return.  Return error_mark_node instead of NULL_TREE in more
1318         places.  Issue errors about function definitions that do not have
1319         a function declarator.  Check for complete types for all function
1320         definitions.
1321         * cp-tree.h (cp_error_declarator): Remove.
1322         (currently_open_class): Change return type.
1323         * parser.c (cp_parser_id_expression): Add optional_p parameter.
1324         (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
1325         (cp_parser_id_expression): Likewise.
1326         (cp_parser_unqualified_id): If the name is optional, return
1327         NULL_TREE.
1328         (cp_parser_postfix_dot_deref_expression): Adjust calls.
1329         (cp_parser_type_parameter): Likewise.
1330         (cp_parser_unqualified_id): Likewise.
1331         (cp_parser_direct_declarator): Likewise.
1332         (cp_parser_declarator_id): Add optional_p parameter.
1333         (cp_parser_function_definition_from_specifiers_and_declarator):
1334         Assume that start_function indicates failure only if it has issued
1335         an error.
1336         (cp_parser_omp_var_list_no_open): Adjust calls.
1337
1338 2006-04-17  Janis Johnson  <janis187@us.ibm.com>
1339
1340         PR c++/26114, c++/26115
1341         * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
1342         * class.c (check_field_decls): Ditto.
1343
1344 2006-04-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1345
1346         * init.c (build_offset_ref): Remove superfluous temporary.
1347
1348 2006-04-16  Mark Mitchell  <mark@codesourcery.com>
1349
1350         PR c++/26365
1351         * typeck.c (finish_class_member_access_expr): Robustify
1352
1353 2006-04-15  Kazu Hirata  <kazu@codesourcery.com>
1354
1355         * Make-lang.in (cp/pt.o): Depend on vecprim.h.
1356         * pt.c: Include vecprim.h.
1357         (inline_parm_levels): Change the type to VEC(int,heap) *.
1358         (inline_parm_levels_used): Remove.
1359         (maybe_begin_member_template_processing,
1360         maybe_end_member_template_processing): Use VEC instead of
1361         VARRAY.
1362
1363         * cp/call.c: Fix comment typos.
1364
1365 2006-04-12  Mark Mitchell  <mark@codesourcery.com>
1366
1367         * parser.c (cp_parser_init_declarator): Initialize local variables
1368         aggressively.
1369
1370 2006-04-12  Roger Sayle  <roger@eyesopen.com>
1371
1372         * parser.c (cp_parser_init_declarator): Initialise
1373         is_parenthesized_init to false to avoid compiler warning.
1374
1375 2006-04-11  Mark Mitchell  <mark@codesourcery.com>
1376
1377         * cp-tree.h (build_operator_new_call): Adjust prototype.
1378         (build_new_method_call): Likewise.
1379         (build_op_delete_call): Likewise.
1380         * init.c (build_raw_new_expr): New function.
1381         (build_new_1): Pass information as parameters, rather than
1382         bundling it into a NEW_EXPR.
1383         (build_new): Adjust accordingly.
1384         (build_vec_delete_1): Adjust for changes to build_op_delete_call.
1385         (build_delete): Likewise.
1386         * decl.c (finish_destructor_body): Likewise.
1387         * call.c (build_operator_new_call): Return the allocation function
1388         used.
1389         (build_op_delete_call): Take allocation function as parameter.
1390         (build_special_member_call): Adjust call to build_new_method_call.
1391         (build_new_method_call): Return function called.
1392         * pt.c (tsubst_copy_and_build): Adjust call to
1393         build_new_method_call.
1394         * semantics.c (finish_call_expr): Likewise.
1395         * parser.c (cp_parser_postfix_expression): Likewise.
1396         * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
1397         "incomplete", not "undefined", types.
1398
1399         PR c++/26295
1400         * decl.c (grokdeclarator): Remove namespace-handling code for
1401         pointers-to-members.
1402         * parser.c (cp_parser_ptr_operator): Check for qualified names
1403         using namespaces.
1404
1405         PR c++/26122
1406         * parser.c (cp_parser_init_declarator): Adjust logic for deciding
1407         whether or not to look for a pure-specifier.
1408         (cp_parser_member_declaration): Likewise.
1409
1410 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1411
1412         * decl2.c, pt.c, semantics.c: Fix comment typos.
1413
1414 2006-04-06  Roger Sayle  <roger@eyesopen.com>
1415
1416         * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
1417
1418 2006-04-05  Jason Merrill  <jason@redhat.com>
1419
1420         * name-lookup.c (push_namespace_with_attribs): Temporarily disable
1421         default hidden visibility for anonymous namespace.
1422
1423 2006-03-29  Roger Sayle  <roger@eyesopen.com>
1424
1425         PR c++/22494
1426         * init.c (build_vec_delete_1): Convert BASE pointer's type to
1427         the base pointer type to avoid a type mismatch in the EQ_EXPR.
1428
1429 2006-03-24  Carlos O'Donell  <carlos@codesourcery.com>
1430
1431         * search.c (maybe_suppress_debug_info): If
1432         flag_emit_class_debug_always then don't suppress.
1433
1434 2006-03-22  Jason Merrill  <jason@redhat.com>
1435
1436         * name-lookup.c (push_namespace_with_attribs): Only apply hidden
1437         visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
1438
1439 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
1440
1441         PR c++/26691
1442         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
1443
1444 2006-03-21  Jason Merrill  <jason@redhat.com>
1445
1446         PR c++/21581
1447         * parser.c (cp_parser_declaration): Support attributes on
1448         anonymous namespaces.
1449         * name-lookup.c (push_namespace_with_attribs): Anonymous
1450         namespaces default to hidden visibility.
1451
1452 2006-03-20  Jason Merrill  <jason@redhat.com>
1453
1454         PR c++/21764, c++/19238
1455         * decl.c (cp_finish_decl): Call determine_visibility later.
1456         (start_preparsed_function): Likewise.
1457         * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
1458         (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
1459         * name-lookup.h (struct cp_binding_level): Add has_visibility
1460         bitfield.
1461         * name-lookup.c: Include c-pragma.h.
1462         (push_namespace_with_attribs): Split out from push_namespace.
1463         Push visibility if appropriate.  Set TREE_PUBLIC on namespaces.
1464         (leave_scope): Pop visibility if appropriate.
1465         * decl2.c (determine_visibility_from_class): Split out from...
1466         (determine_visibility): ...here.  Handle function scope and
1467         nested classes.
1468         (import_export_decl): Move visibility handling to
1469         determine_visibility_from_class.
1470         * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
1471         attributes on namespace declarations.
1472
1473 2006-03-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1474
1475         PR c++/6634
1476         * decl.c (grokdeclarator): Do not accept long long double.
1477         Reorganize checks for invalid (combinations of) type modifiers.
1478         Quote modifiers in messages.
1479
1480 2006-03-09  Jason Merrill  <jason@redhat.com>
1481
1482         PR c++/16387, c++/16389
1483         * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
1484         (cxx_sizeof_or_alignof_expr): Split out from here.
1485
1486 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
1487
1488         Merge from gomp-20050608-branch
1489
1490         2006-02-02  Diego Novillo  <dnovillo@redhat.com>
1491
1492                 * decl.c (pop_labels_1): Use appropriate pointer casting.
1493                 (poplevel_named_label_1): Likewise.
1494                 (named_label_entry_hash): Likewise.
1495                 (named_label_entry_eq): Likewise.
1496                 (check_goto): Likewise.
1497                 (define_label): Likewise.
1498
1499         2006-01-26  Diego Novillo  <dnovillo@redhat.com>
1500
1501                 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
1502                 of TREE_BLOCK.
1503                 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
1504                 instead of TREE_CODE/TREE_OPERAND.
1505                 * semantics.c: Likewise.
1506                 * parser.c: Likewise.
1507
1508         2005-11-10  Diego Novillo  <dnovillo@redhat.com>
1509
1510                 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
1511                 target does not support TLS.
1512
1513         2005-11-09  Jakub Jelinek  <jakub@redhat.com>
1514
1515                 * decl.c (redeclaration_error_message): Don't error about
1516                 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
1517                 (olddecl).
1518
1519         2005-11-08  Jakub Jelinek  <jakub@redhat.com>
1520
1521                 PR c++/24735
1522                 * semantics.c (finish_omp_barrier, finish_omp_flush): New
1523                   functions.
1524                 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
1525                 (cp_parser_omp_flush): Call finish_omp_flush.
1526                 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
1527                   prototypes.
1528
1529                 PR c++/24734
1530                 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
1531
1532         2005-11-03  Jakub Jelinek  <jakub@redhat.com>
1533
1534                 * semantics.c (finish_omp_threadprivate): Error on class-scope
1535                 variables.
1536
1537         2005-11-02  Jakub Jelinek  <jakub@redhat.com>
1538
1539                 * parser.c (cp_parser_omp_all_clauses): If some clause
1540                 type is not allowed, don't remove just one of the
1541                 clauses, but all clauses added in that loop round.
1542
1543                 * semantics.c (finish_omp_clauses): Fix function
1544                 comment. Don't handle non-const or mutable specially,
1545                 as const and not mutable is predetermined shared and
1546                 that leads to double error. Don't ICE if copyin var is
1547                 PARM_DECL.
1548
1549                 PR c++/24613
1550                 * parser.c (cp_parser_pragma): Diagnose
1551                 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
1552                 construct.
1553
1554                 * semantics.c (finish_omp_threadprivate): Error if V
1555                   is automatic variable or has incomplete type.
1556
1557         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
1558
1559                 * parser.c (cp_parser_omp_all_clauses): Use
1560                 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
1561
1562         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
1563
1564                 * parser.c (cp_parser_omp_all_clauses): When emitting an
1565                 error message, remove the invalid clause from the list.
1566
1567         2005-10-31  Diego Novillo  <dnovillo@redhat.com>
1568
1569                 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
1570                 combined parallel+workshare directives.
1571
1572         2005-10-31  Richard Henderson  <rth@redhat.com>
1573
1574                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
1575                 Use cxx_omp_clause_dtor.
1576                 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
1577                 (cxx_omp_clause_dtor): New.
1578                 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
1579                 (cxx_omp_clause_default_ctor): Use it.
1580                 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
1581                 Likewise.
1582                 (cxx_omp_clause_dtor): New.
1583                 * semantics.c (finish_omp_clauses): Rewrite cdtor
1584                 checking to fill in CP_OMP_CLAUSE_INFO.  Don't
1585                 specialcase LASTPRIVATE for removal.
1586                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
1587                 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
1588
1589         2005-10-28  Jakub Jelinek  <jakub@redhat.com>
1590
1591                 * semantics.c (finish_omp_threadprivate): If
1592                   DECL_RTL_SET_P, call make_decl_rtl again so that
1593                   encode_section_info can update SYMBOL_REF's flags.
1594
1595         2005-10-26  Jakub Jelinek  <jakub@redhat.com>
1596
1597                 * semantics.c (finish_omp_for): Don't segfault if COND
1598                 or INCR is NULL.  If not calling c_finish_omp_for
1599                 right away and one of COND and INCR is NULL, issue
1600                 error and don't expand anything.
1601
1602                 PR c++/24512
1603                 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
1604                 * semantics.c (finish_omp_for): Likewise.  Set
1605                 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
1606                 into the current statement list if not processing
1607                 template decl or pass it to c_finish_omp_for.
1608
1609                 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
1610                 into PRE_BODY statement list.  Pass it to finish_omp_for.
1611                 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
1612                 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
1613                 finish_omp_for.  Put all the statements into sk_omp
1614                 scope.
1615
1616         2005-10-25  Jakub Jelinek  <jakub@redhat.com>
1617
1618                 PR c++/24516
1619                 * parser.c (struct cp_parser): Rename in_iteration_statement
1620                 field to in_statement.
1621                 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1622                 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
1623                 (cp_parser_new, cp_parser_begin_omp_structured_block,
1624                 cp_parser_end_omp_structured_block,
1625                 cp_parser_omp_for_loop): Adjust for
1626                 in_iteration_statement renaming.
1627                 (cp_parser_selection_statement): Save
1628                 parser->in_iteration, or it temporarily with
1629                 IN_SWITCH_STMT for the
1630                 cp_parser_implicitly_scoped_statement call.
1631                 (cp_parser_iteration_statement): Adjust for
1632                 in_iteration_statement renaming.  Use
1633                 IN_ITERATION_STMT rather than true.
1634                 (cp_parser_jump_statement): Adjust for
1635                 in_iteration_statement renaming and new values.  Don't
1636                 error on break in a switch statement within OMP_FOR or
1637                 OpenMP structured block.
1638
1639                 PR c++/24513
1640                 * parser.c (cp_parser_cache_group): Don't stop if next
1641                 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
1642                 well.  If current token is CPP_PRAGMA, consume
1643                 everything until CPP_PRAGMA_EOL inclusive.
1644
1645         2005-10-24  Jakub Jelinek  <jakub@redhat.com>
1646
1647                 PR c++/24502
1648                 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
1649                 addition to MODIFY_EXPR.
1650
1651         2005-10-23  Richard Henderson  <rth@redhat.com>
1652
1653                 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
1654                 (bc_label): New.
1655                 (begin_bc_block, finish_bc_block): Use it.
1656                 (push_context, pop_context): Remove.
1657                 (cp_genericize): Don't use them.  Assert bc_label is null.
1658                 * semantics.c (finish_omp_clauses): Create a fake data
1659                 element of TYPE for probing ctors.
1660
1661         2005-10-23  Richard Henderson  <rth@redhat.com>
1662
1663                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
1664                 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
1665                 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
1666                 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
1667                 * semantics.c (finish_omp_clauses): Look through
1668                 arrays when looking up special member calls.  Also
1669                 remove FIRSTPRIVATE when LASTPRIVATE fails.
1670                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
1671                 (cxx_omp_clause_assign_op): New.
1672                 * cp-tree.h: Declare them.
1673
1674         2005-10-21  Richard Henderson  <rth@redhat.com>
1675
1676                 * decl.c (check_previous_goto_1): Return false if error.
1677                 (check_switch_goto): Likewise.
1678                 (finish_case_label): Don't emit the case label on error.
1679                 * parser.c (struct cp_parser): Revert
1680                 in_switch_statement_p changes.
1681                 (cp_parser_labeled_statement,
1682                 cp_parser_selection_statement): Likewise.
1683                 (cp_parser_begin_omp_structured_block): Don't save...
1684                 (cp_parser_end_omp_structured_block): or restore
1685                 in_switch_statement_p.
1686
1687         2005-10-21  Richard Henderson  <rth@redhat.com>
1688
1689                 * semantics.c (finish_omp_threadprivate): Set
1690                 decl_flags.u2sel when necessary.
1691
1692         2005-10-21  Richard Henderson  <rth@redhat.com>
1693
1694                 * decl.c (poplevel_named_label_1): Restore creation of the
1695                 bad_decls list.
1696                 (decl_jump_unsafe): Check for error_mark_node types.
1697                 (check_goto): Don't check cdtor_label.  Don't use identify_goto.
1698                 * semantics.c (finish_return_stmt): Do check_omp_return before
1699                 converting to cdtor_label goto.
1700
1701         2005-10-21  Richard Henderson  <rth@redhat.com>
1702
1703                 PR c++/24451
1704                 * decl.c (check_omp_return): Return false on error.
1705                 * cp-tree.h (check_omp_return): Update decl.
1706                 * semantics.c (finish_return_stmt): Avoid adding
1707                 return on error.
1708
1709         2005-10-21  Richard Henderson  <rth@redhat.com>
1710
1711                 * cp-tree.h (struct language_function): Remove
1712                 x_named_label_uses.
1713                 Change x_named_labels to a hashtable.
1714                 (check_omp_return): Declare.
1715                 * decl.c (struct named_label_use_entry): Rename from
1716                 named_label_use_list.  Remove label_decl.
1717                 (struct named_label_entry): Rename from
1718                 named_label_list.  Remove old_value and next.  Change
1719                 in_try_scope and in_catch_scope to bool. Add
1720                 in_omp_scope.
1721                 (pop_labels_1): New.
1722                 (pop_labels): Use it.
1723                 (pop_local_label, poplevel_named_label_1): New.
1724                 (poplevel): Use them.
1725                 (named_label_entry_hash, named_label_entry_eq): New.
1726                 (make_label_decl): Create named_labels.  Move label
1727                 creation bits from lookup_label.
1728                 (declare_local_label): Tidy.
1729                 (identify_goto): Split out from ...
1730                 (check_previous_goto_1): Add exited_omp argument.
1731                 Handle omp scopes.
1732
1733                 (use_label): Merge into...
1734                 (check_goto): ... here.  Handle omp scopes.
1735                 (check_omp_return): New.
1736                 (check_previous_gotos): Merge into...
1737                 (define_label): ... here.
1738                 (save_function_data): Remove x_named_label_uses reference.
1739                 (finish_function): Likewise.
1740                 * name-lookup.h (sk_omp): New.
1741                 * name-lookup.c (begin_scope): Handle it.
1742                 * parser.c (cp_parser_omp_for): Don't create extra
1743                 compound stmt.
1744
1745                 (cp_parser_omp_sections): Likewise.
1746                 * semantics.c (finish_return_stmt): Call check_omp_return.
1747                 (begin_omp_structured_block): Use sk_omp.
1748                 (finish_omp_structured_block): Use do_poplevel.  Don't build a
1749                 MUST_NOT_THROW expression here.
1750                 (begin_omp_parallel, finish_omp_parallel): Don't create extra
1751                 compound statements.
1752
1753         2005-10-21  Diego Novillo  <dnovillo@redhat.com>
1754
1755                 PR 24455
1756                 * cp/cp-tree.h (struct lang_decl_flags): Add field
1757                 threadprivate_p.
1758                 (CP_DECL_IS_THREADPRIVATE): Define.
1759                 * cp/semantics.c (finish_omp_threadprivate): Set.  Do
1760                 not error out if CP_DECL_IS_THREADPRIVATE is set
1761                 already.
1762                 * cp/decl.c (duplicate_decls): Merge
1763                 CP_DECL_THREADPRIVATE_P.
1764
1765         2005-10-20  Richard Henderson  <rth@redhat.com>
1766
1767                 * cp-gimplify.c (cp_gimplify_omp_for): New.
1768                 (cp_gimplify_expr): Call it.
1769                 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
1770                 * parser.c (struct cp_parser): Rename
1771                 in_iteration_statement_p to in_iteration_statement and
1772                 change to unsigned char.  Similarly with
1773                 in_switch_statement.  Update all users.
1774                 (IN_OMP_BLOCK, IN_OMP_FOR): New.
1775                 (cp_parser_labeled_statement): Diagnose case labels
1776                 binding closer to an openmp block nested than the
1777                 switch.
1778                 (cp_parser_jump_statement): Diagnose break and
1779                 continue labels binding closer to an openmp block than
1780                 an iteration or switch.
1781                 (cp_parser_omp_for_loop): Mark in_iteration_statement
1782                 for an omp for.
1783                 (cp_parser_begin_omp_structured_block): New.
1784                 (cp_parser_end_omp_structured_block): New.
1785                 (cp_parser_omp_structured_block): Use them.
1786                 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
1787                 (cp_parser_omp_parallel): Likewise.
1788
1789         2005-10-20  Richard Henderson  <rth@redhat.com>
1790
1791                 * semantics.c (begin_omp_structured_block): New.
1792                 (finish_omp_structured_block): New.
1793                 (begin_omp_parallel, finish_omp_parallel): Use them.
1794                 * parser.c (cp_parser_omp_structured_block): Likewise.
1795                 (cp_parser_omp_for): Likewise.
1796                 (cp_parser_omp_sections_scope): Likewise.
1797                 * cp-tree.h: Declare them.
1798
1799         2005-10-20  Richard Henderson  <rth@redhat.com>
1800
1801                 * parser.c (cp_parser_omp_master): Return the statement.
1802                 (cp_parser_omp_ordered): Likewise.
1803                 (cp_parser_omp_construct): Set the locus for them.
1804
1805         2005-10-19  Richard Henderson  <rth@redhat.com>
1806
1807                 * semantics.c (finish_omp_atomic): Revert to
1808                 uses_template_parms.
1809
1810         2005-10-19  Richard Henderson  <rth@redhat.com>
1811
1812                 * semantics.c (finish_omp_clauses): Avoid
1813                 DECL_THREAD_LOCAL_P on a PARM_DECL.  Remove some
1814                 stub asserts guaranteed to fail.
1815
1816         2005-10-19  Richard Henderson  <rth@redhat.com>
1817
1818                 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
1819                 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
1820                 * parser.c (cp_parser_omp_clause_copyin): Remove.
1821                 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
1822                 Call finish_omp_clauses.
1823                 (cp_parser_omp_clause_if): Don't do error checking here.
1824                 (cp_parser_omp_clause_num_threads): Likewise.
1825                 (cp_parser_omp_clause_schedule): Likewise.
1826                 (cp_parser_omp_atomic): Use finish_omp_atomic.
1827                 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
1828                 Don't decompose assignment statment here.  Use
1829                 finish_omp_for.
1830
1831                 * pt.c (tsubst_omp_clauses): New.
1832                 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
1833                 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
1834                 * semantics.c (finish_omp_clauses): New.
1835                 (begin_omp_parallel, finish_omp_parallel): Know Less about the
1836                 internals of the stmt_list stack.
1837                 (finish_omp_for, finish_omp_atomic): New.
1838
1839         2005-10-18  Jakub Jelinek  <jakub@redhat.com>
1840
1841                 * semantics.c (cxx_omp_predetermined_sharing): New function.
1842                 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
1843                 * cp-objcp-common.h
1844                 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
1845
1846         2005-10-18  Richard Henderson  <rth@redhat.com>
1847
1848                 * parser.c (cp_parser_omp_single): Use make_node and accessors
1849                 instead of build.
1850
1851         2005-10-17  Richard Henderson  <rth@redhat.com>
1852
1853                 * parser.c (cp_parser_omp_for_loop): Handle declarations.
1854
1855         2005-10-12  Richard Henderson  <rth@redhat.com>
1856
1857                 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
1858                 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
1859                 (finish_omp_threadprivate): Declare.
1860                 * parser.c (struct cp_lexer): Add in_pragma.
1861                 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
1862                 when in_pragma.
1863                 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
1864                 (cp_parser_skip_to_end_of_statement): Likewise.
1865                 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
1866                 (cp_parser_skip_to_closing_brace): Likewise.
1867                 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
1868                 (cp_parser_require_pragma_eol): New.
1869                 (cp_parser_statement): Add in_compound argument;
1870                 update all callers.
1871                 Restart if a non-statement pragma seen outside a
1872                 compound.
1873                 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
1874                 (cp_parser_declaration_seq_opt): Likewise.
1875                 (cp_parser_member_specification_opt): Likewise.
1876                 (cp_parser_function_definition_after_decl): Likewise.
1877                 (cp_parser_skip_until_found): Likewise.
1878                 (cp_parser_cache_group): Likewise.
1879                 (enum pragma_omp_clause, cp_parser_omp_clause_name,
1880                 check_no_duplicate_clause,
1881                 cp_parser_omp_var_list_no_open,
1882                 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
1883                 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
1884                 cp_parser_omp_clause_nowait,
1885                 cp_parser_omp_clause_num_threads,
1886                 cp_parser_omp_clause_ordered,
1887                 cp_parser_omp_clause_reduction,
1888                 cp_parser_omp_clause_schedule,
1889                 cp_parser_omp_all_clauses,
1890                 cp_parser_omp_structured_block, cp_parser_omp_atomic,
1891                 cp_parser_omp_barrier, cp_parser_omp_critical,
1892                 cp_parser_omp_flush, cp_parser_omp_for_loop,
1893                 cp_parser_omp_for, cp_parser_omp_master,
1894                 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
1895                 cp_parser_omp_sections, cp_parser_omp_parallel,
1896                 cp_parser_omp_single, cp_parser_omp_threadprivate,
1897                 cp_parser_omp_construct): New.
1898                 (cp_parser_pragma): Handle OpenMP pragmas.
1899                 * semantics.c (finish_omp_threadprivate): New.
1900                 (begin_omp_parallel, finish_omp_parallel): New.
1901
1902         2005-10-11  Richard Henderson  <rth@redhat.com>
1903
1904                 * parser.c (struct cp_token): Add pragma_kind.
1905                 (eof_token): Initialize it.
1906                 (cp_lexer_handle_pragma): Remove.
1907                 (cp_parser_initial_pragma): New.
1908                 (cp_lexer_new_main): Use it.
1909                 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
1910                 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
1911                 (cp_parser_skip_to_pragma_eol): New.
1912                 (cp_parser_error): Use it.
1913                 (pragma_lex): New.
1914
1915         2005-10-09  Richard Henderson  <rth@redhat.com>
1916
1917                 * lex.c (parse_strconst_pragma): Update for c_lex name change.
1918                 (handle_pragma_java_exceptions): Likewise.
1919                 * parser.c (cp_lexer_new_main): Likewise.
1920
1921         2005-10-06  Richard Henderson  <rth@redhat.com>
1922
1923                 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
1924                 (cp_lexer_handle_pragma): Comment out
1925                 cpp_handle_deferred_pragma.
1926
1927         2005-10-01  Richard Henderson  <rth@redhat.com>
1928
1929                 * name-lookup.c (lookup_name): Remove prefer_type argument.
1930                 (lookup_name_prefer_type): New function.
1931                 * name-lookup.h (lookup_name_prefer_type): Declare it.
1932                 * decl.c (lookup_and_check_tag): Use it.
1933                 * pt.c (tsubst_friend_class): Likewise. Update for
1934                 lookup_name change.
1935                 (lookup_template_class, tsubst_copy_and_build): Likewise.
1936
1937 2006-03-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1938
1939         PR c++/15759
1940         * tree.c (bot_manip): Don't call mark_used.
1941
1942 2006-03-02  Mike Stump  <mrs@apple.com>
1943
1944         * decl2.c (import_export_decl): Remove redundant call to
1945         targetm.cxx.key_method_may_be_inline ().
1946
1947 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
1948
1949         * decl.c (start_decl): Use have_global_bss_p when deciding
1950         whether to make the decl common.
1951
1952 2006-03-01  Mike Stump  <mrs@apple.com>
1953
1954         PR darwin/25908
1955         * decl2.c (import_export_decl): Fix ABI breakage on darwin.
1956
1957 2006-02-24  Geoffrey Keating  <geoffk@apple.com>
1958
1959         * except.c (expand_start_catch_block): Handle
1960         flag_use_cxa_get_exception_ptr.
1961
1962 2006-02-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1963
1964         PR c++/26291
1965         * decl.c (grok_op_properties): Check for ellipsis in arguments of
1966         operators.
1967
1968 2006-02-20  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1969
1970         * Make-lang.in (C++): Remove.
1971         (.PHONY): Remove C++.
1972
1973 2006-02-18  Mark Mitchell  <mark@codesourcery.com>
1974
1975         PR c++/26266
1976         * cp-tree.h (cp_finish_decl): Adjust declaration.
1977         (grokbitfield): Likewise.
1978         (finish_static_data_member_decl): Likewise.
1979         * init.c (constant_value_1): Ensure processing_template_decl when
1980         folding non-dependent initializers for static data members of
1981         dependent types.  Return error_mark_node for erroneous
1982         initailizers.
1983         * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
1984         * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
1985         (cp_finish_decl): Add init_const_expr_p parameter.  Set
1986         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
1987         (finish_decl): Adjust call to cp_finish_decl.
1988         (compute_array_index_type): Robustify.
1989         (start_method): Use finish_decl, not cp_finish_decl.
1990         * rtti.c (emit_tinfo_decl): Likewise.
1991         * except.c (initialize_handler_parm): Adjust call to
1992         cp_finish_decl.
1993         (expand_start_catch_block): Likewise.
1994         * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
1995         * pt.c (instantiate_class_template): Adjust call to
1996         finish_static_data_member_decl.
1997         (tsubst_expr): Use finish_decl, not cp_finish_decl.
1998         (instantiate_decl): Adjust call to cp_finish_decl.
1999         * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
2000         cp_finish_decl.
2001         * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
2002         parameter.
2003         (grokfield): Likewise.
2004         * parser.c (cp_parser_condition): Check for constant initializers.
2005         (cp_parser_init_declarator): Adjust calls to grokfield and
2006         cp_finish_decl.  Don't set
2007         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2008         (cp_parser_member_declaration): Likewise.
2009         (cp_parser_objc_class_ivars): Likewise.
2010
2011 2006-02-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2012
2013         * call.c (standard_conversion): Return NULL instead of 0.
2014         (build_user_type_conversion_1): Likewise.
2015         (tourney): Likewise.
2016         * decl.c (redeclaration_error_message): Likewise.
2017         * error.c (language_to_string): Likewise.
2018
2019 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2020
2021         * cp-tree.h (warn_hidden): Remove prototype.
2022         * class.c (warn_hidden): Make static.
2023
2024         * cp-tree.h (build_type_conversion): Remove prototype.
2025         * cvt.c (build_type_conversion): Add prototype, make static.
2026
2027         * cp-tree.h (push_tinst_level): Remove prototype.
2028         (pop_tinst_level): Likewise.
2029         * pt.c (push_tinst_level): Add prototype, make static.
2030         (pop_tinst_level): Likewise.
2031
2032 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2033
2034         * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
2035         * typeck.c (unary_complex_lvalue): Likewise.
2036
2037 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2038
2039         * lex.c (parse_strconst_pragma): Return error_mark_node instead of
2040         "(tree)-1" to indicate failure.  Simplify.
2041         (handle_pragma_interface): Test for error_mark_node instead of
2042         "(tree)-1".
2043         (handle_pragma_implementation): Likewise.
2044
2045 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2046
2047         PR c++/26151
2048         * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
2049         decl-specifiers.  Remove extra check for duplicate 'friend'.
2050         * decl.c (grokdeclarator): Remove check for duplicate
2051         decl-specifiers.  Set longlong together with long_p.
2052
2053 2006-02-12  Jason Merrill  <jason@redhat.com>
2054
2055         PR c++/24996
2056         * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
2057         TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
2058
2059 2006-02-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2060
2061         * class.c (debug_class): Remove extern.
2062         (debug_thunks): Likewise.
2063
2064 2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2065
2066         * typeck.c (string_conv_p): Don't test for flag_const_strings.
2067
2068 2006-02-08  Jason Merrill  <jason@redhat.com>
2069
2070         PR c++/25979
2071         * cp-gimplify.c (cp_gimplify_expr): Don't call
2072         cp_gimplify_init_expr for MODIFY_EXPRs.
2073         * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
2074
2075 2006-02-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2076
2077         PR c++/26071
2078         * decl.c (grokdeclarator): Set dname also for destructor.
2079
2080         PR c++/26070
2081         * decl.c (grokdeclarator): Clear storage_class together with staticp.
2082
2083 2006-02-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2084
2085         * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
2086         (cp_build_qualified_type): Propogate renaming.
2087         * call.c (convert_like_real): Likewise.
2088         * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
2089         * decl.c (make_typename_type, grokdeclarator): Likewise.
2090         * pt.c (tsubst_friend_function, instantiate_class_template,
2091         tsubst_default_argument, instantiate_decl,
2092         tsubst_initializer_list, tsubst_enum): Likewise.
2093         * semantics.c (finish_template_type): Likewise.
2094         * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
2095
2096 2006-02-07  Dirk Mueller  <dmueller@suse.com>
2097
2098         * typeck.c (build_binary_op): Annotate div-by-zero
2099         warnings to make -Wno-div-by-zero have an effect.
2100
2101 2006-02-07  Mark Mitchell  <mark@codesourcery.com>
2102
2103         PR c++/9737
2104         * pt.c (coerce_template_template_parms): Do not templates with
2105         excess default arguments to match template template parameters
2106         with fewer parameters.
2107         (coerce_template_parms): Add use_default_args parameter; use
2108         default arguments only when true.
2109         (lookup_template_class): Adjust call to coerce_template_parms.
2110         (fn_type_unification): Likewise.
2111         (unify): Likewise.
2112         (get_bindings): Likewise.
2113         (dependent_type_p): Add assertions.
2114
2115 2006-02-06  Roger Sayle  <roger@eyesopen.com>
2116
2117         * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
2118         * rtti.c (typeinfo_in_lib_p): Likewise.
2119         * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
2120         * name-lookup.c (arg_assoc_type): Likewise.
2121
2122 2006-02-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2123
2124         * cp-tree.h (tf_warn_or_error): New substituion flag.
2125         (cp_build_qualified_type): Use it.
2126         * call.c (convert_like_real): Likewise.
2127         * cvt.c (cp_convert_to_pointer): Likewise.
2128         (convert_to_reference): Likewise.
2129         * decl.c (make_typename_type): Likewise.
2130         (grokdeclarator): Likewise.
2131         * pt.c (tsubst_friend_function): Likewise.
2132         (tsubst_friend_class): Likewise.
2133         (instantiate_class_template): Likewise.
2134         (tsubst_default_argument): Likewise.
2135         (instantiate_decl): Likewise.
2136         (tsubst_initializer_list): Likewise.
2137         (tsubst_enum): Likewise.
2138         * semantics.c (finish_template_type): Likewise.
2139         * typeck.c (build_ptrmemfunc): Likewise.
2140         (convert_for_assignment): Likewise.
2141
2142 2006-02-03  Lee Millward  <lee.millward@gmail.com>
2143
2144         * typeck.c (string_conv_p): Pass appropiate
2145         OPT_Wxxxx values when calling warning().
2146         (build_array_ref, cxx_mark_addressable): Likewise.
2147         (check_return_expr): Likewise.
2148
2149         * init.c (perform_member_init): Likewise.
2150         (sort_mem_initializers, emit_mem_initializers): Likewise.
2151
2152         * class.c (check_field_decls): Likewise.
2153         (warn_about_ambiguous_bases): Likewise.
2154
2155         * decl.c (pop_label, poplevel): Likewise.
2156         (duplicate_decls, grok_op_properties): Likewise.
2157         (start_preparsed_function, finish_function): Likewise.
2158
2159         * name-lookup.c (pushdecl_maybe_friend): Likewise.
2160         (pushdecl_maybe_friend): Likewise.
2161
2162         * parser.c (cp_parser_warn_min_max): Likewise.
2163         (cp_parser_cast_expression): Likewise.
2164
2165         * method.c (lazily_declare_fn): Likewise.
2166         * cvt.c (convert_to_void): Likewise.
2167         * mangle.c (finish_mangling): Likewise.
2168         * cp-gimplify.c (gimplify_expr_stmt): Likewise.
2169
2170 2006-02-03  Mark Mitchell  <mark@codesourcery.com>
2171
2172         * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
2173         not IDENTIFIER_OPNAME_P.
2174
2175 2006-01-31  Mark Mitchell  <mark@codesourcery.com>
2176
2177         PR c++/25342
2178         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
2179         documentation.
2180         * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
2181         not TREE_VALUE.
2182         (instantiate_class_template): Simplify.
2183         (verify_class_unification): Remove.
2184         (unify): Document parameters.  Use INNERMOST_TEMPLATE_ARGS to
2185         permit multiple levels of template arguments.
2186         (more_specialized_class): Simplify.
2187         (get_class_bindings): Pass full arguments to unify.  Fold
2188         verify_class_unification into this function.  Return full
2189         arguments.
2190         (most_specialized_class): Adjust for changes to
2191         get_class_bindings.  Issue errors here for ambiguity.  Return the
2192         fully deduced arguments for the most specialized class, in
2193         addition to the partial specialization.
2194
2195 2006-01-31  Ben Elliston  <bje@au.ibm.com>
2196
2197         * mangle.c: Comment fix.
2198
2199 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2200
2201         * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
2202         * repo.c (extract_string, afgets): Use cast when converting from
2203         void *.
2204
2205 2006-01-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2206
2207         * call.c (alloc_conversion): Use cast when converting from void *.
2208         (alloc_conversions): Likewise.
2209         (add_candidate): Likewise.
2210         (print_z_candidates): Likewise.
2211         (add_warning): Likewise.
2212         * pt.c (retrieve_local_specialization): Likewise.
2213         (process_partial_specialization): Likewise.
2214         (mangle_class_name_for_template): Likewise.
2215         (tsubst_template_args): Likewise.
2216         * typeck2.c (pat_calc_hash): Likewise.
2217         (pat_compare): Likewise.
2218         (abstract_virtuals_error): Likewise.
2219         * class.c (method_name_cmp): Likewise.
2220         (resort_method_name_cmp): Likewise.
2221         (get_vfield_name): Likewise.
2222         * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
2223         * lex.c (init_reswords): Likewise.
2224         * rtti.c (create_pseudo_type_info): Likewise.
2225         * search.c (dfs_lookup_base): Likewise.
2226         (dfs_dcast_hint_pre): Likewise.
2227         (dfs_dcast_hint_post): Likewise.
2228         * tree.c (hash_tree_cons): Likewise.
2229         * repo.c (extract_string): Likewise.
2230         (afgets): Likewise.
2231         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
2232         * g++spec.c (lang_specific_driver): Likewise.
2233
2234 2006-01-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2235
2236         * call.c (joust): Pass option code to warning.  Use inform for
2237         explanation.
2238         * class.c (check_bases): Likewise.
2239         (maybe_warn_about_overly_private_class): Likewise.
2240         (check_field_decls): Likewise.
2241         (layout_empty_base): Likewise.
2242         (layout_virtual_bases): Likewise.
2243         (layout_class_type): Likewise.
2244
2245 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
2246
2247         PR c++/25999
2248         * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
2249         here, not ...
2250         (start_function): ... here.
2251
2252 2006-01-28  Mark Mitchell  <mark@codesourcery.com>
2253
2254         PR c++/25855
2255         * class.c (resolve_address_of_overloaded_function): Adjust use of
2256         return value from most_specialized_instantiation.
2257         * pt.c (determine_specialization): Avoid multiple calls to
2258         get_bindings.
2259         (most_specialized_instantiation): When a tie occurs, set the
2260         current presumed champion to the next template.  Return the
2261         TREE_LIST node containing the template, rather than the template
2262         itself.
2263         (most_specialized): Remove.
2264         * name-lookup.c (push_overloaded_decl): When duplicate_decls
2265         indicates a failed redeclaration, report that to callers.
2266
2267 2006-01-26  Jason Merrill  <jason@redhat.com>
2268
2269         PR c++/16021
2270         * name-lookup.c (parse_using_directive): Require strong using to
2271         name a nested namespace.
2272
2273 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2274
2275         Revert:
2276         * cp-tree.h (do_poplevel): Remove prototype.
2277         * semantics.c (do_poplevel): Add prototype.  Make static.
2278
2279         Revert:
2280         * cp-tree.h (default_conversion): Remove prototype.
2281         * typeck.c (default_conversion): Make static.
2282
2283 2006-01-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2284
2285         * cp-tree.h (get_primary_binfo): Remove prototype.
2286         (push_using_decl): Likewise.
2287         (current_template_args): Likewise.
2288         (more_specialized_class): Likewise.
2289         (mark_class_instantiated): Likewise.
2290         (default_conversion): Likewise.
2291         (pfn_from_ptrmemfunc): Likewise.
2292         * class.c (get_primary_binfo): Add prototype, make static, simplify.
2293         * name-lookup.c (push_using_decl): Make static.
2294         * pt.c (current_template_args): Likewise.
2295         (more_specialized_class): Likewise.
2296         (mark_class_instantiated): Likewise.
2297         * typeck.c (default_conversion): Make static.
2298         (pfn_from_ptrmemfunc): Add prototype, make static.
2299
2300 2006-01-24  Dirk Mueller  <dmueller@suse.de>
2301
2302         * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
2303
2304 2006-01-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2305
2306         PR c++/25552
2307         * parser.c (cp_parser_unqualified_id): Check that destructor name
2308         and scope match.
2309         * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
2310         Adjust comment.  Return early if possible.
2311         Use same_type_p to compare types.
2312         * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
2313
2314 2006-01-24  Mark Mitchell  <mark@codesourcery.com>
2315
2316         * semantics.c: Remove outdated comment.
2317
2318 2006-01-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2319
2320         * cp-tree.h (do_poplevel): Remove prototype.
2321         * semantics.c (do_poplevel): Add prototype.  Make static.
2322
2323         * cp-tree.h (original_type): Remove prototype.
2324         * typeck.c (original_type): Make static.
2325
2326         * cp-tree.h (declare_global_var): Remove prototype.
2327         * decl.c (declare_global_var): Make static.
2328
2329         * cp-tree.h (implicitly_declare_fn): Remove prototype.
2330         * method.c (implicitly_declare_fn): Make static.
2331
2332         * cp-tree.h (fold_decl_constant_value): Remove prototype.
2333         * pt.c (fold_decl_constant_value): Make static.
2334
2335         * cp-tree.h (build_x_delete): Remove prototype.
2336         * init.c (build_vec_delete_1): Call build_op_delete_call directly
2337         and not via build_x_delete.
2338         (build_x_delete): Remove.
2339
2340         * cp-tree.h (get_vtt_name): Remove prototype.
2341         * class.c (get_vtt_name): Remove.
2342         (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
2343
2344 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2345
2346         * rtti.c (build_dynamic_cast): Fix comment.
2347
2348 2006-01-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2349
2350         PR c++/10891
2351         * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
2352         -fno-rtti.
2353
2354 2006-01-21  Mark Mitchell  <mark@codesourcery.com>
2355
2356         PR c++/25895
2357         * class.c (build_base_path): Generate a NOP_EXPR instead of a
2358         COMPONENT_REF if the base and derived classes are at the same
2359         address.
2360
2361         PR c++/25856
2362         * decl.c (begin_destructor_body): Robustify.
2363
2364         PR c++/25858
2365         * parser.c (cp_parser_direct_declarator): Robustify.
2366
2367 2006-01-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2368
2369         * parser.c (cp_lexer_next_token_is_keyword): Simplify.
2370
2371         * parser.c (clear_decl_specs): Remove prototype.
2372
2373         * parser.c (cp_parser_expression_fn): Remove.
2374
2375         * call.c (add_builtin_candidates): Remove superfluous return.
2376         * name-lookup.c (do_toplevel_using_decl): Likewise.
2377         * parser.c (cp_parser_type_specifier_seq): Likewise.
2378         (cp_parser_save_default_args): Likewise.
2379
2380 2006-01-20  Dirk Mueller  <dmueller@suse.com>
2381
2382         PR c++/5520
2383         * semantics.c (finish_if_stmt): Call empty_body_warning.
2384         * parser.c (cp_parser_implicitly_scoped_statement):
2385         Mark empty statement with an empty stmt.
2386
2387 2006-01-19  Mark Mitchell  <mark@codesourcery.com>
2388
2389         PR c++/22136
2390         * name-lookup.c (do_class_using_decl): Don't try to look up base
2391         classes in templates with dependent base types.
2392
2393 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2394
2395         PR c++/25854
2396         * pt.c (maybe_process_partial_specialization): Return early on
2397         error_mark_node.
2398
2399 2006-01-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2400
2401         PR c++/16829
2402         * decl.c (start_preparsed_function): Check default arguments
2403         unconditionally.
2404         * name-lookup.c (pushdecl_maybe_friend): Check default arguments
2405         of all functions and function templates.
2406         * parser.c (cp_parser_late_parsing_default_args): Check default
2407         arguments.
2408         * decl2.c (check_default_args): Set missing default arguments to
2409         error_mark_node.
2410
2411 2006-01-18  Mark Mitchell  <mark@codesourcery.com>
2412
2413         PR c++/25836
2414         * cp-tree.h (push_class_stack): New function.
2415         (pop_class_stack): Likewise.
2416         * class.c (class_stack_node): Add hidden field.
2417         (pushclass): Clear it.
2418         (push_class_stack): New function.
2419         (pop_class_stack): Likewise.
2420         (currently_open_class): Ignore hidden classes.
2421         (currently_open_derived_class): Likewise.
2422         * name-lookup.c (push_to_top_level): Call push_class_stack.
2423         (pop_from_top_level): Call pop_class_stack.
2424
2425 2006-01-18  Kazu Hirata  <kazu@codesourcery.com>
2426
2427         * tree.c (find_tree_t, find_tree): Remove.
2428         * cp-tree.h: Remove the prototype for find_tree.
2429
2430 2006-01-18  Jakub Jelinek  <jakub@redhat.com>
2431
2432         * search.c (lookup_conversions_r): Fix a pasto.
2433
2434 2006-01-17  Eric Christopher  <echristo@apple.com>
2435
2436         * call.c (convert_like_real): When issuing conversion
2437         warnings, depend on OPT_Wconversion.
2438         * cvt.c (build_expr_type_conversion): Ditto.
2439
2440 2006-01-17  Kazu Hirata  <kazu@codesourcery.com>
2441
2442         * name-lookup.c (lookup_namespace_name): Remove.
2443         * name-lookup.h: Remove the prototype for
2444         lookup_namespace_name.
2445
2446 2006-01-17  Jakub Jelinek  <jakub@redhat.com>
2447
2448         PR c/25682
2449         * decl.c (compute_array_index_type): After issuing not an integral
2450         constant-expression error, set size to 1 to avoid ICEs later on.
2451
2452 2006-01-16  Ian Lance Taylor  <ian@airs.com>
2453
2454         * parser.c: Include "cgraph.h".
2455         (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
2456         assemble_asm.
2457
2458 2006-01-16  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
2459
2460         * g++spec.c (lang_specific_spec_functions): Remove.
2461
2462 2006-01-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2463
2464         * decl.c (check_initializer): Fix thinko.
2465
2466 2006-01-14  Mark Mitchell  <mark@codesourcery.com>
2467
2468         PR c++/25663
2469         * parser.c (cp_parser_direct_declarator): Use cp_parser_error
2470         instead of error.
2471
2472 2006-01-13  Jason Merrill  <jason@redhat.com>
2473
2474         * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
2475
2476         * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
2477         * pt.c (check_explicit_specialization): Likewise.
2478
2479 2006-01-12  Jason Merrill  <jason@redhat.com>
2480
2481         PR libstdc++/24660
2482         * pt.c (check_explicit_specialization): Handle namespace
2483         association.
2484         * name-lookup.c (set_decl_namespace): Likewise.
2485
2486 2006-01-12  Nathan Sidwell  <nathan@codesourcery.com>
2487
2488         PR c++/24824
2489         * class.c (handle_using_decl): Pass correct scope to
2490         cp_emit_debug_info_for_using.
2491
2492 2006-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2493
2494         PR c++/25386
2495         * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
2496         packedness.
2497
2498 2006-01-06  Gabriel Dos Reis  <gdr@integrablesolutions.net>
2499
2500         * parser.c (cp_parser_primary_expression): Document the grammar
2501         for the built-in offsetof, a GNU extension.
2502
2503 2006-01-04  Zdenek Dvorak <dvorakz@suse.cz>
2504
2505         PR c++/25632
2506         * init.c (constant_value_1): Unshare use of DECL_INITIAL.  Fix a typo
2507         in condition.
2508
2509 2006-01-04  Chris Lattner  <sabre@gnu.org>
2510
2511         * typeck2.c: update copyright to 2006
2512         (split_nonconstant_init_1):  Set TREE_CONSTANT to true.
2513
2514 2006-01-04  Mark Mitchell  <mark@codesourcery.com>
2515
2516         PR c++/24782
2517         * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
2518         checks, even when parsing tentatively.
2519
2520 2006-01-04  Richard Henderson  <rth@redhat.com>
2521
2522         Merge from gomp branch.
2523         * lex.c (handle_pragma_java_exceptions): Fix whitespace.
2524         * parser.c (struct cp_token): Add pragma_kind.
2525         (eof_token): Update to match.
2526         (struct cp_lexer): Add in_pragma; rearrange next for better packing.
2527         (cp_parser_initial_pragma): New.
2528         (cp_lexer_new_main): Use it.  Don't bother clearing
2529         c_lex_return_raw_strings.
2530         (cp_lexer_get_preprocessor_token): Always initialize keyword
2531         and pragma_kind fields.  Handle CPP_PRAGMA.
2532         (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
2533         in_pragma is set.
2534         (cp_lexer_handle_pragma): Remove.  Update callers to cp_parser_pragma.
2535         (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
2536         (cp_parser_skip_to_pragma_eol): New.
2537         (cp_parser_error): Use it.
2538         (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
2539         rearrange with switch statement.
2540         (cp_parser_skip_to_end_of_statement): Likewise.
2541         (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2542         (cp_parser_skip_to_closing_brace): Likewise.
2543         (cp_parser_skip_until_found): Likewise.
2544         (cp_parser_statement): Add in_compound argument; update callers.
2545         Use it to decide how to handle pragma parsing.
2546         (cp_parser_labeled_statement): Add in_compound argument; pass
2547         it on to cp_parser_statement.
2548         (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
2549         (cp_parser_declaration_seq_opt): Likewise.
2550         (cp_parser_parameter_declaration): Likewise.
2551         (cp_parser_member_specification_opt): Likewise.
2552         (cp_parser_function_definition_after_decl): Likewise.
2553         (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
2554         (cp_parser_pragma): New.
2555         (pragma_lex): New.
2556
2557 2006-01-04  Dirk Mueller <dmueller@suse.com>
2558
2559         * decl.c (finish_constructor_body): create simple
2560         compound stmt instead of a if(1) { } construct.
2561
2562 2006-01-03  Mark Mitchell  <mark@codesourcery.com>
2563
2564         PR c++/25492
2565         * name-lookup.c (push_class_level_binding): When a derived class
2566         provides a type binding, eliminate any type binding from a base
2567         class.
2568
2569         PR c++/25625
2570         * repo.c (repo_emit_p): Always instantiate static data members
2571         initialized by constant expressions, so that there values are
2572         available.
2573
2574 2006-01-02  Mark Mitchell  <mark@codesourcery.com>
2575
2576         PR c++/25635
2577         * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
2578         conversion operator.
2579         * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
2580
2581         PR c++/25638
2582         * class.c (add_method): Never associate more than one destructor
2583         with a single class.
2584
2585         PR c++/25637
2586         * cp-tree.h (do_friend): Adjust prototype.
2587         * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
2588         (grokdeclarator): Likewise.  Refine check for invalid
2589         declarations/definitions of member functions outside of their own
2590         class.
2591         * friend.c (do_friend): Make funcdef_flag a bool, not an int.
2592
2593         PR c++/25633
2594         * parser.c (cp_parser_mem_initializer_list): Check result of
2595         cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
2596         (cp_parser_mem_initializer): Return error_mark_node for failure.
2597
2598         PR c++/25634
2599         * parser.c (cp_parser_template_parameter_list): Call
2600         begin_template_parm_list and end_template_parm_list here.
2601         (cp_parser_type_parameter): Not here.
2602         (cp_parser_template_declaration_after_export): Or here.
2603         (cp_parser_elaborated_type_specifier): Call
2604         cp_parser_check_template_parameters.
2605
2606         * tree.c (build_target_expr_with_type): Use force_target_expr.
2607
2608         * decl2.c (mark_used): Fix typo in comment.
2609
2610 2006-01-02  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2611
2612         * parser.c (cp_parser_using_declaration): Skip name-lookup on
2613         invalid scope.
2614
2615 2005-12-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2616
2617         * cxx-pretty-print.c (pp_cxx_constant): New.  Print
2618         string-literal in parens if input program says so.
2619         (pp_cxx_primary_expression): Hand off constant printing to
2620         pp_cxx_constant.
2621         (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
2622         (pp_cxx_expression): Use pp_cxx_constant for literals.
2623         * error.c (dump_expr): Use pp_constant for literals.
2624
2625 2005-12-29  Nathan Sidwell  <nathan@codesourcery.com>
2626
2627         * method.c (make_thunk): Don't set comdat_linkage here.
2628         (use_thunk): Make thunk one only here, if thunk target is
2629         DECL_ONE_ONLY.
2630
2631 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
2632
2633         PR c++/25439
2634         * decl.c (grokdeclarator): Remove dead code.
2635         * ptree.c (cxx_print_xnode): Handle BASELINK.
2636         * parser.c (make_id_declarator): Add sfk parameter.
2637         (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
2638         make_id_declarator.
2639         (cp_parser_declarator_id): Simplify BASELINKs here.
2640         (cp_parser_member_declaration): Adjust calls to
2641         make_id_declarator.
2642
2643 2005-12-26  Mark Mitchell  <mark@codesourcery.com>
2644
2645         PR c++/23171, c++/23172, c++/25417.
2646         * typeck.c (build_unary_op): Create temporary variables for
2647         compound literals whose addresses are taken.
2648         * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
2649         * decl.c (reshape_init_vector): Likewise.
2650         (reshape_init): Give it external linkage.
2651         (check_initializer): Use COMPOUND_LITERAL_P.
2652         (initialize_artificial_var): Allow the initializer to be a
2653         CONSTRUCTOR.
2654         * call.c (make_temporary_var_for_ref_to_temp): Use
2655         create_temporary_var.
2656         * cp-tree.h (COMPOUND_LITERAL_P): New macro.
2657         (rehape_init): Declare.
2658         * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
2659         * semantics.c (finish_compound_literal): Use reshape_init.
2660
2661 2005-12-23  Mark Mitchell  <mark@codesourcery.com>
2662
2663         PR c++/24671
2664         * pt.c (instantiate_template): Handle SFINAE.
2665
2666 2005-12-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2667
2668         * decl.c (grokdeclarator): Improve diagnostic for friend
2669         declarations of class members.
2670
2671 2005-12-22  Mark Mitchell  <mark@codesourcery.com>
2672
2673         PR c++/25369
2674         * tree.c (really_overloaded_fn): Tweak comment.
2675         * pt.c (tsubst_call_declarator_parms): Remove.
2676         (tsubst_copy): Call mark_used on the member referenced by an
2677         OFFSET_REF.
2678         * semantics.c (finish_qualified_id_expr): Simplify.
2679         * decl2.c (mark_used): Accept BASELINKs.
2680
2681         PR c++/25364
2682         * typeck.c (build_unary_op): Pass DECLs not names to
2683         build_offset_refs.
2684         * init.c (build_offset_ref): Do not do name lookup.  Do not call
2685         mark_used.
2686         * call.c (build_call): Simplify and tidy.
2687         * semantics.c (finish_qualified_id_expr): Call mark_used.
2688
2689 2005-12-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2690
2691         PR c++/23333
2692         * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
2693         identify a single '0'.
2694
2695 2005-12-20  Mark Mitchell  <mark@codesourcery.com>
2696
2697         PR c++/21228
2698         * decl.c (use_eh_spec_block): New function.
2699         (store_parm_decls): Use it.
2700         (finish_function): Likewise.
2701
2702 2005-12-19  Mark Mitchell  <mark@codesourcery.com>
2703
2704         PR c++/24278
2705         * init.c (expand_member_init): Print messages about baseclasses
2706         using %T rather than %D.
2707
2708         PR c++/24915
2709         * class.c (add_method): Do not treat templates as identical unless
2710         their return types are the same.
2711
2712 2005-12-12  Mark Mitchell  <mark@codesourcery.com>
2713
2714         PR c++/25300
2715         * tree.c (build_qualified_name): Return error_mark_node for
2716         erroneous input.
2717
2718 2005-12-10  Mark Mitchell  <mark@codesourcery.com>
2719
2720         PR c++/25337
2721         * pt.c (tsubst_copy_and_build): Permit dependent types for the
2722         object in a class member access expression.
2723
2724 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2725
2726         PR java/9861
2727         * mangle.c (write_bare_function_type): Mangle return type for
2728         methods of Java classes
2729
2730 2005-12-08  Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2731
2732         * call.c (build_conditional_expr): Print types in error messages.
2733
2734 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2735
2736         * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
2737
2738 2005-12-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2739
2740         * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
2741
2742 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
2743
2744         * Make-lang.in (c++.all.build, c++.install-normal): Remove.
2745
2746 2005-12-07  Rafael �ila de Esp�dola  <rafael.espindola@gmail.com>
2747
2748         * Make-lang.in: Remove all dependencies on s-gtype.
2749
2750 2005-12-06  Aldy Hernandez  <aldyh@redhat.com>
2751
2752         PR C++/24138
2753         * decl.c (reshape_init_array_1): Handle max_index of -1.
2754
2755 2005-12-06  Roger Sayle  <roger@eyesopen.com>
2756
2757         * typeck.c (build_binary_op): Issue warning if either operand of a
2758         comparison operator is a string literal, except for testing equality
2759         or inequality against NULL.
2760
2761 2005-12-06  Roger Sayle  <roger@eyesopen.com>
2762
2763         PR c++/25263
2764         * decl.c (compute_array_index_type): Check that itype is an
2765         INTEGER_CST node before testing/clearing TREE_OVERFLOW.
2766
2767 2005-12-05  Daniel Berlin  <dberlin@dberlin.org>
2768
2769         * ptree.c (cxx_print_decl): Update to check for decl_common
2770         structure.
2771
2772 2005-12-02  Mark Mitchell  <mark@codesourcery.com>
2773
2774         PR c++/24173
2775         * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
2776         clobbering newdecl.
2777
2778 2005-12-02  Richard Guenther  <rguenther@suse.de>
2779
2780         * semantics.c (simplify_aggr_init_expr): Use buildN instead
2781         of build.
2782
2783 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2784
2785         * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
2786         ggc_realloc.
2787         (cp_parser_template_argument_list): Use XRESIZEVEC instead of
2788         xrealloc.
2789         * class.c (pushclass): Likewise.
2790
2791 2005-12-02  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2792
2793         * decl2.c (get_priority_info): Use XNEW, not xmalloc.
2794         * decl.c (push_switch): Likewise.
2795         * lex.c (handle_pragma_implementation): Likewise.
2796         * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
2797         not ggc_alloc.
2798         (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
2799         * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
2800         * g++spec.c (lang_specific_driver): Likewise.
2801         * mangle.c (save_partially_mangled_name): Likewise.
2802         * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
2803         (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
2804         (cp_parser_sizeof_operand): Likewise.
2805         * repo.c (open_repo_file, open_repo_file): Likewise.
2806
2807 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2808
2809         * parser.c (cp_parser_make_typename_type): Call make_typename_type
2810         with tf_none instead of magic value 0.
2811         (cp_parser_explicit_instantiation): Call do_type_instantiation
2812         with tf_error instead of magic value 1.
2813         (cp_parser_elaborated_type_specifier): Call make_typename_type
2814         with tf_error instead of magic value 1.
2815         (cp_parser_class_name): Likewise.
2816         (cp_parser_lookup_name): Likewise.
2817
2818 2005-12-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2819
2820         * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
2821         not RID_MAX.
2822
2823 2005-11-30  Jason Merrill  <jason@redhat.com>
2824
2825         PR c++/21123
2826         * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
2827         parms in a thunk.
2828
2829 2005-11-30  Ben Elliston  <bje@au.ibm.com>
2830
2831         * typeck.c (build_x_unary_op): Correct spelling in error message.
2832
2833 2005-11-28  Nathan Sidwell  <nathan@codesourcery.com>
2834
2835         PR c++/21166
2836         * class.c (check_field_decls): Only set DECL_PACKED on a field
2837         when its natural alignment is > BITS_PER_UNIT.
2838
2839 2005-11-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2840
2841         PR c++/24979
2842         * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
2843
2844 2005-11-26  Richard Henderson  <rth@redhat.com>
2845
2846         * lex.c: Update for pragma_lex rename.
2847         * parser.c: Likewise.
2848
2849 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2850
2851         PR c++/9278
2852         * decl.c (grokparms): Do not allow typedef-names in a '(void)'
2853         parmlist.
2854
2855 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2856
2857         * typeck2.c (process_init_constructor_union): Remove check for
2858         unnamed union members.
2859
2860 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2861
2862         * name-lookup.c (lookup_name_real): Merge two if's.
2863
2864 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2865
2866         * pt.c (instantiate_class_template): Clean-up.
2867
2868 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2869
2870         * pt.c (template_class_depth_real): Remove. Move functionality to ...
2871         (template_class_depth): ... here, replacing count_specializations
2872         with 0.  Adjust comment.
2873
2874 2005-11-24  Richard Guenther  <rguenther@suse.de>
2875         Dirk Mueller <dmueller@suse.de>
2876
2877         PR c++/14024
2878         * typeck.c (build_reinterpret_cast_1): Use
2879         strict_aliasing_warning.
2880
2881 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2882
2883         PR c++/24235
2884         * pt.c (check_instantiated_args): Reword diagnostic message about
2885         template argument involving local types.
2886
2887 2005-11-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2888
2889         PR c++/21667
2890         * typeck.c (build_array_ref): Avoid code duplicate.  Use common
2891         C/C++ diagnostic function warn_array_subscript_with_type_char.
2892
2893 2005-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2894
2895         PR c++/22238
2896         * error.c (resolve_virtual_fun_from_obj_type_ref): New.
2897         (dump_expr): Use it in <case CALL_EXPR>.
2898
2899 2005-11-21  Richard Henderson  <rth@redhat.com>
2900
2901         * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
2902
2903         * name-lookup.c (lookup_name): Remove prefer_type argument.
2904         (lookup_name_prefer_type): New.
2905         * decl.c (lookup_and_check_tag): Use them.
2906         * pt.c (tsubst_friend_class): Likewise.
2907         (lookup_template_class): Likewise.
2908         (tsubst_copy_and_build): Likewise.
2909         * name-lookup.h (lookup_name_prefer_type): New.
2910         (lookup_name): Remove declaration.
2911
2912 2005-11-18  Mark Mitchell  <mark@codesourcery.com>
2913
2914         PR c++/8355
2915         * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
2916         set_decl_namespace.
2917         * name-lookup.c (set_decl_namespace):
2918
2919 2005-11-18  Mike Stump  <mrs@apple.com>
2920
2921         * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
2922         * name-lookup.c (lookup_name_two): Remove.
2923         (lookup_name_one): Add.
2924         * name-lookup.h (lookup_name_two): Remove.
2925         (lookup_name_one): Add.
2926
2927 2005-11-15  Jason Merrill  <jason@redhat.com>
2928
2929         PR c++/24580
2930         * method.c (locate_copy): Also use skip_artificial_parms here.
2931         (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
2932         for RECORD_TYPE.
2933         (locate_ctor): Abort if we fail to find a default constructor.
2934
2935 2005-11-15  Mike Stump  <mrs@apple.com>
2936
2937         * name-lookup.c (lookup_name_two): Add.
2938         * name-lookup.h: Likewise.
2939
2940 2005-11-15  Mark Mitchell  <mark@codesourcery.com>
2941
2942         PR c++/24667
2943         * typeck.c (check_for_casting_away_constness): Use the diag_fn.
2944         (build_const_cast_1): Call it, for C-style casts.
2945
2946 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
2947
2948         PR c++/24687
2949         * pt.c (check_explicit_specialization): Don't check for C linkage.
2950         (push_template_decl_real): Likewise.
2951         * parser.c (cp_parser_explicit_specialization): Check here.
2952         (cp_parser_template_declaration_after_export): And here.
2953
2954         * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
2955         field.
2956
2957 2005-11-14  Jason Merrill  <jason@redhat.com>
2958
2959         PR c++/24580
2960         * method.c (locate_ctor): Skip all artificial parms, not just
2961         'this'.
2962
2963 2005-11-14  Mark Mitchell  <mark@codesourcery.com>
2964
2965         * parser.c (eof_token): Add initializer for ambiguous_p.
2966
2967 2005-11-13  Mark Mitchell  <mark@codesourcery.com>
2968
2969         PR c++/24817
2970         * decl.c (check_redeclaration_exception_specification): New
2971         function.
2972         (duplicate_decls): Use it.
2973         * error.c (fndecl_to_string): Print the template parameter list.
2974
2975         PR c++/20293
2976         * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
2977         for namespaces.
2978         (pp_cxx_original_namespace_definition): Likewise.
2979         * name-lookup.c (ambiguous_decl): Don't issue error messages;
2980         instead return lists of ambiguous candidates.
2981         (select_decl): Handle ambiguous namespace lookups.
2982         * parser.c (cp_token): Add ambiguous_p.
2983         (cp_lexer_get_preprocessor_token): Set it.
2984         (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
2985         when a qualified name uses an invalid scope.
2986         (cp_parser_primary_expression): Print ambiguous candidates.
2987         (cp_parser_type_parameter): Adjust comment to reflect new
2988         parameter name for cp_parser_lookup_name.
2989         (cp_parser_template_argument): Likewise.
2990         (cp_parser_elaborated_type_specifier): Likewise.
2991         (cp_parser_namespace_name): Likewise.
2992         (cp_parser_class_name): Print ambiguous candidates.
2993         (cp_parser_lookup_name): Rename ambiguous_p parameter to
2994         ambiguous_decls.  Use it to return a list of ambiguous candiates
2995         when a lookup is ambiguous.
2996         (cp_parser_lookup_name_simple): Adjust comment to reflect new
2997         parameter name for cp_parser_lookup_name.
2998
2999 2005-11-12  Jakub Jelinek  <jakub@redhat.com>
3000
3001         PR c++/24780
3002         * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
3003         and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
3004         of array type.
3005
3006         PR c++/24761
3007         * pt.c (tsubst_copy_asm_operands): New function.
3008         (tsubst_expr) <case ASM_EXPR>: Use it.
3009
3010 2005-11-08  Jakub Jelinek  <jakub@redhat.com>
3011
3012         PR c++/19450
3013         * decl.c (redeclaration_error_message): Issue diagnostics about
3014         olddecl and newdecl disagreement on __thread property.
3015         (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
3016
3017 2005-11-08  Jason Merrill  <jason@redhat.com>
3018
3019         PR c++/21123
3020         * method.c (use_thunk): Use build_cplus_new instead of
3021         force_target_expr.
3022
3023 2005-11-06  Jason Merrill  <jason@redhat.com>
3024             James A. Morrison <phython@gcc.gnu.org>
3025
3026         PR c++/17256
3027         * decl2.c (cp_finish_file): Fix conditions for undefined warning.
3028         Set TREE_NO_WARNING instead of TREE_PUBLIC.
3029         * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
3030         a warning on a function we didn't instantiate because of excessive
3031         recursion.
3032
3033 2005-11-06  Mark Mitchell  <mark@codesourcery.com>
3034
3035         * class.c (record_subobject_offsets): Don't record offsets past
3036         biggest empty class for non-empty base classes.
3037         (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
3038         keeping track of the size of emptyclasses.
3039
3040         PR c++/21308
3041         * class.c (sizeof_biggest_empty_class): New variable.
3042         (record_subobject_offsets): Don't record offsets past biggest
3043         empty class for data members.  Replace vbases_p parameter with
3044         is_data_member parameter.
3045         (build_base_field): Adjust call.
3046         (layout_class_type): Likewise.  Maintain
3047         sizeof_biggest_empty_class.
3048
3049 2005-11-05  Kazu Hirata  <kazu@codesourcery.com>
3050
3051         * decl2.c, init.c, typeck.c: Fix comment typos.
3052
3053 2005-11-04  Richard Guenther  <rguenther@suse.de>
3054
3055         PR c++/22487
3056         * init.c (build_vec_init): Build comparison of matching
3057         types.
3058
3059 2005-11-03  Josh Conner  <jconner@apple.com>
3060
3061         PR c++/19989
3062         pt.c (tsubst): Accept zero-length array if tf_error is set
3063         in complain flags.  Change error message for negative-
3064         length array.
3065
3066 2005-11-04  Joseph S. Myers  <joseph@codesourcery.com>
3067
3068         * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
3069         parameter.
3070
3071 2005-11-03  Joseph S. Myers  <joseph@codesourcery.com>
3072
3073         PR c++/17964
3074         * error.c (cp_cpp_error): New function.
3075         * cp-tree.h (cp_cpp_error): Declare.
3076         * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
3077         and error callback after lexing.
3078
3079 2005-11-03  Mark Mitchell  <mark@codesourcery.com>
3080
3081         PR c++/21627
3082         * pt.c (register_specialization): Update inline flags on clones.y
3083
3084 2005-11-03  Andrew Pinski  <pinskia@physics.uc.edu>
3085
3086         PR c++/24582
3087         * decl.c (declare_local_label): Return 0 for variables
3088         with error_mark_node as their types.
3089
3090 2005-11-02  Mark Mitchell  <mark@codesourcery.com>
3091
3092         PR c++/22434
3093         * call.c (build_conditional_expr): Do bad conversions, if there's
3094         no other choice.
3095
3096         PR c++/24560
3097         * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
3098         message for use of overloaded functions on LHS of "." operator.
3099
3100         PR c++/19253
3101         * parser.c (cp_parser_postfix_expression): Use
3102         cp_parser_elaborated_type_specifier to handle typename-types in
3103         functional casts.
3104         (cp_parser_enclosed_argument_list): Skip ahead to the end of the
3105         template argument list if the closing ">" is not found.
3106
3107         PR c++/24569
3108         * pt.c (instantiate_decl): Use cp_finish_decl, not
3109         finish_static_data_member_decl.
3110
3111 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3112
3113         * decl.c (grokfndecl): Remove the setting
3114         of the return type of the function type
3115         of main after erroring about must returning
3116         int.
3117
3118 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3119
3120         PR C++/23229
3121         * decl.c (grokfndecl): Create a new function type
3122         after erroring out about main not returning int.
3123
3124 2005-10-28  Josh Conner  <jconner@apple.com>
3125
3126         PR c++/22153
3127         * parser.c (cp_parser_member_declaration): Detect and handle
3128         a template specialization.
3129
3130 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
3131
3132         PR C++/23426
3133         * decl.c (start_decl): Check that the decl is an
3134         error_mark_node before getting the type.
3135         Remove the check for the decl's type being an
3136         error_mark_node.
3137
3138 2005-10-21  Mark Mitchell  <mark@codesourcery.com>
3139
3140         PR c++/24260
3141         * parser.c (cp_parser_init_declarator): Pass attributes to
3142         grokfield.
3143
3144 2005-10-20  Mark Mitchell  <mark@codesourcery.com>
3145
3146         PR c++/22618
3147         * search.c (accessible_p): Check access in the outermost set of
3148         template parameters.
3149
3150 2005-10-20  Richard Guenther  <rguenther@suse.de>
3151
3152         * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
3153
3154 2005-10-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3155
3156         PR c++/22293
3157         * decl.c (grokdeclarator): Reject unqualified destructors in
3158         friend declarations.
3159
3160 2005-10-18  Mark Mitchell  <mark@codesourcery.com>
3161
3162         PR c++/23293
3163         * pt.c (convert_template_argument): Use canonical type variants in
3164         template specializations.
3165
3166 2005-10-18  Nathan Sidwell  <nathan@codesourcery.com>
3167
3168         PR c++/21383
3169         * name-lookup.c (arg_assoc): Template args can be null in a
3170         template-id-expr.
3171
3172         PR c++/22604
3173         * class.c (update_vtable_entry_for_fn): Don't process invalid
3174         covariant overriders.
3175
3176         PR c++/23118
3177         * cp-tree.h (add_method): Add return value.
3178         * class.c (add_method): Return success indicator.
3179         * semantics.c (finish_member_declaration): Don't add an invalid
3180         method to the method list.
3181
3182 2005-10-17  Mark Mitchell  <mark@codesourcery.com>
3183
3184         PR c++/21908
3185         * call.c (build_new_method_call): Do not show VTT parameters to
3186         the user.
3187
3188 2005-10-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3189
3190         PR c++/23440
3191         * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
3192         only complain about missing statement.
3193
3194 2005-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3195
3196         PR c++/24386
3197         * cp-tree.h (BASELINK_QUALIFIED_P): New.
3198         * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
3199         * typeck.c (finish_class_member_access_expr): Set it.
3200
3201         PR c++/21353
3202         * decl.c (check_default_argument): Don't check
3203         processing_template_decl or uses_template_parms here.
3204         (grokparms): Only call check_default_argument when not processing
3205         a template decl.
3206         * parser.c (cp_parser_late_parsing_default_arg): Call
3207         check_default_argument when not processing a template decl.
3208
3209 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
3210
3211         PR c++/24389
3212         * decl2.c (mark_used): Use uses_template_parms instead of
3213         dependent_type_p.
3214         * init.c (constant_value_1): Handle uninstantiated templates
3215         specially.
3216         * pt.c (instantiate_decl): Add sanity check.
3217
3218 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
3219
3220         PR c++/22173
3221         * typeck.c (check_template_keyword): Fix thinko.
3222
3223 2005-10-16  Andrew Pinski  <pinskia@physics.uc.edu>
3224
3225         PR c++/23959
3226         * decl.c (pop_switch): Only call c_do_switch_warnings
3227         when not processing templates.
3228
3229 2005-10-16  Mark Mitchell  <mark@codesourcery.com>
3230
3231         PR c++/22173
3232         * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
3233         (check_template_keyword): New function.
3234         (finish_id_expression): Change prototoype.
3235         (finish_qualified_id_expr): Change prototype.
3236         (build_qualified_name): New function.
3237         (finish_class_member_access_expr): Change prototype.
3238         * init.c (build_offset_ref): Use build_qualified_name.
3239         * mangle.c (write_expression): Likewise.
3240         * parser.c (cp_parser_primary_expression): Remove qualifying_class
3241         parameter.  Add address_p and template_arg_p.  Use
3242         build_qualified_name.
3243         (cp_parser_id_expression): Default *template_p to
3244         template_keyword_p.  Check for invalid uses of the template
3245         keyword.
3246         (cp_parser_postfix_expression): Eliminate special handling for
3247         qualified names.  Adjust call to cp_parser_primary_expression.
3248         (cp_parser_postfix_dot_deref_expression): Adjust call to
3249         cp_parser_id_expression and finish_class_member_access_expr.
3250         (cp_parser_template_argument_list): Add comment.
3251         (cp_parser_template_argument): Adjust use of
3252         cp_parser_primary_expression.  Remove call to
3253         finish_qualified_id_expr.
3254         (cp_parser_lookup_name): Use build_qualified_name.
3255         * pt.c (tsubst): Use build_qualified_name.
3256         (tsubst_qualified_id): Likewise.  Adjust call to
3257         finish_qualified_id_expr.
3258         (tsubst_copy): Use build_qualified_name.
3259         (tsubst_copy_and_build): Adjusts call to finish_id_expression and
3260         finish_class_member_access_expr.
3261         * semantics.c (finish_non_static_data_member): Use
3262         build_qualified_name.
3263         (finish_qualified_id_expr): Add template_p and template_arg_p
3264         parameters.
3265         (finish_id_expression): Remove qualifiying_class parameter.  Add
3266         template_p, done, address_p, and template_arg_p.  Use
3267         build_qualified_name.  Adjust calls to
3268         finish_class_member_acess_expr.
3269         * tree.c (build_qualified_name): New function.
3270         * typeck.c (check_template_keyword): New function.
3271         (finish_class_member_access_expr): Add template_p argument.  Check
3272         for invalid uses of the template keyword.
3273
3274 2005-10-15  Mark Mitchell  <mark@codesourcery.com>
3275
3276         PR c++/21347
3277         * class.c (maybe_warn_about_overly_private_class): Lazy
3278         constructors are public.
3279
3280 2005-10-14  Mark Mitchell  <mark@codesourcery.com>
3281
3282         PR c++/19565
3283         * call.c (convert_like_real): Rely on convert_and_check to issue
3284         warnings about overflow and conversion to unsigned.
3285         * decl.c (finish_enum): Use the location of the enumerators, not
3286         the closing brace of the enumeration, when reporting warnings
3287         about conversions.
3288         (build_enumerator): Use error_mark_node for erroneous values.
3289         * typeck2.c (digest_init): Remove reference to "signature pointer"
3290         from comment.
3291
3292 2005-10-14  Nathan Sidwell  <nathan@codesourcery.com>
3293
3294         PR c++/17796
3295         * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
3296         (maybe_clone_body): Track the first clone.
3297
3298 2005-10-13  Nathan Sidwell  <nathan@codesourcery.com>
3299
3300         PR c++/23984
3301         * class.c (build_base_path): The vtable is always the first thing
3302         in the vtt.
3303
3304 2005-10-13  Mark Mitchell  <mark@codesourcery.com>
3305
3306         PR c++/20721
3307         * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
3308         * decl.c (duplicate_decls): Merge it into new declarations.
3309         (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
3310         (cp_finish_decl): Set it, when appropriate.
3311
3312         PR c++/22180
3313         * call.c (build_new_method_call): Correct pretty-printing of
3314         destructor names.
3315         * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
3316         identifier.
3317
3318         PR c++/23694
3319         * decl.c (start_method): Return error_mark_node for errors.
3320
3321         PR c++/23307
3322         * pt.c (push_template_decl_real): Complain about attempts to
3323         declare template variables.
3324
3325         PR c++/22352
3326         * pt.c (tsubst_template_parms): Set processing_template_decl while
3327         processing the parameters.
3328         (tsubst_decl): Set processing_template_decl when substituting into
3329         a TEMPLATE_DECL.
3330
3331         PR c++/22405
3332         * pt.c (most_specialized_instantiation): Robustify.
3333
3334         PR c++/22464
3335         * semantics.c (finish_id_expression): Issue errors about uses of
3336         local variables in containing functions even in templates.
3337
3338 2005-10-12  Danny Smith  <dannysmith@users.sourceforge.net>
3339
3340         PR target/21801
3341         PR target/23589
3342         * class.c (finish_struct_1): Call
3343         targetm.cxx.adjust_class_at_definition.
3344
3345
3346 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3347
3348         PR c++/21592
3349         * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
3350         with already looked up member functions.  Assert we're not
3351         returning a NON_DEPENDENT_EXPR with unknown type.
3352         * typeck.c (finish_class_member_access_expr):  We can get
3353         non-template-id-expr baselinks.  If the lookup finds a baselink,
3354         remember it even inside templates.
3355
3356         PR c++/23797
3357         * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
3358         TYPE_DECL.  Use dependent_type_p to check type.
3359         * pt.c (uses_template_parms_p): Use dependent_type_p for a
3360         TYPE_DECL.
3361         (type_dependent_expression_p): Assert we've not been given a
3362         TYPE_DECL.
3363
3364         PR c++/21117
3365         * decl.c (check_function_type): Correctly overwrite incomplete
3366         return type with void type.
3367         * typeck.c (check_return_expr): If the function's return type is
3368         void, don't try and convert a return expr.
3369
3370 2005-10-12  David Edelsohn  <edelsohn@gnu.org>
3371
3372         PR c++/23730
3373         * call.c (build_object_call): If BINFO is NULL, bypass
3374         lookup_fnfields and set fns to NULL_TREE.
3375
3376 2005-10-12  Paolo Bonzini  <bonzini@gnu.org>
3377
3378         PR c++/24052
3379         * error.c (dump_expr): Pass LABEL_DECL to dump_decl.  Print
3380         an ADDR_EXPR of a LABEL_DECL as &&.
3381
3382 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3383
3384         PR c++/19964
3385         * class.c (walk_subobject_offsets): Don't walk error_mark_node.
3386
3387 2005-10-11  Ian Lance Taylor  <ian@airs.com>
3388
3389         PR c++/8057
3390         * cvt.c (convert_to_void): Don't warn about unused values when
3391         processing a template declaration.
3392
3393 2005-10-11  Mark Mitchell  <mark@codesourcery.com>
3394
3395         PR c++/21089
3396         * call.c (convert_like_real): Use decl_constant_value, not
3397         integral_constant_value.
3398         * init.c (constant_value_1): New function.
3399         (integral_constant_value): Use it.
3400         (decl_constant_value): Likewise.
3401         * typeck.c (decay_conversion): Use decl_constant_value, not
3402         integral_constant_value.
3403
3404         PR c++/21369
3405         * parser.c (cp_parser_elaborated_type_specifier): Don't treat
3406         class types as templates if the type is not appearing as part of a
3407         type definition or declaration.
3408
3409 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
3410
3411         PR c++/24277
3412         * pt.c (instantiate_decl): Call finish_static_data_member_decl for
3413         static data members.
3414
3415 2005-10-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3416             Mark Mitchell  <mark@codesourcery.com>
3417
3418         PR c++/23437
3419         * parser.c (cp_parser_template_argument_list): Do not treat
3420         contents of argument list as part of a constant expression.
3421
3422 2005-10-10  Mark Mitchell  <mark@codesourcery.com>
3423
3424         PR c++/24139
3425         * decl.c (grokdeclarator): Do not require template parameter lists
3426         for explicitly specialized class.
3427         * error.c (dump_aggr_type): Do not dump template arguments for
3428         non-primary specializations.
3429         (dump_function_name): Likewise.
3430
3431         PR c++/24275
3432         * pt.c (instantiate_decl): Instantiate the initializer of
3433         a static data member in the namespace containing the class
3434         containing the static data member.
3435
3436 2005-10-08  James A. Morrison  <phython@gcc.gnu.org>
3437
3438         PR c++/22172
3439         * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
3440         scopes as nondependent.
3441
3442 2005-10-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3443
3444         * call.c (resolve_args): Remove redundant test.
3445
3446 2005-10-05  Paolo Bonzini  <bonzini@gnu.org>
3447
3448         PR tree-optimization/21419
3449         PR tree-optimization/24146
3450         PR tree-optimization/24151
3451
3452         * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
3453         read-only.  Set ASM_VOLATILE_P for asms without outputs.
3454
3455 2005-10-05  Nathan Sidwell  <nathan@codesourcery.com>
3456
3457         PR c++/23513
3458         * call.c (joust): Adjust length count to more_specialized_fn.
3459         * pt.c (more_specialized_fn): Cope with non-static member vs
3460         non-member.
3461
3462 2005-10-04  Andrew Pinski  <pinskia@physics.uc.edu>
3463
3464         PR middle-end/23125
3465         * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
3466         instead of change_decl_assembler_name.
3467
3468 2005-10-03  Alexandre Oliva  <aoliva@redhat.com>
3469
3470         * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
3471
3472 2005-10-03  Mark Mitchell  <mark@codesourcery.com>
3473
3474         PR c++/17775
3475         * repo.c: Include flags.h.
3476         (finish_repo): Add -frandom-seed to the arguments.
3477
3478 2005-10-02  Mark Mitchell  <mark@codesourcery.com>
3479
3480         PR c++/22621
3481         * parser.c (cp_parser_template_argument): Don't turn "T::f" into
3482         "(*this).T::f".
3483         * pt.c (convert_nontype_argument): Remove ??? comment.
3484
3485         PR c++/23840
3486         * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
3487         when class rvalues are lvalues.
3488
3489 2005-09-28  Mark Mitchell  <mark@codesourcery.com>
3490
3491         PR c++/16782
3492         * decl.c (grokdeclarator): Always pedwarn about overqualified
3493         member names.
3494
3495 2005-09-27  Mark Mitchell  <mark@codesourcery.com>
3496
3497         PR c++/22147
3498         * name-lookup.c (maybe_process_template_type_declaration): Don't
3499         treat forward declarations of classes as templates just because
3500         we're processing_template_decl.
3501         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
3502         functions.
3503
3504 2005-09-26  Jason Merrill  <jason@redhat.com>
3505
3506         PR c++/13764
3507         * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
3508         * name-lookup.c (pushdecl_maybe_friend): Check it.
3509         * decl.c (begin_function_body): Do nothing if it's false.
3510         (finish_function_body): Ditto.
3511         (outer_curly_brace_block): New fn.
3512         (finish_function): Use it.
3513
3514 2005-09-26  Richard Guenther  <rguenther@suse.de>
3515
3516         PR middle-end/15855
3517         * decl2.c (do_static_destruction): Remove.
3518         (finish_static_initialization_or_destruction): Likewise.
3519         (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
3520         (NEEDS_GUARD_P): Likewise.
3521         (do_static_initialization): Rename to
3522         do_static_initialization_or_destruction.  Process all
3523         initializers/destructors and handle common conditionalizing.
3524         (start_static_initialization_or_destruction): Rename to
3525         one_static_initialization_or_destruction.  Handle only
3526         decl-specific conditionalizing.
3527         (cp_finish_file): Call do_static_initialization_or_destruction.
3528
3529 2005-09-22  Jakub Jelinek  <jakub@redhat.com>
3530
3531         PR c++/21983
3532         * class.c (find_final_overrider): Move diagnostic about no unique final
3533         overrider to...
3534         (update_vtable_entry_for_fn): ... here.
3535
3536 2005-09-21  Mark Mitchell  <mark@codesourcery.com>
3537
3538         PR c++/23993
3539         * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
3540
3541 2005-09-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3542
3543         PR c++/23965
3544         * call.c (resolve_args): Return error_mark_node on arguments
3545         whose TREE_TYPE is error_mark_node.
3546
3547 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
3548
3549         PR c++/23947
3550         * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
3551         get_tinfo_ptr calls.
3552
3553 2005-09-16  Mark Mitchell  <mark@codesourcery.com>
3554
3555         PR c++/23914
3556         * parser.c (cp_parser_enclosed_template_argument_list): Make sure
3557         skip_evaluation is false when processing template arguments.
3558
3559         PR c++/21514
3560         * pt.c (check_instantiated_args): Treat uses of anonymous types as
3561         causing type-deduction failure.
3562
3563 2005-09-15  Jason Merrill  <jason@redhat.com>
3564
3565         PR c++/23357
3566         * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
3567         tcc_expression.
3568
3569 2005-09-15  Mark Mitchell  <mark@codesourcery.com>
3570
3571         PR c++/23896
3572         * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
3573         processing template arguments.
3574
3575         * pt.c (check_explicit_instantiation_namespace): Fix typo.
3576
3577         PR c++/13140
3578         * decl.c (check_class_member_definition_namespace): New function.
3579         (grokfndecl): Use it.
3580         (grokvardecl): Likewise.
3581         (grokdecl): Improve documentation.
3582         * pt.c (check_explicit_instantiation_namespace): New function.
3583         (register_specialization): Call check_specialization_namespace
3584         when replacing an implicitly instantiated function.
3585         (check_explicit_specialization): Ensure that DECL_CONTEXT is set
3586         correctly for namespace-scope specializations.
3587         (do_decl_instantiation): Use
3588         check_explicit_instantiation_namespace.
3589         (do_type_instantiation): Likewise.
3590
3591 2005-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3592
3593         PR c++/23725
3594         * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
3595
3596 2005-09-13  Bastian Blank <waldi@debian.org>
3597
3598         PR c++/16171
3599         * mangle.c (find_substitution): Do not use special substitutions
3600         for identifiers not in std::.
3601
3602 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
3603
3604         PR c++/23839
3605         * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
3606         for VAR_DECLs.
3607
3608 2005-09-13  Mark Mitchell  <mark@codesourcery.com>
3609
3610         PR c++/23842
3611         * pt.c (tsubst_default_argument): Do treat default argument
3612         expressions as occurring in the context of the function called.
3613
3614 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
3615
3616         PR c++/23841
3617         * parser.c (cp_parser_primary_expression): Recognize the closing
3618         ">" of a template-argument-list after a floating-point literal as
3619         the end of a cast expression.
3620
3621 2005-09-12  Mark Mitchell  <mark@codesourcery.com>
3622
3623         PR c++/23789
3624         * cvt.c (perform_qualification_conversions): Don't create
3625         unnecessary NOP_EXPRs.
3626         * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
3627
3628 2005-09-12  Ian Lance Taylor  <ian@airs.com>
3629
3630         PR g++/7874
3631         * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
3632         bitfield.  Make dummy bitfield one bit smaller.
3633         (DECL_HIDDEN_FRIEND_P): Define.
3634         (pushdecl_maybe_friend): Declare.
3635         (pushdecl_top_level_maybe_friend): Declare.
3636         * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
3637         Change prototype and all callers.  Add assertion that a
3638         DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P.  Set
3639         DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
3640         appropriate.
3641         * name-lookup.c (supplement_binding): Don't ignore a
3642         DECL_HIDDEN_FRIEND_P.
3643         (pushdecl_maybe_friend): Break out contents of pushdecl.  Add
3644         is_friend parameter.  Set DECL_ANTICIPATED and
3645         DECL_HIDDEN_FRIEND_P for a friend function.
3646         (pushdecl): Just call pushdecl_maybe_friend.
3647         (pushdecl_with_scope): Add is_friend parameter.  Change prototype
3648         and all callers.
3649         (pushdecl_namespace_level): Likewise.
3650         (push_overloaded_decl): Likewise.  Check DECL_HIDDEN_FRIEND_P as
3651         well as DECL_ANTICIPATED when checking for a builtin.
3652         (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
3653         DECL_ANTICIPATED when checking for a builtin.
3654         (do_nonmember_using_decl): Likewise.
3655         (pushdecl_top_level_1): Add is_friend parameter.  Change all
3656         callers.
3657         (pushdecl_top_level_maybe_friend): New function.
3658         (remove_hidden_names): New function.
3659         (struct arg_lookup): Add args field.
3660         (friend_of_associated_class_p): New static function.
3661         (arg_assoc_namespace): Ignore hidden functions which are not
3662         friends of an associated class of some argument.
3663         (lookup_arg_dependent): Remove hidden functions from list passed
3664         in.  Initialize k.args.
3665         * name-lookup.h (remove_hidden_names): Declare.
3666         * friend.c (do_friend): Call pushdecl_maybe_friend instead of
3667         pushdecl.
3668         * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
3669         an assertion, with a check for DECL_HIDDEN_FRIEND_P.
3670         (build_new_function_call): Add koenig_p parameter.  Change
3671         prototype and callers.
3672         * pt.c (register_specialization): Add is_friend parameter.  Change
3673         all callers.
3674         (push_template_decl_real): Change is_friend parameter to bool.
3675         Change prototype and all callers.
3676         (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
3677         instead of pushdecl_top_level.
3678
3679 2005-09-11  Richard Henderson  <rth@redhat.com>
3680
3681         * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
3682         * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
3683
3684 2005-09-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3685
3686         * parser.c (cp_parser_translation_unit): Simplify.  The while-block
3687         was actually executed at most once.
3688
3689 2005-09-09  Richard Henderson  <rth@redhat.com>
3690
3691         PR debug/20998
3692         * cp-tree.def (ALIAS_DECL): Remove.
3693         * cp-lang.c (cp_init_ts): Remove support for it.
3694         * error.c (dump_decl): Likewise.
3695         * name-lookup.c (pushdecl): Likewise.
3696         * semantics.c (finish_id_expression): Likewise.
3697         * decl2.c (build_anon_union_vars): Use a VAR_DECL with
3698         DECL_VALUE_EXPR instead.
3699
3700 2005-09-09  Mark Mitchell  <mark@codesourcery.com>
3701
3702         PR c++/22252
3703         * decl.c (start_preparsed_function): Do not pay attention to
3704         #pragma interface for implicitly-defined methods.
3705         * decl2.c (cp_finish_file): Do not complain about uses of inline
3706         functions that have bodies, even if we decided not to emit the
3707         body in this translation unit.
3708         * semantics.c (note_decl_for_pch): Do not mess with linkage.
3709         (expand_or_defer_fn): Make inline, non-template functions COMDAT
3710         at this point.
3711
3712 2005-09-08  Richard Henderson  <rth@redhat.com>
3713
3714         PR debug/23190
3715         * decl.c (wrapup_globals_for_namespace): Call
3716         emit_debug_global_declarations.
3717         * decl2.c (cp_finish_file): Likewise.
3718
3719 2005-09-08  Mark Mitchell  <mark@codesourcery.com>
3720
3721         PR c++/23691
3722         * decl2.c (mark_used): Instantiate static data members initialized
3723         by constants, even in a template.
3724
3725 2005-09-08  Andrew Pinski  <pinskia@physics.uc.edu>
3726
3727         PR obj-c++/16816
3728         * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
3729         two CPP_COLON.
3730
3731 2005-09-07  Richard Guenther  <rguenther@suse.de>
3732
3733         * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
3734         for EMPTY_CLASS_EXPR.
3735
3736 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
3737
3738         PR c/23075
3739         * typeck.c (check_return_expr): Add no_warning argument.  Set
3740         *no_warning to true if "return-statement with no value, in function
3741         returning" warning has been issued.
3742         * cp-tree.h (check_return_expr): Adjust prototype.
3743         * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
3744         check_return_expr set *no_warning to true.
3745
3746 2005-09-06  Mark Mitchell  <mark@codesourcery.com>
3747
3748         * cp-tree.h (rvalue): New function.
3749         * call.c (build_conditional_expr): Use it.
3750         * init.c (build_new_1): Likewise.
3751         * rtti.c (build_dynamic_cast_1): Likewise.
3752         * tree.c (rvalue): New function.
3753         * typeck.c (build_unary_op): Use it.
3754         (build_static_cast_1): Likewise.
3755
3756         PR c++/9782
3757         * init.c (build_new_1): Make sure the entire array type is
3758         complete, not just its element types.
3759
3760 2005-09-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3761
3762         * decl.c (check_elaborated_type_specifier): Remove redundant check.
3763
3764 2005-09-06  Jakub Jelinek  <jakub@redhat.com>
3765
3766         PR c++/23056
3767         * typeck.c (ignore_overflows): New helper function.
3768         (build_static_cast_1): Use it.
3769
3770 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3771
3772         * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
3773         Follow spelling conventions.
3774
3775 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
3776
3777         PR c++/23667
3778         * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
3779         copying a VAR_DECL.
3780
3781 2005-09-05  Mark Mitchell  <mark@codesourcery.com>
3782
3783         PR c++/21440
3784         * semantics.c (finish_stmt_expr_expr): Add an explicit
3785         initialization to the last statement in the statement-expression.
3786         * (finish_stmt_expr): Adjust accordingly.
3787
3788 2005-09-03  Mark Mitchell  <mark@codesourcery.com>
3789
3790         PR c++/23699
3791         * decl2.c (mark_used): Always instantiate static data members
3792         initialized by constant expressions.
3793         * pt.c (instantiate_decl): Instantiate the initializers for static
3794         data members initialized by constant expressions.
3795
3796         PR c++/21687
3797         * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
3798         finishing processing for a template function in a local class.
3799         Revert:
3800         2005-09-02  Mark Mitchell  <mark@codesourcery.com>
3801         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
3802         around functions in local classes.
3803
3804 2005-09-02  Mark Mitchell  <mark@codesourcery.com>
3805
3806         PR c++/21687
3807         * parser.c (cp_parser_class_specifier): Push/pop GC contexts
3808         around functions in local classes.
3809
3810 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
3811
3812         PR obj-c++/23640
3813         * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
3814         init, call generate_ctor_or_dtor_function.
3815
3816 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3817
3818         PR c++/13377
3819         * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
3820         lookup_name_real on final parse.
3821
3822 2005-08-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3823
3824         PR c++/23639
3825         * semantics.c (qualified_name_lookup_error): Do not complain again
3826         on invalid scope.
3827
3828 2005-08-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3829
3830         PR c++/23586
3831         * parser.c (cp_parser_namespace_name): Move diagnostic for
3832         invalid namespace-name to here from ...
3833         * name-lookup.c (do_namespace_alias): ... here and ...
3834         (do_using_directive): ... here.  Remove dead code.
3835
3836 2005-08-28  Mark Mitchell  <mark@codesourcery.com>
3837
3838         PR c++/23099
3839         * cp-tree.h (saved_scope): Add skip_evaluation.
3840         * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
3841         DECL_INITIAL, to determine whether or not a static data member was
3842         initialized in the class-specifier.
3843         (cp_finish_decl): Add comment.
3844         * init.c (integral_constant_value): Subtitute into the
3845         initializers for static data members in templates.
3846         * name-lookup.c (push_to_top_level): Save skip_evaluation.
3847         (pop_from_top_level): Restore it.
3848         * pt.c (instantiate_class_template): Do not substitute into the
3849         intializers of static data members when instantiating a class.
3850         (regenerate_decl_from_template): Simplify.
3851         (instantiate_decl): Tidy.  Substitute into the initializer for a
3852         static data member even when the definition of the data member is
3853         not available.
3854
3855 2005-08-26  Mark Mitchell  <mark@codesourcery.com>
3856
3857         PR c++/19004
3858         * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
3859         (type_dependent_expression_p): Allow BASELINKs whose associated
3860         functions are simply a FUNCTION_DECL.
3861
3862         PR c++/23491
3863         * cp-tree.h (build_vec_init): Adjust prototype.
3864         * init.c (perform_member_init): Adjust call to build_vec_init.
3865         (build_aggr_init): Likewise.
3866         (build_new_1): Do not call build_default_init for array types.
3867         (build_vec_init): Add explicit_default_init_p parameter.  Perform
3868         default initialization of vector elements when set.
3869         * typeck.c (build_modify_expr): Adjust call to build_vec_init.
3870
3871 2005-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3872
3873         PR c++/20817
3874         * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
3875         ->*.
3876
3877 2005-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3878
3879         PR c++/22454
3880         * parser.c (cp_lexer_peek_nth_token): Relax assert.
3881
3882 2005-08-23  Nathan Sidwell  <nathan@codesourcery.com>
3883
3884         PR c++/23044
3885         * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
3886
3887 2005-08-22  James E Wilson  <wilson@specifix.com>
3888
3889         PR tree-optimization/23426
3890         * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
3891         array size check.
3892
3893 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3894
3895         PR c++/22233
3896         * pt.c (push_template_decl_real): Return error_mark_node if the
3897         number of template parameters does not match previous definition.
3898
3899 2005-08-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3900
3901         PR c++/23089
3902         * decl.c (require_complete_types_for_parms): Mark incomplete types
3903         as invalid.
3904
3905 2005-08-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3906
3907         * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
3908         Fix typo in leading comment.
3909
3910 2005-08-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3911
3912         * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
3913
3914 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
3915
3916         * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
3917         * call.c (add_template_candidate_real): Pass down 'flags' to
3918         fn_type_unification.
3919         (can_convert_arg): New 'flags' argument. Pass it to call to
3920         implicit_conversion instead of LOOKUP_NORMAL.
3921         (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
3922         * class.c (resolve_address_of_overloaded_function): Ditto.
3923         (resolve_address_of_overloaded_function): Ditto.
3924         * decl.c (reshape_init, check_default_argument): Ditto.
3925         * typeck.c (build_ptrmemfunc): Ditto.
3926         * pt.c (type_unification_real): Add 'flags' argument.
3927         (fn_type_unification): Pass 'flags' to type_unification_real.
3928         (type_unification_real): Pass new 'flags' argument to call to
3929         can_convert_arg.
3930
3931 2005-08-12  Giovanni Bajo  <giovannibajo@libero.it>
3932             Nathan Sidwell  <nathan@codesourcery.com>
3933
3934         PR c++/21799
3935         PR c++/8271
3936         * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
3937         explicitly.
3938
3939 2005-08-12  Nathan Sidwell  <nathan@codesourcery.com>
3940
3941         PR c++/21799
3942         Revert my 2005-07-08 patch
3943         * pt.c (type_unification_real): Remove is_method_argument and
3944         assoicated checks.
3945         (fn_type_unification, unify): Adjust type_unification_real calls.
3946
3947 2005-08-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3948
3949         PR c++/23266
3950         * decl2.c (grokfield): Check that method is not static before
3951         marking it as pure.
3952
3953 2005-08-11  Nathan Sidwell  <nathan@codesourcery.com>
3954
3955         PR c++/23219
3956         * name-lookup.c (pushtag): Process the template type before
3957         altering the identifier lookup fields.  Remove unreachable code
3958         creating an empty stub decl.
3959
3960 2005-08-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3961
3962         PR c++/20646
3963         * decl.c (grokdeclarator): Reset storage_class after error.
3964
3965 2005-08-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3966
3967         PR c++/22508
3968         * init.c (build_new_1): Check for empty candidate list.
3969
3970 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3971
3972         PR c++/23191
3973         * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
3974         before calling build_exception_variant.
3975
3976 2005-08-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3977
3978         PR c++/19498
3979         * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
3980         if substitution of template args did not succeed.
3981
3982 2005-08-06  Michael Matz  <matz@suse.de>
3983
3984         * method.c (use_thunk): Call init_insn_lengths.
3985
3986 2005-08-05  James A. Morrison  <phython@gcc.gnu.org>
3987
3988         PR c++/22514
3989         * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
3990         sorrycount or errorcount are nonzero.
3991
3992 2005-08-05  Mark Mitchell  <mark@codesourcery.com>
3993
3994         * name-lookup.c (pushtag): Remove accidental commit from:
3995         2004-12-21  Mark Mitchell  <mark@codesourcery.com>
3996         PR c++/19063
3997         * decl.c (grokdeclarator): Return error_mark_node, not
3998         void_type_node, to indicate errors.
3999         * parser.c (cp_parser_template_parameter_list): Robustify.
4000         (cp_parser_template_parameter): Likewise.
4001
4002 2005-08-01  Kazu Hirata  <kazu@codesourcery.com>
4003
4004         * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
4005         Fix comment typos.
4006
4007 2005-07-29  Kazu Hirata  <kazu@codesourcery.com>
4008
4009         * method.c: Fix a comment typo.
4010
4011 2005-07-28  Mark Mitchell  <mark@codesourcery.com>
4012
4013         PR c++/22545
4014         * call.c (add_builtin_candidate): Adjust for changes in
4015         representation of pointer-to-member types.
4016
4017 2005-07-28  Mike Stump  <mrs@apple.com>
4018
4019         * pt.c (check_explicit_specialization): Add visibility logic.
4020         (lookup_template_class): Likewise.
4021         (instantiate_class_template): Likewise.
4022
4023 2005-07-27  Devang Patel  <dpatel@apple.com>
4024
4025         * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
4026
4027 2005-07-25  Ian Lance Taylor  <ian@airs.com>
4028
4029         * ptree.c (cxx_print_identifier): Print a leading space if the
4030         indent level is 0.
4031
4032 2005-07-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4033
4034         * call.c (convert_for_arg_passing): Check function pointers when
4035         -Wmissing-format-attribute is activated.
4036         * typeck.c (convert_for_assignment): Likewise.
4037
4038 2005-07-22  Manfred Hollstein  <mh@suse.com>
4039
4040         * parser.c (cp_parser_declaration): Fix unitialised warnings.
4041
4042 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
4043
4044         * class.c (build_base_path): Fix typo.
4045
4046 2005-07-21  Andrew Pinski  <pinskia@physics.uc.edu>
4047
4048         PR C++/22358