OSDN Git Service

38ce783a47b66002ef44356077bc64f3ee2ba675
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2007-04-11  Jan Hubicka  <jh@suse.cz>
2
3         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
4         that we are not processing template_decl.
5
6 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
7
8         PR c++/31449
9         * class.c (build_base_path): Ensure that the converted pointer has
10         the same cv-qualification as the input.
11
12 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
13
14         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
15
16 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
17
18         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
19         Do not set it.
20         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
21         * tree.c (cp_add_pending_fn_decls): Remove.
22         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
23
24 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
25
26         Revert change removing staticp.
27
28 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
29
30         * cp-objcp-common.c (cxx_staticp): Remove.
31         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
32         * cp-tree.h (cxx_staticp):      
33
34 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
35
36         * class.c (check_for_override): Don't remove dllmport attribute
37         of virtual methods.
38
39
40
41 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
42
43         PR c++/30847
44         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
45         type issue error and return early.
46
47 2007-03-30  Jason Merrill  <jason@redhat.com>
48
49         PR c++/31187
50         * typeck.c (cp_type_readonly): New fn.
51         * cp-tree.h: Declare it.
52         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
53         (cp_finish_decl): Not here.
54
55 2007-03-31  Richard Guenther  <rguenther@suse.de>
56
57         * optimize.c (maybe_clone_body): Replace splay-tree usage by
58         pointer-map.
59
60 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
61
62         PR c++/31138
63         PR c++/31140
64         PR c++/31141
65         * parser.c (declarator_can_be_parameter_pack): New.
66         (cp_parser_template_parameter): Only parse the `...' if the
67         declarator can be a parameter pack.
68         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
69         is NULL.
70         * pt.c (find_parameter_packs_r): Look into the bounds on integer
71         types (they could be used as array bounds). 
72         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
73         (tsubst_pack_expansion): Handle failure to expand parameter
74         packs.
75         
76 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
77
78         PR c++/26099
79         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
80         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
81         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
82         (CLASS_TYPE_NON_UNION_P): Add.
83         (struct lang_type_class): Add has_complex_dflt.
84         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
85         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
86         * cp-tree.def: Add TRAIT_EXPR.
87         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
88         * lex.c (struct resword): Add __has_nothrow_assign,
89         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
90         __has_trivial_constructor, __has_trivial_copy,
91         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
92         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
93         __is_pod, __is_polymorphic, __is_union.
94         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
95         (cp_parser_trait_expr): New.
96         * semantics.c (finish_trait_expr, trait_expr_value
97         classtype_has_nothrow_copy_or_assign_p): New.
98         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
99         as static.
100         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
101         * class.c (check_bases, check_field_decl, check_bases_and_members):
102         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
103         * pt.c (uses_template_parms, tsubst_copy_and_build,
104         value_dependent_expression_p, type_dependent_expression_p): Deal with
105         TRAIT_EXPR.
106         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
107
108 2007-03-29  Richard Guenther  <rguenther@suse.de>
109
110         * tree.c (cp_walk_subtrees): Do not set input_location.
111
112 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
113
114         PR c++/29077
115         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
116         destructor.
117
118 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
119
120         * parser.c (struct cp_parser): Update comment for
121         greater_than_is_operator_p.
122         (cp_parser_primary_expression): In C++0x mode, a cast operator can
123         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
124         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
125         !GREATER_THAN_IS_OPERATOR_P.
126         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
127         `>>' operators that will become two `>' tokens in C++0x.
128         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
129         mode, allowing it to terminate default arguments.
130         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
131         `>>' like two consecutive `>' tokens.
132         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
133         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
134         ends a template argument.
135
136 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
137
138         * decl.c (redeclaration_error_message): Complain when redeclaring
139         a friend function with default template arguments (C++0x mode only).
140         * cp-tree.h (check_default_tmpl_args): Declare.
141         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
142         template arguments in function templates. Add support for checking
143         the default template arguments of friend templates.
144         (push_template_decl_real): Fix call to check_default_tmpl_args.
145         (type_unification_real): If a template parameter has not been
146         deduced but provides a default template argument, substitute into
147         that default template argument.
148         * parser.c (cp_parser_init_declarator): When declaring (but not
149         defining!) a function template in C++0x mode, check for default
150         template arguments.
151
152 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
153
154         PR c++/29993
155         * decl.c (grokdeclarator): Deal with cv-qualified function type
156         typedefs in the same way for member and non-member functions.
157
158 2007-03-26  Dirk Mueller  <dmueller@suse.de>
159
160         * parser.c (cp_parser_member_declaration): Pedwarn
161         about stray semicolons after member declarations.
162
163 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
164
165         PR c++/30500
166         * pt.c (instantiate_decl): Set in_system_header.
167
168 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
169
170         * cp-tree.h (current_tempalte_parms): Improve documentation.
171         * pt.c (current_template_args): Likewise.
172
173         PR c++/30863
174         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
175         not consume tokens when failing.
176
177 2007-03-22  Jim Wilson  <wilson@specifix.com>
178             Mark Mitchell  <mark@codesourcery.com>
179
180         PR c++/31273
181         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
182         consistent with FROM.
183
184 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
185
186         * error.c (dump_expr): Handle dependent names that designate types.
187         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
188
189 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
190
191         * cp-tree.def, parser.c, pt.c: Fix comment typos.
192
193 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
194
195         * cvt.c (cp_convert_and_check) : Define.
196         * cp-tree.h (cp_convert_and_check): Declare.
197         * call.c (convert_conversion_warnings): Rename to
198         conversion_null_warnings.  The warning for floating-point to
199         integer is handled by convert_and_check in convert_like_real.
200         (convert_like_real): convert_conversion_warnings was renamed as
201         conversion_null_warnings.
202         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
203         overflow and changes of value during conversion.
204
205 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
206
207         PR c++/30891
208         * parser.c (cp_parser_statement): If 'namespace' is found, this
209         only can be a namespace alias definition, so parse it now.
210         (cp_parser_namespace_alias_definition): if we find an open brace
211         instead of '=', then this is actually a misplaced namespace
212         definition.
213         
214 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
215
216         PR c++/24924
217         * decl.c (cxx_init_decl_processing): Move command-line options
218         processing to c-opts.c.
219         
220 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
221
222         * ptree.c (cxx_print_type): Use formatting markup for integers
223         when printing template parameter index/level/orig level.
224         (cxx_print_xnode): Ditto.
225         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
226         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
227         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
228         HOST_WIDE_INTs.
229         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
230         rather than a HOST_WIDE_INT.
231         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
232         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
233         better bit-packing.
234         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
235         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
236         IN_BASE_INITIALIZER bool bitfields.
237         (struct cp_declarator): Make KIND a 4-bit field. Make
238         PARAMETER_PACK_P a bool bitfield just after KIND.
239         * pt.c (uses_parameter_packs): Destroy the pointer set.
240         (make_pack_expansion): Ditto.
241         (check_for_bare_parameter_packs): Ditto.
242         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
243         
244 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
245
246         PR c++/31165
247         * call.c  (convert_default_arg): Instead of copying the node,
248         unshare it.
249
250 2007-03-15  Dirk Mueller  <dmueller@suse.de>
251
252         PR c++/30860
253         * call.c (convert_conversion_warnings): New..
254         (convert_like_real): .. factored out from here.
255         (convert_conversion_warnings): Add warning about
256         false being converted to NULL in argument passing.
257
258 2007-03-14  Dirk Mueller  <dmueller@suse.de>
259
260         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
261         (finish_do_body): Warn about empty body in do/while statement.
262
263 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
264
265         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
266         
267 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
268
269         PR c/21438
270         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
271         warning.
272         
273 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
274
275         * cp/repo.c (init_repo): Initialize random_seed saved options.
276         (finish_repo): Adjust.
277
278 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
279
280         PR bootstrap/30899
281         * Make-lang.in (doc/g++.1): Use $< to specify the location from
282         which to copy.
283
284 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
285
286         * decl.c (compute_array_index_type): New warning flag warn_vla.
287
288 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
289
290         PR c++/30108
291         * call.c (convert_default_arg): Copy non-constant arguments.
292
293 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
294
295         PR c++/31038
296         * parser.c (cp_parser_postfix_expression): Disallow compound
297         literals in constant expressions.
298
299         PR c++/30328
300         * semantics.c (finish_typeof): Use unlowered_expr_type.
301         
302 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
303
304         PR c++/30274
305         * cp-tree.h (unlowered_expr_type): New function.
306         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
307         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
308         (unlowered_expr_type): New function.
309         (build_unary_op): Disallow predecrements of bool bitfields.
310         * call.c (build_conditional_expr): Use unlowered_expr_type.
311         * pt.c (type_unification_real): Likewise.
312
313 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
314
315         PR c++/20599
316         * typeck.c (check_return_expr): Check for bare parameter packs.
317         (comptypes): Compare template parameter packs and
318         type pack expansions.
319         * decl.c (grokdeclarator): Deal with the declaration of function
320         parameter packs.
321         (grokparms): Verify that the (optional) function parameter pack is
322         at the end of the parameter list.
323         (xref_basetypes): Handle pack expansions in the base class.
324         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
325         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
326         (NONTYPE_ARGUMENT_PACK): New.
327         (TYPE_PACK_EXPANSION): New.
328         (EXPR_PACK_EXPANSION): New.
329         (ARGUMENT_PACK_SELECT): New.
330         * cp-objcp-common.c (cp_tree_size): Compute size of
331         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
332         ARGUMENT_PACK_SELECT.
333         * error.c (dump_template_argument): Print template argument packs.
334         (dump_template_argument_list): Ditto.
335         (dump_template_parameter): Dump `...' for template type parameter
336         packs.
337         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
338         (dump_parameters): Print function parameter packs.
339         (dump_template_parms): Print template argument packs.
340         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
341         (maybe_warn_variadic_templates): New.
342         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
343         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
344         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
345         CAST_EXPR. 
346         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
347         (write_template_arg): Write argument packs as separate arguments.
348         * cp-tree.h (struct template_parm_index_s): Add flag that
349         indicates that the template parameter is actually a parameter
350         pack.
351         (struct tree_argument_pack_select): New.
352         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
353         (union lang_tree_node): Add argument_pack_select.
354         (FUNCTION_PARAMETER_PACK_P): New.
355         (PACK_EXPANSION_P): New.
356         (PACK_EXPANSION_PATTERN): New.
357         (SET_PACK_EXPANSION_PATTERN): New.
358         (PACK_EXPANSION_PARAMETER_PACKS): New.
359         (ARGUMENT_PACK_P): New.
360         (ARGUMENT_PACK_ARGS): New.
361         (SET_ARGUMENT_PACK_ARGS): New.
362         (ARGUMENT_PACK_INCOMPLETE_P): New.
363         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
364         (TEMPLATE_PARM_PARAMETER_PACK): New.
365         (TEMPLATE_TYPE_PARAMETER_PACK): New.
366         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
367         (ARGUMENT_PACK_SELECT_INDEX): New.
368         (ARGUMENT_PACK_SELECT_ARG): New.
369         (struct cp_declarator): Add parameter_pack_p flag.
370         (maybe_warn_variadic_templates): Declare.
371         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
372         indicate a template parameter pack. 
373         (uses_parameter_packs): Declare.
374         (template_parameter_pack_p): Declare.
375         (template_parms_variadic_p): Declare.
376         (make_pack_expansion): Declare.
377         (check_for_bare_parameter_packs): Declare.
378         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
379         sizeof... expressions. 
380         (pp_cxx_expression): Print pack expansions and non-type argument
381         packs.
382         (pp_cxx_exception_specification): Print pack expansions. 
383         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
384         (pp_cxx_ctor_initializer): Print pack expansions.
385         (pp_cxx_type_id): Print pack expansions.
386         (pp_cxx_template_argument_list): Print argument packs.
387         (pp_cxx_template_parameter): Print ellipsis for template parameter
388         packs.
389         * pt.c (comp_template_parms): Compare template parameter packs.
390         (template_parameter_pack_p): New.
391         (template_parms_variadic_p): New.
392         (template_args_variadic_p): New.
393         (make_ith_pack_parameter_name): New.
394         (struct find_parameter_pack_data): New.
395         (find_parameter_packs_r): New.
396         (uses_parameter_packs): New.
397         (make_pack_expansion): New.
398         (check_for_bare_parameter_packs): New.
399         (expand_template_argument_pack): New.
400         (reduce_template_parm_level): Propagate parameter pack flag.
401         (process_template_parm): Add is_parameter_pack parameter to state
402         when the parameter is actually a parameter pack. Create template
403         parameter packs when is_parameter_pack is true.
404         (current_template_args): The argument for a template parameter
405         pack is an argument pack containing a single pack expansion.
406         (process_partial_specialization): When checking that non-type
407         argument expressions do not involve template parameters, loop over
408         the arguments in argument packs separately.
409         (push_template_decl_real): Check that the type of the declaration
410         does not have any bare parameter packs. Check that primary
411         templates have no more than one parameter pack, and that it comes
412         at the end of the template parameter list.
413         (convert_template_argument): Handle coercions for pack expansion
414         expressions by coercing the pattern then rebuilding the expansion.
415         (coerce_template_parms): When coercing the arguments for a
416         variadic template, pack "extra" arguments into an argument pack.
417         (coerce_template_template_parms): Cannot coerce between parameter
418         packs and non-pack parameters.
419         (template_args_equal): Compare PACK_EXPANSION_P expressions.
420         (comp_template_args): Expand all template arguments packs before
421         comparing template argument lists.
422         (mangle_class_name_for_template): Make argument packs as separate
423         template arguments.
424         (for_each_template_parm_r): No need to handle BASELINK. 
425         (instantiate_class_template): Handle pack expansions in the base
426         class list.
427         (tsubst_pack_expansion): New.
428         (tsubst_template_args): Handle substitutions of argument packs and
429         pack expansion into template argument lists.
430         (tsubst_decl): Expand function parameter packs into separate
431         function parameters.
432         (tsubst_arg_types): Expand a type pack expansion into separate
433         argument types.
434         (tsubst_exception_specification): Handle pack expansions in
435         exception specifiers.
436         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
437         replacing a template parameter with its argument. If we encounter
438         a substitution for an argument pack, just return the parameter
439         itself. 
440         (tsubst_copy): sizeof(X...) returns the number of elements in
441         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
442         PARM_DECL is a parameter pack.
443         (tsubst_expr): Expression pack expansions and argument packs
444         cannot show up here; they will all be handled through function
445         calls, sizeof, and template argument lists.
446         (tsubst_copy_and_build): sizeof(X...) returns the number of
447         elements in parameter pack X.  Handle pack expansions in TREE_LIST
448         and CONSTRUCTOR nodes.
449         (fn_type_unification): Handle "incomplete" explicit template
450         argument lists that specify some of the arguments for a template
451         parameter pack.
452         (type_unification_real): Unify arguments against pack expansions.
453         (template_parm_level_and_index): New, helper function.
454         (unify_pack_expansion): New.
455         (unify): Unify argument packs on an argument-by-argument basis,
456         handling variadic argument packs as well.
457         (more_specialized_fn): Handle unification of function parameter
458         packs. All things being equal, prefer non-variadic function
459         templates to variadic function templates.
460         (more_specialized_class): Prefer the variadic class template
461         partial specialization that binds fewer arguments to a parameter
462         pack.
463         (regenerate_decl_from_template): Expand function parameter packs
464         into separate parameters.
465         (instantiate_decl): Ditto.
466         (tsubst_initializer_list): Handle pack expansions for base-class
467         initializers.
468         (dependent_type_p_r): Determine dependent types in argument packs
469         and pack expansions.
470         (value_dependent_expression_p): Determine value-dependence of
471         non-type argument packs.
472         (dependent_template_arg_p): Handle argument packs.
473         * semantics.c (finish_cond): Check for bare parameter packs.
474         (finish_expr_stmt): Ditto.
475         (finish_for_expr): Ditto.
476         (finish_switch_cond): Ditto.
477         (finish_mem_initializers): Ditto.
478         * name-lookup.c (arg_assoc_type): Handle pack expansions and
479         argument packs.
480         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
481         * parser.c (make_declarator): Declarator is not an expansion.
482         (make_pointer_declarator): Transfer parameter pack flag to outer
483         declarator.
484         (make_reference_declarator): Ditto.
485         (make_ptrmem_declarator): Ditto.
486         (make_call_declarator): Ditto.
487         (make_array_declarator): Ditto.
488         (cp_parser_postfix_expression): Allow pack expansion expressions
489         in the argument list for a call expression.
490         (cp_parser_parenthesized_expression_list): Add new parameter
491         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
492         into separate arguments."
493         (cp_parser_new_placement): Allow pack expansion expressions.
494         (cp_parser_new_initializer): Ditto.
495         (cp_parser_mem_initializer_list): Allow ellipsis to create a
496         base-class initializer expansion.
497         (cp_parser_mem_initializer): Ditto.
498         (cp_parser_template_parameter_list): Keep track of whether the
499         template parameter is a template parameter pack.
500         (cp_parser_template_parameter): Parse the ellipsis to indicate a
501         template parameter pack.
502         (cp_parser_type_parameter): Ditto.
503         (cp_parser_template_argument_list): Parse the ellipsis to indicate
504         a pack expansion.
505         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
506         this declarator is a parameter pack.
507         (cp_parser_parameter_declaration): The ellipsis does not end the
508         parameter declaration, because it might be a parameter pack. Parse
509         the ellipsis to indicate a parameter pack.
510         (cp_parser_initializer): Allow pack expansions.
511         (cp_parser_initializer_list): Allow ellipsis to create an
512         initializer expansion.
513         (cp_parser_base_clause): Allow ellipsis to create a base specifier
514         expansion.
515         (cp_parser_type_id_list): Allow ellipsis to create an exception
516         specifier expansion.
517         (cp_parser_attribute_list): Don't allow pack expansions.
518         (cp_parser_functional_cast): Allow pack expansions.
519         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
520         compute the length of a parameter pack.
521         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
522         end a template argument.
523         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
524         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
525         CAST_EXPR. 
526
527 2007-03-09  Dirk Mueller  <dmueller@suse.de>
528
529         * cp/call.c (build_new_op): Call warn_logical_operator.
530
531 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
532
533         PR c++/30852
534         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
535
536         PR c++/30534
537         * pt.c (any_template_arguments_need_structural_equality_p):
538         Robustify.
539
540 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
541
542         * decl.c (grokdeclarator): Disable warnings for anonymous
543         bitfields.
544
545 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
546
547         * typeck2.c (readonly_error): Always emit a hard error.
548         Remove last argument.
549         * cp-tree.h (readonly_error): Adjust prototype.
550         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
551         * typeck.c (build_unary_op): Likewise.
552         (build_modify_expr): Likewise.
553
554 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
555
556         PR c++/30895
557         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
558
559 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
560
561         PR c++/15787
562         * parser.c (struct cp_parser): New IN_IF_STMT.
563         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
564         returning if parsing the body of an 'if' statement or issuing an
565         error and continuing.
566         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
567         body of 'if'.
568         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
569         
570 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
571
572         PR c++/28253
573         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
574         for thunks.
575
576 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
577
578         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
579         Objective-C++.  Don't exit early if -shared-libgcc needs to be
580         added.
581
582 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
583
584         * typeck.c (common_base_type): Delete unused function.
585         
586 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
587
588         * Make-lang.in: Add dummy lang.install-pdf target.
589
590 2007-03-01  Simon Baldwin <simonb@google.com>
591
592         PR c++/23689
593         * decl.c (check_tag_decl): Added new warning for typedef ignored
594         when it precedes an otherwise valid non-typedef declaration.
595
596 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
597
598         * typeck.c (build_function_call): Store converted arguments
599         in a stack-allocated array instead of building a list.
600         (convert_arguments): Store arguments in the array passed in as an
601         argument, and return the actual number of arguments.
602         * call.c (build_call): Delete, and replace with...
603         (build_call_n, build_call_a): New.
604         (build_op_delete_call): Rewrite to avoid constructing argument lists.
605         (build_over_call): Store converted arguments in a stack-allocated
606         array instead of building a list.
607         (build_cxx_call): Pass arguments in an array instead of as a list.
608         (build_java_interface_fn_ref): Rewrite to avoid constructing
609         argument lists.
610         * tree.h: Update declarations to reflect above changes.
611         * method.c (use_thunk): Use a stack-allocated array to hold
612         the arguments instead of a list.
613         * rtti.c (throw_bad_cast): Update call to cxx_call.
614         (throw_bad_typeid): Likewise.
615         (build_dynamic_cast_1): Likewise.
616         * init.c (build_builtin_delete_call): Use build_call_n.
617         * decl.c (expand_static_init): Likewise.
618         * except.c (cp_protect_cleanup_actions): Likewise.
619         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
620         (gimplify_must_not_throw_expr): Likewise.
621         (cxx_omp_apply_fn): Use build_call_a.
622
623 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
624
625         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
626         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
627
628 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
629
630         * cp-tree.h (static_ctors): Remove.
631         * cp-tree.h (static_dtors): Likewise.
632         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
633         refactoring of tree_map hierarchy.
634         (decl_shadowed_for_var_insert): Likewise.
635         * semantics.c (expand_body): Use c_expand_body.
636         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
637         * decl2.c (static_ctors): Remove.
638         (static_dtors): Likewise.
639         (generate_ctor_or_dtor_function): Pass NULL_TREE to
640         objc_generate_static_init_call.  Do not call static_[cd]tors.
641         (generate_ctor_and_dtor_functions_for_priority): Do not check for
642         static_[cd]tors.
643         (cp_write_global_declarations): Likewise.
644
645 2007-02-23  Richard Guenther  <rguenther@suse.de>
646
647         * class.c (note_name_declared_in_class): Make declaration
648         changes meaning a pedwarn.
649
650 2007-02-22  Michael Matz  <matz@suse.de>
651
652         PR c++/29433
653         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
654         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
655         dump_function_decl): Guard emitting outer scopes by new flag.
656         * cp-lang.c (cxx_dwarf_name): New function.
657         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
658         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
659         Remove functions.
660         (push_template_decl_real, lookup_template_class): Remove calls
661         to above functions.
662
663 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
664
665         * call.c (build_new_method_call): Ensure that explicit calls of
666         destructors have type "void".
667
668 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
669
670         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
671         and -Walways-true with -Waddress.
672         * cvt.c (convert_to_void): Replace unconditional warning with
673         -Waddress.
674
675 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
676
677         * decl.c, tree.c: Fix comment typos.
678
679 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
680
681         PR C++/30158
682         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
683         statement expression if we had an error mark node.
684                 
685 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
686             Brooks Moses  <brooks.moses@codesourcery.com>
687             Lee Millward  <lee.millward@codesourcery.com>
688
689         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
690         Change class to tcc_vl_exp.
691
692         * call.c (build_call): Use build_call_list instead 
693         of build3. 
694         (build_over_call): Likewise.
695         (build_new_method_call): Use build_min_non_dep_call_list 
696         instead of build_min_non_dep.
697
698         * error.c (dump_call_expr_args): New function.
699         (dump_aggr_init_expr_args): New function.
700         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
701         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
702
703         * cvt.c (convert_to_void): Use build_call_array instead
704         of build3; use new AGGR_INIT_EXPR accessor macros.
705
706         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
707         instead of TREE_CODE_LENGTH.
708
709         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
710         AGGR_INIT_EXPR accessor macros.
711
712         * cp-gimplify.c (cp_gimplify_init_expr): Use 
713         AGGR_INIT_EXPR_SLOT to set the slot operand.
714
715         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
716         (AGGR_INIT_EXPR_SLOT): New macro.
717         (AGGR_INIT_EXPR_ARG): New macro.
718         (aggr_init_expr_nargs): New macro.
719         (AGGR_INIT_EXPR_ARGP): New macro.
720         (aggr_init_expr_arg_iterator): New.
721         (init_aggr_init_expr_arg_iterator): New.
722         (next_aggr_init_expr_arg): New.
723         (first_aggr_init_expr_arg): New.
724         (more_aggr_init_expr_args_p): New.
725         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
726         (stabilize_aggr_init): New declaration.
727         (build_min_non_dep_call_list): Likewise.
728
729         * tree.c (process_aggr_init_operands): New function.
730         (build_aggr_init_array) New function.
731         (build_cplus_new): Update to use new CALL_EXPR and
732         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
733         build_aggr_init_array.
734         (build_min_non_dep_call_list) New function.
735         (build_min_nt): Assert input code parameter is not a variable
736         length expression class.
737         (build_min, build_min_non_dep): Likewise.
738         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
739         to check for equality instead of recursing. Handle tcc_vl_exp
740         tree code classes.
741         (stabilize_call): Update to only handle CALL_EXPRs, not 
742         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
743         (stabilize_aggr_init): New function.
744         (stabilize_init): Use it.
745
746         * cxx-pretty-print.c (pp_cxx_postfix_expression)
747         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
748         AGGR_INIT_EXPR accessor macros and argument iterators.
749         
750         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
751         build_vl_exp. Iterate through the operands, recursively 
752         processing each one.
753         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
754         CALL_EXPR accessor macros.
755         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
756         tree code classes. Use TREE_OPERAND_LENGTH instead of 
757         TREE_CODE_LENGTH.
758
759         * semantics.c (finish_call_expr): Use build_nt_call_list
760         instead of build_nt.
761         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
762         accessor macros. Use build_call_array to construct the 
763         CALL_EXPR node instead of build3
764         
765         * decl2.c (build_offset_ref_call_from_tree): Use 
766         build_nt_call_list and build_min_non_dep_call_list instead
767         of build_min_nt and build_min_non_dep.
768
769         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
770         Use build_nt_call_list instead of build_min_nt.
771
772 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
773
774         PR c++/28943
775         * call.c (build_conditional_expr): Improve error message.
776         
777 2007-02-13  Dirk Mueller  <dmueller@suse.de>
778
779         * friend.c (do_friend): Annotate warning about friend
780         declarations in templates with OPT_Wnon_template_friend.
781         Convert informal message from warning() to inform().
782
783 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
784             Mark Mitchell  <mark@codesourcery.com>
785
786         PR c++/14622
787         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
788         instantiations for variables.
789
790 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
791
792         PR middle-end/7651
793         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
794         Check warn_unused_value just once.
795
796 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
797
798         PR c++/26988
799         * pt.c (determine_specialization): Use skip_artificial_parms_for.
800         (fn_type_unificiation): Likewise.
801         (get_bindings): Likewise.
802
803 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
804
805         PR target/29487
806         * decl.c (finish_function): Use DECL_REPLACEABLE.
807         * tree.c (cp_cannot_inline_tree_fn): Likewise.
808
809 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
810
811         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
812
813 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
814
815         * decl.c (grokvardecl): Don't error if !have_tls.
816         (grokdeclarator): Likewise.
817         * parser.c (cp_parser_omp_threadprivate): Likewise.
818
819 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
820
821         PR c++/30703
822         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
823         parameters and result decls in omp clauses.
824         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
825         by reference.
826
827 2007-02-05  Dirk Mueller  <dmueller@suse.de>
828
829         PR bootstrap/30510
830         * parser.c (cp_parser_class_specifier): Always initialize bases.
831
832 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
833
834         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
835         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
836         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
837         expressions.
838         * semantics.c (finish_omp_atomic): Store a whole expression node
839         in operand 1, and integer_zero_node in operand 0, for dependent
840         OMP_ATOMIC.  Rewrite to make flow easier to understand.
841
842 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
843
844         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
845
846 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
847
848         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
849         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
850
851 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
852
853        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
854        keyword warning to -Wc++0x-compat.
855         
856 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
857
858         * decl.c (grokdeclarator): Update documentation.
859
860 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
861
862         PR c++/30536
863         * decl.c (grokdeclarator): If __thread is used together with
864         a storage class other than extern and static, clear thread_p
865         after issuing diagnostics and fall through to checking the
866         storage class.
867
868 2007-01-30  Roger Sayle  <roger@eyesopen.com>
869
870         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
871         calculating the size of an array (to avoid recursive errors).
872
873 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
874
875         PR c++/24745
876         * typeck.c (build_binary_op): Fix logic for warning. Move warning
877         to -Wpointer-arith.
878         * call.c (convert_like_real): Don't warn when converting to
879         boolean type.
880         
881 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
882
883         * decl.c (pop_label): Replace warning with call to
884         warn_for_unused_label.
885
886 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
887
888         PR C++/28988
889         * semantics.c (finish_pseudo_destructor_expr): Check the
890         destrutor name by calling check_dtor_name.
891
892 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
893
894         * lex.c (D_CPP0X): Rename.
895         (D_CXX0X): To this.
896         (reswords): D_CPP0X -> D_CXX0X.
897         (init_reswords): Ditto.
898         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
899         of C++0x keywords as identifiers.
900
901 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
902
903         PR c++/27492
904         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
905         function decls.
906
907 2007-01-23  Ian Lance Taylor  <iant@google.com>
908
909         * typeck.c (convert_for_assignment): Only warn about a = b = c
910         when converting to bool.
911
912 2007-01-23  Roger Sayle  <roger@eyesopen.com>
913
914         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
915         TREE_OVERFLOW.
916         * typeck.c (ignore_overflows): Remove the remaining uses of
917         TREE_CONSTANT_OVERFLOW.
918
919 2007-01-20  Jan Hubicka  <jh@suse.cz>
920
921         * decl2.c (start_objects, start_static_storage_duration_function):
922         Do not make the functions uninlinable.
923
924 2007-01-17  Ian Lance Taylor  <iant@google.com>
925
926         * class.c (add_method): Call VEC_reserve_exact rather than passing
927         a negative size to VEC_reserve.
928
929 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
930
931         PR c++/29573
932         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
933
934 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
935
936         PR c++/28999
937         * decl.c (make_typename_type): If the qualified name is not a
938         type, issue an error.
939         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
940         formatting.
941
942 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
943
944         * rtti.c: Include target.h.
945         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
946         don't emit typeinfo for fundamental types as weak.
947         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
948
949 2007-01-08  Richard Guenther  <rguenther@suse.de>
950
951         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
952
953 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
954
955         * call.c (standard_conversion): Pass flag to
956         vector_types_convertible_p to disallow emission of note.
957         * typeck.c (convert_for_assignment): Pass flag to
958         vector_types_convertible_p to allow emission of note.
959         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
960         to disallow emission of note.
961
962 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
963
964         PR c++/28986
965         * typeck.c (build_binary_op): Call overflow_warning if
966         TREE_OVERFLOW_P is true for the result and not for any of the
967         operands.
968         
969 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
970
971        PR c++/19439
972        * class.c (add_method): Don't wait until template
973        instantiation time to complain about duplicate methods.
974         
975 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
976
977         PR c/19978
978         * semantics.c (finish_unary_op_expr): Warn only if result
979         overflowed and operands did not.
980
981 2007-01-05  Ian Lance Taylor  <iant@google.com>
982
983         * typeck.c (build_binary_op): Warn about comparing a non-weak
984         address to NULL.
985
986 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
987
988         * pt.c (tsubst): Propagate the need for structural equality checks
989         when reducing the level of template parameters.
990
991 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
992
993         * pt.c: Fix a comment typo.
994
995 2006-01-02  Ian Lance Taylor  <iant@google.com>
996
997         * semantics.c (maybe_convert_cond): Optionally warn when using an
998         assignment as a condition.
999         * typeck.c (convert_for_assignment): Optionally warn about
1000         assigning the result of an assignment to a bool.
1001
1002 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
1003
1004         * pt.c (canonical_template_parms): Correct typo in comment.
1005         
1006 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
1007
1008         * typeck.c (structural_comptypes): Renamed from "comptypes".
1009         (comptypes): Use canonical type information to perform fast type
1010         comparison. When VERIFY_CANONICAL_TYPES, verify that the
1011         canonical type comparison returns the same results as we would see
1012         from the current, structural check. Support COMPARE_STRUCTURAL
1013         when we need structural checks.
1014         * decl.c (typename_compare): Fix comment.
1015         (build_typename_type): TYPENAME_TYPE nodes require structural
1016         equality checks, because they resolve different based on the
1017         current class type.
1018         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1019         require structural equality checks (for now).
1020         (build_ptrmemfunc_type): Build the canonical pointer to member
1021         function type.
1022         (compute_array_index_type): Whenever we build a new index type
1023         to represent the size of an array in a template, we need to mark
1024         this index type as requiring structural equality. This goes for
1025         arrays with value-dependent sizes with the current ABI, or all
1026         arrays with ABI-1.
1027         * tree.c (cplus_array_hash): New.
1028         (struct cplus_array_info): New.
1029         (cplus_array_compare): New.
1030         (cplus_array_htab): New.
1031         (build_cplus_array_type_1): Use a hash table to cache the array
1032         types we build. Build the canonical array type for each array
1033         type.
1034         (cp_build_qualified_type_real): When building a cv-qualified array
1035         type, use the hash table of array types and build canonical array
1036         types as necessary.
1037         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1038         use structural equality (for now).
1039         * cp-tree.h (COMPARE_STRUCTURAL): New.
1040         * pt.c (canonical_template_parms): New.
1041         (canonical_type_parameter): New.
1042         (process_template_parm): Find the canonical type parameter.
1043         (lookup_template_class): When we have named the primary template
1044         type, set the canonical type for our template class to the primary
1045         template type. If any of the template arguments need structural
1046         equality checks, the template class needs structural equality
1047         checks.
1048         (tsubst): When reducing the level of a template template
1049         parameter, we require structural equality tests for the resulting
1050         parameter because its template parameters have not had their types
1051         canonicalized. When reducing a template type parameter, find the
1052         canonical reduced type parameter.
1053         (any_template_arguments_need_structural_equality_p): New.
1054
1055 2006-12-31  Simon Martin  <simartin@users.sourceforge.net>
1056
1057         PR c++/29731
1058         * parser.c (cp_parser_primary_expression): Return error_mark_node when
1059         a statement-expression is found outside of a function body.
1060
1061 2006-12-28  Kazu Hirata  <kazu@codesourcery.com>
1062
1063         * cp-tree.h (TYPE_NAMESPACE_SCOPE_P, TYPE_FUNCTION_SCOPE_P):
1064         Remove.
1065
1066         * decl2.c: Fix a comment typo.
1067
1068 2006-12-21  Andrew Pinski  <pinskia@gmail.com>
1069
1070         PR C++/30225
1071         * decl.c (cxx_builtin_function): Only copy the decl if adding
1072         it to the std namespace.
1073
1074 2006-12-21  Andrew Pinski  <pinskia@gmail.com>
1075
1076         PR C++/30168
1077         * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
1078
1079 2006-12-22  Kazu Hirata  <kazu@codesourcery.com>
1080
1081         * decl.c: Fix a coment typo.
1082
1083 2006-12-18  Ian Lance Taylor  <iant@google.com>
1084
1085         * decl.c (start_preparsed_function): Add support for
1086         -Wmissing-declarations.
1087
1088 2006-12-16  Simon Martin  <simartin@users.sourceforge.net>
1089
1090         PR c++/29475
1091         * cp-tree.h (struct deferred_access_check): New structure to represent a
1092         deferred access check. It replaces the previous representation as a tree.
1093         (get_deferred_access_checks): Return a vector of struct
1094         deferred_access_check instead of a tree list.
1095         (perform_access_checks): Take a vector of struct deferred_access_check
1096         instead of a tree list.
1097         * semantics.c (struct deferred_access): Store the deferred access checks
1098         as a vector of struct deferred_access_check instead of a tree list.
1099         (push_deferring_access_checks): Handle the change in struct
1100         deferred_access.
1101         (get_deferred_access_checks): Likewise.
1102         (pop_to_parent_deferring_access_checks): Likewise.
1103         (perform_or_defer_access_check): Likewise.
1104         (perform_access_checks): Take a vector of struct deferred_access_check
1105         instead of a tree list.
1106         * parser.c (struct tree_check): New structure to store various data
1107         associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
1108         (struct cp_token): Changed the value field to be a union with a pointer to
1109         a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
1110         tokens and a tree field for all other tokens.
1111         (eof_token): Adjusted due to the change in struct cp_token.
1112         (cp_lexer_get_preprocessor_token): Likewise.
1113         (cp_lexer_purge_token): Likewise.
1114         (cp_lexer_purge_tokens_after): Likewise.
1115         (cp_lexer_print_token): Likewise.
1116         (cp_parser_error): Likewise.
1117         (cp_parser_identifier): Likewise.
1118         (cp_parser_string_literal): Likewise.
1119         (cp_parser_primary_expression): Likewise.
1120         (cp_parser_unqualified_id): Likewise.
1121         (cp_parser_parenthesized_expression_list): Likewise.
1122         (cp_parser_storage_class_specifier_opt): Likewise.
1123         (cp_parser_function_specifier_opt): Likewise.
1124         (cp_parser_type_specifier): Likewise.
1125         (cp_parser_simple_type_specifier): Likewise.
1126         (cp_parser_initializer_list): Likewise.
1127         (cp_parser_member_specification_opt): Likewise.
1128         (cp_parser_attribute_list): Likewise.
1129         (cp_parser_objc_expression): Likewise.
1130         (cp_parser_objc_protocol_qualifiers): Likewise.
1131         (cp_parser_objc_selector): Likewise.
1132         (cp_parser_objc_declaration): Likewise.
1133         (cp_parser_objc_statement): Likewise.
1134         (cp_parser_omp_clause_name): Likewise.
1135         (cp_parser_omp_clause_default): Likewise.
1136         (cp_parser_omp_clause_schedule): Likewise.
1137         (cp_parser_omp_parallel): Likewise.
1138         (cp_parser_initial_pragma): Likewise.
1139         (pragma_lex): Likewise.
1140         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1141         (cp_parser_nested_name_specifier_opt): Likewise.
1142         Use cp_token::u::tree_check_value to save the token's value, the
1143         associated deferred checks and its qualifying scope.
1144         (cp_parser_template_id): Likewise.
1145         (cp_parser_template_declaration_after_export): Adjusted the call to
1146         get_deferred_access_checks.
1147         (cp_parser_init_declarator): Take the access checks as a vector of struct
1148         deferred_access_check instead of a tree list.
1149         (cp_parser_single_declaration): Likewise.
1150         (cp_parser_perform_template_parameter_access_checks): Likewise.
1151         (cp_parser_simple_declaration): Adjusted the call to
1152         cp_parser_init_declarator.
1153         (cp_parser_explicit_specialization): Adjusted the call to
1154         cp_parser_single_declaration.
1155
1156 2006-12-13  Ian Lance Taylor  <iant@google.com>
1157
1158         PR c++/19564
1159         PR c++/19756
1160         * parser.c (cp_parser_expression_stack_entry): Add field
1161         lhs_type.
1162         (cp_parser_binary_expression): Track tree code of left hand side
1163         of expression.  Use it when calling build_x_binary_op.
1164         (cp_parser_selection_statement): Add if_p parameter.  Change all
1165         callers.  Warn about ambiguous else.
1166         (cp_parser_statement): Add if_p parameter.  Change all callers.
1167         (cp_parser_implicitly_scoped_statement): Likewise.
1168         * typeck.c (build_x_binary_op): Add parameters arg1_code and
1169         arg2_code.  Change all callers.  Call warn_about_parentheses.
1170         * cp-tree.h (build_x_binary_op): Update declaration.
1171
1172 2006-12-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1173
1174         * decl.c (build_enumerator): Update error message to match C
1175         front-end.
1176         
1177 2006-12-11  Jan Hubicka  <jh@suse.cz>
1178
1179         * decl2.c (var_finalized_p): Update for renamed varpool functions.
1180
1181 2006-12-09  Zack Weinberg  <zackw@panix.com>
1182
1183         * parser.c (yydebug, enum pragma_omp_clause): Delete.
1184
1185 2006-12-07  Mark Mitchell  <mark@codesourcery.com>
1186
1187         PR c++/29732
1188         * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
1189         (explicit_class_specialization_p): Declare.
1190         * pt.c (explicit_class_specialization_p): New function.
1191         * parser.c (cp_parser_init_declarator): Check correct number of
1192         template parameters for in-class function definitions.
1193         (cp_parser_check_declrator_template_parameters): Stop looking for
1194         template classes when we find an explicit specialization.
1195
1196 2006-12-07  Lee Millward  <lee.millward@codesourcery.com>
1197
1198         PR c++/29980
1199         * cp_parser_elaborated_type_specifier: Check
1200         the return value of check_elaborated_type_specifier.
1201
1202 2006-12-06  Mark Mitchell  <mark@codesourcery.com>
1203
1204         PR c++/29730
1205         * parser.c (cp_parser_init_declarator): Reject initialization of
1206         functions.
1207
1208 2006-12-05  Mark Mitchell  <mark@codesourcery.com>
1209
1210         PR c++/29729
1211         * decl2.c (check_member_template): Move check for member
1212         templates in local classes to ...
1213         * parser.c (cp_parser_template_declaration_after_export):
1214         ... here.
1215
1216         PR c++/29728
1217         * decl.c (check_array_designated_initializer): New function.
1218         (maybe_deduce_size_from_array_init): Use it.
1219         (reshape_init_array): Likewise.
1220
1221 2006-12-05  Aldy Hernandez  <aldyh@redhat.com>
1222
1223         Merge from gimple-tuples-branch.
1224
1225         2006-10-05  Aldy Hernandez  <aldyh@redhat.com>
1226
1227         * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
1228         (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
1229         (cxx_omp_clause_copy_ctor): Same.
1230         (cxx_omp_clause_assign_op): Same.
1231
1232         2006-09-28  Aldy Hernandez  <aldyh@redhat.com>
1233
1234         * cp-tree.h (union lang_tree_node): Gimple statements do not
1235         have a TREE_CHAIN.
1236         (TREE_INDIRECT_USING): Look in base.
1237
1238 2006-12-04  Jan Hubicka  <jh@suse.cz>
1239
1240         * cp-objcp-common.c (cp_expr_size): Return NULL in the case
1241         size is undefined.
1242
1243 2006-12-04  Mark Mitchell  <mark@codesourcery.com>
1244
1245         PR c++/29733
1246         * pt.c (tsubst_decl): Disallow variables of function type.
1247
1248         PR c++/29632
1249         * call.c (add_builtin_candidate): Do not permit NULL pointer
1250         constants to be compared with template parameters.
1251
1252 2006-12-04  Eric Botcazou  <ebotcazou@adacore.com>
1253
1254         * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
1255         Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1256
1257 2006-12-03  Richard Henderson  <rth@redhat.com>
1258             Andrew Pinski  <pinskia@gmail.com>
1259
1260         PR C++/14329
1261         * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
1262
1263 2006-12-02  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1264
1265         PR C++/30033
1266         * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
1267
1268 2006-12-02  Kazu Hirata  <kazu@codesourcery.com>
1269
1270         * name-lookup.c: Follow spelling conventions.
1271
1272 2006-12-01  Geoffrey Keating  <geoffk@apple.com>
1273
1274         * decl.c (poplevel): Check DECL_INITIAL invariant.
1275         (duplicate_decls): Preserve DECL_INITIAL when eliminating
1276         a new definition in favour of an old declaration.
1277         (start_preparsed_function): Define and document value of
1278         DECL_INITIAL before and after routine.
1279         (finish_function): Check DECL_INITIAL invariant.
1280         * parser.c
1281         (cp_parser_function_definition_from_specifiers_and_declarator):
1282         Skip duplicate function definitions.
1283
1284 2006-12-01  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1285
1286         PR c++/30022
1287         * typeck.c (type_after_usual_arithmetic_conversions):
1288         Fix assertion for vector types.
1289         (build_binary_op): Use temporary for inner type of vector types.
1290
1291 2006-12-01  Ryan Mansfield  <rmansfield@qnx.com>
1292
1293         PR c++/29066
1294         * typeck.c (build_binary_op):  Fix pointer to member function
1295         comparison for ptrmemfunc_vbit_in_delta targets.
1296
1297 2006-12-01  Dirk Mueller  <dmueller@suse.de>
1298
1299         PR c++/18313
1300         * decl.c (grokdeclarator): Warn for type qualifiers on return
1301         type for non-dependent types.
1302         * pt.c (tsubst_function_type): Warn for type qualifiers on
1303         return type for dependent types.
1304
1305 2006-11-30  Geoffrey Keating  <geoffk@apple.com>
1306
1307         * rtti.c (get_tinfo_decl): Handle return value from
1308         pushdecl_top_level_and_finish.
1309
1310 2006-11-29  Lee Millward  <lee.millward@codesourcery.com>
1311
1312         PR c++/29022
1313         * parser.c (cp_parser_class_head): Move processing
1314         of any base classes to...
1315         (cp_parser_class_specifier) ...here. Take an extra
1316         tree* parameter for any base classes. Only process
1317         them if the opening brace was found.
1318
1319 2006-11-28  Jakub Jelinek  <jakub@redhat.com>
1320
1321         PR c++/29735
1322         * decl.c (grokfndecl): Check main's type after applying
1323         attributes, not before.
1324
1325 2006-11-27  Mark Mitchell  <mark@codesourcery.com>
1326
1327         * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
1328         entries for a primary construction virtual table.
1329
1330 2006-11-26  Mark Mitchell  <mark@codesourcery.com>
1331
1332         PR c++/29886
1333         * parser.c (cp_parser): Add in_function_body.
1334         (cp_parser_new): Initialize it.
1335         (cp_parser_primary_expression): Use parser->in_function_body
1336         instead of at_function_scope_p.
1337         (cp_parser_asm_definition): Likewise.
1338         (cp_parser_direct_declarator): Likewise.
1339         (cp_parser_class_specifier): Clear parser->in_function_body.
1340         (cp_parser_constructor_declarator_p): Use parser->in_function_body
1341         instead of at_function_scope_p.
1342         (cp_parser_function_body_after_declarator): Set
1343         parser->in_function_body.
1344
1345 2006-11-21      Douglas Gregor <doug.gregor@gmail.com>
1346
1347         * cp-tree.def (STATIC_ASSERT): New.
1348         * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
1349         * error.c (dump_decl): Handle STATIC_ASSERT.
1350         * cp-tree.h (STATIC_ASSERT_CONDITION): New.
1351         (STATIC_ASSERT_MESSAGE): New.
1352         (STATIC_ASSERT_SOURCE_LOCATION): New.
1353         (struct tree_static_assert): New.
1354         (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
1355         (union lang_tree_node): Add static_assertion.
1356         (finish_static_assert): Declare.
1357         * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
1358         (pp_cxx_declaration): Handle STATIC_ASSERT.
1359         * pt.c (instantiate_class_template): Handle
1360         STATIC_ASSERT members.
1361         (tsubst_expr): Handle STATIC_ASSERT statements.
1362         * semantics.c (finish_static_assert): New.
1363         * lex.c (D_CPP0X): New.
1364         (reswords): Add static_assert keyword.
1365         (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
1366         * parser.c (cp_parser_block_declaration): Parse static
1367         assertions.
1368         (cp_parser_static_assert): New.
1369         (cp_parser_member_declaration): Parse static assertions.
1370
1371 2006-11-21  Jakub Jelinek  <jakub@redhat.com>
1372
1373         PR c++/29570
1374         * decl.c (cp_finish_decl): Check for value dependent brace enclosed
1375         scalar initializer.
1376
1377         PR c++/29734
1378         * cp-tree.h (WANT_VECTOR): Define.
1379         (WANT_ARITH): Add WANT_VECTOR.
1380         * cvt.c (build_expr_type_conversion): Handle vector types.
1381         * typeck.c (build_unary_op): Add WANT_VECTOR to
1382         build_expr_type_conversion flags.
1383
1384 2006-11-20  Simon Martin  <simartin@users.sourceforge.net>
1385
1386         PR c++/29475
1387         * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
1388         extra argument that represents the declaration to use to print
1389         potential error messages.
1390         * init.c (build_offset_ref): Adjusted the call to
1391         perform_or_defer_access_check.
1392         * class.c (alter_access, resolve_address_of_overloaded_function):
1393         Likewise.
1394         * decl.c (make_typename_type, make_unbound_class_template): Likewise.
1395         * search.c (lookup_member): Likewise.
1396         * friend.c (add_friend): Likewise.
1397         * parser.c (cp_parser_template_id,
1398         cp_parser_pre_parsed_nested_name_specifier): Likewise.
1399         * semantics.c (finish_non_static_data_member,
1400         check_accessibility_of_qualified_id, finish_id_expression): Likewise.
1401         (pop_to_parent_deferring_access_checks, perform_access_checks,
1402         perform_or_defer_access_check): Adjusted the call to enforce_access.
1403         * call.c (enforce_access): Use the new extra argument to build the
1404         error message.
1405         (build_op_delete_call): Adjusted the call to
1406         perform_or_defer_access_check.
1407         (build_over_call): Likewise.
1408
1409 2006-11-16  Dirk Mueller  <dmueller@suse.de>
1410
1411         * name-lookup.c (begin_scope): Use GGC_CNEW instead of
1412         GGC_NEW and memset.
1413
1414 2006-11-13  Roger Sayle  <roger@eyesopen.com>
1415
1416         * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
1417         base type info initializer has the correct type.
1418
1419 2006-11-13  Mark Mitchell  <mark@codesourcery.com>
1420
1421         PR c++/29518
1422         * pt.c (coerce_template_parms): Do not skip_evaluation while
1423         substituting template arguments.
1424
1425 2006-11-11  Richard Guenther  <rguenther@suse.de>
1426
1427         * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
1428         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1429
1430 2006-11-03  Roger Sayle  <roger@eyesopen.com>
1431
1432         * call.c (build_op_delete_call): Test user-visible type against
1433         size_type_node, instead of against the internal type, sizetype.
1434         * class.c (type_requires_array_cookie): Likewise.
1435         * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
1436         handling of TYPE_IS_SIZETYPE.
1437         * typeck.c (type_after_usual_arithmetic_conversions): Remove
1438         special case handling of TYPE_IS_SIZETYPE.
1439         (comptypes): Likewise.
1440
1441 2006-11-01  Danny Smith  <dannysmith@users.sourceforge.net>
1442
1443         * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
1444         if targetm.cxx.use_atexit_for cxa_atexit.
1445         (start_cleanup_fn): Likewise.
1446         (register_dtor_fn): Likewise.
1447
1448 2006-09-25  Geoffrey Keating  <geoffk@apple.com>
1449
1450         * decl2.c (cp_write_global_declarations): Rename from
1451         cp_finish_file.
1452         * cp-lang.c (finish_file): Don't call cp_finish_file.
1453         * cp-tree.h (cp_write_global_declarations): Rename from
1454         cp_finish_file.
1455         * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
1456         cp_write_global_declarations.
1457
1458 2006-10-31  Geoffrey Keating  <geoffk@apple.com>
1459
1460         * name-lookup.c (get_anonymous_namespace_name): New.
1461         (push_namespace_with_attribs): Use get_anonymous_namespace_name.
1462         * decl2.c (start_objects): Update for rename of
1463         get_file_function_name_long.
1464
1465 2006-10-30  Dirk Mueller  <dmueller@suse.de>
1466
1467         PR c++/28704
1468         * decl.c (grokdeclarator): Duplicate diagnostic message
1469         for easier translation.
1470         * decl.c (grokdeclarator): Fix line-wrapping.
1471
1472 2006-10-30  Dirk Mueller  <dmueller@suse.de>
1473
1474         PR c++/6321
1475         * decl.c (grokfndecl): Use check_main_parameter_types.
1476
1477 2006-10-30  Dirk Mueller  <dmueller@suse.de>
1478
1479         PR c++/28669
1480         * decl.c (grokfndecl): Duplicate warning message for
1481         easier translation.
1482
1483 2006-10-30  Dirk Mueller  <dmueller@suse.de>
1484
1485         * typeck.c (build_unary_op): Fix indenting. Use G_().
1486
1487 2006-10-29  Dirk Mueller  <dmueller@suse.de>
1488
1489         PR c++/29089
1490         * typeck.c (build_unary_op): Duplicate warning message
1491         for easier translation.
1492
1493 2006-10-29  Dirk Mueller  <dmueller@suse.de>
1494
1495         PR c++/16307
1496         * typeck.c (build_array_ref): Warn for char subscriptions
1497         on pointers.
1498
1499 2006-10-29  Kazu Hirata  <kazu@codesourcery.com>
1500
1501         * decl.c: Fix a comment typo.
1502
1503 2006-10-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1504
1505         PR C++/29295
1506         * typeck.c (build_unary_op): Use same_type_p when comparing to
1507         boolean type.
1508
1509 2006-10-29  Dirk Mueller  <dmueller@suse.de>
1510
1511         PR c++/29033
1512         * typeck.c (build_binary_op): Duplicate warning message
1513         for better translation.
1514
1515 2006-10-23  Rafael Avila de Espindola  <rafael.espindola@gmail.com>
1516
1517         * decl.c (builtin_function_1): Move common code to
1518         add_builtin_function.
1519         (builtin_function): Rename to cxx_builtin_function.
1520         Change the signature.
1521         * call.c: Include langhooks.h.
1522         (build_java_interface_fn_ref):  Replace calls to
1523         builtin_function with add_builtin_function.
1524         * Make-lang.in (cp/call.o): Depend on langhooks.h.
1525         * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
1526         cxx_builtin_function.
1527         * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
1528         Change the signature.
1529
1530 2006-10-22  Nathan Sidwell  <nathan@codesourcery.com>
1531
1532         PR c++/20647
1533         * rtti.c (tinfo_base_init): The type info string is always global.
1534
1535 2006-10-20  Lee Millward  <lee.millward@codesourcery.com>
1536             Mark Mitchell <mark@codesourcery.com>
1537
1538         PR c++/28053
1539         * decl2.c (grokbitfield): Detect invalid non-integral
1540         types earlier when possible.
1541
1542 2006-10-18  Mark Shinwell  <shinwell@codesourcery.com>
1543
1544         PR c++/26884
1545         * typeck2.c (digest_init): Raise error upon attempts to
1546         initialize arrays with variables.
1547
1548 2006-10-17  Lee Millward  <lee.millward@codesourcery.com>
1549
1550         PR c++/27952
1551         * cp-tree.h (xref_basetypes): Return bool instead of void.
1552         * decl.c (xref_basetypes): Adjust definition. Return false
1553         if the class bases are invalid.
1554         * parser.c (cp_parser_class_head): Check the return value
1555         from xref_basetypes.
1556
1557 2006-10-17  Mark Mitchell  <mark@codesourcery.com>
1558
1559         PR c++/28261
1560         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
1561         comment.
1562
1563         PR c++/28261
1564         * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
1565         function.
1566         (cp_parser_constructor_declarator_p): Use it.
1567         (cp_parser_check_type_definition): Return a value indicating
1568         whether or not the definition is valid.
1569         (cp_parser_enum_specifier): Skip invalid enum definitions.
1570
1571 2006-10-17  Mark Mitchell  <mark@codesourcery.com>
1572
1573         PR c++/29039
1574         * typeck2.c (build_functional_cast): Don't zero-initialize
1575         non-PODs; instead, call their constructors.
1576         * method.c (synthesize_method): Always build mem-initializers, if
1577         we're synthesizing the default constructor.
1578
1579 2006-10-17  Mark Mitchell  <mark@codesourcery.com>
1580
1581         PR c++/27270
1582         * decl.c (reshape_init_class): Move check for designated
1583         to ...
1584         * parser.c (cp_parser_initializer_list): ... here.
1585         * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
1586
1587 2006-10-16  Mark Mitchell  <mark@codesourcery.com>
1588
1589         PR c++/27270
1590         * typeck2.c (process_init_constructor_array): Reword comment.
1591         * pt.c (tsubst_copy_and_built): Call reshape_init before calling
1592         digest_init.
1593
1594         PR c++/29408
1595         * parser.c (cp_parser_using_declaration): Stop parsing when
1596         something goes wrong with an access declaration.
1597
1598         PR c++/29435
1599         * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
1600         types when their sizes are required.  Refine test for VLAs.
1601
1602         PR c++/28211
1603         * parser.c (cp_parser_template_argument): Don't consider "&var" a
1604         possible constant-expression.
1605         * pt.c (convert_nontype_argument): Refine handling of arguments of
1606         pointer type.
1607
1608 2006-10-13  Mark Mitchell  <mark@codesourcery.com>
1609
1610         PR c++/28506
1611         * parser.c (function_declarator_p): New function.
1612         (cp_parser_init_declarator): Use it.
1613         (cp_parser_member_declaration): Likewise.
1614
1615 2006-10-12  Mark Mitchell  <mark@codesourcery.com>
1616
1617         PR c++/29318
1618         * rtti.c (get_tinfo_decl): Refuse to create type info objects for
1619         variably modified types.
1620
1621 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
1622
1623        PR c++/27961
1624        * decl.c (start_decl): Return error_mark_node if a
1625        function is initialized like a variable.
1626        (check_var_type): If a variable of field is declared void,
1627        set the type to error_mark_node.
1628        (grokdeclarator): Check the return type of check_var_type.
1629        * class.c (finish_struct_1): Robustify.
1630
1631 2006-10-11  Mark Mitchell  <mark@codesourcery.com>
1632
1633         PR c++/29175
1634         * decl.c (check_initializer): Issue errors about trying to
1635         initialize arrays whose elements have variable size.
1636
1637 2006-10-11  Lee Millward  <lee.millward@codesourcery.com>
1638
1639         PR c++/29024
1640         * cp-tree (struct cp_decl_specifier_seq): Rename to
1641         conflicting_specifiers_p
1642         * parser.c (cp_parser_set_storage_class): Set
1643         conflicting_specifiers_p for the input decl specifier
1644         if a typedef specifier is present. Rename uses of
1645         multiple_specifiers_p to conflicting_specifiers_p.
1646         (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
1647         class specifier has already been set for this declaration,
1648         set conflicting_specifiers_p to true on the decl_specs.
1649         * decl.c (grokdeclarator): Rename uses of
1650         multiple_specifiers_p to conflicting_specifiers_p.
1651
1652 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1653
1654         * Make-lang.in: Added "c++.pdf" target support.
1655
1656 2006-10-10  Richard Guenther  <rguenther@suse.de>
1657
1658         PR rtl-optimization/29323
1659         * decl.c (finish_function): Set TREE_NOTHROW only for
1660         functions that bind local.
1661
1662 2006-10-09  Richard Henderson  <rth@redhat.com>
1663
1664         Revert emutls patch.
1665
1666 2006-10-04  Richard Henderson  <rth@redhat.com>
1667             Jakub Jelinek  <jakub@redhat.com>
1668
1669         * decl.c (grokvardecl): Don't error if !have_tls.
1670         (grokdeclarator): Likewise.
1671         * parser.c (cp_parser_omp_threadprivate): Likewise.
1672
1673 2006-10-03  Mark Mitchell  <mark@codesourcery.com>
1674
1675         PR c++/29020
1676         * friend.c (do_friend): Improve comments; add assertion.
1677         * parser.c (cp_parser_nested_name_specifier_opt): Resolve
1678         typenames for qualified names used in declarations, even when
1679         caching qualified name lookup.
1680
1681         PR c++/29138
1682         * decl2.c (grokfield): Don't handle access declarations here.
1683         * parser.c (cp_parser_using_declaration): Handle access
1684         declarations too.
1685         (cp_parser_block_declaration): Adjust calls to
1686         cp_parser_using_declaration.
1687         (cp_parser_member_declaration): Likewise.  Use
1688         cp_parser_using_declaration to look for access_declarations.
1689
1690 2006-10-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1691
1692         PR c++/29291
1693         * init.c (build_new): Check for invalid init.
1694
1695 2006-10-02  Mark Mitchell  <mark@codesourcery.com>
1696
1697         PR c++/29226
1698         * typeck.c (cxx_sizeof_or_alignof_type): Tidy.  In templates, do
1699         not try to actually evaluate sizeof for a VLA type.
1700
1701 2006-10-01  Mark Mitchell  <mark@codesourcery.com>
1702
1703         PR c++/29105
1704         * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
1705         * semantics.c (baselink_for_fns): Build a baselink, even when
1706         processing a template.
1707
1708         PR c++/29080
1709         * parser.c (cp_parser_postfix_dot_deref_expression): Use
1710         BASELINK_ACCESS_BINFO as the qualifying scope when calling
1711         adjust_result_of_qualified_name_lookup.
1712
1713 2006-09-25  Lee Millward  <lee.millward@codesourcery.com>
1714
1715         PR c++/27329
1716         PR c++/26938
1717         * cp-tree.h (redeclare_class_template): Adjust declaration
1718         to return bool instead of void.
1719         * pt.c (redeclare_class_template): Update definition.
1720         Return false on error.
1721         * decl.c (xref_tag): Return error_mark_node if
1722         redeclare_class_template returned false.
1723
1724         PR c++/27667
1725         * cp-tree.h (begin_specialization): Return bool
1726         instead of void.
1727         * pt.c (check_specialization_scope): Likwise.
1728         Adjust comment. Return false if a specialization
1729         isn't permitted in the current scope.
1730         (begin_specialization): Use the return value of
1731         check_specialization_scope.
1732         * parser.c (cp_parser_explicit_specialization): If
1733         begin_specialization returned false, skip the rest
1734         of the specialization.
1735
1736 2006-09-21  Mark Mitchell  <mark@codesourcery.com>
1737
1738         PR c++/29016
1739         * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
1740         BASELINK.
1741
1742 2006-09-21  Lee Millward  <lee.millward@codesourcery.com>
1743
1744         PR c++/28861
1745         * decl.c (shadow_tag): Return error_mark_node
1746         if maybe_process_partial_specialization failed.
1747
1748         PR c++/28303
1749         * decl.c (grokdeclarator): Return error_mark_node on
1750         declaration with two or more data types.
1751
1752 2006-09-20  Danny Smith  <dannysmith@users.sourceforge.net>
1753
1754         PR target/27650
1755         * class.c (check_for_override): Remove dllimport from virtual
1756         methods.
1757
1758 2006-09-18  Steven Bosscher  <steven@gcc.gnu.org>
1759
1760         PR c++/29087
1761         * parser.c (cp_parser_labeled_statement): Return nothing.  Do
1762         not take in_statement_expr and in_compound as arguments.  Rename
1763         to cp_parser_label_for_labeled_statement.  Parse only the label,
1764         not the statement.
1765         (cp_parser_statement): Parse the statement of a labeled-statement
1766         from here, using tail recursion.
1767
1768 2006-09-14  Andrew Pinski  <pinskia@physics.uc.edu>
1769
1770         PR C++/29002
1771         * init.c (build_zero_init): If we have an error mark node for
1772         the array size, return.
1773
1774 2006-09-10  Mark Mitchell  <mark@codesourcery.com>
1775
1776         PR c++/28991
1777         * cp-objcp-common.c (cxx_staticp): New function.
1778         * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
1779         * cp-tree.h (cxx_staticp): New function.
1780
1781 2006-09-09  Jason Merrill  <jason@redhat.com>
1782
1783         PR c++/28996
1784         * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
1785
1786 2006-09-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1787
1788         PR c++/28858
1789         * parser.c (cp_parser_skip_until_found): Rename to
1790         cp_parser_skip_to_end_of_template_parameter_list.  Remove last two
1791         parameters.  Track levels of '< ... >'.  Stop at '{', '}', or ';'.
1792         Reorganize.  Adjust comment.
1793         (cp_parser_template_declaration_after_export): Adjust call.
1794         (cp_parser_enclosed_template_argument_list): Likewise.
1795
1796 2006-09-07  Andrew Pinski  <pinskia@physics.uc.edu>
1797
1798         PR C++/28906
1799         * init.c (build_new_1): Build a distinct type copy
1800         for the array type that was returned from
1801         build_cplus_array_type.
1802
1803 2006-09-07  Jason Merrill  <jason@redhat.com>
1804
1805         PR c++/27371
1806         * cvt.c (convert_to_void): Enable previous change.
1807
1808         PR c++/26957
1809         * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
1810         parms.
1811
1812 2006-09-07  Simon Martin  <simartin@users.sourceforge.net>
1813
1814         PR c++/28284
1815         * pt.c (fold_non_dependent_expr): Make sure expr is not
1816         dereferenced if it is NULL.
1817
1818 2006-09-06  Zak Kipling  <zak@transversal.com>
1819
1820         PR c++/26195
1821         * decl.c (make_rtl_for_nonlocal_decl),
1822         (start_preparsed_function): Don't use lbasename on
1823         input_filename when calling get_fileinfo.
1824         * semantics.c (begin_class_definition): Likewise.
1825         * lex.c (cxx_make_type): Likewise.
1826         (handle_pragma_interface): Call get_fileinfo on input_filename,
1827         not on the parameter to the directive.
1828
1829 2006-09-06  Mark Mitchell  <mark@codesourcery.com>
1830
1831         PR c++/28903
1832         * pt.c (tsubst): Use fold_non_dependent_expr to fold array
1833         dimensions.
1834
1835         PR c++/28886
1836         * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
1837         dimensions.
1838
1839 2006-09-06  Jason Merrill  <jason@redhat.com>
1840
1841         PR c++/27371
1842         * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
1843         * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
1844         * tree.c (build_cplus_new): Set it.
1845
1846         PR c++/26696
1847         * cvt.c (convert_to_void): Replace a subexpression with no side
1848         effects with void_zero_node.
1849         * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
1850         (get_first_fn): Ditto.
1851         * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
1852
1853 2006-09-05  Jason Merrill  <jason@redhat.com>
1854
1855         PR c++/26571
1856         * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
1857         where the name is a type used incorrectly.
1858
1859         PR c++/26671
1860         * typeck.c (maybe_warn_about_returning_address_of_local): Look
1861         through COMPONENT_REF and ARRAY_REF.
1862
1863         PR c++/26102
1864         * name-lookup.c (do_class_using_decl): Try to find the base even
1865         if bases_dependent_p.
1866         * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
1867
1868         PR c++/19809
1869         * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
1870
1871 2006-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1872
1873         PR 23287 Revert my 2006-09-01 patch.
1874         * parser.c: Reverted.
1875         * pt.c: Reverted.
1876
1877 2006-09-02  Lee Millward  <lee.millward@codesourcery.com>
1878
1879         PR c++/27670
1880         PR c++/27493
1881         PR c++/27494
1882         PR c++/27397
1883         * parser.c (cp_parser_template_parameter_list): Add
1884         invalid template parameters to the parameter list as
1885         error_mark_node.
1886
1887 2006-09-02  Jakub Jelinek  <jakub@redhat.com>
1888
1889         PR c++/28878
1890         * except.c (build_throw): Only set current_function_returns_abnormally
1891         if cfun is not NULL.
1892
1893         PR c++/26917
1894         * repo.c (repo_file): Remove.
1895         (open_repo_file, reopen_repo_file_for_write): Return fopened
1896         FILE * instead of setting global repo_file variable.
1897         (init_repo): Adjust caller.
1898         (finish_repo): Likewise.  Return instead of goto out before
1899         reopen_repo_file_for_write has been called.
1900
1901 2006-09-01  Nathan Sidwell  <nathan@codesourcery.com>
1902
1903         PR c++/28705
1904         * semantics.c (finish_call_expr): Add assert.
1905         * name-lookup.c (lookup_arg_dependent): Check we found an overload
1906         or an object.
1907
1908         PR c++/23287
1909         * parser.c (cp_parser_id_expression): Add member_p
1910         argument. Update all callers.
1911         (cp_parser_unqualified_id): Likewise.  Lookup a destructor name in
1912         the object's scope, if valid.
1913         (cp_parser_global_scope_opt): Add object_scope_valid_p.  Update
1914         callers.
1915         (cp_parser_postfix_dot_deref_expression): Set object_scope.
1916         * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
1917
1918 2006-08-30  Jason Merrill  <jason@redhat.com>
1919
1920         PR c++/26670
1921         * class.c (check_field_decls): Don't unset TYPE_PACKED until all
1922         the fields have been processed.
1923
1924 2006-08-29  Andrew Pinski  <pinskia@physics.uc.edu>
1925
1926         PR C++/28349
1927         * call.c (build_x_va_arg): Remove the reference type
1928         from the type before creating the pointer type.
1929
1930 2006-08-29  J"orn Rennecke  <joern.rennecke@st.com>
1931
1932         PR c++/28139
1933         * except.c (expand_start_catch_block): Use correct types for bitwise
1934         copy.
1935
1936 2006-08-28  Jason Merrill  <jason@redhat.com>
1937
1938         PR c++/26670
1939         * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
1940         fields can't be packed.
1941
1942         PR c++/26577
1943         * cvt.c (convert_to_void): Don't automatically load from volatiles
1944         of TREE_ADDRESSABLE type.
1945
1946 2006-08-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1947
1948         PR c++/28860
1949         * cp-tree.h (maybe_process_partial_specialization): Return
1950         tree instead of void.
1951         * parser.c (cp_parser_class_head): Use return value of
1952         maybe_process_partial_specialization.
1953         * pt.c (maybe_process_partial_specialization): Return error_mark_node
1954         for broken specializations, TYPE otherwise.  Check for template
1955         template parameters.
1956
1957 2006-08-27  Mark Mitchell  <mark@codesourcery.com>
1958
1959         PR c++/28058
1960         * pt.c (register_specialization): Return error_mark_node for
1961         specialization-after-instantiation.
1962         * decl2.c (mark_used): Mark the main function used when one of its
1963         clones is used.
1964
1965 2006-08-27  Lee Millward  <lee.millward@codesourcery.com>
1966
1967         PR c++/26573
1968         * class.c (check_field_decls): Don't issue error about
1969         local classes containing static data members.
1970
1971 2006-08-26  Joseph S. Myers  <joseph@codesourcery.com>
1972
1973         PR c++/24009
1974         * parser.c (struct cp_token): Add input_file_stack_index.
1975         (eof_token): Update.
1976         (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
1977         (cp_lexer_set_source_position_from_token): Restore input file
1978         stack.
1979
1980 2006-08-26  Lee Millward  <lee.millward@codesourcery.com>
1981
1982         PR c++/28736
1983         PR c++/28737
1984         PR c++/28738
1985         * pt.c (process_template_parm): Store invalid template
1986         parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
1987         (push_inline_template_parms_recursive): Check for template
1988         parameters having a TREE_VALUE of error_mark_node rather than
1989         check the parameter itself.
1990         (mangle_class_name_for_template): Likewise.
1991         (comp_template_parms): When comparing the individual template
1992         parameters, return 1 if either is error_mark_node.
1993         (current_template_args): Robustify.
1994         (redeclare_class_template): Likewise.
1995
1996 2006-08-26  Mark Mitchell  <mark@codesourcery.com>
1997
1998         PR c++/28588
1999         * class.c (resolve_address_of_overloaded_function): Add
2000         access_path parameter.  Perform access checks.
2001         (instantiate_type): Adjust call to
2002         resolve_address_of_overloaded_function.  Remove unnecessary code.
2003         * tree.c (is_overloaded_fn): Document.  Return 2 when there are
2004         acutally multiple functions.
2005         (really_overloaded_fn): Use is_overloaded_fn.
2006         * mangle.c (write_expression): Handle BASELINKs.
2007         * cp-tree.h (really_overloaded_fn): Return bool.
2008         (baselink_for_fns): Declare.
2009         * search.c (lookup_member): Check access for single static
2010         functions here.
2011         * pt.c (convert_nontype_argument_function): Handle BASELINKs.
2012         (tsubst_copy_and_build): Generate BASELINKs for template-ids.
2013         * semantics.c (finish_call_expr): Use baselink_for_fns.
2014         (baselink_for_fns): New function.
2015         (finish_id_expression): Use it.
2016         * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
2017
2018         PR c++/28595
2019         * pt.c (tsubst): Issue errors about attempts to create VLAs at
2020         template-instantiation time.
2021
2022 2006-08-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2023
2024         PR c++/28853
2025         * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
2026         template parameters.  Improve error message for template type
2027         parameters.
2028
2029         PR c++/28852
2030         * cp-tree.h (grok_op_properties): Return bool instead of void.
2031         * decl.c (grokfndecl): Discard invalid operator declarations.
2032         (copy_fn_p): Revert change for PR 27547.
2033         (grok_op_properties): Return error status (true on success).
2034         * pt.c (tsubst_decl): Discard invalid operator declarations.
2035
2036 2006-08-25  Mark Mitchell  <mark@codesourcery.com>
2037
2038         PR c++/28056
2039         * decl.c (grokdeclarator): Disallow declarations with qualified
2040         names in local scopes.
2041
2042 2006-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2043
2044         PR c++/27787
2045         * decl.c (make_typename_type): Only try and resolve it when
2046         context is not dependent.  Refactor.
2047         * decl2.c (check_classfn): Push to class scope before looking for
2048         the function.
2049
2050 2006-08-24  Danny Smith   <dannysmith@users.sourceforge.net>
2051
2052         PR driver/28528
2053         * g++spec.c (lang_specific_driver): Always check if we need to
2054         swallow a space-separated  arg to '-x'.
2055         * lang-specs.h: Don't create ouput files for '-xc++-header'
2056         if -fsyntax-only.
2057
2058 2006-08-23  Jason Merrill  <jason@redhat.com>
2059
2060         PR c++/27714
2061         * pt.c (push_template_decl_real): A friend template with class
2062         scope isn't primary.
2063
2064 2006-08-23  Benjamin Smedberg <benjamin@smedbergs.us>
2065
2066         PR c++/28687
2067         * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
2068         Move -fno-rtti check to be more specific.
2069
2070 2006-08-22  Jason Merrill  <jason@redhat.com>
2071
2072         PR c++/23372
2073         * call.c (build_over_call): Don't make a copy here if build_call
2074         will make one too.
2075
2076 2006-08-22  Andrew Pinski  <pinskia@physics.uc.edu>
2077
2078         PR C++/28450
2079         * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
2080         COMPLEX_TYPEs.
2081
2082 2006-08-22  Simon Martin  <simartin@users.sourceforge.net>
2083
2084         PR c++/28420
2085         * parser.c (cp_parser_postfix_expression): Make sure that the
2086         saved value for parser->type_definition_forbidden_message is
2087         restored before returning to avoid an invalid free().
2088
2089 2006-08-22  Jason Merrill  <jason@redhat.com>
2090
2091         PR c++/28659
2092         * typeck.c (merge_types): If either of the types have the right
2093         attributes, return that one.
2094
2095         * tree.c (cp_build_type_attribute_variant): Make sure we aren't
2096         doing this to class types.
2097         * typeck.c (original_type): Deal with type quals properly.
2098
2099 2006-08-21  Jason Merrill  <jason@redhat.com>
2100
2101         PR c++/27115
2102         * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
2103         just leave the expression as it is.
2104         (finish_stmt_expr): If the statement-expression has class type,
2105         wrap it in a TARGET_EXPR.
2106         * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
2107         CLEANUP_POINT_EXPR.
2108         * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
2109
2110 2006-08-21  Lee Millward  <lee.millward@codesourcery.com>
2111
2112         PR c++/26269
2113         * decl.c (duplicate_decls): Return early if either
2114         newdecl or olddecl is error_mark_node.
2115
2116          PR c++/28505
2117         * decl.c (grokdeclarator): Return early after
2118         issuing diagnostic about an incomplete type.
2119
2120         PR c++/28741
2121         * tree.c (decl_anon_ns_mem_p): Robustify.
2122         * decl2.c (determine_visibility): Likewise.
2123
2124 2006-08-20  Mark Mitchell  <mark@codesourcery.com>
2125
2126         PR c++/28341
2127         * tree.c (cast_valid_in_integral_constant_expression_p): New
2128         function.
2129         * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
2130         * pt.c (tsubst_expr): Add integral_constant_expression_p
2131         parameter.
2132         (fold_non_dependent_expr): Adjust callers of
2133         tsubst_{expr,copy_and_build}.
2134         (tsubst_friend_function): Likewise.
2135         (tsubst_template_arg): Likewise.
2136         (tsubst_default_argument): Likewise.
2137         (tsubst_decl): Likewise.
2138         (tsubst): Likewise.
2139         (tsubst_omp_clasuses): Likewise.
2140         (regenerate_decl_fromp_template): Likewise.
2141         (instantiate_decl): Likewise.
2142         (tsubst_initializer_list): Likewise.
2143         (tsubst_enum): Likewise.
2144         (tsubst_expr): Use RECUR throughout.
2145         (tsubst_copy_and_build): Change definition of RECUR.  Do not allow
2146         invalid casts in integral constant expressions.
2147         * parser.c (cp_parser_postfix_expression): Use
2148         cast_valid_in_integral_constant_expression_p.
2149         (cp_parser_cast_expression): Likewise.
2150         (cp_parser_functional_cast): Likewise.
2151
2152         PR c++/28346
2153         * pt.c (tsubst_qualified_id): Do not strip references from
2154         OFFSET_REFs.
2155
2156 2006-08-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2157
2158         PR c++/28606
2159         * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
2160         Fix formatting.
2161         (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
2162         for valid type-names.
2163         (cp_parser_unqualified_id): Fix error handling for destructors.
2164
2165         PR c++/28710
2166         * decl.c (xref_tag): Improve error message.  Return early on error.
2167
2168         PR c++/28711
2169         * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
2170
2171 2006-08-17  Paolo Bonzini  <bonzini@gnu.org>
2172
2173         PR c++/28573
2174         * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
2175
2176 2006-08-16  Andrew Pinski  <pinskia@physics.uc.edu>
2177
2178         PR c++/28302
2179         * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
2180         perform_integral_promotions for non integral type.
2181
2182 2006-08-16  Jason Merrill  <jason@redhat.com>
2183
2184         PR c++/28385
2185         * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
2186         if arg is a function.
2187
2188 2006-08-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2189
2190         PR c++/28593
2191         * init.c (build_new): Return early on invalid placement.
2192
2193 2006-08-15  Lee Millward  <lee.millward@codesourcery.com>
2194
2195         PR c++/28594
2196         * pt.c (process_template_parm): Robustify.
2197
2198 2006-08-14  Steve Ellcey  <sje@cup.hp.com>
2199
2200         PR c++/28288
2201         PR c++/14556
2202         * operators.def: Remove <?, ?>, <?=, and >?= operators.
2203         * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
2204         (cp_parser_warn_min_max): Remove.
2205
2206 2006-08-11  Jason Merrill  <jason@redhat.com>
2207
2208         PR c++/28559
2209         * parser.c (cp_parser_elaborated_type_specifier): Also ignore
2210         attributes applied to a TYPENAME_TYPE.
2211
2212 2006-08-09  Lee Millward  <lee.millward@codesourcery.com>
2213
2214         PR c++/28637
2215         * pt.c (coerce_template_parms): Copy across the
2216         invalid template arguments to the new template inner arguments.
2217         (retrieve_specialization): Robustify.
2218
2219         PR c++/28638
2220         * pt.c (coerce_template_template_parms): Robustify.
2221
2222         PR c++/28639
2223         * error.c (dump_template_parms): Robustify.
2224
2225         PR c++/28640
2226         * pt.c (redeclare_class_template): Robustify.
2227
2228         PR c++/28641
2229         * pt.c (type_unification_real): Robustify.
2230
2231 2006-08-03  Lee Millward  <lee.millward@codesourcery.com>
2232
2233         PR c++/28347
2234         * decl.c (start_decl): Return error_mark_node if a
2235         diagnostic was issed for an invalid typedef initialization.
2236
2237 2006-08-03  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2238
2239         PR c++/27508
2240         * parser.c (cp_parser_unqualified_id): Check for invalid scopes
2241         when parsing destructor names.
2242
2243         PR c++/28274
2244         * decl.c (duplicate_decls): Call check_default_args here.
2245         (start_preparsed_function): Do not call check_default_args.
2246         * name-lookup.c (pushdecl_maybe_friend): Only call
2247         check_default_args if duplicate_decls got bypassed.
2248
2249 2006-08-02  Richard Guenther  <rguenther@suse.de>
2250
2251         PR c++/28479
2252         Revert
2253         2006-07-05  Richard Guenther  <rguenther@suse.de>
2254         Andrew Pinski  <pinskia@gcc.gnu.org>
2255
2256         PR c++/27084
2257         * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2258         top level qualifiers for pointer type comparisons.
2259
2260 2006-08-02  Mark Mitchell  <mark@codesourcery.com>
2261
2262         PR c++/28557
2263         * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
2264
2265 2006-07-31  Mark Mitchell  <mark@codesourcery.com>
2266
2267         PR c++/28523
2268         * tree.c (stabilize_expr): Tweak documentation.  Add assertion.
2269         (stabilize_call): Tweak documentation.
2270         (stabilize_init): Only call stabilize_call for calls.
2271
2272 2006-08-01  Steve Ellcey  <sje@cup.hp.com>
2273
2274         PR c++/28432
2275         * decl2.c (check_classfn): Remove early return.
2276         * search.c (lookup_member): Return NULL with bad type.
2277
2278 2006-08-01  Steve Ellcey  <sje@cup.hp.com>
2279
2280         PR c++/28256
2281         * decl.c (check_initializer): Check for 1 initializer on scalar types.
2282
2283 2006-08-01  Daniel Jacobowitz  <dan@codesourcery.com>
2284
2285         PR debug/23336
2286         * pt.c (tsubst_copy_and_build): Mark used enum types.
2287         * semantics.c (finish_id_expression): Likewise.
2288
2289 2006-07-31  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2290
2291         PR c++/6634
2292         * decl.c (grokdeclarator): Check whether "long" or "short" was
2293         specified for non-integral types.
2294
2295 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2296
2297         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2298
2299 2006-07-28  Lee Millward  <lee.millward@codesourcery.com>
2300
2301         PR c++/27668
2302         PR c++/27962
2303         * pt.c (process_template_parm) Store invalid template
2304         parameters as error_mark_node in the paramater list.
2305         (push_inline_template_parms_recursive): Handle invalid
2306         template parameters.
2307         (comp_template_parms): Likewise.
2308         (check_default_tmpl_arg): Likewise.
2309         (coerce_template_template_parms): Likewise.
2310         (mangle_class_name_for_template): Likewise.
2311         (tsubst_template_parms): Likewise.
2312         * error.c (dump_template_argument_list): Likewise.
2313
2314 2006-07-28  Kazu Hirata  <kazu@codesourcery.com>
2315
2316         * cp-tree.h: Fix a comment typo.
2317
2318 2006-07-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2319
2320         PR c++/27572
2321         * decl.c (grokdeclarator): Return error_mark_node after invalid
2322         typedef.
2323
2324 2006-07-23  Daniel Jacobowitz  <dan@codesourcery.com>
2325
2326         PR c++/28460
2327         * decl.c (grokvardecl): Use FROB_CONTEXT.
2328         * pt.c (register_specialization): Likewise.
2329
2330 2006-07-23  Mark Mitchell  <mark@codesourcery.com>
2331
2332         PR c++/28025
2333         * cp-tree.h (LOOKUP_HIDDEN): New macro.  Reformat comments.
2334         * name-lookup.c (unqualified_namespace_lookup): There is no way to
2335         have a hidden name in non-namespace scopes.
2336         * pt.c (tsubst_friend_class): Look for hidden names.
2337         * decl.c (lookup_and_check_tag): Fix typo in comment.
2338
2339         * semantics.c (finish_compound_literal): Fix typo in comment.
2340
2341 2006-07-21  Jason Merrill  <jason@redhat.com>
2342
2343         * decl2.c (determine_visibility): Don't propagate visibility from
2344         type to decl.
2345         (constrain_class_visibility): Don't warn in system headers.
2346         Don't warn about pointer fields.
2347
2348 2006-07-20  Mike Stump  <mrs@apple.com>
2349
2350         * decl2.c (determine_visibility_from_class): Don't use hidden
2351         visibility for explicit instantiations.
2352
2353 2006-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2354
2355         PR c++/28250
2356         * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
2357         valid decls.  Cleanup.
2358
2359         PR c++/28363
2360         * semantics.c (check_template_template_default_arg): Simplify
2361         error handling.
2362
2363 2006-07-20  Jason Merrill  <jason@redhat.com>
2364
2365         PR c++/28407
2366         * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
2367         const variables with implicit internal linkage.
2368         * tree.c (decl_linkage): Only return lk_external if it's set.
2369
2370         PR c++/28409
2371         * decl2.c (constrain_visibility): Ignore the anonymous namespace
2372         for extern "C" decls.
2373         (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
2374
2375         * decl2.c (constrain_visibility): Remove specified and reason
2376         parameters.  Don't touch decls that already have explicit visibility.
2377         (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
2378         template.
2379         (determine_visibility_from_class): Reverse sense of
2380         DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
2381         (constrain_class_visibility): Only complain about member visibility
2382         if the member type is another class.  Don't change visibility of the
2383         current class.
2384
2385 2006-07-19  Mark Mitchell  <mark@codesourcery.com>
2386
2387         PR c++/28338
2388         * decl.c (layout_var_decl): Don't call push_local_name here.
2389         (initialize_artificial_var): Assert artificiality.
2390         (cp_finish_decl): Call push_local_name here.
2391
2392 2006-07-18  Mark Mitchell  <mark@codesourcery.com>
2393
2394         PR c++/28337
2395         * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
2396         templates.
2397
2398 2006-07-18  Mark Mitchell  <mark@codesourcery.com>
2399
2400         PR c++/28048
2401         * semantics.c (check_accessibility_of_qualified_id): Robustify.
2402
2403         PR c++/28235
2404         * pt.c (tsubst_decl): Handling substitutions into a static data
2405         member from within the scope of the tempalte itself.
2406
2407 2006-07-18  Lee Millward  <lee.millward@gmail.com>
2408
2409         PR c++/28258
2410         * method.c (locate_copy): Check for non_reference
2411         returning error_mark_node.
2412
2413         PR c++/28260
2414         * decl.c (duplicate_decls): Return error_mark_node
2415         on ambiguous declaration.
2416
2417 2006-07-18  Steve Ellcey  <sje@cup.hp.com>
2418
2419         PR c++/27495
2420         * search.c (adjust_result_of_qualified_name_lookup): Change
2421         assert to part of if statement.
2422
2423 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
2424
2425         PR c++/28291
2426         * decl.c (reshape_init_class): Return error_mark_node on error.
2427
2428 2006-07-17  Steve Ellcey  <sje@cup.hp.com>
2429
2430         PR c++/28304
2431         * decl2.c (check_classfn): Return NULL_TREE on error.
2432
2433 2006-07-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2434
2435         PR c++/28250
2436         * name-lookup.c (pushdecl_maybe_friend): Return early on
2437         error_mark_node.
2438         * except.c (expand_start_catch_block): Use error_mark_node instead
2439         of NULL_TREE for invalid decls.
2440         * parser.c (cp_parser_exception_declaration): Return error_mark_node
2441         on invalid catch parameter. Simplify.
2442
2443 2006-07-16  Jakub Jelinek  <jakub@redhat.com>
2444
2445         PR c++/28370
2446         * decl2.c (note_vague_linkage_var): Removed.
2447         (finish_static_data_member_decl): Add decl to pending_statics vector
2448         directly.  Do it even for non-public decls.
2449
2450 2006-07-15  Lee Millward  <lee.millward@gmail.com>
2451
2452         PR c++/28292
2453         * decl2.c (acceptable_java_type): Robustify. Use
2454         proper Boolean return type instead of return 1.
2455         (check_java_method): Don't issue error about
2456         type not being an acceptable Java parameter if
2457         it's error_mark_node.
2458
2459         PR c++/28269
2460         * parser.c (cp_parser_elaborated_type_specifier):
2461         Return early if an invalid type was detected.
2462
2463 2006-07-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2464
2465         PR c++/28249
2466         * parser.c (cp_parser_check_decl_spec): New function.
2467         (cp_parser_decl_specifier_seq): Factor out check for repeated
2468         decl-specifiers into cp_parser_check_decl_spec. Use it.
2469         (cp_parser_type_specifier_seq): Use it.
2470
2471         PR c++/28294
2472         * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
2473         only.
2474
2475         PR c++/28387
2476         * decl2.c (cplus_decl_attributes): Check for invalid decls.
2477
2478 2006-07-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2479
2480         PR c++/28343
2481         * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
2482         * decl2.c (grokfield): Likewise.
2483
2484 2006-07-12  Geoffrey Keating  <geoffk@apple.com>
2485
2486         * decl2.c (determine_visibility): Don't change visibility of
2487         function locals because of -fvisibility-inlines-hidden.
2488
2489 2006-07-12  Jason Merrill  <jason@redhat.com>
2490
2491         PR c++/28217
2492         * semantics.c (note_decl_for_pch): Don't premangle templates.
2493
2494 2006-07-12  Martin Michlmayr  <tbm@cyrius.com>
2495
2496         * typeck.c (string_conv_p): Remove spurious quotation mark in
2497         warning.
2498
2499 2006-07-07  Lee Millward  <lee.millward@gmail.com>
2500             Andrew Pinski  <pinskia@gmail.com>
2501
2502         PR c++/27820
2503         * decl.c (define_label): Return error_mark_node on error.
2504         * semantics.c (finish_label_stmt): Don't call
2505         add_stmt for invalid labels.
2506
2507 2006-07-06  Jason Merrill  <jason@redhat.com>
2508
2509         PR c++/28279
2510         * decl2.c (finish_static_data_member_decl): Don't assert
2511         TREE_PUBLIC.
2512
2513 2006-07-05  Jason Merrill  <jason@redhat.com>
2514
2515         PR c++/13983
2516         PR c++/17519
2517         * class.c (check_field_decls): Check TYPE_PACKED after
2518         stripping array types.
2519         (finish_struct_bits): Don't copy TYPE_SIZE here.
2520
2521         PR c++/18681
2522         * friend.c (is_friend): Fix DR 45 implementation.
2523
2524 2006-07-05  Richard Guenther  <rguenther@suse.de>
2525         Andrew Pinski  <pinskia@gcc.gnu.org>
2526
2527         PR c++/27084
2528         * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2529         top level qualifiers for pointer type comparisons.
2530
2531 2006-07-01  Jason Merrill  <jason@redhat.com>
2532
2533         PR c++/28215
2534         * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
2535         DECL_TEMPLATE_INFO.
2536
2537 2006-06-30  Jason Merrill  <jason@redhat.com>
2538
2539         PR c++/26577
2540         * call.c (build_new_method_call): Force evaluation of the
2541         instance pointer, not the object.
2542
2543 2006-06-30  Kazu Hirata  <kazu@codesourcery.com>
2544
2545         * decl2.c: Fix a comment typo.
2546
2547 2006-06-30  Jason Merrill  <jason@redhat.com>
2548
2549         PR c++/18698
2550         * decl2.c (grokfield): Only try to treat the decl as an access
2551         declaration if the scope is a class.
2552
2553 2006-06-29  Jason Merrill  <jason@redhat.com>
2554
2555         PR c++/26905
2556         PR c++/26612
2557         PR c++/27000
2558         PR c++/26984
2559         PR c++/19134
2560         * decl2.c (determine_visibility): Overhaul.
2561         (determine_visibility_from_class): Likewise.
2562         (min_vis_r, type_visibility, constrain_visibility): New fns.
2563         (constrain_visibility_for_template): Likewise.
2564         (constrain_class_visibility): Likewise.
2565         * decl.c (cp_finish_decl): Call determine_visibility for function
2566         decls, too.
2567         * name-lookup.c (pushtag): Call determine_visibility.
2568         * decl.c (duplicate_decls): Don't copy visibility from template to
2569         specialization.
2570         * pt.c (check_explicit_specialization): Likewise.
2571         (lookup_template_class, tsubst_decl): Call determine_visibility.
2572         * class.c (finish_struct_1): Call constrain_class_visibility.
2573
2574         PR c++/26905
2575         PR c++/21675
2576         PR c++/17470
2577         * parser.c (cp_parser_explicit_instantiation): Pass the attributes
2578         to grokdeclarator.
2579         (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
2580         (cp_parser_enum_specifier): Likewise.
2581         (cp_parser_elaborated_type_specifier): Apply attributes if this
2582         declares only the class.
2583         (cp_parser_class_specifier): Apply leading attributes immediately.
2584         * semantics.c (begin_class_definition): Add attributes parameter,
2585         apply them to the type.
2586
2587         PR c++/21581
2588         PR c++/25915
2589         * tree.c (decl_anon_ns_mem_p): New function.
2590         * cp-tree.h: Declare it.
2591         * decl2.c (determine_visibility): Make anonymous namespace
2592         members static.
2593         (min_vis_r, constrain_visibility): Likewise.
2594         * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
2595         pseudo-types.
2596         * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
2597         global_namespace.
2598         * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
2599         on anonymous namespaces.
2600
2601 2006-06-28  Jason Merrill  <jason@redhat.com>
2602
2603         PR c++/27424
2604         * pt.c (convert_template_argument): Pass all template arguments
2605         on to coerce_template_template_parms.
2606
2607 2006-06-25  Lee Millward  <lee.millward@gmail.com>
2608             Mark Mitchell <mark@codesuorcery.com>
2609
2610         PR c++/28054
2611         * decl2.c (grokbitfied): Remove check for grokdeclarator
2612         returning NULL_TREE, instead check for error_mark_node
2613         to indicate failure.
2614         * decl.c (grokdeclarator): Adjust block comment.
2615
2616 2006-06-25  Lee Millward  <lee.millward@gmail.com>
2617
2618         PR c++/28051
2619         * mangle.c (mangle_conv_op_name_for_type): Check for
2620         invalid types.
2621         * name-lookup.c (push_class_level_binding): Robustify.
2622         (do_class_using_decl): Return early if name is error_mark_node.
2623
2624 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
2625
2626         PR c++/28114
2627         * name-lookup.c (pushtag): Return if we have error_mark_node.
2628
2629 2006-06-23  Steve Ellcey  <sje@cup.hp.com>
2630
2631         PR c++/27019
2632         * typeck2.c (process_init_constructor_array): Set ce->value on errors.
2633
2634 2006-06-23  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2635
2636         PR c++/28112
2637         * parser.c (cp_parser_attribute_list): Skip attributes with invalid
2638         arguments.  Fix comment.
2639
2640         PR c++/11468
2641         * init.c (build_new_1): Handle error_mark_nodes returned by
2642         build_java_class_ref.
2643         (build_java_class_ref): Do not abort compilation, but return
2644         error_mark_node.  Improve error message.  Fix indentation.
2645
2646 2006-06-23  Danny Smith   <dannysmith@users.sourceforge.net>
2647
2648         PR target/27789
2649         * decl.c (start_decl): Check that dllimports are not initialized.
2650
2651 2006-06-22  Lee Millward  <lee.millward@gmail.com>
2652
2653         PR c++/27805
2654         * typeck2.c (build_m_component_ref): Use error_operand_p.
2655
2656         PR c++/27821
2657         * decl.c (grokdeclarator): Return error_mark_node on
2658         invalid uses of the scope resolution operator.
2659
2660 2006-06-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2661
2662         PR c++/28111
2663         * pt.c (determine_specialization): Check for invalid decls.
2664
2665         PR c++/28110
2666         * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
2667         parameters.
2668
2669         PR c++/28109
2670         * rtti.c (get_tinfo_decl_dynamic): Robustify.
2671
2672 2006-06-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2673
2674         PR c++/28052
2675         * init.c (push_base_cleanups): Skip members with invalid types.
2676         * typeck.c (build_class_member_access_expr): Robustify.
2677
2678 2006-06-19  Mark Mitchell  <mark@codesourcery.com>
2679
2680         * pt.c (instantiate_template): Fix typo in comment.
2681
2682 2006-06-19  Richard Guenther  <rguenther@suse.de>
2683
2684         * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
2685         power-of-two token vector size.
2686
2687 2006-06-16  Mark Mitchell  <mark@codesourcery.com>
2688
2689         PR c++/28016
2690         * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
2691         members.
2692
2693         PR c++/27979
2694         * call.c (standard_conversion): Strip cv-qualifiers from bitfield
2695         types.
2696
2697         PR c++/27884
2698         * decl.c (have_extern_spec): Remove.
2699         (start_decl): Do not check have_extern_spec.
2700         (start_function): Likewise.
2701         * cp-tree.h (have_extern_spec): Remove.
2702         * parser.c (cp_parser_linkage_specification): Don't set
2703         have_extern_spec.
2704         (cp_parser_init_declarator): Likewise.
2705         (cp_parser_parameter_declaration): Do not treat parameters as
2706         within the scope of an unbraced linkage specification.
2707
2708 2006-06-15  Mark Mitchell  <mark@codesourcery.com>
2709
2710         PR c++/27689
2711         * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
2712         macro.
2713         * pt.c (unify): Use it.
2714
2715         PR c++/27666
2716         * call.c (build_conditional_expr): Robustify.
2717
2718         PR c++/27640
2719         * pt.c (instantiate_template): Set processing_template_decl to
2720         zero while performing substitutions.
2721
2722 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
2723
2724         PR c++/27665
2725         * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
2726         identify destructors.
2727         (cp_parser_nested_name_specifier_opt): Remove invalid
2728         optimization.
2729         (cp_parser_template_id): Refine heuristic for determining whether
2730         we are entering a scope.
2731
2732         PR c++/27648
2733         * parser.c (cp_parser_declarator): Robustify.
2734
2735         PR c++/26559
2736         * pt.c (tsubst_expr): Use finish_omp_atomic.
2737         (value_dependent_expression_p): All CALL_EXPRs are dependent.
2738         * semantics.c (finish_omp_atomic): Rework to use standard
2739         paradigms for handling non-dependent expressions.
2740
2741 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2742
2743         * typeck.c (build_modify_expr): Tidy diagnostic message.
2744
2745 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
2746
2747         PR c++/28018
2748         * typeck.c (build_modify_expr): Disallow array assignment.
2749
2750 2006-06-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2751
2752         * cp-tree.def: Fix typo.
2753
2754 2006-06-13  Mark Mitchell  <mark@codesourcery.com>
2755
2756         PR c++/27227
2757         * decl.c (decls_match): Allow an extern "C" variable declarations
2758         from different namespaces to match.
2759         (duplicate_decls): Disallow redeclaring a variable with a
2760         different linkage specification.
2761
2762 2006-06-13  Jakub Jelinek  <jakub@redhat.com>
2763
2764         PR middle-end/27793
2765         * cp-tree.h (cxx_int_tree_map): New struct.
2766         (struct language_function): Add extern_decl_map field.
2767         * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
2768         to cp_function_chain->extern_decl_map hash table instead of
2769         copying over DECL_UID.
2770         * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
2771         functions.
2772         (cp_genericize_r): Remap DECL_EXTERN local decls using
2773         cp_function_chain->extern_decl_map hash table.
2774         * decl.c (finish_function): Clear extern_decl_map.
2775
2776 2006-06-12  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2777
2778         PR c++/27601
2779         * semantics.c (finish_offsetof): Handle pseudo-destructors.
2780
2781         PR c++/27933
2782         * name-lookup.c (lookup_qualified_name): Always return error_mark_node
2783         if lookup fails.
2784
2785         PR c++/27951
2786         * decl2.c (finish_anon_union): Return early if build_anon_union_vars
2787         fails.
2788
2789 2006-06-12  Roger Sayle  <roger@eyesopen.com>
2790
2791         PR c++/21210
2792         * typeck2.c (build_functional_cast): Use cp_convert to construct
2793         non-aggregate initializers instead of the user-level build_c_cast.
2794
2795 2006-06-07  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2796
2797         PR c++/27601
2798         * cp-tree.h (finish_offsetof): Add prototype.
2799         * semantics.c (finish_offsetof): New function.
2800         * parser.c (cp_parser_builtin_offsetof): Call it instead of
2801         fold_offsetof.
2802         * pt.c (tsubst_copy_and_build): Likewise.
2803
2804 2006-06-06  Mark Mitchell  <mark@codesourcery.com>
2805
2806         PR c++/27177
2807         * call.c (standard_conversion): Require that the derived type be
2808         complete when performing a derived-to-base conversion.
2809
2810 2006-06-04  Mark Mitchell  <mark@codesourcery.com>
2811
2812         PR c++/27819
2813         * decl.c (cp_finish_decl): Process initializers for static data
2814         members with non-dependent initializers, even in templates.
2815
2816         PR c++/27722
2817         * decl.c (maybe_deduce_size_from_array_init): If the declaration
2818         is erroneous, give it an erroneous type.
2819         (layout_var_decl): If the type is erroneous, give up.
2820         (check_initializer): Likewise.
2821
2822         PR c++/27807
2823         * cp-tree.h (TYPE_OBJ_P): New macro.
2824         (TYPE_PTROB_P): Use it.
2825         (TYPE_REF_OBJ_P): Likewise.
2826         * semantics.c (finish_compound_literal): Do not permit compound
2827         literals of non-object types.
2828
2829         PR c++/27806
2830         * typeck.c (original_type): Robustify.
2831
2832 2006-06-05  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2833
2834         PR c++/27804
2835         * init.c (constant_value_1): Return decl instead of error_mark_node
2836         for invalid initializers.
2837
2838 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
2839
2840         PR c++/27592
2841         * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
2842         on operand of the COND_EXPR for the null pointer check.
2843
2844 2006-06-01  Andrew Pinski  <pinskia@physics.uc.edu>
2845
2846         PR c++/26740
2847         * typeck.c (build_unary_op): Mark the function as being used.
2848
2849 2006-06-01  Alexandre Oliva  <aoliva@redhat.com>
2850
2851         PR c++/26660
2852         * parser.c (cp_parser_initial_pragma): Read one more token for
2853         caller after reading PCH file in.
2854
2855 2006-05-31  Mark Mitchell  <mark@codesourcery.com>
2856
2857         PR c++/27801
2858         * call.c (perform_implicit_conversion): Do not actually perform
2859         conversions in templates.
2860
2861         PR c++/26496
2862         * call.c (resolve_args): Check for invalid uses of bound
2863         non-static member functions.
2864         * init.c (build_offset_ref): Return error_mark_node for errors.
2865
2866         PR c++/27385
2867         * decl.c (reshape_init): Robustify.
2868         (reshape_init_array_1): Likewise.
2869
2870 2006-05-30  Mark Mitchell  <mark@codesourcery.com>
2871
2872         PR c++/27808
2873         * parser.c (cp_parser_decl_specifier_seq): Issue errors about
2874         "friend" specifiers that do not appear in class scopes.
2875
2876         PR c++/27803
2877         * class.c (check_bitfield_decl): Ensure that all bitfields have
2878         integral type.
2879
2880 2006-05-29  Kazu Hirata  <kazu@codesourcery.com>
2881
2882         * pt.c (convert_nontype_argument): Fix a typo in an error
2883         message.
2884
2885 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
2886
2887         * decl.c, decl2.c, parser.c: Fix comment typos.  Follow
2888         spelling conventions.
2889
2890 2006-05-24  Mark Mitchell  <mark@codesourcery.com>
2891
2892         PR c++/20103
2893         * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
2894         error_mark_node to indicate an initialization is OK.
2895         (start_decl): Likewise.  Adjust call to start_decl_1.
2896         (start_decl_1): Add initialized parameter.  Simplify.
2897         * except.c (initialize_handler_parm): Adjust call to
2898         setart_decl_1.
2899         (expand_start_catch_block): Let cp_finish_decl initialize catch
2900         parameters.
2901         * cp-tree.h (start_decl_1): Adjust prototype.
2902         * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
2903         (instantiate_decl): Let cp_finish_decl handle initialization.
2904         * semantics.c (finish_compound_literal): Create a temporary
2905         variable for the literal.
2906         * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
2907         cases.
2908         * decl2.c (finish_static_data_member_decl): Don't set
2909         DECL_INITIAL.
2910         (grokfield): Do not try to initialize functions.
2911
2912 2006-05-23  Mark Mitchell  <mark@codesourcery.com>
2913
2914         PR c++/20173
2915         * pt.c (determine_specialization): Disallow partial
2916         specializations of templates.
2917
2918 2006-05-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2919
2920         PR c++/27716
2921         * typeck.c (build_modify_expr): Test arguments for error_operand_p.
2922
2923         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
2924
2925 2006-05-21  Mark Mitchell  <mark@codesourcery.com>
2926
2927         PR c++/27210
2928         * cp-tree.h (cp_save_expr): New function.
2929         * init.c (build_new): Correct logic for zero-element array
2930         warning.  Use cp_save_expr.
2931         * tree.c (cp_save_expr): New function.
2932
2933 2006-05-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2934
2935         PR c++/27398
2936         * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
2937         or void_type_node.
2938
2939 2006-05-19  Mike Stump  <mrs@apple.com>
2940
2941         * typeck.c (default_conversion): Remove static.
2942
2943 2006-05-19  Mark Mitchell  <mark@codesourcery.com>
2944
2945         PR c++/26433
2946         * cp-tree.h (begin_function_try_block): Change prototype.
2947         (finish_function_handler_sequence): Likewise.
2948         * parser.c (cp_parser_function_try_block): Adjust calls.
2949         * pt.c (tsubst_expr): Adjust calls.
2950         * semantics.c (begin_function_try_block): Create an artificial
2951         outer scope.
2952         (finish_function_handler_sequence): Close it.
2953
2954 2006-05-18  Mark Mitchell  <mark@codesourcery.com>
2955
2956         PR c++/27471
2957         PR c++/27506
2958         * typeck.c (decay_conversion): Convert bitfields to their declared
2959         types here.  Improve documentation.  Avoid use of cp_convert.
2960         (default_conversion): Make it static.  Perform integral promotions
2961         before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
2962         conversions.
2963         * init.c (build_init): Remove.
2964         (expand_default_init): Do not call rvalue.
2965         * call.c (null_ptr_cst_p): Robustify.
2966         (build_conditional_expr): Tidy.
2967         * except.c (build_throw): Do not perform lvalue-to-rvalue
2968         conversion on operand before initializing temporary.
2969         * tree.c (convert.h): Include it.
2970         (convert_bitfield_to_declared_type): Use convert_to_integer, not
2971         cp_convert.
2972         (rvalue): Don't convert bitfields to their declared type here.
2973         * cp-tree.h (build_init): Remove.
2974         (default_conversion): Likewise.
2975         * typeck2.c (build_m_component_ref): Do not perform
2976         lvalue-to-rvalue, function-to-pointer, or array-to-pointer
2977         conversions here.  Correct error message.
2978
2979 2006-05-17  Mark Mitchell  <mark@codesourcery.com>
2980
2981         PR c++/26122
2982         * decl2.c (check_member_template): Remove checks for virtual
2983         functions.
2984         * parser.c (cp_parser_function_specifier_opt): Complain about
2985         virtual templates.
2986         (cp_parser_pure_specifier): Likewise.
2987
2988         PR c++/26068
2989         * parser.c (cp_parser_set_storage_class): Check for
2990         invalid uses of storage classes on unbraced linkage
2991         specifications.
2992         (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
2993         to cp_parser_set_storage_class.
2994
2995 2006-05-17  Jakub Jelinek  <jakub@redhat.com>
2996
2997         PR c++/27491
2998         * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
2999         on CONSTRUCTORs.
3000
3001         PR middle-end/27415
3002         * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3003         on combined parallel workshare constructs.
3004         * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
3005
3006 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
3007
3008         PR driver/26885
3009         * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
3010
3011 2006-05-15  Mark Mitchell  <mark@codesourcery.com>
3012
3013         PR c++/27339
3014         * cp-tree.h (perform_access_checks): New function.
3015         * semantics.c (perform_access_checks): New function.
3016         (perform_deferred_access_checks): Use it.
3017         * parser.c (cp_parser_simple_declaration): Adjust call to
3018         cp_parser_init_declarator.
3019         (cp_parser_type_parameter): Do not defer checks in default
3020         arguments.
3021         (cp_parser_explicit_specialization): Adjust call to
3022         cp_parser_single_declaration.
3023         (cp_parser_init_declarator): Perform template-parameter access
3024         checks.
3025         (cp_parser_parameter_declaration): Do not defer checks for
3026         template parameter default arguments.
3027         (cp_parser_template_declaration_after_export): Gather access
3028         checks for template parameters, and pass them to
3029         cp_parser_single_declaration.
3030         (cp_parser_template_parameter_access_checks): New function.
3031         (cp_parser_single_declaration): Add checks parameter.
3032
3033         PR c++/27505
3034         * call.c (convert_like_real): Convert bitfields to their declared
3035         types when forming an rvalue.
3036         * tree.c (convert_bitfield_to_declared_type): New function.
3037         (rvalue): Use it.
3038         * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
3039
3040 2006-05-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3041
3042         PR c++/27582
3043         * pt.c (any_dependent_template_arguments_p): Return early on invalid
3044         argument list.
3045
3046         PR c++/27581
3047         * search.c (adjust_result_of_qualified_name_lookup): Skip on
3048         invalid context_class.
3049
3050         PR c++/27315
3051         * pt.c (do_decl_instantiation): Return early on invalid decl.
3052
3053         PR c++/27559
3054         * pt.c (push_template_decl_real): Return error_mark_node instead
3055         of broken decl.
3056
3057         PR c++/27496
3058         * pt.c (tsubst_friend_class): Return early on invalid friend
3059         declarations.
3060
3061 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
3062
3063         * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
3064         (cp/decl2.o): Likewise.
3065         (cp/typeck.o): Likewise.
3066         (cp/cvt.o): Likewise.
3067         (cp/parser.o): Likewise.
3068         (cp/call.o): Replace target.h with $(TARGET_H).
3069
3070 2006-05-14  Alexandre Oliva  <aoliva@redhat.com>
3071
3072         * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
3073         COMPONENT_REF alone.
3074
3075 2006-05-11  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3076
3077         PR c++/27547
3078         * decl.c (copy_fn_p): Return early on non-member functions.
3079
3080 2006-05-08  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3081
3082         PR c++/27447
3083         * decl2.c (build_memfn_type): Skip invalid functions and class types.
3084
3085 2006-05-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3086
3087         PR c++/27427
3088         * pt.c (convert_nontype_argument): Return early on invalid arguments.
3089
3090         * pt.c (process_template_parm): Remove superfluous temporary.
3091
3092         PR c++/27430
3093         * pt.c (process_template_parm): Handle erroneous non-type parameters.
3094
3095         PR c++/27423
3096         * typeck.c (convert_for_initialization): Skip erroneous types.
3097
3098         PR c++/27422
3099         * typeck.c (convert_arguments): Return early on args with
3100         invalid types.
3101
3102 2006-05-03  Aldy Hernandez  <aldyh@redhat.com>
3103
3104         PR/21391
3105         * typeck.c (build_static_cast_1): Save casted types in used types
3106         hash table.
3107         (build_reinterpret_cast_1): Same.
3108         * rtti.c (build_dynamic_cast_1): Same.
3109
3110 2006-05-04  Jakub Jelinek  <jakub@redhat.com>
3111
3112         PR c++/27359
3113         * parser.c (cp_parser_omp_for_loop): Only call
3114         cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
3115         called.
3116
3117 2006-05-02  Mark Mitchell  <mark@codesourcery.com>
3118
3119         PR c++/27102
3120         * decl.c (grokdeclarator): Robustify checks for defining members
3121         of incomplete types.
3122
3123         PR c++/27309
3124         * class.c (add_method): Call grok_special_member_properties.
3125         * decl.c (grokdeclarator): Don't call it here.
3126         (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
3127         assignment operator.  Set TYPE_HAS_CONSTURCTOR if DECL is a
3128         constructor.
3129         (start_method): Don't call grok_special_member_properties.
3130         * method.c (implicitly_declare_fn): Likewise.
3131         * pt.c (instantiate_class_template): Likewise.
3132         * decl2.c (grokfield): Likewise.
3133
3134 2006-05-02  Jakub Jelinek  <jakub@redhat.com>
3135
3136         PR middle-end/27337
3137         * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
3138         * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
3139         * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
3140
3141 2006-04-30  Mark Mitchell  <mark@codesourcery.com>
3142
3143         PR c++/27094
3144         * pt.c (tsubst_default_argument): Increment function_depth around
3145         call to tsubst_expr.
3146         * parser.c (cp_parser_parameter_declaration): Likewise.
3147         * decl2.c (mark_used): Tidy.
3148
3149 2006-04-30  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3150
3151         PR c++/27278
3152         * decl.c (grok_op_properties): Skip operators with invalid args
3153         when checking for class-type or enum-type args.
3154
3155 2006-04-29  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3156
3157         PR c++/27279
3158         * decl.c (copy_fn_p): Skip functions with invalid first arg.
3159
3160 2006-04-27  Mark Mitchell  <mark@codesourcery.com>
3161
3162         PR c++/27292
3163         * tree.c (rvalue): Convert bitfields to their declared types.
3164
3165         PR c++/27102
3166         * typeck2.c (cxx_incomplete_type_diagnostic): Handle
3167         TYPENAME_TYPE.
3168
3169 2006-04-24  Mark Mitchell  <mark@codesourcery.com>
3170
3171         PR c++/27292
3172         * typeck.c (decay_conversion): Don't adjust bitfield types.
3173         (perform_integral_promotions): Treat bitfield enums as enums, not
3174         as short integer types.
3175         * tree.c (rvalue): Convert bitfields to their correct types.
3176
3177 2006-04-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3178
3179         PR c++/19963
3180         * class.c (layout_class_type): Skip fields with invalid types.
3181
3182 2006-04-23  Mark Mitchell  <mark@codesourcery.com>
3183
3184         PR c++/26912
3185         * cp-tree.h (build_this_parm): Declare.
3186         (grok_method_quals): Remove.
3187         (build_memfn_type): Declare.
3188         (build_artificial_parm): Declare.
3189         (do_friend): Remove quals parameter.
3190         * decl.c (build_this_parm): New function.
3191         (grokfndecl): Use it.  Do not pass quals to grokclassfn.
3192         (grokdeclarator): Rename quals to memfn_quals.  Avoid allocating
3193         unnecessary TYPE_DECLs.  Correct qualification of member function
3194         types.  Tidy.
3195         * method.c (implicitly_declare_fn): Use build_this_parm.
3196         * friend.c (do_friend): Remove quals parameter.
3197         * decl2.c (grok_method_quals): Remove.
3198         (build_memfn_type): New function.
3199         (build_artificial_parm): Give it external linkage.
3200         (grokclassfn): Remove quals parameter.  Do not build "this"
3201         PARM_DECL here.
3202
3203         PR c++/26534
3204         * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
3205         * typeck.c (is_bitfield_expr_with_lowered_type): New function.
3206         (decay_conversion): Convert bitfield expressions to the correct
3207         type.
3208         (build_modify_expr): Remove spurious conversions.
3209         * class.c (layout_class_type): Modify the type of bitfields to
3210         indicate a limited range.
3211         * call.c (standard_conversion): Adjust the type of bitfield
3212         expressions used in an rvalue context.
3213         (build_conditional_expr): Likewise.
3214
3215 2006-04-22  Kazu Hirata  <kazu@codesourcery.com>
3216
3217         * decl.c: Fix comment typos.
3218
3219 2006-04-21  Eric Christopher  <echristo@apple.com>
3220
3221         * decl.c: Fix typo in function name.
3222
3223 2006-04-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3224
3225         PR c++/26558
3226         * parser.c (cp_parser_class_name): Check for invalid typenames.
3227         Rearrange code.
3228
3229         PR c++/26739
3230         * pt.c (tsubst_friend_function): Return early if
3231         pushdecl_namespace_level fails.
3232
3233         PR c++/26036
3234         * typeck.c (convert_arguments): Return error_mark_node instead of
3235         error_mark_list.
3236         * cp-tree.h (error_mark_list): Remove declaration.
3237         * decl.c (error_mark_list): Remove definition.
3238         (cxx_init_decl_processing): Do not initialize error_mark_list.
3239
3240         PR c++/10385
3241         * rtti.c (build_dynamic_cast_1): Check for invalid conversions
3242         before calling convert_to_reference.
3243         * cvt.c (convert_to_reference): Assert that reftype is a
3244         REFERENCE_TYPE.
3245
3246 2006-04-19  Mark Mitchell  <mark@codesourcery.com>
3247
3248         PR c++/27102
3249         * class.c (currently_open_class): Tidy.
3250         * decl.c (grokdeclarator): If we encounter an erroneous
3251         declarator, assume that we have already issued an error message
3252         and return.  Return error_mark_node instead of NULL_TREE in more
3253         places.  Issue errors about function definitions that do not have
3254         a function declarator.  Check for complete types for all function
3255         definitions.
3256         * cp-tree.h (cp_error_declarator): Remove.
3257         (currently_open_class): Change return type.
3258         * parser.c (cp_parser_id_expression): Add optional_p parameter.
3259         (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
3260         (cp_parser_id_expression): Likewise.
3261         (cp_parser_unqualified_id): If the name is optional, return
3262         NULL_TREE.
3263         (cp_parser_postfix_dot_deref_expression): Adjust calls.
3264         (cp_parser_type_parameter): Likewise.
3265         (cp_parser_unqualified_id): Likewise.
3266         (cp_parser_direct_declarator): Likewise.
3267         (cp_parser_declarator_id): Add optional_p parameter.
3268         (cp_parser_function_definition_from_specifiers_and_declarator):
3269         Assume that start_function indicates failure only if it has issued
3270         an error.
3271         (cp_parser_omp_var_list_no_open): Adjust calls.
3272
3273 2006-04-17  Janis Johnson  <janis187@us.ibm.com>
3274
3275         PR c++/26114, c++/26115
3276         * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
3277         * class.c (check_field_decls): Ditto.
3278
3279 2006-04-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3280
3281         * init.c (build_offset_ref): Remove superfluous temporary.
3282
3283 2006-04-16  Mark Mitchell  <mark@codesourcery.com>
3284
3285         PR c++/26365
3286         * typeck.c (finish_class_member_access_expr): Robustify
3287
3288 2006-04-15  Kazu Hirata  <kazu@codesourcery.com>
3289
3290         * Make-lang.in (cp/pt.o): Depend on vecprim.h.
3291         * pt.c: Include vecprim.h.
3292         (inline_parm_levels): Change the type to VEC(int,heap) *.
3293         (inline_parm_levels_used): Remove.
3294         (maybe_begin_member_template_processing,
3295         maybe_end_member_template_processing): Use VEC instead of
3296         VARRAY.
3297
3298         * cp/call.c: Fix comment typos.
3299
3300 2006-04-12  Mark Mitchell  <mark@codesourcery.com>
3301
3302         * parser.c (cp_parser_init_declarator): Initialize local variables
3303         aggressively.
3304
3305 2006-04-12  Roger Sayle  <roger@eyesopen.com>
3306
3307         * parser.c (cp_parser_init_declarator): Initialise
3308         is_parenthesized_init to false to avoid compiler warning.
3309
3310 2006-04-11  Mark Mitchell  <mark@codesourcery.com>
3311
3312         * cp-tree.h (build_operator_new_call): Adjust prototype.
3313         (build_new_method_call): Likewise.
3314         (build_op_delete_call): Likewise.
3315         * init.c (build_raw_new_expr): New function.
3316         (build_new_1): Pass information as parameters, rather than
3317         bundling it into a NEW_EXPR.
3318         (build_new): Adjust accordingly.
3319         (build_vec_delete_1): Adjust for changes to build_op_delete_call.
3320         (build_delete): Likewise.
3321         * decl.c (finish_destructor_body): Likewise.
3322         * call.c (build_operator_new_call): Return the allocation function
3323         used.
3324         (build_op_delete_call): Take allocation function as parameter.
3325         (build_special_member_call): Adjust call to build_new_method_call.
3326         (build_new_method_call): Return function called.
3327         * pt.c (tsubst_copy_and_build): Adjust call to
3328         build_new_method_call.
3329         * semantics.c (finish_call_expr): Likewise.
3330         * parser.c (cp_parser_postfix_expression): Likewise.
3331         * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
3332         "incomplete", not "undefined", types.
3333
3334         PR c++/26295
3335         * decl.c (grokdeclarator): Remove namespace-handling code for
3336         pointers-to-members.
3337         * parser.c (cp_parser_ptr_operator): Check for qualified names
3338         using namespaces.
3339
3340         PR c++/26122
3341         * parser.c (cp_parser_init_declarator): Adjust logic for deciding
3342         whether or not to look for a pure-specifier.
3343         (cp_parser_member_declaration): Likewise.
3344
3345 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
3346
3347         * decl2.c, pt.c, semantics.c: Fix comment typos.
3348
3349 2006-04-06  Roger Sayle  <roger@eyesopen.com>
3350
3351         * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
3352
3353 2006-04-05  Jason Merrill  <jason@redhat.com>
3354
3355         * name-lookup.c (push_namespace_with_attribs): Temporarily disable
3356         default hidden visibility for anonymous namespace.
3357
3358 2006-03-29  Roger Sayle  <roger@eyesopen.com>
3359
3360         PR c++/22494
3361         * init.c (build_vec_delete_1): Convert BASE pointer's type to
3362         the base pointer type to avoid a type mismatch in the EQ_EXPR.
3363
3364 2006-03-24  Carlos O'Donell  <carlos@codesourcery.com>
3365
3366         * search.c (maybe_suppress_debug_info): If
3367         flag_emit_class_debug_always then don't suppress.
3368
3369 2006-03-22  Jason Merrill  <jason@redhat.com>
3370
3371         * name-lookup.c (push_namespace_with_attribs): Only apply hidden
3372         visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
3373
3374 2006-03-21  Jakub Jelinek  <jakub@redhat.com>
3375
3376         PR c++/26691
3377         * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
3378
3379 2006-03-21  Jason Merrill  <jason@redhat.com>
3380
3381         PR c++/21581
3382         * parser.c (cp_parser_declaration): Support attributes on
3383         anonymous namespaces.
3384         * name-lookup.c (push_namespace_with_attribs): Anonymous
3385         namespaces default to hidden visibility.
3386
3387 2006-03-20  Jason Merrill  <jason@redhat.com>
3388
3389         PR c++/21764, c++/19238
3390         * decl.c (cp_finish_decl): Call determine_visibility later.
3391         (start_preparsed_function): Likewise.
3392         * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
3393         (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
3394         * name-lookup.h (struct cp_binding_level): Add has_visibility
3395         bitfield.
3396         * name-lookup.c: Include c-pragma.h.
3397         (push_namespace_with_attribs): Split out from push_namespace.
3398         Push visibility if appropriate.  Set TREE_PUBLIC on namespaces.
3399         (leave_scope): Pop visibility if appropriate.
3400         * decl2.c (determine_visibility_from_class): Split out from...
3401         (determine_visibility): ...here.  Handle function scope and
3402         nested classes.
3403         (import_export_decl): Move visibility handling to
3404         determine_visibility_from_class.
3405         * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
3406         attributes on namespace declarations.
3407
3408 2006-03-15  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3409
3410         PR c++/6634
3411         * decl.c (grokdeclarator): Do not accept long long double.
3412         Reorganize checks for invalid (combinations of) type modifiers.
3413         Quote modifiers in messages.
3414
3415 2006-03-09  Jason Merrill  <jason@redhat.com>
3416
3417         PR c++/16387, c++/16389
3418         * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
3419         (cxx_sizeof_or_alignof_expr): Split out from here.
3420
3421 2006-03-09  Diego Novillo  <dnovillo@redhat.com>
3422
3423         Merge from gomp-20050608-branch
3424
3425         2006-02-02  Diego Novillo  <dnovillo@redhat.com>
3426
3427                 * decl.c (pop_labels_1): Use appropriate pointer casting.
3428                 (poplevel_named_label_1): Likewise.
3429                 (named_label_entry_hash): Likewise.
3430                 (named_label_entry_eq): Likewise.
3431                 (check_goto): Likewise.
3432                 (define_label): Likewise.
3433
3434         2006-01-26  Diego Novillo  <dnovillo@redhat.com>
3435
3436                 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
3437                 of TREE_BLOCK.
3438                 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
3439                 instead of TREE_CODE/TREE_OPERAND.
3440                 * semantics.c: Likewise.
3441                 * parser.c: Likewise.
3442
3443         2005-11-10  Diego Novillo  <dnovillo@redhat.com>
3444
3445                 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
3446                 target does not support TLS.
3447
3448         2005-11-09  Jakub Jelinek  <jakub@redhat.com>
3449
3450                 * decl.c (redeclaration_error_message): Don't error about
3451                 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
3452                 (olddecl).
3453
3454         2005-11-08  Jakub Jelinek  <jakub@redhat.com>
3455
3456                 PR c++/24735
3457                 * semantics.c (finish_omp_barrier, finish_omp_flush): New
3458                   functions.
3459                 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
3460                 (cp_parser_omp_flush): Call finish_omp_flush.
3461                 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
3462                   prototypes.
3463
3464                 PR c++/24734
3465                 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
3466
3467         2005-11-03  Jakub Jelinek  <jakub@redhat.com>
3468
3469                 * semantics.c (finish_omp_threadprivate): Error on class-scope
3470                 variables.
3471
3472         2005-11-02  Jakub Jelinek  <jakub@redhat.com>
3473
3474                 * parser.c (cp_parser_omp_all_clauses): If some clause
3475                 type is not allowed, don't remove just one of the
3476                 clauses, but all clauses added in that loop round.
3477
3478                 * semantics.c (finish_omp_clauses): Fix function
3479                 comment. Don't handle non-const or mutable specially,
3480                 as const and not mutable is predetermined shared and
3481                 that leads to double error. Don't ICE if copyin var is
3482                 PARM_DECL.
3483
3484                 PR c++/24613
3485                 * parser.c (cp_parser_pragma): Diagnose
3486                 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
3487                 construct.
3488
3489                 * semantics.c (finish_omp_threadprivate): Error if V
3490                   is automatic variable or has incomplete type.
3491
3492         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
3493
3494                 * parser.c (cp_parser_omp_all_clauses): Use
3495                 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
3496
3497         2005-11-01  Diego Novillo  <dnovillo@redhat.com>
3498
3499                 * parser.c (cp_parser_omp_all_clauses): When emitting an
3500                 error message, remove the invalid clause from the list.
3501
3502         2005-10-31  Diego Novillo  <dnovillo@redhat.com>
3503
3504                 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
3505                 combined parallel+workshare directives.
3506
3507         2005-10-31  Richard Henderson  <rth@redhat.com>
3508
3509                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
3510                 Use cxx_omp_clause_dtor.
3511                 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
3512                 (cxx_omp_clause_dtor): New.
3513                 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
3514                 (cxx_omp_clause_default_ctor): Use it.
3515                 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
3516                 Likewise.
3517                 (cxx_omp_clause_dtor): New.
3518                 * semantics.c (finish_omp_clauses): Rewrite cdtor
3519                 checking to fill in CP_OMP_CLAUSE_INFO.  Don't
3520                 specialcase LASTPRIVATE for removal.
3521                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
3522                 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
3523
3524         2005-10-28  Jakub Jelinek  <jakub@redhat.com>
3525
3526                 * semantics.c (finish_omp_threadprivate): If
3527                   DECL_RTL_SET_P, call make_decl_rtl again so that
3528                   encode_section_info can update SYMBOL_REF's flags.
3529
3530         2005-10-26  Jakub Jelinek  <jakub@redhat.com>
3531
3532                 * semantics.c (finish_omp_for): Don't segfault if COND
3533                 or INCR is NULL.  If not calling c_finish_omp_for
3534                 right away and one of COND and INCR is NULL, issue
3535                 error and don't expand anything.
3536
3537                 PR c++/24512
3538                 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
3539                 * semantics.c (finish_omp_for): Likewise.  Set
3540                 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
3541                 into the current statement list if not processing
3542                 template decl or pass it to c_finish_omp_for.
3543
3544                 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
3545                 into PRE_BODY statement list.  Pass it to finish_omp_for.
3546                 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
3547                 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
3548                 finish_omp_for.  Put all the statements into sk_omp
3549                 scope.
3550
3551         2005-10-25  Jakub Jelinek  <jakub@redhat.com>
3552
3553                 PR c++/24516
3554                 * parser.c (struct cp_parser): Rename in_iteration_statement
3555                 field to in_statement.
3556                 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
3557                 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
3558                 (cp_parser_new, cp_parser_begin_omp_structured_block,
3559                 cp_parser_end_omp_structured_block,
3560                 cp_parser_omp_for_loop): Adjust for
3561                 in_iteration_statement renaming.
3562                 (cp_parser_selection_statement): Save
3563                 parser->in_iteration, or it temporarily with
3564                 IN_SWITCH_STMT for the
3565                 cp_parser_implicitly_scoped_statement call.
3566                 (cp_parser_iteration_statement): Adjust for
3567                 in_iteration_statement renaming.  Use
3568                 IN_ITERATION_STMT rather than true.
3569                 (cp_parser_jump_statement): Adjust for
3570                 in_iteration_statement renaming and new values.  Don't
3571                 error on break in a switch statement within OMP_FOR or
3572                 OpenMP structured block.
3573
3574                 PR c++/24513
3575                 * parser.c (cp_parser_cache_group): Don't stop if next
3576                 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
3577                 well.  If current token is CPP_PRAGMA, consume
3578                 everything until CPP_PRAGMA_EOL inclusive.
3579
3580         2005-10-24  Jakub Jelinek  <jakub@redhat.com>
3581
3582                 PR c++/24502
3583                 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
3584                 addition to MODIFY_EXPR.
3585
3586         2005-10-23  Richard Henderson  <rth@redhat.com>
3587
3588                 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
3589                 (bc_label): New.
3590                 (begin_bc_block, finish_bc_block): Use it.
3591                 (push_context, pop_context): Remove.
3592                 (cp_genericize): Don't use them.  Assert bc_label is null.
3593                 * semantics.c (finish_omp_clauses): Create a fake data
3594                 element of TYPE for probing ctors.
3595
3596         2005-10-23  Richard Henderson  <rth@redhat.com>
3597
3598                 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
3599                 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
3600                 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
3601                 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
3602                 * semantics.c (finish_omp_clauses): Look through
3603                 arrays when looking up special member calls.  Also
3604                 remove FIRSTPRIVATE when LASTPRIVATE fails.
3605                 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
3606                 (cxx_omp_clause_assign_op): New.
3607                 * cp-tree.h: Declare them.
3608
3609         2005-10-21  Richard Henderson  <rth@redhat.com>
3610
3611                 * decl.c (check_previous_goto_1): Return false if error.
3612                 (check_switch_goto): Likewise.
3613                 (finish_case_label): Don't emit the case label on error.
3614                 * parser.c (struct cp_parser): Revert
3615                 in_switch_statement_p changes.
3616                 (cp_parser_labeled_statement,
3617                 cp_parser_selection_statement): Likewise.
3618                 (cp_parser_begin_omp_structured_block): Don't save...
3619                 (cp_parser_end_omp_structured_block): or restore
3620                 in_switch_statement_p.
3621
3622         2005-10-21  Richard Henderson  <rth@redhat.com>
3623
3624                 * semantics.c (finish_omp_threadprivate): Set
3625                 decl_flags.u2sel when necessary.
3626
3627         2005-10-21  Richard Henderson  <rth@redhat.com>
3628
3629                 * decl.c (poplevel_named_label_1): Restore creation of the
3630                 bad_decls list.
3631                 (decl_jump_unsafe): Check for error_mark_node types.
3632                 (check_goto): Don't check cdtor_label.  Don't use identify_goto.
3633                 * semantics.c (finish_return_stmt): Do check_omp_return before
3634                 converting to cdtor_label goto.
3635
3636         2005-10-21  Richard Henderson  <rth@redhat.com>
3637
3638                 PR c++/24451
3639                 * decl.c (check_omp_return): Return false on error.
3640                 * cp-tree.h (check_omp_return): Update decl.
3641                 * semantics.c (finish_return_stmt): Avoid adding
3642                 return on error.
3643
3644         2005-10-21  Richard Henderson  <rth@redhat.com>
3645
3646                 * cp-tree.h (struct language_function): Remove
3647                 x_named_label_uses.
3648                 Change x_named_labels to a hashtable.
3649                 (check_omp_return): Declare.
3650                 * decl.c (struct named_label_use_entry): Rename from
3651                 named_label_use_list.  Remove label_decl.
3652                 (struct named_label_entry): Rename from
3653                 named_label_list.  Remove old_value and next.  Change
3654                 in_try_scope and in_catch_scope to bool. Add
3655                 in_omp_scope.
3656                 (pop_labels_1): New.
3657                 (pop_labels): Use it.
3658                 (pop_local_label, poplevel_named_label_1): New.
3659                 (poplevel): Use them.
3660                 (named_label_entry_hash, named_label_entry_eq): New.
3661                 (make_label_decl): Create named_labels.  Move label
3662                 creation bits from lookup_label.
3663                 (declare_local_label): Tidy.
3664                 (identify_goto): Split out from ...
3665                 (check_previous_goto_1): Add exited_omp argument.
3666                 Handle omp scopes.
3667
3668                 (use_label): Merge into...
3669                 (check_goto): ... here.  Handle omp scopes.
3670                 (check_omp_return): New.
3671                 (check_previous_gotos): Merge into...
3672                 (define_label): ... here.
3673                 (save_function_data): Remove x_named_label_uses reference.
3674                 (finish_function): Likewise.
3675                 * name-lookup.h (sk_omp): New.
3676                 * name-lookup.c (begin_scope): Handle it.
3677                 * parser.c (cp_parser_omp_for): Don't create extra
3678                 compound stmt.
3679
3680                 (cp_parser_omp_sections): Likewise.
3681                 * semantics.c (finish_return_stmt): Call check_omp_return.
3682                 (begin_omp_structured_block): Use sk_omp.
3683                 (finish_omp_structured_block): Use do_poplevel.  Don't build a
3684                 MUST_NOT_THROW expression here.
3685                 (begin_omp_parallel, finish_omp_parallel): Don't create extra
3686                 compound statements.
3687
3688         2005-10-21  Diego Novillo  <dnovillo@redhat.com>
3689
3690                 PR 24455
3691                 * cp/cp-tree.h (struct lang_decl_flags): Add field
3692                 threadprivate_p.
3693                 (CP_DECL_IS_THREADPRIVATE): Define.
3694                 * cp/semantics.c (finish_omp_threadprivate): Set.  Do
3695                 not error out if CP_DECL_IS_THREADPRIVATE is set
3696                 already.
3697                 * cp/decl.c (duplicate_decls): Merge
3698                 CP_DECL_THREADPRIVATE_P.
3699
3700         2005-10-20  Richard Henderson  <rth@redhat.com>
3701
3702                 * cp-gimplify.c (cp_gimplify_omp_for): New.
3703                 (cp_gimplify_expr): Call it.
3704                 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
3705                 * parser.c (struct cp_parser): Rename
3706                 in_iteration_statement_p to in_iteration_statement and
3707                 change to unsigned char.  Similarly with
3708                 in_switch_statement.  Update all users.
3709                 (IN_OMP_BLOCK, IN_OMP_FOR): New.
3710                 (cp_parser_labeled_statement): Diagnose case labels
3711                 binding closer to an openmp block nested than the
3712                 switch.
3713                 (cp_parser_jump_statement): Diagnose break and
3714                 continue labels binding closer to an openmp block than
3715                 an iteration or switch.
3716                 (cp_parser_omp_for_loop): Mark in_iteration_statement
3717                 for an omp for.
3718                 (cp_parser_begin_omp_structured_block): New.
3719                 (cp_parser_end_omp_structured_block): New.
3720                 (cp_parser_omp_structured_block): Use them.
3721                 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
3722                 (cp_parser_omp_parallel): Likewise.
3723
3724         2005-10-20  Richard Henderson  <rth@redhat.com>
3725
3726                 * semantics.c (begin_omp_structured_block): New.
3727                 (finish_omp_structured_block): New.
3728                 (begin_omp_parallel, finish_omp_parallel): Use them.
3729                 * parser.c (cp_parser_omp_structured_block): Likewise.
3730                 (cp_parser_omp_for): Likewise.
3731                 (cp_parser_omp_sections_scope): Likewise.
3732                 * cp-tree.h: Declare them.
3733
3734         2005-10-20  Richard Henderson  <rth@redhat.com>
3735
3736                 * parser.c (cp_parser_omp_master): Return the statement.
3737                 (cp_parser_omp_ordered): Likewise.
3738                 (cp_parser_omp_construct): Set the locus for them.
3739
3740         2005-10-19  Richard Henderson  <rth@redhat.com>
3741
3742                 * semantics.c (finish_omp_atomic): Revert to
3743                 uses_template_parms.
3744
3745         2005-10-19  Richard Henderson  <rth@redhat.com>
3746
3747                 * semantics.c (finish_omp_clauses): Avoid
3748                 DECL_THREAD_LOCAL_P on a PARM_DECL.  Remove some
3749                 stub asserts guaranteed to fail.
3750
3751         2005-10-19  Richard Henderson  <rth@redhat.com>
3752
3753                 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
3754                 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
3755                 * parser.c (cp_parser_omp_clause_copyin): Remove.
3756                 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
3757                 Call finish_omp_clauses.
3758                 (cp_parser_omp_clause_if): Don't do error checking here.
3759                 (cp_parser_omp_clause_num_threads): Likewise.
3760                 (cp_parser_omp_clause_schedule): Likewise.
3761                 (cp_parser_omp_atomic): Use finish_omp_atomic.
3762                 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
3763                 Don't decompose assignment statment here.  Use
3764                 finish_omp_for.
3765
3766                 * pt.c (tsubst_omp_clauses): New.
3767                 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
3768                 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
3769                 * semantics.c (finish_omp_clauses): New.
3770                 (begin_omp_parallel, finish_omp_parallel): Know Less about the
3771                 internals of the stmt_list stack.
3772                 (finish_omp_for, finish_omp_atomic): New.
3773
3774         2005-10-18  Jakub Jelinek  <jakub@redhat.com>
3775
3776                 * semantics.c (cxx_omp_predetermined_sharing): New function.
3777                 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
3778                 * cp-objcp-common.h
3779                 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
3780
3781         2005-10-18  Richard Henderson  <rth@redhat.com>
3782
3783                 * parser.c (cp_parser_omp_single): Use make_node and accessors
3784                 instead of build.
3785
3786         2005-10-17  Richard Henderson  <rth@redhat.com>
3787
3788                 * parser.c (cp_parser_omp_for_loop): Handle declarations.
3789
3790         2005-10-12  Richard Henderson  <rth@redhat.com>
3791
3792                 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
3793                 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
3794                 (finish_omp_threadprivate): Declare.
3795                 * parser.c (struct cp_lexer): Add in_pragma.
3796                 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
3797                 when in_pragma.
3798                 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
3799                 (cp_parser_skip_to_end_of_statement): Likewise.
3800                 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
3801                 (cp_parser_skip_to_closing_brace): Likewise.
3802                 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
3803                 (cp_parser_require_pragma_eol): New.
3804                 (cp_parser_statement): Add in_compound argument;
3805                 update all callers.
3806                 Restart if a non-statement pragma seen outside a
3807                 compound.
3808                 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
3809                 (cp_parser_declaration_seq_opt): Likewise.
3810                 (cp_parser_member_specification_opt): Likewise.
3811                 (cp_parser_function_definition_after_decl): Likewise.
3812                 (cp_parser_skip_until_found): Likewise.
3813                 (cp_parser_cache_group): Likewise.
3814                 (enum pragma_omp_clause, cp_parser_omp_clause_name,
3815                 check_no_duplicate_clause,
3816                 cp_parser_omp_var_list_no_open,
3817                 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
3818                 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
3819                 cp_parser_omp_clause_nowait,
3820                 cp_parser_omp_clause_num_threads,
3821                 cp_parser_omp_clause_ordered,
3822                 cp_parser_omp_clause_reduction,
3823                 cp_parser_omp_clause_schedule,
3824                 cp_parser_omp_all_clauses,
3825                 cp_parser_omp_structured_block, cp_parser_omp_atomic,
3826                 cp_parser_omp_barrier, cp_parser_omp_critical,
3827                 cp_parser_omp_flush, cp_parser_omp_for_loop,
3828                 cp_parser_omp_for, cp_parser_omp_master,
3829                 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
3830                 cp_parser_omp_sections, cp_parser_omp_parallel,
3831                 cp_parser_omp_single, cp_parser_omp_threadprivate,
3832                 cp_parser_omp_construct): New.
3833                 (cp_parser_pragma): Handle OpenMP pragmas.
3834                 * semantics.c (finish_omp_threadprivate): New.
3835                 (begin_omp_parallel, finish_omp_parallel): New.
3836
3837         2005-10-11  Richard Henderson  <rth@redhat.com>
3838
3839                 * parser.c (struct cp_token): Add pragma_kind.
3840                 (eof_token): Initialize it.
3841                 (cp_lexer_handle_pragma): Remove.
3842                 (cp_parser_initial_pragma): New.
3843                 (cp_lexer_new_main): Use it.
3844                 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
3845                 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
3846                 (cp_parser_skip_to_pragma_eol): New.
3847                 (cp_parser_error): Use it.
3848                 (pragma_lex): New.
3849
3850         2005-10-09  Richard Henderson  <rth@redhat.com>
3851
3852                 * lex.c (parse_strconst_pragma): Update for c_lex name change.
3853                 (handle_pragma_java_exceptions): Likewise.
3854                 * parser.c (cp_lexer_new_main): Likewise.
3855
3856         2005-10-06  Richard Henderson  <rth@redhat.com>
3857
3858                 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
3859                 (cp_lexer_handle_pragma): Comment out
3860                 cpp_handle_deferred_pragma.
3861
3862         2005-10-01  Richard Henderson  <rth@redhat.com>
3863
3864                 * name-lookup.c (lookup_name): Remove prefer_type argument.
3865                 (lookup_name_prefer_type): New function.
3866                 * name-lookup.h (lookup_name_prefer_type): Declare it.
3867                 * decl.c (lookup_and_check_tag): Use it.
3868                 * pt.c (tsubst_friend_class): Likewise. Update for
3869                 lookup_name change.
3870                 (lookup_template_class, tsubst_copy_and_build): Likewise.
3871
3872 2006-03-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3873
3874         PR c++/15759
3875         * tree.c (bot_manip): Don't call mark_used.
3876
3877 2006-03-02  Mike Stump  <mrs@apple.com>
3878
3879         * decl2.c (import_export_decl): Remove redundant call to
3880         targetm.cxx.key_method_may_be_inline ().
3881
3882 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
3883
3884         * decl.c (start_decl): Use have_global_bss_p when deciding
3885         whether to make the decl common.
3886
3887 2006-03-01  Mike Stump  <mrs@apple.com>
3888
3889         PR darwin/25908
3890         * decl2.c (import_export_decl): Fix ABI breakage on darwin.
3891
3892 2006-02-24  Geoffrey Keating  <geoffk@apple.com>
3893
3894         * except.c (expand_start_catch_block): Handle
3895         flag_use_cxa_get_exception_ptr.
3896
3897 2006-02-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3898
3899         PR c++/26291
3900         * decl.c (grok_op_properties): Check for ellipsis in arguments of
3901         operators.
3902
3903 2006-02-20  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
3904
3905         * Make-lang.in (C++): Remove.
3906         (.PHONY): Remove C++.
3907
3908 2006-02-18  Mark Mitchell  <mark@codesourcery.com>
3909
3910         PR c++/26266
3911         * cp-tree.h (cp_finish_decl): Adjust declaration.
3912         (grokbitfield): Likewise.
3913         (finish_static_data_member_decl): Likewise.
3914         * init.c (constant_value_1): Ensure processing_template_decl when
3915         folding non-dependent initializers for static data members of
3916         dependent types.  Return error_mark_node for erroneous
3917         initailizers.
3918         * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
3919         * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
3920         (cp_finish_decl): Add init_const_expr_p parameter.  Set
3921         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
3922         (finish_decl): Adjust call to cp_finish_decl.
3923         (compute_array_index_type): Robustify.
3924         (start_method): Use finish_decl, not cp_finish_decl.
3925         * rtti.c (emit_tinfo_decl): Likewise.
3926         * except.c (initialize_handler_parm): Adjust call to
3927         cp_finish_decl.
3928         (expand_start_catch_block): Likewise.
3929         * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
3930         * pt.c (instantiate_class_template): Adjust call to
3931         finish_static_data_member_decl.
3932         (tsubst_expr): Use finish_decl, not cp_finish_decl.
3933         (instantiate_decl): Adjust call to cp_finish_decl.
3934         * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
3935         cp_finish_decl.
3936         * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
3937         parameter.
3938         (grokfield): Likewise.
3939         * parser.c (cp_parser_condition): Check for constant initializers.
3940         (cp_parser_init_declarator): Adjust calls to grokfield and
3941         cp_finish_decl.  Don't set
3942         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
3943         (cp_parser_member_declaration): Likewise.
3944         (cp_parser_objc_class_ivars): Likewise.
3945
3946 2006-02-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3947
3948         * call.c (standard_conversion): Return NULL instead of 0.
3949         (build_user_type_conversion_1): Likewise.
3950         (tourney): Likewise.
3951         * decl.c (redeclaration_error_message): Likewise.
3952         * error.c (language_to_string): Likewise.
3953
3954 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3955
3956         * cp-tree.h (warn_hidden): Remove prototype.
3957         * class.c (warn_hidden): Make static.
3958
3959         * cp-tree.h (build_type_conversion): Remove prototype.
3960         * cvt.c (build_type_conversion): Add prototype, make static.
3961
3962         * cp-tree.h (push_tinst_level): Remove prototype.
3963         (pop_tinst_level): Likewise.
3964         * pt.c (push_tinst_level): Add prototype, make static.
3965         (pop_tinst_level): Likewise.
3966
3967 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3968
3969         * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
3970         * typeck.c (unary_complex_lvalue): Likewise.
3971
3972 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3973
3974         * lex.c (parse_strconst_pragma): Return error_mark_node instead of
3975         "(tree)-1" to indicate failure.  Simplify.
3976         (handle_pragma_interface): Test for error_mark_node instead of
3977         "(tree)-1".
3978         (handle_pragma_implementation): Likewise.
3979
3980 2006-02-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3981
3982         PR c++/26151
3983         * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
3984         decl-specifiers.  Remove extra check for duplicate 'friend'.
3985         * decl.c (grokdeclarator): Remove check for duplicate
3986         decl-specifiers.  Set longlong together with long_p.
3987
3988 2006-02-12  Jason Merrill  <jason@redhat.com>
3989
3990         PR c++/24996
3991         * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
3992         TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
3993
3994 2006-02-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
3995
3996         * class.c (debug_class): Remove extern.
3997         (debug_thunks): Likewise.
3998
3999 2006-02-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>