OSDN Git Service

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