OSDN Git Service

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