OSDN Git Service

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