1 2007-04-13 Jason Merrill <jason@redhat.com>
4 * call.c (reference_binding): Add c_cast_p parm. If true,
5 add quals to TO as needed to make it reference-compatible.
7 2007-04-11 Jan Hubicka <jh@suse.cz>
9 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
10 that we are not processing template_decl.
12 2007-04-09 Mark Mitchell <mark@codesourcery.com>
15 * class.c (build_base_path): Ensure that the converted pointer has
16 the same cv-qualification as the input.
18 2007-04-09 Paolo Carlini <pcarlini@suse.de>
20 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
22 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
24 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
26 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
27 * tree.c (cp_add_pending_fn_decls): Remove.
28 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
30 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
32 Revert change removing staticp.
34 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
36 * cp-objcp-common.c (cxx_staticp): Remove.
37 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
38 * cp-tree.h (cxx_staticp):
40 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
42 * class.c (check_for_override): Don't remove dllmport attribute
45 2007-04-03 Jakub Jelinek <jakub@redhat.com>
48 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
49 type issue error and return early.
51 2007-03-30 Jason Merrill <jason@redhat.com>
54 * typeck.c (cp_type_readonly): New fn.
55 * cp-tree.h: Declare it.
56 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
57 (cp_finish_decl): Not here.
59 2007-03-31 Richard Guenther <rguenther@suse.de>
61 * optimize.c (maybe_clone_body): Replace splay-tree usage by
64 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
69 * parser.c (declarator_can_be_parameter_pack): New.
70 (cp_parser_template_parameter): Only parse the `...' if the
71 declarator can be a parameter pack.
72 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
74 * pt.c (find_parameter_packs_r): Look into the bounds on integer
75 types (they could be used as array bounds).
76 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
77 (tsubst_pack_expansion): Handle failure to expand parameter
80 2007-03-30 Paolo Carlini <pcarlini@suse.de>
83 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
84 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
85 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
86 (CLASS_TYPE_NON_UNION_P): Add.
87 (struct lang_type_class): Add has_complex_dflt.
88 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
89 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
90 * cp-tree.def: Add TRAIT_EXPR.
91 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
92 * lex.c (struct resword): Add __has_nothrow_assign,
93 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
94 __has_trivial_constructor, __has_trivial_copy,
95 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
96 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
97 __is_pod, __is_polymorphic, __is_union.
98 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
99 (cp_parser_trait_expr): New.
100 * semantics.c (finish_trait_expr, trait_expr_value
101 classtype_has_nothrow_copy_or_assign_p): New.
102 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
104 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
105 * class.c (check_bases, check_field_decl, check_bases_and_members):
106 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
107 * pt.c (uses_template_parms, tsubst_copy_and_build,
108 value_dependent_expression_p, type_dependent_expression_p): Deal with
110 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
112 2007-03-29 Richard Guenther <rguenther@suse.de>
114 * tree.c (cp_walk_subtrees): Do not set input_location.
116 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
119 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
122 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
124 * parser.c (struct cp_parser): Update comment for
125 greater_than_is_operator_p.
126 (cp_parser_primary_expression): In C++0x mode, a cast operator can
127 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
128 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
129 !GREATER_THAN_IS_OPERATOR_P.
130 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
131 `>>' operators that will become two `>' tokens in C++0x.
132 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
133 mode, allowing it to terminate default arguments.
134 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
135 `>>' like two consecutive `>' tokens.
136 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
137 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
138 ends a template argument.
140 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
142 * decl.c (redeclaration_error_message): Complain when redeclaring
143 a friend function with default template arguments (C++0x mode only).
144 * cp-tree.h (check_default_tmpl_args): Declare.
145 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
146 template arguments in function templates. Add support for checking
147 the default template arguments of friend templates.
148 (push_template_decl_real): Fix call to check_default_tmpl_args.
149 (type_unification_real): If a template parameter has not been
150 deduced but provides a default template argument, substitute into
151 that default template argument.
152 * parser.c (cp_parser_init_declarator): When declaring (but not
153 defining!) a function template in C++0x mode, check for default
156 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
159 * decl.c (grokdeclarator): Deal with cv-qualified function type
160 typedefs in the same way for member and non-member functions.
162 2007-03-26 Dirk Mueller <dmueller@suse.de>
164 * parser.c (cp_parser_member_declaration): Pedwarn
165 about stray semicolons after member declarations.
167 2007-03-26 Paolo Carlini <pcarlini@suse.de>
170 * pt.c (instantiate_decl): Set in_system_header.
172 2007-03-22 Mark Mitchell <mark@codesourcery.com>
174 * cp-tree.h (current_tempalte_parms): Improve documentation.
175 * pt.c (current_template_args): Likewise.
178 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
179 not consume tokens when failing.
181 2007-03-22 Jim Wilson <wilson@specifix.com>
182 Mark Mitchell <mark@codesourcery.com>
185 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
186 consistent with FROM.
188 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
190 * error.c (dump_expr): Handle dependent names that designate types.
191 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
193 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
195 * cp-tree.def, parser.c, pt.c: Fix comment typos.
197 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
199 * cvt.c (cp_convert_and_check) : Define.
200 * cp-tree.h (cp_convert_and_check): Declare.
201 * call.c (convert_conversion_warnings): Rename to
202 conversion_null_warnings. The warning for floating-point to
203 integer is handled by convert_and_check in convert_like_real.
204 (convert_like_real): convert_conversion_warnings was renamed as
205 conversion_null_warnings.
206 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
207 overflow and changes of value during conversion.
209 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
212 * parser.c (cp_parser_statement): If 'namespace' is found, this
213 only can be a namespace alias definition, so parse it now.
214 (cp_parser_namespace_alias_definition): if we find an open brace
215 instead of '=', then this is actually a misplaced namespace
218 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
221 * decl.c (cxx_init_decl_processing): Move command-line options
222 processing to c-opts.c.
224 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
226 * ptree.c (cxx_print_type): Use formatting markup for integers
227 when printing template parameter index/level/orig level.
228 (cxx_print_xnode): Ditto.
229 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
230 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
231 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
233 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
234 rather than a HOST_WIDE_INT.
235 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
236 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
238 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
239 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
240 IN_BASE_INITIALIZER bool bitfields.
241 (struct cp_declarator): Make KIND a 4-bit field. Make
242 PARAMETER_PACK_P a bool bitfield just after KIND.
243 * pt.c (uses_parameter_packs): Destroy the pointer set.
244 (make_pack_expansion): Ditto.
245 (check_for_bare_parameter_packs): Ditto.
246 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
248 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
251 * call.c (convert_default_arg): Instead of copying the node,
254 2007-03-15 Dirk Mueller <dmueller@suse.de>
257 * call.c (convert_conversion_warnings): New..
258 (convert_like_real): .. factored out from here.
259 (convert_conversion_warnings): Add warning about
260 false being converted to NULL in argument passing.
262 2007-03-14 Dirk Mueller <dmueller@suse.de>
264 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
265 (finish_do_body): Warn about empty body in do/while statement.
267 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
269 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
271 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
274 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
277 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
279 * cp/repo.c (init_repo): Initialize random_seed saved options.
280 (finish_repo): Adjust.
282 2007-03-13 Mark Mitchell <mark@codesourcery.com>
285 * Make-lang.in (doc/g++.1): Use $< to specify the location from
288 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
290 * decl.c (compute_array_index_type): New warning flag warn_vla.
292 2007-03-12 Mark Mitchell <mark@codesourcery.com>
295 * call.c (convert_default_arg): Copy non-constant arguments.
297 2007-03-11 Mark Mitchell <mark@codesourcery.com>
300 * parser.c (cp_parser_postfix_expression): Disallow compound
301 literals in constant expressions.
304 * semantics.c (finish_typeof): Use unlowered_expr_type.
306 2007-03-10 Mark Mitchell <mark@codesourcery.com>
309 * cp-tree.h (unlowered_expr_type): New function.
310 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
311 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
312 (unlowered_expr_type): New function.
313 (build_unary_op): Disallow predecrements of bool bitfields.
314 * call.c (build_conditional_expr): Use unlowered_expr_type.
315 * pt.c (type_unification_real): Likewise.
317 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
320 * typeck.c (check_return_expr): Check for bare parameter packs.
321 (comptypes): Compare template parameter packs and
322 type pack expansions.
323 * decl.c (grokdeclarator): Deal with the declaration of function
325 (grokparms): Verify that the (optional) function parameter pack is
326 at the end of the parameter list.
327 (xref_basetypes): Handle pack expansions in the base class.
328 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
329 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
330 (NONTYPE_ARGUMENT_PACK): New.
331 (TYPE_PACK_EXPANSION): New.
332 (EXPR_PACK_EXPANSION): New.
333 (ARGUMENT_PACK_SELECT): New.
334 * cp-objcp-common.c (cp_tree_size): Compute size of
335 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
336 ARGUMENT_PACK_SELECT.
337 * error.c (dump_template_argument): Print template argument packs.
338 (dump_template_argument_list): Ditto.
339 (dump_template_parameter): Dump `...' for template type parameter
341 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
342 (dump_parameters): Print function parameter packs.
343 (dump_template_parms): Print template argument packs.
344 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
345 (maybe_warn_variadic_templates): New.
346 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
347 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
348 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
350 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
351 (write_template_arg): Write argument packs as separate arguments.
352 * cp-tree.h (struct template_parm_index_s): Add flag that
353 indicates that the template parameter is actually a parameter
355 (struct tree_argument_pack_select): New.
356 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
357 (union lang_tree_node): Add argument_pack_select.
358 (FUNCTION_PARAMETER_PACK_P): New.
359 (PACK_EXPANSION_P): New.
360 (PACK_EXPANSION_PATTERN): New.
361 (SET_PACK_EXPANSION_PATTERN): New.
362 (PACK_EXPANSION_PARAMETER_PACKS): New.
363 (ARGUMENT_PACK_P): New.
364 (ARGUMENT_PACK_ARGS): New.
365 (SET_ARGUMENT_PACK_ARGS): New.
366 (ARGUMENT_PACK_INCOMPLETE_P): New.
367 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
368 (TEMPLATE_PARM_PARAMETER_PACK): New.
369 (TEMPLATE_TYPE_PARAMETER_PACK): New.
370 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
371 (ARGUMENT_PACK_SELECT_INDEX): New.
372 (ARGUMENT_PACK_SELECT_ARG): New.
373 (struct cp_declarator): Add parameter_pack_p flag.
374 (maybe_warn_variadic_templates): Declare.
375 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
376 indicate a template parameter pack.
377 (uses_parameter_packs): Declare.
378 (template_parameter_pack_p): Declare.
379 (template_parms_variadic_p): Declare.
380 (make_pack_expansion): Declare.
381 (check_for_bare_parameter_packs): Declare.
382 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
383 sizeof... expressions.
384 (pp_cxx_expression): Print pack expansions and non-type argument
386 (pp_cxx_exception_specification): Print pack expansions.
387 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
388 (pp_cxx_ctor_initializer): Print pack expansions.
389 (pp_cxx_type_id): Print pack expansions.
390 (pp_cxx_template_argument_list): Print argument packs.
391 (pp_cxx_template_parameter): Print ellipsis for template parameter
393 * pt.c (comp_template_parms): Compare template parameter packs.
394 (template_parameter_pack_p): New.
395 (template_parms_variadic_p): New.
396 (template_args_variadic_p): New.
397 (make_ith_pack_parameter_name): New.
398 (struct find_parameter_pack_data): New.
399 (find_parameter_packs_r): New.
400 (uses_parameter_packs): New.
401 (make_pack_expansion): New.
402 (check_for_bare_parameter_packs): New.
403 (expand_template_argument_pack): New.
404 (reduce_template_parm_level): Propagate parameter pack flag.
405 (process_template_parm): Add is_parameter_pack parameter to state
406 when the parameter is actually a parameter pack. Create template
407 parameter packs when is_parameter_pack is true.
408 (current_template_args): The argument for a template parameter
409 pack is an argument pack containing a single pack expansion.
410 (process_partial_specialization): When checking that non-type
411 argument expressions do not involve template parameters, loop over
412 the arguments in argument packs separately.
413 (push_template_decl_real): Check that the type of the declaration
414 does not have any bare parameter packs. Check that primary
415 templates have no more than one parameter pack, and that it comes
416 at the end of the template parameter list.
417 (convert_template_argument): Handle coercions for pack expansion
418 expressions by coercing the pattern then rebuilding the expansion.
419 (coerce_template_parms): When coercing the arguments for a
420 variadic template, pack "extra" arguments into an argument pack.
421 (coerce_template_template_parms): Cannot coerce between parameter
422 packs and non-pack parameters.
423 (template_args_equal): Compare PACK_EXPANSION_P expressions.
424 (comp_template_args): Expand all template arguments packs before
425 comparing template argument lists.
426 (mangle_class_name_for_template): Make argument packs as separate
428 (for_each_template_parm_r): No need to handle BASELINK.
429 (instantiate_class_template): Handle pack expansions in the base
431 (tsubst_pack_expansion): New.
432 (tsubst_template_args): Handle substitutions of argument packs and
433 pack expansion into template argument lists.
434 (tsubst_decl): Expand function parameter packs into separate
436 (tsubst_arg_types): Expand a type pack expansion into separate
438 (tsubst_exception_specification): Handle pack expansions in
439 exception specifiers.
440 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
441 replacing a template parameter with its argument. If we encounter
442 a substitution for an argument pack, just return the parameter
444 (tsubst_copy): sizeof(X...) returns the number of elements in
445 parameter pack X. See through ARGUMENT_PACK_SELECT when the
446 PARM_DECL is a parameter pack.
447 (tsubst_expr): Expression pack expansions and argument packs
448 cannot show up here; they will all be handled through function
449 calls, sizeof, and template argument lists.
450 (tsubst_copy_and_build): sizeof(X...) returns the number of
451 elements in parameter pack X. Handle pack expansions in TREE_LIST
452 and CONSTRUCTOR nodes.
453 (fn_type_unification): Handle "incomplete" explicit template
454 argument lists that specify some of the arguments for a template
456 (type_unification_real): Unify arguments against pack expansions.
457 (template_parm_level_and_index): New, helper function.
458 (unify_pack_expansion): New.
459 (unify): Unify argument packs on an argument-by-argument basis,
460 handling variadic argument packs as well.
461 (more_specialized_fn): Handle unification of function parameter
462 packs. All things being equal, prefer non-variadic function
463 templates to variadic function templates.
464 (more_specialized_class): Prefer the variadic class template
465 partial specialization that binds fewer arguments to a parameter
467 (regenerate_decl_from_template): Expand function parameter packs
468 into separate parameters.
469 (instantiate_decl): Ditto.
470 (tsubst_initializer_list): Handle pack expansions for base-class
472 (dependent_type_p_r): Determine dependent types in argument packs
474 (value_dependent_expression_p): Determine value-dependence of
475 non-type argument packs.
476 (dependent_template_arg_p): Handle argument packs.
477 * semantics.c (finish_cond): Check for bare parameter packs.
478 (finish_expr_stmt): Ditto.
479 (finish_for_expr): Ditto.
480 (finish_switch_cond): Ditto.
481 (finish_mem_initializers): Ditto.
482 * name-lookup.c (arg_assoc_type): Handle pack expansions and
484 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
485 * parser.c (make_declarator): Declarator is not an expansion.
486 (make_pointer_declarator): Transfer parameter pack flag to outer
488 (make_reference_declarator): Ditto.
489 (make_ptrmem_declarator): Ditto.
490 (make_call_declarator): Ditto.
491 (make_array_declarator): Ditto.
492 (cp_parser_postfix_expression): Allow pack expansion expressions
493 in the argument list for a call expression.
494 (cp_parser_parenthesized_expression_list): Add new parameter
495 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
496 into separate arguments."
497 (cp_parser_new_placement): Allow pack expansion expressions.
498 (cp_parser_new_initializer): Ditto.
499 (cp_parser_mem_initializer_list): Allow ellipsis to create a
500 base-class initializer expansion.
501 (cp_parser_mem_initializer): Ditto.
502 (cp_parser_template_parameter_list): Keep track of whether the
503 template parameter is a template parameter pack.
504 (cp_parser_template_parameter): Parse the ellipsis to indicate a
505 template parameter pack.
506 (cp_parser_type_parameter): Ditto.
507 (cp_parser_template_argument_list): Parse the ellipsis to indicate
509 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
510 this declarator is a parameter pack.
511 (cp_parser_parameter_declaration): The ellipsis does not end the
512 parameter declaration, because it might be a parameter pack. Parse
513 the ellipsis to indicate a parameter pack.
514 (cp_parser_initializer): Allow pack expansions.
515 (cp_parser_initializer_list): Allow ellipsis to create an
516 initializer expansion.
517 (cp_parser_base_clause): Allow ellipsis to create a base specifier
519 (cp_parser_type_id_list): Allow ellipsis to create an exception
521 (cp_parser_attribute_list): Don't allow pack expansions.
522 (cp_parser_functional_cast): Allow pack expansions.
523 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
524 compute the length of a parameter pack.
525 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
526 end a template argument.
527 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
528 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
531 2007-03-09 Dirk Mueller <dmueller@suse.de>
533 * cp/call.c (build_new_op): Call warn_logical_operator.
535 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
538 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
541 * pt.c (any_template_arguments_need_structural_equality_p):
544 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
546 * decl.c (grokdeclarator): Disable warnings for anonymous
549 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
551 * typeck2.c (readonly_error): Always emit a hard error.
552 Remove last argument.
553 * cp-tree.h (readonly_error): Adjust prototype.
554 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
555 * typeck.c (build_unary_op): Likewise.
556 (build_modify_expr): Likewise.
558 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
561 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
563 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
566 * parser.c (struct cp_parser): New IN_IF_STMT.
567 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
568 returning if parsing the body of an 'if' statement or issuing an
569 error and continuing.
570 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
572 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
574 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
577 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
580 2007-03-02 Geoffrey Keating <geoffk@apple.com>
582 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
583 Objective-C++. Don't exit early if -shared-libgcc needs to be
586 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
588 * typeck.c (common_base_type): Delete unused function.
590 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
592 * Make-lang.in: Add dummy lang.install-pdf target.
594 2007-03-01 Simon Baldwin <simonb@google.com>
597 * decl.c (check_tag_decl): Added new warning for typedef ignored
598 when it precedes an otherwise valid non-typedef declaration.
600 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
602 * typeck.c (build_function_call): Store converted arguments
603 in a stack-allocated array instead of building a list.
604 (convert_arguments): Store arguments in the array passed in as an
605 argument, and return the actual number of arguments.
606 * call.c (build_call): Delete, and replace with...
607 (build_call_n, build_call_a): New.
608 (build_op_delete_call): Rewrite to avoid constructing argument lists.
609 (build_over_call): Store converted arguments in a stack-allocated
610 array instead of building a list.
611 (build_cxx_call): Pass arguments in an array instead of as a list.
612 (build_java_interface_fn_ref): Rewrite to avoid constructing
614 * tree.h: Update declarations to reflect above changes.
615 * method.c (use_thunk): Use a stack-allocated array to hold
616 the arguments instead of a list.
617 * rtti.c (throw_bad_cast): Update call to cxx_call.
618 (throw_bad_typeid): Likewise.
619 (build_dynamic_cast_1): Likewise.
620 * init.c (build_builtin_delete_call): Use build_call_n.
621 * decl.c (expand_static_init): Likewise.
622 * except.c (cp_protect_cleanup_actions): Likewise.
623 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
624 (gimplify_must_not_throw_expr): Likewise.
625 (cxx_omp_apply_fn): Use build_call_a.
627 2007-02-26 Mark Mitchell <mark@codesourcery.com>
629 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
630 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
632 2007-02-25 Mark Mitchell <mark@codesourcery.com>
634 * cp-tree.h (static_ctors): Remove.
635 * cp-tree.h (static_dtors): Likewise.
636 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
637 refactoring of tree_map hierarchy.
638 (decl_shadowed_for_var_insert): Likewise.
639 * semantics.c (expand_body): Use c_expand_body.
640 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
641 * decl2.c (static_ctors): Remove.
642 (static_dtors): Likewise.
643 (generate_ctor_or_dtor_function): Pass NULL_TREE to
644 objc_generate_static_init_call. Do not call static_[cd]tors.
645 (generate_ctor_and_dtor_functions_for_priority): Do not check for
647 (cp_write_global_declarations): Likewise.
649 2007-02-23 Richard Guenther <rguenther@suse.de>
651 * class.c (note_name_declared_in_class): Make declaration
652 changes meaning a pedwarn.
654 2007-02-22 Michael Matz <matz@suse.de>
657 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
658 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
659 dump_function_decl): Guard emitting outer scopes by new flag.
660 * cp-lang.c (cxx_dwarf_name): New function.
661 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
662 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
664 (push_template_decl_real, lookup_template_class): Remove calls
667 2007-02-19 Mark Mitchell <mark@codesourcery.com>
669 * call.c (build_new_method_call): Ensure that explicit calls of
670 destructors have type "void".
672 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
674 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
675 and -Walways-true with -Waddress.
676 * cvt.c (convert_to_void): Replace unconditional warning with
679 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
681 * decl.c, tree.c: Fix comment typos.
683 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
686 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
687 statement expression if we had an error mark node.
689 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
690 Brooks Moses <brooks.moses@codesourcery.com>
691 Lee Millward <lee.millward@codesourcery.com>
693 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
694 Change class to tcc_vl_exp.
696 * call.c (build_call): Use build_call_list instead
698 (build_over_call): Likewise.
699 (build_new_method_call): Use build_min_non_dep_call_list
700 instead of build_min_non_dep.
702 * error.c (dump_call_expr_args): New function.
703 (dump_aggr_init_expr_args): New function.
704 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
705 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
707 * cvt.c (convert_to_void): Use build_call_array instead
708 of build3; use new AGGR_INIT_EXPR accessor macros.
710 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
711 instead of TREE_CODE_LENGTH.
713 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
714 AGGR_INIT_EXPR accessor macros.
716 * cp-gimplify.c (cp_gimplify_init_expr): Use
717 AGGR_INIT_EXPR_SLOT to set the slot operand.
719 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
720 (AGGR_INIT_EXPR_SLOT): New macro.
721 (AGGR_INIT_EXPR_ARG): New macro.
722 (aggr_init_expr_nargs): New macro.
723 (AGGR_INIT_EXPR_ARGP): New macro.
724 (aggr_init_expr_arg_iterator): New.
725 (init_aggr_init_expr_arg_iterator): New.
726 (next_aggr_init_expr_arg): New.
727 (first_aggr_init_expr_arg): New.
728 (more_aggr_init_expr_args_p): New.
729 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
730 (stabilize_aggr_init): New declaration.
731 (build_min_non_dep_call_list): Likewise.
733 * tree.c (process_aggr_init_operands): New function.
734 (build_aggr_init_array) New function.
735 (build_cplus_new): Update to use new CALL_EXPR and
736 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
737 build_aggr_init_array.
738 (build_min_non_dep_call_list) New function.
739 (build_min_nt): Assert input code parameter is not a variable
740 length expression class.
741 (build_min, build_min_non_dep): Likewise.
742 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
743 to check for equality instead of recursing. Handle tcc_vl_exp
745 (stabilize_call): Update to only handle CALL_EXPRs, not
746 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
747 (stabilize_aggr_init): New function.
748 (stabilize_init): Use it.
750 * cxx-pretty-print.c (pp_cxx_postfix_expression)
751 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
752 AGGR_INIT_EXPR accessor macros and argument iterators.
754 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
755 build_vl_exp. Iterate through the operands, recursively
757 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
758 CALL_EXPR accessor macros.
759 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
760 tree code classes. Use TREE_OPERAND_LENGTH instead of
763 * semantics.c (finish_call_expr): Use build_nt_call_list
765 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
766 accessor macros. Use build_call_array to construct the
767 CALL_EXPR node instead of build3
769 * decl2.c (build_offset_ref_call_from_tree): Use
770 build_nt_call_list and build_min_non_dep_call_list instead
771 of build_min_nt and build_min_non_dep.
773 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
774 Use build_nt_call_list instead of build_min_nt.
776 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
779 * call.c (build_conditional_expr): Improve error message.
781 2007-02-13 Dirk Mueller <dmueller@suse.de>
783 * friend.c (do_friend): Annotate warning about friend
784 declarations in templates with OPT_Wnon_template_friend.
785 Convert informal message from warning() to inform().
787 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
788 Mark Mitchell <mark@codesourcery.com>
791 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
792 instantiations for variables.
794 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
797 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
798 Check warn_unused_value just once.
800 2007-02-11 Mark Mitchell <mark@codesourcery.com>
803 * pt.c (determine_specialization): Use skip_artificial_parms_for.
804 (fn_type_unificiation): Likewise.
805 (get_bindings): Likewise.
807 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
810 * decl.c (finish_function): Use DECL_REPLACEABLE.
811 * tree.c (cp_cannot_inline_tree_fn): Likewise.
813 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
815 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
817 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
819 * decl.c (grokvardecl): Don't error if !have_tls.
820 (grokdeclarator): Likewise.
821 * parser.c (cp_parser_omp_threadprivate): Likewise.
823 2007-02-07 Jakub Jelinek <jakub@redhat.com>
826 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
827 parameters and result decls in omp clauses.
828 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
831 2007-02-05 Dirk Mueller <dmueller@suse.de>
834 * parser.c (cp_parser_class_specifier): Always initialize bases.
836 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
838 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
839 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
840 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
842 * semantics.c (finish_omp_atomic): Store a whole expression node
843 in operand 1, and integer_zero_node in operand 0, for dependent
844 OMP_ATOMIC. Rewrite to make flow easier to understand.
846 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
848 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
850 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
852 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
853 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
855 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
857 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
858 keyword warning to -Wc++0x-compat.
860 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
862 * decl.c (grokdeclarator): Update documentation.
864 2007-02-02 Jakub Jelinek <jakub@redhat.com>
867 * decl.c (grokdeclarator): If __thread is used together with
868 a storage class other than extern and static, clear thread_p
869 after issuing diagnostics and fall through to checking the
872 2007-01-30 Roger Sayle <roger@eyesopen.com>
874 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
875 calculating the size of an array (to avoid recursive errors).
877 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
880 * typeck.c (build_binary_op): Fix logic for warning. Move warning
882 * call.c (convert_like_real): Don't warn when converting to
885 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
887 * decl.c (pop_label): Replace warning with call to
888 warn_for_unused_label.
890 2007-01-28 Andrew Pinski <pinskia@gmail.com>
893 * semantics.c (finish_pseudo_destructor_expr): Check the
894 destrutor name by calling check_dtor_name.
896 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
898 * lex.c (D_CPP0X): Rename.
900 (reswords): D_CPP0X -> D_CXX0X.
901 (init_reswords): Ditto.
902 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
903 of C++0x keywords as identifiers.
905 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
908 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
911 2007-01-23 Ian Lance Taylor <iant@google.com>
913 * typeck.c (convert_for_assignment): Only warn about a = b = c
914 when converting to bool.
916 2007-01-23 Roger Sayle <roger@eyesopen.com>
918 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
920 * typeck.c (ignore_overflows): Remove the remaining uses of
921 TREE_CONSTANT_OVERFLOW.
923 2007-01-20 Jan Hubicka <jh@suse.cz>
925 * decl2.c (start_objects, start_static_storage_duration_function):
926 Do not make the functions uninlinable.
928 2007-01-17 Ian Lance Taylor <iant@google.com>
930 * class.c (add_method): Call VEC_reserve_exact rather than passing
931 a negative size to VEC_reserve.
933 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
936 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
938 2007-01-10 Mark Mitchell <mark@codesourcery.com>
941 * decl.c (make_typename_type): If the qualified name is not a
942 type, issue an error.
943 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
946 2007-01-08 Geoffrey Keating <geoffk@apple.com>
948 * rtti.c: Include target.h.
949 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
950 don't emit typeinfo for fundamental types as weak.
951 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
953 2007-01-08 Richard Guenther <rguenther@suse.de>
955 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
957 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
959 * call.c (standard_conversion): Pass flag to
960 vector_types_convertible_p to disallow emission of note.
961 * typeck.c (convert_for_assignment): Pass flag to
962 vector_types_convertible_p to allow emission of note.
963 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
964 to disallow emission of note.
966 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
969 * typeck.c (build_binary_op): Call overflow_warning if
970 TREE_OVERFLOW_P is true for the result and not for any of the
973 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
976 * class.c (add_method): Don't wait until template
977 instantiation time to complain about duplicate methods.
979 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
982 * semantics.c (finish_unary_op_expr): Warn only if result
983 overflowed and operands did not.
985 2007-01-05 Ian Lance Taylor <iant@google.com>
987 * typeck.c (build_binary_op): Warn about comparing a non-weak
990 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
992 * pt.c (tsubst): Propagate the need for structural equality checks
993 when reducing the level of template parameters.
995 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
997 * pt.c: Fix a comment typo.
999 2006-01-02 Ian Lance Taylor <iant@google.com>
1001 * semantics.c (maybe_convert_cond): Optionally warn when using an
1002 assignment as a condition.
1003 * typeck.c (convert_for_assignment): Optionally warn about
1004 assigning the result of an assignment to a bool.
1006 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1008 * pt.c (canonical_template_parms): Correct typo in comment.
1010 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1012 * typeck.c (structural_comptypes): Renamed from "comptypes".
1013 (comptypes): Use canonical type information to perform fast type
1014 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1015 canonical type comparison returns the same results as we would see
1016 from the current, structural check. Support COMPARE_STRUCTURAL
1017 when we need structural checks.
1018 * decl.c (typename_compare): Fix comment.
1019 (build_typename_type): TYPENAME_TYPE nodes require structural
1020 equality checks, because they resolve different based on the
1022 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1023 require structural equality checks (for now).
1024 (build_ptrmemfunc_type): Build the canonical pointer to member
1026 (compute_array_index_type): Whenever we build a new index type
1027 to represent the size of an array in a template, we need to mark
1028 this index type as requiring structural equality. This goes for
1029 arrays with value-dependent sizes with the current ABI, or all
1031 * tree.c (cplus_array_hash): New.
1032 (struct cplus_array_info): New.
1033 (cplus_array_compare): New.
1034 (cplus_array_htab): New.
1035 (build_cplus_array_type_1): Use a hash table to cache the array
1036 types we build. Build the canonical array type for each array
1038 (cp_build_qualified_type_real): When building a cv-qualified array
1039 type, use the hash table of array types and build canonical array
1041 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1042 use structural equality (for now).
1043 * cp-tree.h (COMPARE_STRUCTURAL): New.
1044 * pt.c (canonical_template_parms): New.
1045 (canonical_type_parameter): New.
1046 (process_template_parm): Find the canonical type parameter.
1047 (lookup_template_class): When we have named the primary template
1048 type, set the canonical type for our template class to the primary
1049 template type. If any of the template arguments need structural
1050 equality checks, the template class needs structural equality
1052 (tsubst): When reducing the level of a template template
1053 parameter, we require structural equality tests for the resulting
1054 parameter because its template parameters have not had their types
1055 canonicalized. When reducing a template type parameter, find the
1056 canonical reduced type parameter.
1057 (any_template_arguments_need_structural_equality_p): New.
1059 2006-12-31 Simon Martin <simartin@users.sourceforge.net>
1062 * parser.c (cp_parser_primary_expression): Return error_mark_node when
1063 a statement-expression is found outside of a function body.
1065 2006-12-28 Kazu Hirata <kazu@codesourcery.com>
1067 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P, TYPE_FUNCTION_SCOPE_P):
1070 * decl2.c: Fix a comment typo.
1072 2006-12-21 Andrew Pinski <pinskia@gmail.com>
1075 * decl.c (cxx_builtin_function): Only copy the decl if adding
1076 it to the std namespace.
1078 2006-12-21 Andrew Pinski <pinskia@gmail.com>
1081 * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
1083 2006-12-22 Kazu Hirata <kazu@codesourcery.com>
1085 * decl.c: Fix a coment typo.
1087 2006-12-18 Ian Lance Taylor <iant@google.com>
1089 * decl.c (start_preparsed_function): Add support for
1090 -Wmissing-declarations.
1092 2006-12-16 Simon Martin <simartin@users.sourceforge.net>
1095 * cp-tree.h (struct deferred_access_check): New structure to represent a
1096 deferred access check. It replaces the previous representation as a tree.
1097 (get_deferred_access_checks): Return a vector of struct
1098 deferred_access_check instead of a tree list.
1099 (perform_access_checks): Take a vector of struct deferred_access_check
1100 instead of a tree list.
1101 * semantics.c (struct deferred_access): Store the deferred access checks
1102 as a vector of struct deferred_access_check instead of a tree list.
1103 (push_deferring_access_checks): Handle the change in struct
1105 (get_deferred_access_checks): Likewise.
1106 (pop_to_parent_deferring_access_checks): Likewise.
1107 (perform_or_defer_access_check): Likewise.
1108 (perform_access_checks): Take a vector of struct deferred_access_check
1109 instead of a tree list.
1110 * parser.c (struct tree_check): New structure to store various data
1111 associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
1112 (struct cp_token): Changed the value field to be a union with a pointer to
1113 a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
1114 tokens and a tree field for all other tokens.
1115 (eof_token): Adjusted due to the change in struct cp_token.
1116 (cp_lexer_get_preprocessor_token): Likewise.
1117 (cp_lexer_purge_token): Likewise.
1118 (cp_lexer_purge_tokens_after): Likewise.
1119 (cp_lexer_print_token): Likewise.
1120 (cp_parser_error): Likewise.
1121 (cp_parser_identifier): Likewise.
1122 (cp_parser_string_literal): Likewise.
1123 (cp_parser_primary_expression): Likewise.
1124 (cp_parser_unqualified_id): Likewise.
1125 (cp_parser_parenthesized_expression_list): Likewise.
1126 (cp_parser_storage_class_specifier_opt): Likewise.
1127 (cp_parser_function_specifier_opt): Likewise.
1128 (cp_parser_type_specifier): Likewise.
1129 (cp_parser_simple_type_specifier): Likewise.
1130 (cp_parser_initializer_list): Likewise.
1131 (cp_parser_member_specification_opt): Likewise.
1132 (cp_parser_attribute_list): Likewise.
1133 (cp_parser_objc_expression): Likewise.
1134 (cp_parser_objc_protocol_qualifiers): Likewise.
1135 (cp_parser_objc_selector): Likewise.
1136 (cp_parser_objc_declaration): Likewise.
1137 (cp_parser_objc_statement): Likewise.
1138 (cp_parser_omp_clause_name): Likewise.
1139 (cp_parser_omp_clause_default): Likewise.
1140 (cp_parser_omp_clause_schedule): Likewise.
1141 (cp_parser_omp_parallel): Likewise.
1142 (cp_parser_initial_pragma): Likewise.
1143 (pragma_lex): Likewise.
1144 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1145 (cp_parser_nested_name_specifier_opt): Likewise.
1146 Use cp_token::u::tree_check_value to save the token's value, the
1147 associated deferred checks and its qualifying scope.
1148 (cp_parser_template_id): Likewise.
1149 (cp_parser_template_declaration_after_export): Adjusted the call to
1150 get_deferred_access_checks.
1151 (cp_parser_init_declarator): Take the access checks as a vector of struct
1152 deferred_access_check instead of a tree list.
1153 (cp_parser_single_declaration): Likewise.
1154 (cp_parser_perform_template_parameter_access_checks): Likewise.
1155 (cp_parser_simple_declaration): Adjusted the call to
1156 cp_parser_init_declarator.
1157 (cp_parser_explicit_specialization): Adjusted the call to
1158 cp_parser_single_declaration.
1160 2006-12-13 Ian Lance Taylor <iant@google.com>
1164 * parser.c (cp_parser_expression_stack_entry): Add field
1166 (cp_parser_binary_expression): Track tree code of left hand side
1167 of expression. Use it when calling build_x_binary_op.
1168 (cp_parser_selection_statement): Add if_p parameter. Change all
1169 callers. Warn about ambiguous else.
1170 (cp_parser_statement): Add if_p parameter. Change all callers.
1171 (cp_parser_implicitly_scoped_statement): Likewise.
1172 * typeck.c (build_x_binary_op): Add parameters arg1_code and
1173 arg2_code. Change all callers. Call warn_about_parentheses.
1174 * cp-tree.h (build_x_binary_op): Update declaration.
1176 2006-12-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1178 * decl.c (build_enumerator): Update error message to match C
1181 2006-12-11 Jan Hubicka <jh@suse.cz>
1183 * decl2.c (var_finalized_p): Update for renamed varpool functions.
1185 2006-12-09 Zack Weinberg <zackw@panix.com>
1187 * parser.c (yydebug, enum pragma_omp_clause): Delete.
1189 2006-12-07 Mark Mitchell <mark@codesourcery.com>
1192 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
1193 (explicit_class_specialization_p): Declare.
1194 * pt.c (explicit_class_specialization_p): New function.
1195 * parser.c (cp_parser_init_declarator): Check correct number of
1196 template parameters for in-class function definitions.
1197 (cp_parser_check_declrator_template_parameters): Stop looking for
1198 template classes when we find an explicit specialization.
1200 2006-12-07 Lee Millward <lee.millward@codesourcery.com>
1203 * cp_parser_elaborated_type_specifier: Check
1204 the return value of check_elaborated_type_specifier.
1206 2006-12-06 Mark Mitchell <mark@codesourcery.com>
1209 * parser.c (cp_parser_init_declarator): Reject initialization of
1212 2006-12-05 Mark Mitchell <mark@codesourcery.com>
1215 * decl2.c (check_member_template): Move check for member
1216 templates in local classes to ...
1217 * parser.c (cp_parser_template_declaration_after_export):
1221 * decl.c (check_array_designated_initializer): New function.
1222 (maybe_deduce_size_from_array_init): Use it.
1223 (reshape_init_array): Likewise.
1225 2006-12-05 Aldy Hernandez <aldyh@redhat.com>
1227 Merge from gimple-tuples-branch.
1229 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
1231 * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
1232 (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
1233 (cxx_omp_clause_copy_ctor): Same.
1234 (cxx_omp_clause_assign_op): Same.
1236 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
1238 * cp-tree.h (union lang_tree_node): Gimple statements do not
1240 (TREE_INDIRECT_USING): Look in base.
1242 2006-12-04 Jan Hubicka <jh@suse.cz>
1244 * cp-objcp-common.c (cp_expr_size): Return NULL in the case
1247 2006-12-04 Mark Mitchell <mark@codesourcery.com>
1250 * pt.c (tsubst_decl): Disallow variables of function type.
1253 * call.c (add_builtin_candidate): Do not permit NULL pointer
1254 constants to be compared with template parameters.
1256 2006-12-04 Eric Botcazou <ebotcazou@adacore.com>
1258 * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
1259 Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1261 2006-12-03 Richard Henderson <rth@redhat.com>
1262 Andrew Pinski <pinskia@gmail.com>
1265 * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
1267 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
1270 * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
1272 2006-12-02 Kazu Hirata <kazu@codesourcery.com>
1274 * name-lookup.c: Follow spelling conventions.
1276 2006-12-01 Geoffrey Keating <geoffk@apple.com>
1278 * decl.c (poplevel): Check DECL_INITIAL invariant.
1279 (duplicate_decls): Preserve DECL_INITIAL when eliminating
1280 a new definition in favour of an old declaration.
1281 (start_preparsed_function): Define and document value of
1282 DECL_INITIAL before and after routine.
1283 (finish_function): Check DECL_INITIAL invariant.
1285 (cp_parser_function_definition_from_specifiers_and_declarator):
1286 Skip duplicate function definitions.
1288 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1291 * typeck.c (type_after_usual_arithmetic_conversions):
1292 Fix assertion for vector types.
1293 (build_binary_op): Use temporary for inner type of vector types.
1295 2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
1298 * typeck.c (build_binary_op): Fix pointer to member function
1299 comparison for ptrmemfunc_vbit_in_delta targets.
1301 2006-12-01 Dirk Mueller <dmueller@suse.de>
1304 * decl.c (grokdeclarator): Warn for type qualifiers on return
1305 type for non-dependent types.
1306 * pt.c (tsubst_function_type): Warn for type qualifiers on
1307 return type for dependent types.
1309 2006-11-30 Geoffrey Keating <geoffk@apple.com>
1311 * rtti.c (get_tinfo_decl): Handle return value from
1312 pushdecl_top_level_and_finish.
1314 2006-11-29 Lee Millward <lee.millward@codesourcery.com>
1317 * parser.c (cp_parser_class_head): Move processing
1318 of any base classes to...
1319 (cp_parser_class_specifier) ...here. Take an extra
1320 tree* parameter for any base classes. Only process
1321 them if the opening brace was found.
1323 2006-11-28 Jakub Jelinek <jakub@redhat.com>
1326 * decl.c (grokfndecl): Check main's type after applying
1327 attributes, not before.
1329 2006-11-27 Mark Mitchell <mark@codesourcery.com>
1331 * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
1332 entries for a primary construction virtual table.
1334 2006-11-26 Mark Mitchell <mark@codesourcery.com>
1337 * parser.c (cp_parser): Add in_function_body.
1338 (cp_parser_new): Initialize it.
1339 (cp_parser_primary_expression): Use parser->in_function_body
1340 instead of at_function_scope_p.
1341 (cp_parser_asm_definition): Likewise.
1342 (cp_parser_direct_declarator): Likewise.
1343 (cp_parser_class_specifier): Clear parser->in_function_body.
1344 (cp_parser_constructor_declarator_p): Use parser->in_function_body
1345 instead of at_function_scope_p.
1346 (cp_parser_function_body_after_declarator): Set
1347 parser->in_function_body.
1349 2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
1351 * cp-tree.def (STATIC_ASSERT): New.
1352 * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
1353 * error.c (dump_decl): Handle STATIC_ASSERT.
1354 * cp-tree.h (STATIC_ASSERT_CONDITION): New.
1355 (STATIC_ASSERT_MESSAGE): New.
1356 (STATIC_ASSERT_SOURCE_LOCATION): New.
1357 (struct tree_static_assert): New.
1358 (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
1359 (union lang_tree_node): Add static_assertion.
1360 (finish_static_assert): Declare.
1361 * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
1362 (pp_cxx_declaration): Handle STATIC_ASSERT.
1363 * pt.c (instantiate_class_template): Handle
1364 STATIC_ASSERT members.
1365 (tsubst_expr): Handle STATIC_ASSERT statements.
1366 * semantics.c (finish_static_assert): New.
1367 * lex.c (D_CPP0X): New.
1368 (reswords): Add static_assert keyword.
1369 (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
1370 * parser.c (cp_parser_block_declaration): Parse static
1372 (cp_parser_static_assert): New.
1373 (cp_parser_member_declaration): Parse static assertions.
1375 2006-11-21 Jakub Jelinek <jakub@redhat.com>
1378 * decl.c (cp_finish_decl): Check for value dependent brace enclosed
1382 * cp-tree.h (WANT_VECTOR): Define.
1383 (WANT_ARITH): Add WANT_VECTOR.
1384 * cvt.c (build_expr_type_conversion): Handle vector types.
1385 * typeck.c (build_unary_op): Add WANT_VECTOR to
1386 build_expr_type_conversion flags.
1388 2006-11-20 Simon Martin <simartin@users.sourceforge.net>
1391 * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
1392 extra argument that represents the declaration to use to print
1393 potential error messages.
1394 * init.c (build_offset_ref): Adjusted the call to
1395 perform_or_defer_access_check.
1396 * class.c (alter_access, resolve_address_of_overloaded_function):
1398 * decl.c (make_typename_type, make_unbound_class_template): Likewise.
1399 * search.c (lookup_member): Likewise.
1400 * friend.c (add_friend): Likewise.
1401 * parser.c (cp_parser_template_id,
1402 cp_parser_pre_parsed_nested_name_specifier): Likewise.
1403 * semantics.c (finish_non_static_data_member,
1404 check_accessibility_of_qualified_id, finish_id_expression): Likewise.
1405 (pop_to_parent_deferring_access_checks, perform_access_checks,
1406 perform_or_defer_access_check): Adjusted the call to enforce_access.
1407 * call.c (enforce_access): Use the new extra argument to build the
1409 (build_op_delete_call): Adjusted the call to
1410 perform_or_defer_access_check.
1411 (build_over_call): Likewise.
1413 2006-11-16 Dirk Mueller <dmueller@suse.de>
1415 * name-lookup.c (begin_scope): Use GGC_CNEW instead of
1418 2006-11-13 Roger Sayle <roger@eyesopen.com>
1420 * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
1421 base type info initializer has the correct type.
1423 2006-11-13 Mark Mitchell <mark@codesourcery.com>
1426 * pt.c (coerce_template_parms): Do not skip_evaluation while
1427 substituting template arguments.
1429 2006-11-11 Richard Guenther <rguenther@suse.de>
1431 * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
1432 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1434 2006-11-03 Roger Sayle <roger@eyesopen.com>
1436 * call.c (build_op_delete_call): Test user-visible type against
1437 size_type_node, instead of against the internal type, sizetype.
1438 * class.c (type_requires_array_cookie): Likewise.
1439 * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
1440 handling of TYPE_IS_SIZETYPE.
1441 * typeck.c (type_after_usual_arithmetic_conversions): Remove
1442 special case handling of TYPE_IS_SIZETYPE.
1443 (comptypes): Likewise.
1445 2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
1447 * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
1448 if targetm.cxx.use_atexit_for cxa_atexit.
1449 (start_cleanup_fn): Likewise.
1450 (register_dtor_fn): Likewise.
1452 2006-09-25 Geoffrey Keating <geoffk@apple.com>
1454 * decl2.c (cp_write_global_declarations): Rename from
1456 * cp-lang.c (finish_file): Don't call cp_finish_file.
1457 * cp-tree.h (cp_write_global_declarations): Rename from
1459 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
1460 cp_write_global_declarations.
1462 2006-10-31 Geoffrey Keating <geoffk@apple.com>
1464 * name-lookup.c (get_anonymous_namespace_name): New.
1465 (push_namespace_with_attribs): Use get_anonymous_namespace_name.
1466 * decl2.c (start_objects): Update for rename of
1467 get_file_function_name_long.
1469 2006-10-30 Dirk Mueller <dmueller@suse.de>
1472 * decl.c (grokdeclarator): Duplicate diagnostic message
1473 for easier translation.
1474 * decl.c (grokdeclarator): Fix line-wrapping.
1476 2006-10-30 Dirk Mueller <dmueller@suse.de>
1479 * decl.c (grokfndecl): Use check_main_parameter_types.
1481 2006-10-30 Dirk Mueller <dmueller@suse.de>
1484 * decl.c (grokfndecl): Duplicate warning message for
1487 2006-10-30 Dirk Mueller <dmueller@suse.de>
1489 * typeck.c (build_unary_op): Fix indenting. Use G_().
1491 2006-10-29 Dirk Mueller <dmueller@suse.de>
1494 * typeck.c (build_unary_op): Duplicate warning message
1495 for easier translation.
1497 2006-10-29 Dirk Mueller <dmueller@suse.de>
1500 * typeck.c (build_array_ref): Warn for char subscriptions
1503 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
1505 * decl.c: Fix a comment typo.
1507 2006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1510 * typeck.c (build_unary_op): Use same_type_p when comparing to
1513 2006-10-29 Dirk Mueller <dmueller@suse.de>
1516 * typeck.c (build_binary_op): Duplicate warning message
1517 for better translation.
1519 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
1521 * decl.c (builtin_function_1): Move common code to
1522 add_builtin_function.
1523 (builtin_function): Rename to cxx_builtin_function.
1524 Change the signature.
1525 * call.c: Include langhooks.h.
1526 (build_java_interface_fn_ref): Replace calls to
1527 builtin_function with add_builtin_function.
1528 * Make-lang.in (cp/call.o): Depend on langhooks.h.
1529 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
1530 cxx_builtin_function.
1531 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
1532 Change the signature.
1534 2006-10-22 Nathan Sidwell <nathan@codesourcery.com>
1537 * rtti.c (tinfo_base_init): The type info string is always global.
1539 2006-10-20 Lee Millward <lee.millward@codesourcery.com>
1540 Mark Mitchell <mark@codesourcery.com>
1543 * decl2.c (grokbitfield): Detect invalid non-integral
1544 types earlier when possible.
1546 2006-10-18 Mark Shinwell <shinwell@codesourcery.com>
1549 * typeck2.c (digest_init): Raise error upon attempts to
1550 initialize arrays with variables.
1552 2006-10-17 Lee Millward <lee.millward@codesourcery.com>
1555 * cp-tree.h (xref_basetypes): Return bool instead of void.
1556 * decl.c (xref_basetypes): Adjust definition. Return false
1557 if the class bases are invalid.
1558 * parser.c (cp_parser_class_head): Check the return value
1559 from xref_basetypes.
1561 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1564 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
1568 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
1570 (cp_parser_constructor_declarator_p): Use it.
1571 (cp_parser_check_type_definition): Return a value indicating
1572 whether or not the definition is valid.
1573 (cp_parser_enum_specifier): Skip invalid enum definitions.
1575 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1578 * typeck2.c (build_functional_cast): Don't zero-initialize
1579 non-PODs; instead, call their constructors.
1580 * method.c (synthesize_method): Always build mem-initializers, if
1581 we're synthesizing the default constructor.
1583 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1586 * decl.c (reshape_init_class): Move check for designated
1588 * parser.c (cp_parser_initializer_list): ... here.
1589 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
1591 2006-10-16 Mark Mitchell <mark@codesourcery.com>
1594 * typeck2.c (process_init_constructor_array): Reword comment.
1595 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
1599 * parser.c (cp_parser_using_declaration): Stop parsing when
1600 something goes wrong with an access declaration.
1603 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
1604 types when their sizes are required. Refine test for VLAs.
1607 * parser.c (cp_parser_template_argument): Don't consider "&var" a
1608 possible constant-expression.
1609 * pt.c (convert_nontype_argument): Refine handling of arguments of
1612 2006-10-13 Mark Mitchell <mark@codesourcery.com>
1615 * parser.c (function_declarator_p): New function.
1616 (cp_parser_init_declarator): Use it.
1617 (cp_parser_member_declaration): Likewise.
1619 2006-10-12 Mark Mitchell <mark@codesourcery.com>
1622 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
1623 variably modified types.
1625 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
1628 * decl.c (start_decl): Return error_mark_node if a
1629 function is initialized like a variable.
1630 (check_var_type): If a variable of field is declared void,
1631 set the type to error_mark_node.
1632 (grokdeclarator): Check the return type of check_var_type.
1633 * class.c (finish_struct_1): Robustify.
1635 2006-10-11 Mark Mitchell <mark@codesourcery.com>
1638 * decl.c (check_initializer): Issue errors about trying to
1639 initialize arrays whose elements have variable size.
1641 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
1644 * cp-tree (struct cp_decl_specifier_seq): Rename to
1645 conflicting_specifiers_p
1646 * parser.c (cp_parser_set_storage_class): Set
1647 conflicting_specifiers_p for the input decl specifier
1648 if a typedef specifier is present. Rename uses of
1649 multiple_specifiers_p to conflicting_specifiers_p.
1650 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
1651 class specifier has already been set for this declaration,
1652 set conflicting_specifiers_p to true on the decl_specs.
1653 * decl.c (grokdeclarator): Rename uses of
1654 multiple_specifiers_p to conflicting_specifiers_p.
1656 2006-10-10 Brooks Moses <bmoses@stanford.edu>
1658 * Make-lang.in: Added "c++.pdf" target support.
1660 2006-10-10 Richard Guenther <rguenther@suse.de>
1662 PR rtl-optimization/29323
1663 * decl.c (finish_function): Set TREE_NOTHROW only for
1664 functions that bind local.
1666 2006-10-09 Richard Henderson <rth@redhat.com>
1668 Revert emutls patch.
1670 2006-10-04 Richard Henderson <rth@redhat.com>
1671 Jakub Jelinek <jakub@redhat.com>
1673 * decl.c (grokvardecl): Don't error if !have_tls.
1674 (grokdeclarator): Likewise.
1675 * parser.c (cp_parser_omp_threadprivate): Likewise.
1677 2006-10-03 Mark Mitchell <mark@codesourcery.com>
1680 * friend.c (do_friend): Improve comments; add assertion.
1681 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
1682 typenames for qualified names used in declarations, even when
1683 caching qualified name lookup.
1686 * decl2.c (grokfield): Don't handle access declarations here.
1687 * parser.c (cp_parser_using_declaration): Handle access
1689 (cp_parser_block_declaration): Adjust calls to
1690 cp_parser_using_declaration.
1691 (cp_parser_member_declaration): Likewise. Use
1692 cp_parser_using_declaration to look for access_declarations.
1694 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1697 * init.c (build_new): Check for invalid init.
1699 2006-10-02 Mark Mitchell <mark@codesourcery.com>
1702 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
1703 not try to actually evaluate sizeof for a VLA type.
1705 2006-10-01 Mark Mitchell <mark@codesourcery.com>
1708 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
1709 * semantics.c (baselink_for_fns): Build a baselink, even when
1710 processing a template.
1713 * parser.c (cp_parser_postfix_dot_deref_expression): Use
1714 BASELINK_ACCESS_BINFO as the qualifying scope when calling
1715 adjust_result_of_qualified_name_lookup.
1717 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
1721 * cp-tree.h (redeclare_class_template): Adjust declaration
1722 to return bool instead of void.
1723 * pt.c (redeclare_class_template): Update definition.
1724 Return false on error.
1725 * decl.c (xref_tag): Return error_mark_node if
1726 redeclare_class_template returned false.
1729 * cp-tree.h (begin_specialization): Return bool
1731 * pt.c (check_specialization_scope): Likwise.
1732 Adjust comment. Return false if a specialization
1733 isn't permitted in the current scope.
1734 (begin_specialization): Use the return value of
1735 check_specialization_scope.
1736 * parser.c (cp_parser_explicit_specialization): If
1737 begin_specialization returned false, skip the rest
1738 of the specialization.
1740 2006-09-21 Mark Mitchell <mark@codesourcery.com>
1743 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
1746 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
1749 * decl.c (shadow_tag): Return error_mark_node
1750 if maybe_process_partial_specialization failed.
1753 * decl.c (grokdeclarator): Return error_mark_node on
1754 declaration with two or more data types.
1756 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
1759 * class.c (check_for_override): Remove dllimport from virtual
1762 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
1765 * parser.c (cp_parser_labeled_statement): Return nothing. Do
1766 not take in_statement_expr and in_compound as arguments. Rename
1767 to cp_parser_label_for_labeled_statement. Parse only the label,
1769 (cp_parser_statement): Parse the statement of a labeled-statement
1770 from here, using tail recursion.
1772 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
1775 * init.c (build_zero_init): If we have an error mark node for
1776 the array size, return.
1778 2006-09-10 Mark Mitchell <mark@codesourcery.com>
1781 * cp-objcp-common.c (cxx_staticp): New function.
1782 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
1783 * cp-tree.h (cxx_staticp): New function.
1785 2006-09-09 Jason Merrill <jason@redhat.com>
1788 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
1790 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1793 * parser.c (cp_parser_skip_until_found): Rename to
1794 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
1795 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
1796 Reorganize. Adjust comment.
1797 (cp_parser_template_declaration_after_export): Adjust call.
1798 (cp_parser_enclosed_template_argument_list): Likewise.
1800 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
1803 * init.c (build_new_1): Build a distinct type copy
1804 for the array type that was returned from
1805 build_cplus_array_type.
1807 2006-09-07 Jason Merrill <jason@redhat.com>
1810 * cvt.c (convert_to_void): Enable previous change.
1813 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
1816 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
1819 * pt.c (fold_non_dependent_expr): Make sure expr is not
1820 dereferenced if it is NULL.
1822 2006-09-06 Zak Kipling <zak@transversal.com>
1825 * decl.c (make_rtl_for_nonlocal_decl),
1826 (start_preparsed_function): Don't use lbasename on
1827 input_filename when calling get_fileinfo.
1828 * semantics.c (begin_class_definition): Likewise.
1829 * lex.c (cxx_make_type): Likewise.
1830 (handle_pragma_interface): Call get_fileinfo on input_filename,
1831 not on the parameter to the directive.
1833 2006-09-06 Mark Mitchell <mark@codesourcery.com>
1836 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
1840 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
1843 2006-09-06 Jason Merrill <jason@redhat.com>
1846 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
1847 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
1848 * tree.c (build_cplus_new): Set it.
1851 * cvt.c (convert_to_void): Replace a subexpression with no side
1852 effects with void_zero_node.
1853 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
1854 (get_first_fn): Ditto.
1855 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
1857 2006-09-05 Jason Merrill <jason@redhat.com>
1860 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
1861 where the name is a type used incorrectly.
1864 * typeck.c (maybe_warn_about_returning_address_of_local): Look
1865 through COMPONENT_REF and ARRAY_REF.
1868 * name-lookup.c (do_class_using_decl): Try to find the base even
1869 if bases_dependent_p.
1870 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
1873 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
1875 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
1877 PR 23287 Revert my 2006-09-01 patch.
1878 * parser.c: Reverted.
1881 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
1887 * parser.c (cp_parser_template_parameter_list): Add
1888 invalid template parameters to the parameter list as
1891 2006-09-02 Jakub Jelinek <jakub@redhat.com>
1894 * except.c (build_throw): Only set current_function_returns_abnormally
1895 if cfun is not NULL.
1898 * repo.c (repo_file): Remove.
1899 (open_repo_file, reopen_repo_file_for_write): Return fopened
1900 FILE * instead of setting global repo_file variable.
1901 (init_repo): Adjust caller.
1902 (finish_repo): Likewise. Return instead of goto out before
1903 reopen_repo_file_for_write has been called.
1905 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
1908 * semantics.c (finish_call_expr): Add assert.
1909 * name-lookup.c (lookup_arg_dependent): Check we found an overload
1913 * parser.c (cp_parser_id_expression): Add member_p
1914 argument. Update all callers.
1915 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
1916 the object's scope, if valid.
1917 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
1919 (cp_parser_postfix_dot_deref_expression): Set object_scope.
1920 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
1922 2006-08-30 Jason Merrill <jason@redhat.com>
1925 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
1926 the fields have been processed.
1928 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
1931 * call.c (build_x_va_arg): Remove the reference type
1932 from the type before creating the pointer type.
1934 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
1937 * except.c (expand_start_catch_block): Use correct types for bitwise
1940 2006-08-28 Jason Merrill <jason@redhat.com>
1943 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
1944 fields can't be packed.
1947 * cvt.c (convert_to_void): Don't automatically load from volatiles
1948 of TREE_ADDRESSABLE type.
1950 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1953 * cp-tree.h (maybe_process_partial_specialization): Return
1954 tree instead of void.
1955 * parser.c (cp_parser_class_head): Use return value of
1956 maybe_process_partial_specialization.
1957 * pt.c (maybe_process_partial_specialization): Return error_mark_node
1958 for broken specializations, TYPE otherwise. Check for template
1959 template parameters.
1961 2006-08-27 Mark Mitchell <mark@codesourcery.com>
1964 * pt.c (register_specialization): Return error_mark_node for
1965 specialization-after-instantiation.
1966 * decl2.c (mark_used): Mark the main function used when one of its
1969 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
1972 * class.c (check_field_decls): Don't issue error about
1973 local classes containing static data members.
1975 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
1978 * parser.c (struct cp_token): Add input_file_stack_index.
1979 (eof_token): Update.
1980 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
1981 (cp_lexer_set_source_position_from_token): Restore input file
1984 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
1989 * pt.c (process_template_parm): Store invalid template
1990 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
1991 (push_inline_template_parms_recursive): Check for template
1992 parameters having a TREE_VALUE of error_mark_node rather than
1993 check the parameter itself.
1994 (mangle_class_name_for_template): Likewise.
1995 (comp_template_parms): When comparing the individual template
1996 parameters, return 1 if either is error_mark_node.
1997 (current_template_args): Robustify.
1998 (redeclare_class_template): Likewise.
2000 2006-08-26 Mark Mitchell <mark@codesourcery.com>
2003 * class.c (resolve_address_of_overloaded_function): Add
2004 access_path parameter. Perform access checks.
2005 (instantiate_type): Adjust call to
2006 resolve_address_of_overloaded_function. Remove unnecessary code.
2007 * tree.c (is_overloaded_fn): Document. Return 2 when there are
2008 acutally multiple functions.
2009 (really_overloaded_fn): Use is_overloaded_fn.
2010 * mangle.c (write_expression): Handle BASELINKs.
2011 * cp-tree.h (really_overloaded_fn): Return bool.
2012 (baselink_for_fns): Declare.
2013 * search.c (lookup_member): Check access for single static
2015 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
2016 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
2017 * semantics.c (finish_call_expr): Use baselink_for_fns.
2018 (baselink_for_fns): New function.
2019 (finish_id_expression): Use it.
2020 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
2023 * pt.c (tsubst): Issue errors about attempts to create VLAs at
2024 template-instantiation time.
2026 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2029 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
2030 template parameters. Improve error message for template type
2034 * cp-tree.h (grok_op_properties): Return bool instead of void.
2035 * decl.c (grokfndecl): Discard invalid operator declarations.
2036 (copy_fn_p): Revert change for PR 27547.
2037 (grok_op_properties): Return error status (true on success).
2038 * pt.c (tsubst_decl): Discard invalid operator declarations.
2040 2006-08-25 Mark Mitchell <mark@codesourcery.com>
2043 * decl.c (grokdeclarator): Disallow declarations with qualified
2044 names in local scopes.
2046 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
2049 * decl.c (make_typename_type): Only try and resolve it when
2050 context is not dependent. Refactor.
2051 * decl2.c (check_classfn): Push to class scope before looking for
2054 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
2057 * g++spec.c (lang_specific_driver): Always check if we need to
2058 swallow a space-separated arg to '-x'.
2059 * lang-specs.h: Don't create ouput files for '-xc++-header'
2062 2006-08-23 Jason Merrill <jason@redhat.com>
2065 * pt.c (push_template_decl_real): A friend template with class
2066 scope isn't primary.
2068 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
2071 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
2072 Move -fno-rtti check to be more specific.
2074 2006-08-22 Jason Merrill <jason@redhat.com>
2077 * call.c (build_over_call): Don't make a copy here if build_call
2080 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
2083 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
2086 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
2089 * parser.c (cp_parser_postfix_expression): Make sure that the
2090 saved value for parser->type_definition_forbidden_message is
2091 restored before returning to avoid an invalid free().
2093 2006-08-22 Jason Merrill <jason@redhat.com>
2096 * typeck.c (merge_types): If either of the types have the right
2097 attributes, return that one.
2099 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
2100 doing this to class types.
2101 * typeck.c (original_type): Deal with type quals properly.
2103 2006-08-21 Jason Merrill <jason@redhat.com>
2106 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
2107 just leave the expression as it is.
2108 (finish_stmt_expr): If the statement-expression has class type,
2109 wrap it in a TARGET_EXPR.
2110 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
2112 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
2114 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
2117 * decl.c (duplicate_decls): Return early if either
2118 newdecl or olddecl is error_mark_node.
2121 * decl.c (grokdeclarator): Return early after
2122 issuing diagnostic about an incomplete type.
2125 * tree.c (decl_anon_ns_mem_p): Robustify.
2126 * decl2.c (determine_visibility): Likewise.
2128 2006-08-20 Mark Mitchell <mark@codesourcery.com>
2131 * tree.c (cast_valid_in_integral_constant_expression_p): New
2133 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
2134 * pt.c (tsubst_expr): Add integral_constant_expression_p
2136 (fold_non_dependent_expr): Adjust callers of
2137 tsubst_{expr,copy_and_build}.
2138 (tsubst_friend_function): Likewise.
2139 (tsubst_template_arg): Likewise.
2140 (tsubst_default_argument): Likewise.
2141 (tsubst_decl): Likewise.
2143 (tsubst_omp_clasuses): Likewise.
2144 (regenerate_decl_fromp_template): Likewise.
2145 (instantiate_decl): Likewise.
2146 (tsubst_initializer_list): Likewise.
2147 (tsubst_enum): Likewise.
2148 (tsubst_expr): Use RECUR throughout.
2149 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
2150 invalid casts in integral constant expressions.
2151 * parser.c (cp_parser_postfix_expression): Use
2152 cast_valid_in_integral_constant_expression_p.
2153 (cp_parser_cast_expression): Likewise.
2154 (cp_parser_functional_cast): Likewise.
2157 * pt.c (tsubst_qualified_id): Do not strip references from
2160 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2163 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
2165 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
2166 for valid type-names.
2167 (cp_parser_unqualified_id): Fix error handling for destructors.
2170 * decl.c (xref_tag): Improve error message. Return early on error.
2173 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
2175 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
2178 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
2180 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
2183 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
2184 perform_integral_promotions for non integral type.
2186 2006-08-16 Jason Merrill <jason@redhat.com>
2189 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
2190 if arg is a function.
2192 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2195 * init.c (build_new): Return early on invalid placement.
2197 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
2200 * pt.c (process_template_parm): Robustify.
2202 2006-08-14 Steve Ellcey <sje@cup.hp.com>
2206 * operators.def: Remove <?, ?>, <?=, and >?= operators.
2207 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
2208 (cp_parser_warn_min_max): Remove.
2210 2006-08-11 Jason Merrill <jason@redhat.com>
2213 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
2214 attributes applied to a TYPENAME_TYPE.
2216 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
2219 * pt.c (coerce_template_parms): Copy across the
2220 invalid template arguments to the new template inner arguments.
2221 (retrieve_specialization): Robustify.
2224 * pt.c (coerce_template_template_parms): Robustify.
2227 * error.c (dump_template_parms): Robustify.
2230 * pt.c (redeclare_class_template): Robustify.
2233 * pt.c (type_unification_real): Robustify.
2235 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
2238 * decl.c (start_decl): Return error_mark_node if a
2239 diagnostic was issed for an invalid typedef initialization.
2241 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2244 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
2245 when parsing destructor names.
2248 * decl.c (duplicate_decls): Call check_default_args here.
2249 (start_preparsed_function): Do not call check_default_args.
2250 * name-lookup.c (pushdecl_maybe_friend): Only call
2251 check_default_args if duplicate_decls got bypassed.
2253 2006-08-02 Richard Guenther <rguenther@suse.de>
2257 2006-07-05 Richard Guenther <rguenther@suse.de>
2258 Andrew Pinski <pinskia@gcc.gnu.org>
2261 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2262 top level qualifiers for pointer type comparisons.
2264 2006-08-02 Mark Mitchell <mark@codesourcery.com>
2267 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
2269 2006-07-31 Mark Mitchell <mark@codesourcery.com>
2272 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
2273 (stabilize_call): Tweak documentation.
2274 (stabilize_init): Only call stabilize_call for calls.
2276 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2279 * decl2.c (check_classfn): Remove early return.
2280 * search.c (lookup_member): Return NULL with bad type.
2282 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2285 * decl.c (check_initializer): Check for 1 initializer on scalar types.
2287 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
2290 * pt.c (tsubst_copy_and_build): Mark used enum types.
2291 * semantics.c (finish_id_expression): Likewise.
2293 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2296 * decl.c (grokdeclarator): Check whether "long" or "short" was
2297 specified for non-integral types.
2299 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2301 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2303 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
2307 * pt.c (process_template_parm) Store invalid template
2308 parameters as error_mark_node in the paramater list.
2309 (push_inline_template_parms_recursive): Handle invalid
2310 template parameters.
2311 (comp_template_parms): Likewise.
2312 (check_default_tmpl_arg): Likewise.
2313 (coerce_template_template_parms): Likewise.
2314 (mangle_class_name_for_template): Likewise.
2315 (tsubst_template_parms): Likewise.
2316 * error.c (dump_template_argument_list): Likewise.
2318 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
2320 * cp-tree.h: Fix a comment typo.
2322 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2325 * decl.c (grokdeclarator): Return error_mark_node after invalid
2328 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
2331 * decl.c (grokvardecl): Use FROB_CONTEXT.
2332 * pt.c (register_specialization): Likewise.
2334 2006-07-23 Mark Mitchell <mark@codesourcery.com>
2337 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
2338 * name-lookup.c (unqualified_namespace_lookup): There is no way to
2339 have a hidden name in non-namespace scopes.
2340 * pt.c (tsubst_friend_class): Look for hidden names.
2341 * decl.c (lookup_and_check_tag): Fix typo in comment.
2343 * semantics.c (finish_compound_literal): Fix typo in comment.
2345 2006-07-21 Jason Merrill <jason@redhat.com>
2347 * decl2.c (determine_visibility): Don't propagate visibility from
2349 (constrain_class_visibility): Don't warn in system headers.
2350 Don't warn about pointer fields.
2352 2006-07-20 Mike Stump <mrs@apple.com>
2354 * decl2.c (determine_visibility_from_class): Don't use hidden
2355 visibility for explicit instantiations.
2357 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2360 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
2361 valid decls. Cleanup.
2364 * semantics.c (check_template_template_default_arg): Simplify
2367 2006-07-20 Jason Merrill <jason@redhat.com>
2370 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
2371 const variables with implicit internal linkage.
2372 * tree.c (decl_linkage): Only return lk_external if it's set.
2375 * decl2.c (constrain_visibility): Ignore the anonymous namespace
2376 for extern "C" decls.
2377 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
2379 * decl2.c (constrain_visibility): Remove specified and reason
2380 parameters. Don't touch decls that already have explicit visibility.
2381 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
2383 (determine_visibility_from_class): Reverse sense of
2384 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
2385 (constrain_class_visibility): Only complain about member visibility
2386 if the member type is another class. Don't change visibility of the
2389 2006-07-19 Mark Mitchell <mark@codesourcery.com>
2392 * decl.c (layout_var_decl): Don't call push_local_name here.
2393 (initialize_artificial_var): Assert artificiality.
2394 (cp_finish_decl): Call push_local_name here.
2396 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2399 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
2402 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2405 * semantics.c (check_accessibility_of_qualified_id): Robustify.
2408 * pt.c (tsubst_decl): Handling substitutions into a static data
2409 member from within the scope of the tempalte itself.
2411 2006-07-18 Lee Millward <lee.millward@gmail.com>
2414 * method.c (locate_copy): Check for non_reference
2415 returning error_mark_node.
2418 * decl.c (duplicate_decls): Return error_mark_node
2419 on ambiguous declaration.
2421 2006-07-18 Steve Ellcey <sje@cup.hp.com>
2424 * search.c (adjust_result_of_qualified_name_lookup): Change
2425 assert to part of if statement.
2427 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2430 * decl.c (reshape_init_class): Return error_mark_node on error.
2432 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2435 * decl2.c (check_classfn): Return NULL_TREE on error.
2437 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2440 * name-lookup.c (pushdecl_maybe_friend): Return early on
2442 * except.c (expand_start_catch_block): Use error_mark_node instead
2443 of NULL_TREE for invalid decls.
2444 * parser.c (cp_parser_exception_declaration): Return error_mark_node
2445 on invalid catch parameter. Simplify.
2447 2006-07-16 Jakub Jelinek <jakub@redhat.com>
2450 * decl2.c (note_vague_linkage_var): Removed.
2451 (finish_static_data_member_decl): Add decl to pending_statics vector
2452 directly. Do it even for non-public decls.
2454 2006-07-15 Lee Millward <lee.millward@gmail.com>
2457 * decl2.c (acceptable_java_type): Robustify. Use
2458 proper Boolean return type instead of return 1.
2459 (check_java_method): Don't issue error about
2460 type not being an acceptable Java parameter if
2461 it's error_mark_node.
2464 * parser.c (cp_parser_elaborated_type_specifier):
2465 Return early if an invalid type was detected.
2467 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2470 * parser.c (cp_parser_check_decl_spec): New function.
2471 (cp_parser_decl_specifier_seq): Factor out check for repeated
2472 decl-specifiers into cp_parser_check_decl_spec. Use it.
2473 (cp_parser_type_specifier_seq): Use it.
2476 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
2480 * decl2.c (cplus_decl_attributes): Check for invalid decls.
2482 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2485 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
2486 * decl2.c (grokfield): Likewise.
2488 2006-07-12 Geoffrey Keating <geoffk@apple.com>
2490 * decl2.c (determine_visibility): Don't change visibility of
2491 function locals because of -fvisibility-inlines-hidden.
2493 2006-07-12 Jason Merrill <jason@redhat.com>
2496 * semantics.c (note_decl_for_pch): Don't premangle templates.
2498 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
2500 * typeck.c (string_conv_p): Remove spurious quotation mark in
2503 2006-07-07 Lee Millward <lee.millward@gmail.com>
2504 Andrew Pinski <pinskia@gmail.com>
2507 * decl.c (define_label): Return error_mark_node on error.
2508 * semantics.c (finish_label_stmt): Don't call
2509 add_stmt for invalid labels.
2511 2006-07-06 Jason Merrill <jason@redhat.com>
2514 * decl2.c (finish_static_data_member_decl): Don't assert
2517 2006-07-05 Jason Merrill <jason@redhat.com>
2521 * class.c (check_field_decls): Check TYPE_PACKED after
2522 stripping array types.
2523 (finish_struct_bits): Don't copy TYPE_SIZE here.
2526 * friend.c (is_friend): Fix DR 45 implementation.
2528 2006-07-05 Richard Guenther <rguenther@suse.de>
2529 Andrew Pinski <pinskia@gcc.gnu.org>
2532 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2533 top level qualifiers for pointer type comparisons.
2535 2006-07-01 Jason Merrill <jason@redhat.com>
2538 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
2541 2006-06-30 Jason Merrill <jason@redhat.com>
2544 * call.c (build_new_method_call): Force evaluation of the
2545 instance pointer, not the object.
2547 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
2549 * decl2.c: Fix a comment typo.
2551 2006-06-30 Jason Merrill <jason@redhat.com>
2554 * decl2.c (grokfield): Only try to treat the decl as an access
2555 declaration if the scope is a class.
2557 2006-06-29 Jason Merrill <jason@redhat.com>
2564 * decl2.c (determine_visibility): Overhaul.
2565 (determine_visibility_from_class): Likewise.
2566 (min_vis_r, type_visibility, constrain_visibility): New fns.
2567 (constrain_visibility_for_template): Likewise.
2568 (constrain_class_visibility): Likewise.
2569 * decl.c (cp_finish_decl): Call determine_visibility for function
2571 * name-lookup.c (pushtag): Call determine_visibility.
2572 * decl.c (duplicate_decls): Don't copy visibility from template to
2574 * pt.c (check_explicit_specialization): Likewise.
2575 (lookup_template_class, tsubst_decl): Call determine_visibility.
2576 * class.c (finish_struct_1): Call constrain_class_visibility.
2581 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
2583 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
2584 (cp_parser_enum_specifier): Likewise.
2585 (cp_parser_elaborated_type_specifier): Apply attributes if this
2586 declares only the class.
2587 (cp_parser_class_specifier): Apply leading attributes immediately.
2588 * semantics.c (begin_class_definition): Add attributes parameter,
2589 apply them to the type.
2593 * tree.c (decl_anon_ns_mem_p): New function.
2594 * cp-tree.h: Declare it.
2595 * decl2.c (determine_visibility): Make anonymous namespace
2597 (min_vis_r, constrain_visibility): Likewise.
2598 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
2600 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
2602 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
2603 on anonymous namespaces.
2605 2006-06-28 Jason Merrill <jason@redhat.com>
2608 * pt.c (convert_template_argument): Pass all template arguments
2609 on to coerce_template_template_parms.
2611 2006-06-25 Lee Millward <lee.millward@gmail.com>
2612 Mark Mitchell <mark@codesuorcery.com>
2615 * decl2.c (grokbitfied): Remove check for grokdeclarator
2616 returning NULL_TREE, instead check for error_mark_node
2617 to indicate failure.
2618 * decl.c (grokdeclarator): Adjust block comment.
2620 2006-06-25 Lee Millward <lee.millward@gmail.com>
2623 * mangle.c (mangle_conv_op_name_for_type): Check for
2625 * name-lookup.c (push_class_level_binding): Robustify.
2626 (do_class_using_decl): Return early if name is error_mark_node.
2628 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2631 * name-lookup.c (pushtag): Return if we have error_mark_node.
2633 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2636 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
2638 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2641 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
2642 arguments. Fix comment.
2645 * init.c (build_new_1): Handle error_mark_nodes returned by
2646 build_java_class_ref.
2647 (build_java_class_ref): Do not abort compilation, but return
2648 error_mark_node. Improve error message. Fix indentation.
2650 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
2653 * decl.c (start_decl): Check that dllimports are not initialized.
2655 2006-06-22 Lee Millward <lee.millward@gmail.com>
2658 * typeck2.c (build_m_component_ref): Use error_operand_p.
2661 * decl.c (grokdeclarator): Return error_mark_node on
2662 invalid uses of the scope resolution operator.
2664 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2667 * pt.c (determine_specialization): Check for invalid decls.
2670 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
2674 * rtti.c (get_tinfo_decl_dynamic): Robustify.
2676 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2679 * init.c (push_base_cleanups): Skip members with invalid types.
2680 * typeck.c (build_class_member_access_expr): Robustify.
2682 2006-06-19 Mark Mitchell <mark@codesourcery.com>
2684 * pt.c (instantiate_template): Fix typo in comment.
2686 2006-06-19 Richard Guenther <rguenther@suse.de>
2688 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
2689 power-of-two token vector size.
2691 2006-06-16 Mark Mitchell <mark@codesourcery.com>
2694 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
2698 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
2702 * decl.c (have_extern_spec): Remove.
2703 (start_decl): Do not check have_extern_spec.
2704 (start_function): Likewise.
2705 * cp-tree.h (have_extern_spec): Remove.
2706 * parser.c (cp_parser_linkage_specification): Don't set
2708 (cp_parser_init_declarator): Likewise.
2709 (cp_parser_parameter_declaration): Do not treat parameters as
2710 within the scope of an unbraced linkage specification.
2712 2006-06-15 Mark Mitchell <mark@codesourcery.com>
2715 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
2717 * pt.c (unify): Use it.
2720 * call.c (build_conditional_expr): Robustify.
2723 * pt.c (instantiate_template): Set processing_template_decl to
2724 zero while performing substitutions.
2726 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2729 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
2730 identify destructors.
2731 (cp_parser_nested_name_specifier_opt): Remove invalid
2733 (cp_parser_template_id): Refine heuristic for determining whether
2734 we are entering a scope.
2737 * parser.c (cp_parser_declarator): Robustify.
2740 * pt.c (tsubst_expr): Use finish_omp_atomic.
2741 (value_dependent_expression_p): All CALL_EXPRs are dependent.
2742 * semantics.c (finish_omp_atomic): Rework to use standard
2743 paradigms for handling non-dependent expressions.
2745 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2747 * typeck.c (build_modify_expr): Tidy diagnostic message.
2749 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2752 * typeck.c (build_modify_expr): Disallow array assignment.
2754 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2756 * cp-tree.def: Fix typo.
2758 2006-06-13 Mark Mitchell <mark@codesourcery.com>
2761 * decl.c (decls_match): Allow an extern "C" variable declarations
2762 from different namespaces to match.
2763 (duplicate_decls): Disallow redeclaring a variable with a
2764 different linkage specification.
2766 2006-06-13 Jakub Jelinek <jakub@redhat.com>
2769 * cp-tree.h (cxx_int_tree_map): New struct.
2770 (struct language_function): Add extern_decl_map field.
2771 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
2772 to cp_function_chain->extern_decl_map hash table instead of
2773 copying over DECL_UID.
2774 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
2776 (cp_genericize_r): Remap DECL_EXTERN local decls using
2777 cp_function_chain->extern_decl_map hash table.
2778 * decl.c (finish_function): Clear extern_decl_map.
2780 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2783 * semantics.c (finish_offsetof): Handle pseudo-destructors.
2786 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
2790 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
2793 2006-06-12 Roger Sayle <roger@eyesopen.com>
2796 * typeck2.c (build_functional_cast): Use cp_convert to construct
2797 non-aggregate initializers instead of the user-level build_c_cast.
2799 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2802 * cp-tree.h (finish_offsetof): Add prototype.
2803 * semantics.c (finish_offsetof): New function.
2804 * parser.c (cp_parser_builtin_offsetof): Call it instead of
2806 * pt.c (tsubst_copy_and_build): Likewise.
2808 2006-06-06 Mark Mitchell <mark@codesourcery.com>
2811 * call.c (standard_conversion): Require that the derived type be
2812 complete when performing a derived-to-base conversion.
2814 2006-06-04 Mark Mitchell <mark@codesourcery.com>
2817 * decl.c (cp_finish_decl): Process initializers for static data
2818 members with non-dependent initializers, even in templates.
2821 * decl.c (maybe_deduce_size_from_array_init): If the declaration
2822 is erroneous, give it an erroneous type.
2823 (layout_var_decl): If the type is erroneous, give up.
2824 (check_initializer): Likewise.
2827 * cp-tree.h (TYPE_OBJ_P): New macro.
2828 (TYPE_PTROB_P): Use it.
2829 (TYPE_REF_OBJ_P): Likewise.
2830 * semantics.c (finish_compound_literal): Do not permit compound
2831 literals of non-object types.
2834 * typeck.c (original_type): Robustify.
2836 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2839 * init.c (constant_value_1): Return decl instead of error_mark_node
2840 for invalid initializers.
2842 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2845 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
2846 on operand of the COND_EXPR for the null pointer check.
2848 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2851 * typeck.c (build_unary_op): Mark the function as being used.
2853 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
2856 * parser.c (cp_parser_initial_pragma): Read one more token for
2857 caller after reading PCH file in.
2859 2006-05-31 Mark Mitchell <mark@codesourcery.com>
2862 * call.c (perform_implicit_conversion): Do not actually perform
2863 conversions in templates.
2866 * call.c (resolve_args): Check for invalid uses of bound
2867 non-static member functions.
2868 * init.c (build_offset_ref): Return error_mark_node for errors.
2871 * decl.c (reshape_init): Robustify.
2872 (reshape_init_array_1): Likewise.
2874 2006-05-30 Mark Mitchell <mark@codesourcery.com>
2877 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
2878 "friend" specifiers that do not appear in class scopes.
2881 * class.c (check_bitfield_decl): Ensure that all bitfields have
2884 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
2886 * pt.c (convert_nontype_argument): Fix a typo in an error
2889 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2891 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
2892 spelling conventions.
2894 2006-05-24 Mark Mitchell <mark@codesourcery.com>
2897 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
2898 error_mark_node to indicate an initialization is OK.
2899 (start_decl): Likewise. Adjust call to start_decl_1.
2900 (start_decl_1): Add initialized parameter. Simplify.
2901 * except.c (initialize_handler_parm): Adjust call to
2903 (expand_start_catch_block): Let cp_finish_decl initialize catch
2905 * cp-tree.h (start_decl_1): Adjust prototype.
2906 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
2907 (instantiate_decl): Let cp_finish_decl handle initialization.
2908 * semantics.c (finish_compound_literal): Create a temporary
2909 variable for the literal.
2910 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
2912 * decl2.c (finish_static_data_member_decl): Don't set
2914 (grokfield): Do not try to initialize functions.
2916 2006-05-23 Mark Mitchell <mark@codesourcery.com>
2919 * pt.c (determine_specialization): Disallow partial
2920 specializations of templates.
2922 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2925 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
2927 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
2929 2006-05-21 Mark Mitchell <mark@codesourcery.com>
2932 * cp-tree.h (cp_save_expr): New function.
2933 * init.c (build_new): Correct logic for zero-element array
2934 warning. Use cp_save_expr.
2935 * tree.c (cp_save_expr): New function.
2937 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2940 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
2943 2006-05-19 Mike Stump <mrs@apple.com>
2945 * typeck.c (default_conversion): Remove static.
2947 2006-05-19 Mark Mitchell <mark@codesourcery.com>
2950 * cp-tree.h (begin_function_try_block): Change prototype.
2951 (finish_function_handler_sequence): Likewise.
2952 * parser.c (cp_parser_function_try_block): Adjust calls.
2953 * pt.c (tsubst_expr): Adjust calls.
2954 * semantics.c (begin_function_try_block): Create an artificial
2956 (finish_function_handler_sequence): Close it.
2958 2006-05-18 Mark Mitchell <mark@codesourcery.com>
2962 * typeck.c (decay_conversion): Convert bitfields to their declared
2963 types here. Improve documentation. Avoid use of cp_convert.
2964 (default_conversion): Make it static. Perform integral promotions
2965 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
2967 * init.c (build_init): Remove.
2968 (expand_default_init): Do not call rvalue.
2969 * call.c (null_ptr_cst_p): Robustify.
2970 (build_conditional_expr): Tidy.
2971 * except.c (build_throw): Do not perform lvalue-to-rvalue
2972 conversion on operand before initializing temporary.
2973 * tree.c (convert.h): Include it.
2974 (convert_bitfield_to_declared_type): Use convert_to_integer, not
2976 (rvalue): Don't convert bitfields to their declared type here.
2977 * cp-tree.h (build_init): Remove.
2978 (default_conversion): Likewise.
2979 * typeck2.c (build_m_component_ref): Do not perform
2980 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
2981 conversions here. Correct error message.
2983 2006-05-17 Mark Mitchell <mark@codesourcery.com>
2986 * decl2.c (check_member_template): Remove checks for virtual
2988 * parser.c (cp_parser_function_specifier_opt): Complain about
2990 (cp_parser_pure_specifier): Likewise.
2993 * parser.c (cp_parser_set_storage_class): Check for
2994 invalid uses of storage classes on unbraced linkage
2996 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
2997 to cp_parser_set_storage_class.
2999 2006-05-17 Jakub Jelinek <jakub@redhat.com>
3002 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
3006 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3007 on combined parallel workshare constructs.
3008 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
3010 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3013 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
3015 2006-05-15 Mark Mitchell <mark@codesourcery.com>
3018 * cp-tree.h (perform_access_checks): New function.
3019 * semantics.c (perform_access_checks): New function.
3020 (perform_deferred_access_checks): Use it.
3021 * parser.c (cp_parser_simple_declaration): Adjust call to
3022 cp_parser_init_declarator.
3023 (cp_parser_type_parameter): Do not defer checks in default
3025 (cp_parser_explicit_specialization): Adjust call to
3026 cp_parser_single_declaration.
3027 (cp_parser_init_declarator): Perform template-parameter access
3029 (cp_parser_parameter_declaration): Do not defer checks for
3030 template parameter default arguments.
3031 (cp_parser_template_declaration_after_export): Gather access
3032 checks for template parameters, and pass them to
3033 cp_parser_single_declaration.
3034 (cp_parser_template_parameter_access_checks): New function.
3035 (cp_parser_single_declaration): Add checks parameter.
3038 * call.c (convert_like_real): Convert bitfields to their declared
3039 types when forming an rvalue.
3040 * tree.c (convert_bitfield_to_declared_type): New function.
3042 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
3044 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3047 * pt.c (any_dependent_template_arguments_p): Return early on invalid
3051 * search.c (adjust_result_of_qualified_name_lookup): Skip on
3052 invalid context_class.
3055 * pt.c (do_decl_instantiation): Return early on invalid decl.
3058 * pt.c (push_template_decl_real): Return error_mark_node instead
3062 * pt.c (tsubst_friend_class): Return early on invalid friend
3065 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3067 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
3068 (cp/decl2.o): Likewise.
3069 (cp/typeck.o): Likewise.
3070 (cp/cvt.o): Likewise.
3071 (cp/parser.o): Likewise.
3072 (cp/call.o): Replace target.h with $(TARGET_H).
3074 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
3076 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
3077 COMPONENT_REF alone.
3079 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3082 * decl.c (copy_fn_p): Return early on non-member functions.
3084 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3087 * decl2.c (build_memfn_type): Skip invalid functions and class types.
3089 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3092 * pt.c (convert_nontype_argument): Return early on invalid arguments.
3094 * pt.c (process_template_parm): Remove superfluous temporary.
3097 * pt.c (process_template_parm): Handle erroneous non-type parameters.
3100 * typeck.c (convert_for_initialization): Skip erroneous types.
3103 * typeck.c (convert_arguments): Return early on args with
3106 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
3109 * typeck.c (build_static_cast_1): Save casted types in used types
3111 (build_reinterpret_cast_1): Same.
3112 * rtti.c (build_dynamic_cast_1): Same.
3114 2006-05-04 Jakub Jelinek <jakub@redhat.com>
3117 * parser.c (cp_parser_omp_for_loop): Only call
3118 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
3121 2006-05-02 Mark Mitchell <mark@codesourcery.com>
3124 * decl.c (grokdeclarator): Robustify checks for defining members
3125 of incomplete types.
3128 * class.c (add_method): Call grok_special_member_properties.
3129 * decl.c (grokdeclarator): Don't call it here.
3130 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
3131 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
3133 (start_method): Don't call grok_special_member_properties.
3134 * method.c (implicitly_declare_fn): Likewise.
3135 * pt.c (instantiate_class_template): Likewise.
3136 * decl2.c (grokfield): Likewise.
3138 2006-05-02 Jakub Jelinek <jakub@redhat.com>
3141 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
3142 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
3143 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
3145 2006-04-30 Mark Mitchell <mark@codesourcery.com>
3148 * pt.c (tsubst_default_argument): Increment function_depth around
3149 call to tsubst_expr.
3150 * parser.c (cp_parser_parameter_declaration): Likewise.
3151 * decl2.c (mark_used): Tidy.
3153 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3156 * decl.c (grok_op_properties): Skip operators with invalid args
3157 when checking for class-type or enum-type args.
3159 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3162 * decl.c (copy_fn_p): Skip functions with invalid first arg.
3164 2006-04-27 Mark Mitchell <mark@codesourcery.com>
3167 * tree.c (rvalue): Convert bitfields to their declared types.
3170 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
3173 2006-04-24 Mark Mitchell <mark@codesourcery.com>
3176 * typeck.c (decay_conversion): Don't adjust bitfield types.
3177 (perform_integral_promotions): Treat bitfield enums as enums, not
3178 as short integer types.
3179 * tree.c (rvalue): Convert bitfields to their correct types.
3181 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3184 * class.c (layout_class_type): Skip fields with invalid types.
3186 2006-04-23 Mark Mitchell <mark@codesourcery.com>
3189 * cp-tree.h (build_this_parm): Declare.
3190 (grok_method_quals): Remove.
3191 (build_memfn_type): Declare.
3192 (build_artificial_parm): Declare.
3193 (do_friend): Remove quals parameter.
3194 * decl.c (build_this_parm): New function.
3195 (grokfndecl): Use it. Do not pass quals to grokclassfn.
3196 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
3197 unnecessary TYPE_DECLs. Correct qualification of member function
3199 * method.c (implicitly_declare_fn): Use build_this_parm.
3200 * friend.c (do_friend): Remove quals parameter.
3201 * decl2.c (grok_method_quals): Remove.
3202 (build_memfn_type): New function.
3203 (build_artificial_parm): Give it external linkage.
3204 (grokclassfn): Remove quals parameter. Do not build "this"
3208 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
3209 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
3210 (decay_conversion): Convert bitfield expressions to the correct
3212 (build_modify_expr): Remove spurious conversions.
3213 * class.c (layout_class_type): Modify the type of bitfields to
3214 indicate a limited range.
3215 * call.c (standard_conversion): Adjust the type of bitfield
3216 expressions used in an rvalue context.
3217 (build_conditional_expr): Likewise.
3219 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
3221 * decl.c: Fix comment typos.
3223 2006-04-21 Eric Christopher <echristo@apple.com>
3225 * decl.c: Fix typo in function name.
3227 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3230 * parser.c (cp_parser_class_name): Check for invalid typenames.
3234 * pt.c (tsubst_friend_function): Return early if
3235 pushdecl_namespace_level fails.
3238 * typeck.c (convert_arguments): Return error_mark_node instead of
3240 * cp-tree.h (error_mark_list): Remove declaration.
3241 * decl.c (error_mark_list): Remove definition.
3242 (cxx_init_decl_processing): Do not initialize error_mark_list.
3245 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
3246 before calling convert_to_reference.
3247 * cvt.c (convert_to_reference): Assert that reftype is a
3250 2006-04-19 Mark Mitchell <mark@codesourcery.com>
3253 * class.c (currently_open_class): Tidy.
3254 * decl.c (grokdeclarator): If we encounter an erroneous
3255 declarator, assume that we have already issued an error message
3256 and return. Return error_mark_node instead of NULL_TREE in more
3257 places. Issue errors about function definitions that do not have
3258 a function declarator. Check for complete types for all function
3260 * cp-tree.h (cp_error_declarator): Remove.
3261 (currently_open_class): Change return type.
3262 * parser.c (cp_parser_id_expression): Add optional_p parameter.
3263 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
3264 (cp_parser_id_expression): Likewise.
3265 (cp_parser_unqualified_id): If the name is optional, return
3267 (cp_parser_postfix_dot_deref_expression): Adjust calls.
3268 (cp_parser_type_parameter): Likewise.
3269 (cp_parser_unqualified_id): Likewise.
3270 (cp_parser_direct_declarator): Likewise.
3271 (cp_parser_declarator_id): Add optional_p parameter.
3272 (cp_parser_function_definition_from_specifiers_and_declarator):
3273 Assume that start_function indicates failure only if it has issued
3275 (cp_parser_omp_var_list_no_open): Adjust calls.
3277 2006-04-17 Janis Johnson <janis187@us.ibm.com>
3279 PR c++/26114, c++/26115
3280 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
3281 * class.c (check_field_decls): Ditto.
3283 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3285 * init.c (build_offset_ref): Remove superfluous temporary.
3287 2006-04-16 Mark Mitchell <mark@codesourcery.com>
3290 * typeck.c (finish_class_member_access_expr): Robustify
3292 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
3294 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
3295 * pt.c: Include vecprim.h.
3296 (inline_parm_levels): Change the type to VEC(int,heap) *.
3297 (inline_parm_levels_used): Remove.
3298 (maybe_begin_member_template_processing,
3299 maybe_end_member_template_processing): Use VEC instead of
3302 * cp/call.c: Fix comment typos.
3304 2006-04-12 Mark Mitchell <mark@codesourcery.com>
3306 * parser.c (cp_parser_init_declarator): Initialize local variables
3309 2006-04-12 Roger Sayle <roger@eyesopen.com>
3311 * parser.c (cp_parser_init_declarator): Initialise
3312 is_parenthesized_init to false to avoid compiler warning.
3314 2006-04-11 Mark Mitchell <mark@codesourcery.com>
3316 * cp-tree.h (build_operator_new_call): Adjust prototype.
3317 (build_new_method_call): Likewise.
3318 (build_op_delete_call): Likewise.
3319 * init.c (build_raw_new_expr): New function.
3320 (build_new_1): Pass information as parameters, rather than
3321 bundling it into a NEW_EXPR.
3322 (build_new): Adjust accordingly.
3323 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
3324 (build_delete): Likewise.
3325 * decl.c (finish_destructor_body): Likewise.
3326 * call.c (build_operator_new_call): Return the allocation function
3328 (build_op_delete_call): Take allocation function as parameter.
3329 (build_special_member_call): Adjust call to build_new_method_call.
3330 (build_new_method_call): Return function called.
3331 * pt.c (tsubst_copy_and_build): Adjust call to
3332 build_new_method_call.
3333 * semantics.c (finish_call_expr): Likewise.
3334 * parser.c (cp_parser_postfix_expression): Likewise.
3335 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
3336 "incomplete", not "undefined", types.
3339 * decl.c (grokdeclarator): Remove namespace-handling code for
3340 pointers-to-members.
3341 * parser.c (cp_parser_ptr_operator): Check for qualified names
3345 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
3346 whether or not to look for a pure-specifier.
3347 (cp_parser_member_declaration): Likewise.
3349 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3351 * decl2.c, pt.c, semantics.c: Fix comment typos.
3353 2006-04-06 Roger Sayle <roger@eyesopen.com>
3355 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
3357 2006-04-05 Jason Merrill <jason@redhat.com>
3359 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
3360 default hidden visibility for anonymous namespace.
3362 2006-03-29 Roger Sayle <roger@eyesopen.com>
3365 * init.c (build_vec_delete_1): Convert BASE pointer's type to
3366 the base pointer type to avoid a type mismatch in the EQ_EXPR.
3368 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
3370 * search.c (maybe_suppress_debug_info): If
3371 flag_emit_class_debug_always then don't suppress.
3373 2006-03-22 Jason Merrill <jason@redhat.com>
3375 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
3376 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
3378 2006-03-21 Jakub Jelinek <jakub@redhat.com>
3381 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
3383 2006-03-21 Jason Merrill <jason@redhat.com>
3386 * parser.c (cp_parser_declaration): Support attributes on
3387 anonymous namespaces.
3388 * name-lookup.c (push_namespace_with_attribs): Anonymous
3389 namespaces default to hidden visibility.
3391 2006-03-20 Jason Merrill <jason@redhat.com>
3393 PR c++/21764, c++/19238
3394 * decl.c (cp_finish_decl): Call determine_visibility later.
3395 (start_preparsed_function): Likewise.
3396 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
3397 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
3398 * name-lookup.h (struct cp_binding_level): Add has_visibility
3400 * name-lookup.c: Include c-pragma.h.
3401 (push_namespace_with_attribs): Split out from push_namespace.
3402 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
3403 (leave_scope): Pop visibility if appropriate.
3404 * decl2.c (determine_visibility_from_class): Split out from...
3405 (determine_visibility): ...here. Handle function scope and
3407 (import_export_decl): Move visibility handling to
3408 determine_visibility_from_class.
3409 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
3410 attributes on namespace declarations.
3412 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3415 * decl.c (grokdeclarator): Do not accept long long double.
3416 Reorganize checks for invalid (combinations of) type modifiers.
3417 Quote modifiers in messages.
3419 2006-03-09 Jason Merrill <jason@redhat.com>
3421 PR c++/16387, c++/16389
3422 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
3423 (cxx_sizeof_or_alignof_expr): Split out from here.
3425 2006-03-09 Diego Novillo <dnovillo@redhat.com>
3427 Merge from gomp-20050608-branch
3429 2006-02-02 Diego Novillo <dnovillo@redhat.com>
3431 * decl.c (pop_labels_1): Use appropriate pointer casting.
3432 (poplevel_named_label_1): Likewise.
3433 (named_label_entry_hash): Likewise.
3434 (named_label_entry_eq): Likewise.
3435 (check_goto): Likewise.
3436 (define_label): Likewise.
3438 2006-01-26 Diego Novillo <dnovillo@redhat.com>
3440 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
3442 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
3443 instead of TREE_CODE/TREE_OPERAND.
3444 * semantics.c: Likewise.
3445 * parser.c: Likewise.
3447 2005-11-10 Diego Novillo <dnovillo@redhat.com>
3449 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
3450 target does not support TLS.
3452 2005-11-09 Jakub Jelinek <jakub@redhat.com>
3454 * decl.c (redeclaration_error_message): Don't error about
3455 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
3458 2005-11-08 Jakub Jelinek <jakub@redhat.com>
3461 * semantics.c (finish_omp_barrier, finish_omp_flush): New
3463 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
3464 (cp_parser_omp_flush): Call finish_omp_flush.
3465 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New