OSDN Git Service

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