1 2007-04-11 Jan Hubicka <jh@suse.cz>
3 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
4 that we are not processing template_decl.
6 2007-04-09 Mark Mitchell <mark@codesourcery.com>
9 * class.c (build_base_path): Ensure that the converted pointer has
10 the same cv-qualification as the input.
12 2007-04-09 Paolo Carlini <pcarlini@suse.de>
14 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
16 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
18 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
20 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
21 * tree.c (cp_add_pending_fn_decls): Remove.
22 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
24 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
26 Revert change removing staticp.
28 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
30 * cp-objcp-common.c (cxx_staticp): Remove.
31 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
32 * cp-tree.h (cxx_staticp):
34 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
36 * class.c (check_for_override): Don't remove dllmport attribute
39 2007-04-03 Jakub Jelinek <jakub@redhat.com>
42 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
43 type issue error and return early.
45 2007-03-30 Jason Merrill <jason@redhat.com>
48 * typeck.c (cp_type_readonly): New fn.
49 * cp-tree.h: Declare it.
50 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
51 (cp_finish_decl): Not here.
53 2007-03-31 Richard Guenther <rguenther@suse.de>
55 * optimize.c (maybe_clone_body): Replace splay-tree usage by
58 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
63 * parser.c (declarator_can_be_parameter_pack): New.
64 (cp_parser_template_parameter): Only parse the `...' if the
65 declarator can be a parameter pack.
66 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
68 * pt.c (find_parameter_packs_r): Look into the bounds on integer
69 types (they could be used as array bounds).
70 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
71 (tsubst_pack_expansion): Handle failure to expand parameter
74 2007-03-30 Paolo Carlini <pcarlini@suse.de>
77 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
78 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
79 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
80 (CLASS_TYPE_NON_UNION_P): Add.
81 (struct lang_type_class): Add has_complex_dflt.
82 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
83 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
84 * cp-tree.def: Add TRAIT_EXPR.
85 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
86 * lex.c (struct resword): Add __has_nothrow_assign,
87 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
88 __has_trivial_constructor, __has_trivial_copy,
89 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
90 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
91 __is_pod, __is_polymorphic, __is_union.
92 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
93 (cp_parser_trait_expr): New.
94 * semantics.c (finish_trait_expr, trait_expr_value
95 classtype_has_nothrow_copy_or_assign_p): New.
96 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
98 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
99 * class.c (check_bases, check_field_decl, check_bases_and_members):
100 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
101 * pt.c (uses_template_parms, tsubst_copy_and_build,
102 value_dependent_expression_p, type_dependent_expression_p): Deal with
104 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
106 2007-03-29 Richard Guenther <rguenther@suse.de>
108 * tree.c (cp_walk_subtrees): Do not set input_location.
110 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
113 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
116 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
118 * parser.c (struct cp_parser): Update comment for
119 greater_than_is_operator_p.
120 (cp_parser_primary_expression): In C++0x mode, a cast operator can
121 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
122 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
123 !GREATER_THAN_IS_OPERATOR_P.
124 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
125 `>>' operators that will become two `>' tokens in C++0x.
126 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
127 mode, allowing it to terminate default arguments.
128 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
129 `>>' like two consecutive `>' tokens.
130 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
131 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
132 ends a template argument.
134 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
136 * decl.c (redeclaration_error_message): Complain when redeclaring
137 a friend function with default template arguments (C++0x mode only).
138 * cp-tree.h (check_default_tmpl_args): Declare.
139 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
140 template arguments in function templates. Add support for checking
141 the default template arguments of friend templates.
142 (push_template_decl_real): Fix call to check_default_tmpl_args.
143 (type_unification_real): If a template parameter has not been
144 deduced but provides a default template argument, substitute into
145 that default template argument.
146 * parser.c (cp_parser_init_declarator): When declaring (but not
147 defining!) a function template in C++0x mode, check for default
150 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
153 * decl.c (grokdeclarator): Deal with cv-qualified function type
154 typedefs in the same way for member and non-member functions.
156 2007-03-26 Dirk Mueller <dmueller@suse.de>
158 * parser.c (cp_parser_member_declaration): Pedwarn
159 about stray semicolons after member declarations.
161 2007-03-26 Paolo Carlini <pcarlini@suse.de>
164 * pt.c (instantiate_decl): Set in_system_header.
166 2007-03-22 Mark Mitchell <mark@codesourcery.com>
168 * cp-tree.h (current_tempalte_parms): Improve documentation.
169 * pt.c (current_template_args): Likewise.
172 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
173 not consume tokens when failing.
175 2007-03-22 Jim Wilson <wilson@specifix.com>
176 Mark Mitchell <mark@codesourcery.com>
179 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
180 consistent with FROM.
182 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
184 * error.c (dump_expr): Handle dependent names that designate types.
185 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
187 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
189 * cp-tree.def, parser.c, pt.c: Fix comment typos.
191 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
193 * cvt.c (cp_convert_and_check) : Define.
194 * cp-tree.h (cp_convert_and_check): Declare.
195 * call.c (convert_conversion_warnings): Rename to
196 conversion_null_warnings. The warning for floating-point to
197 integer is handled by convert_and_check in convert_like_real.
198 (convert_like_real): convert_conversion_warnings was renamed as
199 conversion_null_warnings.
200 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
201 overflow and changes of value during conversion.
203 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
206 * parser.c (cp_parser_statement): If 'namespace' is found, this
207 only can be a namespace alias definition, so parse it now.
208 (cp_parser_namespace_alias_definition): if we find an open brace
209 instead of '=', then this is actually a misplaced namespace
212 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
215 * decl.c (cxx_init_decl_processing): Move command-line options
216 processing to c-opts.c.
218 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
220 * ptree.c (cxx_print_type): Use formatting markup for integers
221 when printing template parameter index/level/orig level.
222 (cxx_print_xnode): Ditto.
223 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
224 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
225 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
227 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
228 rather than a HOST_WIDE_INT.
229 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
230 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
232 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
233 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
234 IN_BASE_INITIALIZER bool bitfields.
235 (struct cp_declarator): Make KIND a 4-bit field. Make
236 PARAMETER_PACK_P a bool bitfield just after KIND.
237 * pt.c (uses_parameter_packs): Destroy the pointer set.
238 (make_pack_expansion): Ditto.
239 (check_for_bare_parameter_packs): Ditto.
240 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
242 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
245 * call.c (convert_default_arg): Instead of copying the node,
248 2007-03-15 Dirk Mueller <dmueller@suse.de>
251 * call.c (convert_conversion_warnings): New..
252 (convert_like_real): .. factored out from here.
253 (convert_conversion_warnings): Add warning about
254 false being converted to NULL in argument passing.
256 2007-03-14 Dirk Mueller <dmueller@suse.de>
258 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
259 (finish_do_body): Warn about empty body in do/while statement.
261 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
263 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
265 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
268 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
271 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
273 * cp/repo.c (init_repo): Initialize random_seed saved options.
274 (finish_repo): Adjust.
276 2007-03-13 Mark Mitchell <mark@codesourcery.com>
279 * Make-lang.in (doc/g++.1): Use $< to specify the location from
282 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
284 * decl.c (compute_array_index_type): New warning flag warn_vla.
286 2007-03-12 Mark Mitchell <mark@codesourcery.com>
289 * call.c (convert_default_arg): Copy non-constant arguments.
291 2007-03-11 Mark Mitchell <mark@codesourcery.com>
294 * parser.c (cp_parser_postfix_expression): Disallow compound
295 literals in constant expressions.
298 * semantics.c (finish_typeof): Use unlowered_expr_type.
300 2007-03-10 Mark Mitchell <mark@codesourcery.com>
303 * cp-tree.h (unlowered_expr_type): New function.
304 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
305 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
306 (unlowered_expr_type): New function.
307 (build_unary_op): Disallow predecrements of bool bitfields.
308 * call.c (build_conditional_expr): Use unlowered_expr_type.
309 * pt.c (type_unification_real): Likewise.
311 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
314 * typeck.c (check_return_expr): Check for bare parameter packs.
315 (comptypes): Compare template parameter packs and
316 type pack expansions.
317 * decl.c (grokdeclarator): Deal with the declaration of function
319 (grokparms): Verify that the (optional) function parameter pack is
320 at the end of the parameter list.
321 (xref_basetypes): Handle pack expansions in the base class.
322 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
323 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
324 (NONTYPE_ARGUMENT_PACK): New.
325 (TYPE_PACK_EXPANSION): New.
326 (EXPR_PACK_EXPANSION): New.
327 (ARGUMENT_PACK_SELECT): New.
328 * cp-objcp-common.c (cp_tree_size): Compute size of
329 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
330 ARGUMENT_PACK_SELECT.
331 * error.c (dump_template_argument): Print template argument packs.
332 (dump_template_argument_list): Ditto.
333 (dump_template_parameter): Dump `...' for template type parameter
335 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
336 (dump_parameters): Print function parameter packs.
337 (dump_template_parms): Print template argument packs.
338 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
339 (maybe_warn_variadic_templates): New.
340 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
341 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
342 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
344 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
345 (write_template_arg): Write argument packs as separate arguments.
346 * cp-tree.h (struct template_parm_index_s): Add flag that
347 indicates that the template parameter is actually a parameter
349 (struct tree_argument_pack_select): New.
350 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
351 (union lang_tree_node): Add argument_pack_select.
352 (FUNCTION_PARAMETER_PACK_P): New.
353 (PACK_EXPANSION_P): New.
354 (PACK_EXPANSION_PATTERN): New.
355 (SET_PACK_EXPANSION_PATTERN): New.
356 (PACK_EXPANSION_PARAMETER_PACKS): New.
357 (ARGUMENT_PACK_P): New.
358 (ARGUMENT_PACK_ARGS): New.
359 (SET_ARGUMENT_PACK_ARGS): New.
360 (ARGUMENT_PACK_INCOMPLETE_P): New.
361 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
362 (TEMPLATE_PARM_PARAMETER_PACK): New.
363 (TEMPLATE_TYPE_PARAMETER_PACK): New.
364 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
365 (ARGUMENT_PACK_SELECT_INDEX): New.
366 (ARGUMENT_PACK_SELECT_ARG): New.
367 (struct cp_declarator): Add parameter_pack_p flag.
368 (maybe_warn_variadic_templates): Declare.
369 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
370 indicate a template parameter pack.
371 (uses_parameter_packs): Declare.
372 (template_parameter_pack_p): Declare.
373 (template_parms_variadic_p): Declare.
374 (make_pack_expansion): Declare.
375 (check_for_bare_parameter_packs): Declare.
376 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
377 sizeof... expressions.
378 (pp_cxx_expression): Print pack expansions and non-type argument
380 (pp_cxx_exception_specification): Print pack expansions.
381 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
382 (pp_cxx_ctor_initializer): Print pack expansions.
383 (pp_cxx_type_id): Print pack expansions.
384 (pp_cxx_template_argument_list): Print argument packs.
385 (pp_cxx_template_parameter): Print ellipsis for template parameter
387 * pt.c (comp_template_parms): Compare template parameter packs.
388 (template_parameter_pack_p): New.
389 (template_parms_variadic_p): New.
390 (template_args_variadic_p): New.
391 (make_ith_pack_parameter_name): New.
392 (struct find_parameter_pack_data): New.
393 (find_parameter_packs_r): New.
394 (uses_parameter_packs): New.
395 (make_pack_expansion): New.
396 (check_for_bare_parameter_packs): New.
397 (expand_template_argument_pack): New.
398 (reduce_template_parm_level): Propagate parameter pack flag.
399 (process_template_parm): Add is_parameter_pack parameter to state
400 when the parameter is actually a parameter pack. Create template
401 parameter packs when is_parameter_pack is true.
402 (current_template_args): The argument for a template parameter
403 pack is an argument pack containing a single pack expansion.
404 (process_partial_specialization): When checking that non-type
405 argument expressions do not involve template parameters, loop over
406 the arguments in argument packs separately.
407 (push_template_decl_real): Check that the type of the declaration
408 does not have any bare parameter packs. Check that primary
409 templates have no more than one parameter pack, and that it comes
410 at the end of the template parameter list.
411 (convert_template_argument): Handle coercions for pack expansion
412 expressions by coercing the pattern then rebuilding the expansion.
413 (coerce_template_parms): When coercing the arguments for a
414 variadic template, pack "extra" arguments into an argument pack.
415 (coerce_template_template_parms): Cannot coerce between parameter
416 packs and non-pack parameters.
417 (template_args_equal): Compare PACK_EXPANSION_P expressions.
418 (comp_template_args): Expand all template arguments packs before
419 comparing template argument lists.
420 (mangle_class_name_for_template): Make argument packs as separate
422 (for_each_template_parm_r): No need to handle BASELINK.
423 (instantiate_class_template): Handle pack expansions in the base
425 (tsubst_pack_expansion): New.
426 (tsubst_template_args): Handle substitutions of argument packs and
427 pack expansion into template argument lists.
428 (tsubst_decl): Expand function parameter packs into separate
430 (tsubst_arg_types): Expand a type pack expansion into separate
432 (tsubst_exception_specification): Handle pack expansions in
433 exception specifiers.
434 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
435 replacing a template parameter with its argument. If we encounter
436 a substitution for an argument pack, just return the parameter
438 (tsubst_copy): sizeof(X...) returns the number of elements in
439 parameter pack X. See through ARGUMENT_PACK_SELECT when the
440 PARM_DECL is a parameter pack.
441 (tsubst_expr): Expression pack expansions and argument packs
442 cannot show up here; they will all be handled through function
443 calls, sizeof, and template argument lists.
444 (tsubst_copy_and_build): sizeof(X...) returns the number of
445 elements in parameter pack X. Handle pack expansions in TREE_LIST
446 and CONSTRUCTOR nodes.
447 (fn_type_unification): Handle "incomplete" explicit template
448 argument lists that specify some of the arguments for a template
450 (type_unification_real): Unify arguments against pack expansions.
451 (template_parm_level_and_index): New, helper function.
452 (unify_pack_expansion): New.
453 (unify): Unify argument packs on an argument-by-argument basis,
454 handling variadic argument packs as well.
455 (more_specialized_fn): Handle unification of function parameter
456 packs. All things being equal, prefer non-variadic function
457 templates to variadic function templates.
458 (more_specialized_class): Prefer the variadic class template
459 partial specialization that binds fewer arguments to a parameter
461 (regenerate_decl_from_template): Expand function parameter packs
462 into separate parameters.
463 (instantiate_decl): Ditto.
464 (tsubst_initializer_list): Handle pack expansions for base-class
466 (dependent_type_p_r): Determine dependent types in argument packs
468 (value_dependent_expression_p): Determine value-dependence of
469 non-type argument packs.
470 (dependent_template_arg_p): Handle argument packs.
471 * semantics.c (finish_cond): Check for bare parameter packs.
472 (finish_expr_stmt): Ditto.
473 (finish_for_expr): Ditto.
474 (finish_switch_cond): Ditto.
475 (finish_mem_initializers): Ditto.
476 * name-lookup.c (arg_assoc_type): Handle pack expansions and
478 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
479 * parser.c (make_declarator): Declarator is not an expansion.
480 (make_pointer_declarator): Transfer parameter pack flag to outer
482 (make_reference_declarator): Ditto.
483 (make_ptrmem_declarator): Ditto.
484 (make_call_declarator): Ditto.
485 (make_array_declarator): Ditto.
486 (cp_parser_postfix_expression): Allow pack expansion expressions
487 in the argument list for a call expression.
488 (cp_parser_parenthesized_expression_list): Add new parameter
489 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
490 into separate arguments."
491 (cp_parser_new_placement): Allow pack expansion expressions.
492 (cp_parser_new_initializer): Ditto.
493 (cp_parser_mem_initializer_list): Allow ellipsis to create a
494 base-class initializer expansion.
495 (cp_parser_mem_initializer): Ditto.
496 (cp_parser_template_parameter_list): Keep track of whether the
497 template parameter is a template parameter pack.
498 (cp_parser_template_parameter): Parse the ellipsis to indicate a
499 template parameter pack.
500 (cp_parser_type_parameter): Ditto.
501 (cp_parser_template_argument_list): Parse the ellipsis to indicate
503 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
504 this declarator is a parameter pack.
505 (cp_parser_parameter_declaration): The ellipsis does not end the
506 parameter declaration, because it might be a parameter pack. Parse
507 the ellipsis to indicate a parameter pack.
508 (cp_parser_initializer): Allow pack expansions.
509 (cp_parser_initializer_list): Allow ellipsis to create an
510 initializer expansion.
511 (cp_parser_base_clause): Allow ellipsis to create a base specifier
513 (cp_parser_type_id_list): Allow ellipsis to create an exception
515 (cp_parser_attribute_list): Don't allow pack expansions.
516 (cp_parser_functional_cast): Allow pack expansions.
517 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
518 compute the length of a parameter pack.
519 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
520 end a template argument.
521 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
522 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
525 2007-03-09 Dirk Mueller <dmueller@suse.de>
527 * cp/call.c (build_new_op): Call warn_logical_operator.
529 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
532 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
535 * pt.c (any_template_arguments_need_structural_equality_p):
538 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
540 * decl.c (grokdeclarator): Disable warnings for anonymous
543 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
545 * typeck2.c (readonly_error): Always emit a hard error.
546 Remove last argument.
547 * cp-tree.h (readonly_error): Adjust prototype.
548 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
549 * typeck.c (build_unary_op): Likewise.
550 (build_modify_expr): Likewise.
552 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
555 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
557 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
560 * parser.c (struct cp_parser): New IN_IF_STMT.
561 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
562 returning if parsing the body of an 'if' statement or issuing an
563 error and continuing.
564 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
566 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
568 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
571 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
574 2007-03-02 Geoffrey Keating <geoffk@apple.com>
576 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
577 Objective-C++. Don't exit early if -shared-libgcc needs to be
580 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
582 * typeck.c (common_base_type): Delete unused function.
584 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
586 * Make-lang.in: Add dummy lang.install-pdf target.
588 2007-03-01 Simon Baldwin <simonb@google.com>
591 * decl.c (check_tag_decl): Added new warning for typedef ignored
592 when it precedes an otherwise valid non-typedef declaration.
594 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
596 * typeck.c (build_function_call): Store converted arguments
597 in a stack-allocated array instead of building a list.
598 (convert_arguments): Store arguments in the array passed in as an
599 argument, and return the actual number of arguments.
600 * call.c (build_call): Delete, and replace with...
601 (build_call_n, build_call_a): New.
602 (build_op_delete_call): Rewrite to avoid constructing argument lists.
603 (build_over_call): Store converted arguments in a stack-allocated
604 array instead of building a list.
605 (build_cxx_call): Pass arguments in an array instead of as a list.
606 (build_java_interface_fn_ref): Rewrite to avoid constructing
608 * tree.h: Update declarations to reflect above changes.
609 * method.c (use_thunk): Use a stack-allocated array to hold
610 the arguments instead of a list.
611 * rtti.c (throw_bad_cast): Update call to cxx_call.
612 (throw_bad_typeid): Likewise.
613 (build_dynamic_cast_1): Likewise.
614 * init.c (build_builtin_delete_call): Use build_call_n.
615 * decl.c (expand_static_init): Likewise.
616 * except.c (cp_protect_cleanup_actions): Likewise.
617 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
618 (gimplify_must_not_throw_expr): Likewise.
619 (cxx_omp_apply_fn): Use build_call_a.
621 2007-02-26 Mark Mitchell <mark@codesourcery.com>
623 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
624 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
626 2007-02-25 Mark Mitchell <mark@codesourcery.com>
628 * cp-tree.h (static_ctors): Remove.
629 * cp-tree.h (static_dtors): Likewise.
630 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
631 refactoring of tree_map hierarchy.
632 (decl_shadowed_for_var_insert): Likewise.
633 * semantics.c (expand_body): Use c_expand_body.
634 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
635 * decl2.c (static_ctors): Remove.
636 (static_dtors): Likewise.
637 (generate_ctor_or_dtor_function): Pass NULL_TREE to
638 objc_generate_static_init_call. Do not call static_[cd]tors.
639 (generate_ctor_and_dtor_functions_for_priority): Do not check for
641 (cp_write_global_declarations): Likewise.
643 2007-02-23 Richard Guenther <rguenther@suse.de>
645 * class.c (note_name_declared_in_class): Make declaration
646 changes meaning a pedwarn.
648 2007-02-22 Michael Matz <matz@suse.de>
651 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
652 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
653 dump_function_decl): Guard emitting outer scopes by new flag.
654 * cp-lang.c (cxx_dwarf_name): New function.
655 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
656 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
658 (push_template_decl_real, lookup_template_class): Remove calls
661 2007-02-19 Mark Mitchell <mark@codesourcery.com>
663 * call.c (build_new_method_call): Ensure that explicit calls of
664 destructors have type "void".
666 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
668 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
669 and -Walways-true with -Waddress.
670 * cvt.c (convert_to_void): Replace unconditional warning with
673 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
675 * decl.c, tree.c: Fix comment typos.
677 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
680 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
681 statement expression if we had an error mark node.
683 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
684 Brooks Moses <brooks.moses@codesourcery.com>
685 Lee Millward <lee.millward@codesourcery.com>
687 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
688 Change class to tcc_vl_exp.
690 * call.c (build_call): Use build_call_list instead
692 (build_over_call): Likewise.
693 (build_new_method_call): Use build_min_non_dep_call_list
694 instead of build_min_non_dep.
696 * error.c (dump_call_expr_args): New function.
697 (dump_aggr_init_expr_args): New function.
698 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
699 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
701 * cvt.c (convert_to_void): Use build_call_array instead
702 of build3; use new AGGR_INIT_EXPR accessor macros.
704 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
705 instead of TREE_CODE_LENGTH.
707 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
708 AGGR_INIT_EXPR accessor macros.
710 * cp-gimplify.c (cp_gimplify_init_expr): Use
711 AGGR_INIT_EXPR_SLOT to set the slot operand.
713 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
714 (AGGR_INIT_EXPR_SLOT): New macro.
715 (AGGR_INIT_EXPR_ARG): New macro.
716 (aggr_init_expr_nargs): New macro.
717 (AGGR_INIT_EXPR_ARGP): New macro.
718 (aggr_init_expr_arg_iterator): New.
719 (init_aggr_init_expr_arg_iterator): New.
720 (next_aggr_init_expr_arg): New.
721 (first_aggr_init_expr_arg): New.
722 (more_aggr_init_expr_args_p): New.
723 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
724 (stabilize_aggr_init): New declaration.
725 (build_min_non_dep_call_list): Likewise.
727 * tree.c (process_aggr_init_operands): New function.
728 (build_aggr_init_array) New function.
729 (build_cplus_new): Update to use new CALL_EXPR and
730 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
731 build_aggr_init_array.
732 (build_min_non_dep_call_list) New function.
733 (build_min_nt): Assert input code parameter is not a variable
734 length expression class.
735 (build_min, build_min_non_dep): Likewise.
736 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
737 to check for equality instead of recursing. Handle tcc_vl_exp
739 (stabilize_call): Update to only handle CALL_EXPRs, not
740 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
741 (stabilize_aggr_init): New function.
742 (stabilize_init): Use it.
744 * cxx-pretty-print.c (pp_cxx_postfix_expression)
745 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
746 AGGR_INIT_EXPR accessor macros and argument iterators.
748 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
749 build_vl_exp. Iterate through the operands, recursively
751 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
752 CALL_EXPR accessor macros.
753 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
754 tree code classes. Use TREE_OPERAND_LENGTH instead of
757 * semantics.c (finish_call_expr): Use build_nt_call_list
759 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
760 accessor macros. Use build_call_array to construct the
761 CALL_EXPR node instead of build3
763 * decl2.c (build_offset_ref_call_from_tree): Use
764 build_nt_call_list and build_min_non_dep_call_list instead
765 of build_min_nt and build_min_non_dep.
767 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
768 Use build_nt_call_list instead of build_min_nt.
770 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
773 * call.c (build_conditional_expr): Improve error message.
775 2007-02-13 Dirk Mueller <dmueller@suse.de>
777 * friend.c (do_friend): Annotate warning about friend
778 declarations in templates with OPT_Wnon_template_friend.
779 Convert informal message from warning() to inform().
781 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
782 Mark Mitchell <mark@codesourcery.com>
785 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
786 instantiations for variables.
788 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
791 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
792 Check warn_unused_value just once.
794 2007-02-11 Mark Mitchell <mark@codesourcery.com>
797 * pt.c (determine_specialization): Use skip_artificial_parms_for.
798 (fn_type_unificiation): Likewise.
799 (get_bindings): Likewise.
801 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
804 * decl.c (finish_function): Use DECL_REPLACEABLE.
805 * tree.c (cp_cannot_inline_tree_fn): Likewise.
807 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
809 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
811 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
813 * decl.c (grokvardecl): Don't error if !have_tls.
814 (grokdeclarator): Likewise.
815 * parser.c (cp_parser_omp_threadprivate): Likewise.
817 2007-02-07 Jakub Jelinek <jakub@redhat.com>
820 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
821 parameters and result decls in omp clauses.
822 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
825 2007-02-05 Dirk Mueller <dmueller@suse.de>
828 * parser.c (cp_parser_class_specifier): Always initialize bases.
830 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
832 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
833 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
834 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
836 * semantics.c (finish_omp_atomic): Store a whole expression node
837 in operand 1, and integer_zero_node in operand 0, for dependent
838 OMP_ATOMIC. Rewrite to make flow easier to understand.
840 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
842 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
844 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
846 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
847 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
849 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
851 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
852 keyword warning to -Wc++0x-compat.
854 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
856 * decl.c (grokdeclarator): Update documentation.
858 2007-02-02 Jakub Jelinek <jakub@redhat.com>
861 * decl.c (grokdeclarator): If __thread is used together with
862 a storage class other than extern and static, clear thread_p
863 after issuing diagnostics and fall through to checking the
866 2007-01-30 Roger Sayle <roger@eyesopen.com>
868 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
869 calculating the size of an array (to avoid recursive errors).
871 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
874 * typeck.c (build_binary_op): Fix logic for warning. Move warning
876 * call.c (convert_like_real): Don't warn when converting to
879 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
881 * decl.c (pop_label): Replace warning with call to
882 warn_for_unused_label.
884 2007-01-28 Andrew Pinski <pinskia@gmail.com>
887 * semantics.c (finish_pseudo_destructor_expr): Check the
888 destrutor name by calling check_dtor_name.
890 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
892 * lex.c (D_CPP0X): Rename.
894 (reswords): D_CPP0X -> D_CXX0X.
895 (init_reswords): Ditto.
896 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
897 of C++0x keywords as identifiers.
899 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
902 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
905 2007-01-23 Ian Lance Taylor <iant@google.com>
907 * typeck.c (convert_for_assignment): Only warn about a = b = c
908 when converting to bool.
910 2007-01-23 Roger Sayle <roger@eyesopen.com>
912 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
914 * typeck.c (ignore_overflows): Remove the remaining uses of
915 TREE_CONSTANT_OVERFLOW.
917 2007-01-20 Jan Hubicka <jh@suse.cz>
919 * decl2.c (start_objects, start_static_storage_duration_function):
920 Do not make the functions uninlinable.
922 2007-01-17 Ian Lance Taylor <iant@google.com>
924 * class.c (add_method): Call VEC_reserve_exact rather than passing
925 a negative size to VEC_reserve.
927 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
930 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
932 2007-01-10 Mark Mitchell <mark@codesourcery.com>
935 * decl.c (make_typename_type): If the qualified name is not a
936 type, issue an error.
937 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
940 2007-01-08 Geoffrey Keating <geoffk@apple.com>
942 * rtti.c: Include target.h.
943 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
944 don't emit typeinfo for fundamental types as weak.
945 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
947 2007-01-08 Richard Guenther <rguenther@suse.de>
949 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
951 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
953 * call.c (standard_conversion): Pass flag to
954 vector_types_convertible_p to disallow emission of note.
955 * typeck.c (convert_for_assignment): Pass flag to
956 vector_types_convertible_p to allow emission of note.
957 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
958 to disallow emission of note.
960 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
963 * typeck.c (build_binary_op): Call overflow_warning if
964 TREE_OVERFLOW_P is true for the result and not for any of the
967 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
970 * class.c (add_method): Don't wait until template
971 instantiation time to complain about duplicate methods.
973 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
976 * semantics.c (finish_unary_op_expr): Warn only if result
977 overflowed and operands did not.
979 2007-01-05 Ian Lance Taylor <iant@google.com>
981 * typeck.c (build_binary_op): Warn about comparing a non-weak
984 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
986 * pt.c (tsubst): Propagate the need for structural equality checks
987 when reducing the level of template parameters.
989 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
991 * pt.c: Fix a comment typo.
993 2006-01-02 Ian Lance Taylor <iant@google.com>
995 * semantics.c (maybe_convert_cond): Optionally warn when using an
996 assignment as a condition.
997 * typeck.c (convert_for_assignment): Optionally warn about
998 assigning the result of an assignment to a bool.
1000 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1002 * pt.c (canonical_template_parms): Correct typo in comment.
1004 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1006 * typeck.c (structural_comptypes): Renamed from "comptypes".
1007 (comptypes): Use canonical type information to perform fast type
1008 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1009 canonical type comparison returns the same results as we would see
1010 from the current, structural check. Support COMPARE_STRUCTURAL
1011 when we need structural checks.
1012 * decl.c (typename_compare): Fix comment.
1013 (build_typename_type): TYPENAME_TYPE nodes require structural
1014 equality checks, because they resolve different based on the
1016 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1017 require structural equality checks (for now).
1018 (build_ptrmemfunc_type): Build the canonical pointer to member
1020 (compute_array_index_type): Whenever we build a new index type
1021 to represent the size of an array in a template, we need to mark
1022 this index type as requiring structural equality. This goes for
1023 arrays with value-dependent sizes with the current ABI, or all
1025 * tree.c (cplus_array_hash): New.
1026 (struct cplus_array_info): New.
1027 (cplus_array_compare): New.
1028 (cplus_array_htab): New.
1029 (build_cplus_array_type_1): Use a hash table to cache the array
1030 types we build. Build the canonical array type for each array
1032 (cp_build_qualified_type_real): When building a cv-qualified array
1033 type, use the hash table of array types and build canonical array
1035 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1036 use structural equality (for now).
1037 * cp-tree.h (COMPARE_STRUCTURAL): New.
1038 * pt.c (canonical_template_parms): New.
1039 (canonical_type_parameter): New.
1040 (process_template_parm): Find the canonical type parameter.
1041 (lookup_template_class): When we have named the primary template
1042 type, set the canonical type for our template class to the primary
1043 template type. If any of the template arguments need structural
1044 equality checks, the template class needs structural equality
1046 (tsubst): When reducing the level of a template template
1047 parameter, we require structural equality tests for the resulting
1048 parameter because its template parameters have not had their types
1049 canonicalized. When reducing a template type parameter, find the
1050 canonical reduced type parameter.
1051 (any_template_arguments_need_structural_equality_p): New.
1053 2006-12-31 Simon Martin <simartin@users.sourceforge.net>
1056 * parser.c (cp_parser_primary_expression): Return error_mark_node when
1057 a statement-expression is found outside of a function body.
1059 2006-12-28 Kazu Hirata <kazu@codesourcery.com>
1061 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P, TYPE_FUNCTION_SCOPE_P):
1064 * decl2.c: Fix a comment typo.
1066 2006-12-21 Andrew Pinski <pinskia@gmail.com>
1069 * decl.c (cxx_builtin_function): Only copy the decl if adding
1070 it to the std namespace.
1072 2006-12-21 Andrew Pinski <pinskia@gmail.com>
1075 * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
1077 2006-12-22 Kazu Hirata <kazu@codesourcery.com>
1079 * decl.c: Fix a coment typo.
1081 2006-12-18 Ian Lance Taylor <iant@google.com>
1083 * decl.c (start_preparsed_function): Add support for
1084 -Wmissing-declarations.
1086 2006-12-16 Simon Martin <simartin@users.sourceforge.net>
1089 * cp-tree.h (struct deferred_access_check): New structure to represent a
1090 deferred access check. It replaces the previous representation as a tree.
1091 (get_deferred_access_checks): Return a vector of struct
1092 deferred_access_check instead of a tree list.
1093 (perform_access_checks): Take a vector of struct deferred_access_check
1094 instead of a tree list.
1095 * semantics.c (struct deferred_access): Store the deferred access checks
1096 as a vector of struct deferred_access_check instead of a tree list.
1097 (push_deferring_access_checks): Handle the change in struct
1099 (get_deferred_access_checks): Likewise.
1100 (pop_to_parent_deferring_access_checks): Likewise.
1101 (perform_or_defer_access_check): Likewise.
1102 (perform_access_checks): Take a vector of struct deferred_access_check
1103 instead of a tree list.
1104 * parser.c (struct tree_check): New structure to store various data
1105 associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
1106 (struct cp_token): Changed the value field to be a union with a pointer to
1107 a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
1108 tokens and a tree field for all other tokens.
1109 (eof_token): Adjusted due to the change in struct cp_token.
1110 (cp_lexer_get_preprocessor_token): Likewise.
1111 (cp_lexer_purge_token): Likewise.
1112 (cp_lexer_purge_tokens_after): Likewise.
1113 (cp_lexer_print_token): Likewise.
1114 (cp_parser_error): Likewise.
1115 (cp_parser_identifier): Likewise.
1116 (cp_parser_string_literal): Likewise.
1117 (cp_parser_primary_expression): Likewise.
1118 (cp_parser_unqualified_id): Likewise.
1119 (cp_parser_parenthesized_expression_list): Likewise.
1120 (cp_parser_storage_class_specifier_opt): Likewise.
1121 (cp_parser_function_specifier_opt): Likewise.
1122 (cp_parser_type_specifier): Likewise.
1123 (cp_parser_simple_type_specifier): Likewise.
1124 (cp_parser_initializer_list): Likewise.
1125 (cp_parser_member_specification_opt): Likewise.
1126 (cp_parser_attribute_list): Likewise.
1127 (cp_parser_objc_expression): Likewise.
1128 (cp_parser_objc_protocol_qualifiers): Likewise.
1129 (cp_parser_objc_selector): Likewise.
1130 (cp_parser_objc_declaration): Likewise.
1131 (cp_parser_objc_statement): Likewise.
1132 (cp_parser_omp_clause_name): Likewise.
1133 (cp_parser_omp_clause_default): Likewise.
1134 (cp_parser_omp_clause_schedule): Likewise.
1135 (cp_parser_omp_parallel): Likewise.
1136 (cp_parser_initial_pragma): Likewise.
1137 (pragma_lex): Likewise.
1138 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1139 (cp_parser_nested_name_specifier_opt): Likewise.
1140 Use cp_token::u::tree_check_value to save the token's value, the
1141 associated deferred checks and its qualifying scope.
1142 (cp_parser_template_id): Likewise.
1143 (cp_parser_template_declaration_after_export): Adjusted the call to
1144 get_deferred_access_checks.
1145 (cp_parser_init_declarator): Take the access checks as a vector of struct
1146 deferred_access_check instead of a tree list.
1147 (cp_parser_single_declaration): Likewise.
1148 (cp_parser_perform_template_parameter_access_checks): Likewise.
1149 (cp_parser_simple_declaration): Adjusted the call to
1150 cp_parser_init_declarator.
1151 (cp_parser_explicit_specialization): Adjusted the call to
1152 cp_parser_single_declaration.
1154 2006-12-13 Ian Lance Taylor <iant@google.com>
1158 * parser.c (cp_parser_expression_stack_entry): Add field
1160 (cp_parser_binary_expression): Track tree code of left hand side
1161 of expression. Use it when calling build_x_binary_op.
1162 (cp_parser_selection_statement): Add if_p parameter. Change all
1163 callers. Warn about ambiguous else.
1164 (cp_parser_statement): Add if_p parameter. Change all callers.
1165 (cp_parser_implicitly_scoped_statement): Likewise.
1166 * typeck.c (build_x_binary_op): Add parameters arg1_code and
1167 arg2_code. Change all callers. Call warn_about_parentheses.
1168 * cp-tree.h (build_x_binary_op): Update declaration.
1170 2006-12-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1172 * decl.c (build_enumerator): Update error message to match C
1175 2006-12-11 Jan Hubicka <jh@suse.cz>
1177 * decl2.c (var_finalized_p): Update for renamed varpool functions.
1179 2006-12-09 Zack Weinberg <zackw@panix.com>
1181 * parser.c (yydebug, enum pragma_omp_clause): Delete.
1183 2006-12-07 Mark Mitchell <mark@codesourcery.com>
1186 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
1187 (explicit_class_specialization_p): Declare.
1188 * pt.c (explicit_class_specialization_p): New function.
1189 * parser.c (cp_parser_init_declarator): Check correct number of
1190 template parameters for in-class function definitions.
1191 (cp_parser_check_declrator_template_parameters): Stop looking for
1192 template classes when we find an explicit specialization.
1194 2006-12-07 Lee Millward <lee.millward@codesourcery.com>
1197 * cp_parser_elaborated_type_specifier: Check
1198 the return value of check_elaborated_type_specifier.
1200 2006-12-06 Mark Mitchell <mark@codesourcery.com>
1203 * parser.c (cp_parser_init_declarator): Reject initialization of
1206 2006-12-05 Mark Mitchell <mark@codesourcery.com>
1209 * decl2.c (check_member_template): Move check for member
1210 templates in local classes to ...
1211 * parser.c (cp_parser_template_declaration_after_export):
1215 * decl.c (check_array_designated_initializer): New function.
1216 (maybe_deduce_size_from_array_init): Use it.
1217 (reshape_init_array): Likewise.
1219 2006-12-05 Aldy Hernandez <aldyh@redhat.com>
1221 Merge from gimple-tuples-branch.
1223 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
1225 * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
1226 (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
1227 (cxx_omp_clause_copy_ctor): Same.
1228 (cxx_omp_clause_assign_op): Same.
1230 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
1232 * cp-tree.h (union lang_tree_node): Gimple statements do not
1234 (TREE_INDIRECT_USING): Look in base.
1236 2006-12-04 Jan Hubicka <jh@suse.cz>
1238 * cp-objcp-common.c (cp_expr_size): Return NULL in the case
1241 2006-12-04 Mark Mitchell <mark@codesourcery.com>
1244 * pt.c (tsubst_decl): Disallow variables of function type.
1247 * call.c (add_builtin_candidate): Do not permit NULL pointer
1248 constants to be compared with template parameters.
1250 2006-12-04 Eric Botcazou <ebotcazou@adacore.com>
1252 * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
1253 Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1255 2006-12-03 Richard Henderson <rth@redhat.com>
1256 Andrew Pinski <pinskia@gmail.com>
1259 * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
1261 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
1264 * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
1266 2006-12-02 Kazu Hirata <kazu@codesourcery.com>
1268 * name-lookup.c: Follow spelling conventions.
1270 2006-12-01 Geoffrey Keating <geoffk@apple.com>
1272 * decl.c (poplevel): Check DECL_INITIAL invariant.
1273 (duplicate_decls): Preserve DECL_INITIAL when eliminating
1274 a new definition in favour of an old declaration.
1275 (start_preparsed_function): Define and document value of
1276 DECL_INITIAL before and after routine.
1277 (finish_function): Check DECL_INITIAL invariant.
1279 (cp_parser_function_definition_from_specifiers_and_declarator):
1280 Skip duplicate function definitions.
1282 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1285 * typeck.c (type_after_usual_arithmetic_conversions):
1286 Fix assertion for vector types.
1287 (build_binary_op): Use temporary for inner type of vector types.
1289 2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
1292 * typeck.c (build_binary_op): Fix pointer to member function
1293 comparison for ptrmemfunc_vbit_in_delta targets.
1295 2006-12-01 Dirk Mueller <dmueller@suse.de>
1298 * decl.c (grokdeclarator): Warn for type qualifiers on return
1299 type for non-dependent types.
1300 * pt.c (tsubst_function_type): Warn for type qualifiers on
1301 return type for dependent types.
1303 2006-11-30 Geoffrey Keating <geoffk@apple.com>
1305 * rtti.c (get_tinfo_decl): Handle return value from
1306 pushdecl_top_level_and_finish.
1308 2006-11-29 Lee Millward <lee.millward@codesourcery.com>
1311 * parser.c (cp_parser_class_head): Move processing
1312 of any base classes to...
1313 (cp_parser_class_specifier) ...here. Take an extra
1314 tree* parameter for any base classes. Only process
1315 them if the opening brace was found.
1317 2006-11-28 Jakub Jelinek <jakub@redhat.com>
1320 * decl.c (grokfndecl): Check main's type after applying
1321 attributes, not before.
1323 2006-11-27 Mark Mitchell <mark@codesourcery.com>
1325 * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
1326 entries for a primary construction virtual table.
1328 2006-11-26 Mark Mitchell <mark@codesourcery.com>
1331 * parser.c (cp_parser): Add in_function_body.
1332 (cp_parser_new): Initialize it.
1333 (cp_parser_primary_expression): Use parser->in_function_body
1334 instead of at_function_scope_p.
1335 (cp_parser_asm_definition): Likewise.
1336 (cp_parser_direct_declarator): Likewise.
1337 (cp_parser_class_specifier): Clear parser->in_function_body.
1338 (cp_parser_constructor_declarator_p): Use parser->in_function_body
1339 instead of at_function_scope_p.
1340 (cp_parser_function_body_after_declarator): Set
1341 parser->in_function_body.
1343 2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
1345 * cp-tree.def (STATIC_ASSERT): New.
1346 * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
1347 * error.c (dump_decl): Handle STATIC_ASSERT.
1348 * cp-tree.h (STATIC_ASSERT_CONDITION): New.
1349 (STATIC_ASSERT_MESSAGE): New.
1350 (STATIC_ASSERT_SOURCE_LOCATION): New.
1351 (struct tree_static_assert): New.
1352 (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
1353 (union lang_tree_node): Add static_assertion.
1354 (finish_static_assert): Declare.
1355 * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
1356 (pp_cxx_declaration): Handle STATIC_ASSERT.
1357 * pt.c (instantiate_class_template): Handle
1358 STATIC_ASSERT members.
1359 (tsubst_expr): Handle STATIC_ASSERT statements.
1360 * semantics.c (finish_static_assert): New.
1361 * lex.c (D_CPP0X): New.
1362 (reswords): Add static_assert keyword.
1363 (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
1364 * parser.c (cp_parser_block_declaration): Parse static
1366 (cp_parser_static_assert): New.
1367 (cp_parser_member_declaration): Parse static assertions.
1369 2006-11-21 Jakub Jelinek <jakub@redhat.com>
1372 * decl.c (cp_finish_decl): Check for value dependent brace enclosed
1376 * cp-tree.h (WANT_VECTOR): Define.
1377 (WANT_ARITH): Add WANT_VECTOR.
1378 * cvt.c (build_expr_type_conversion): Handle vector types.
1379 * typeck.c (build_unary_op): Add WANT_VECTOR to
1380 build_expr_type_conversion flags.
1382 2006-11-20 Simon Martin <simartin@users.sourceforge.net>
1385 * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
1386 extra argument that represents the declaration to use to print
1387 potential error messages.
1388 * init.c (build_offset_ref): Adjusted the call to
1389 perform_or_defer_access_check.
1390 * class.c (alter_access, resolve_address_of_overloaded_function):
1392 * decl.c (make_typename_type, make_unbound_class_template): Likewise.
1393 * search.c (lookup_member): Likewise.
1394 * friend.c (add_friend): Likewise.
1395 * parser.c (cp_parser_template_id,
1396 cp_parser_pre_parsed_nested_name_specifier): Likewise.
1397 * semantics.c (finish_non_static_data_member,
1398 check_accessibility_of_qualified_id, finish_id_expression): Likewise.
1399 (pop_to_parent_deferring_access_checks, perform_access_checks,
1400 perform_or_defer_access_check): Adjusted the call to enforce_access.
1401 * call.c (enforce_access): Use the new extra argument to build the
1403 (build_op_delete_call): Adjusted the call to
1404 perform_or_defer_access_check.
1405 (build_over_call): Likewise.
1407 2006-11-16 Dirk Mueller <dmueller@suse.de>
1409 * name-lookup.c (begin_scope): Use GGC_CNEW instead of
1412 2006-11-13 Roger Sayle <roger@eyesopen.com>
1414 * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
1415 base type info initializer has the correct type.
1417 2006-11-13 Mark Mitchell <mark@codesourcery.com>
1420 * pt.c (coerce_template_parms): Do not skip_evaluation while
1421 substituting template arguments.
1423 2006-11-11 Richard Guenther <rguenther@suse.de>
1425 * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
1426 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1428 2006-11-03 Roger Sayle <roger@eyesopen.com>
1430 * call.c (build_op_delete_call): Test user-visible type against
1431 size_type_node, instead of against the internal type, sizetype.
1432 * class.c (type_requires_array_cookie): Likewise.
1433 * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
1434 handling of TYPE_IS_SIZETYPE.
1435 * typeck.c (type_after_usual_arithmetic_conversions): Remove
1436 special case handling of TYPE_IS_SIZETYPE.
1437 (comptypes): Likewise.
1439 2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
1441 * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
1442 if targetm.cxx.use_atexit_for cxa_atexit.
1443 (start_cleanup_fn): Likewise.
1444 (register_dtor_fn): Likewise.
1446 2006-09-25 Geoffrey Keating <geoffk@apple.com>
1448 * decl2.c (cp_write_global_declarations): Rename from
1450 * cp-lang.c (finish_file): Don't call cp_finish_file.
1451 * cp-tree.h (cp_write_global_declarations): Rename from
1453 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
1454 cp_write_global_declarations.
1456 2006-10-31 Geoffrey Keating <geoffk@apple.com>
1458 * name-lookup.c (get_anonymous_namespace_name): New.
1459 (push_namespace_with_attribs): Use get_anonymous_namespace_name.
1460 * decl2.c (start_objects): Update for rename of
1461 get_file_function_name_long.
1463 2006-10-30 Dirk Mueller <dmueller@suse.de>
1466 * decl.c (grokdeclarator): Duplicate diagnostic message
1467 for easier translation.
1468 * decl.c (grokdeclarator): Fix line-wrapping.
1470 2006-10-30 Dirk Mueller <dmueller@suse.de>
1473 * decl.c (grokfndecl): Use check_main_parameter_types.
1475 2006-10-30 Dirk Mueller <dmueller@suse.de>
1478 * decl.c (grokfndecl): Duplicate warning message for
1481 2006-10-30 Dirk Mueller <dmueller@suse.de>
1483 * typeck.c (build_unary_op): Fix indenting. Use G_().
1485 2006-10-29 Dirk Mueller <dmueller@suse.de>
1488 * typeck.c (build_unary_op): Duplicate warning message
1489 for easier translation.
1491 2006-10-29 Dirk Mueller <dmueller@suse.de>
1494 * typeck.c (build_array_ref): Warn for char subscriptions
1497 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
1499 * decl.c: Fix a comment typo.
1501 2006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1504 * typeck.c (build_unary_op): Use same_type_p when comparing to
1507 2006-10-29 Dirk Mueller <dmueller@suse.de>
1510 * typeck.c (build_binary_op): Duplicate warning message
1511 for better translation.
1513 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
1515 * decl.c (builtin_function_1): Move common code to
1516 add_builtin_function.
1517 (builtin_function): Rename to cxx_builtin_function.
1518 Change the signature.
1519 * call.c: Include langhooks.h.
1520 (build_java_interface_fn_ref): Replace calls to
1521 builtin_function with add_builtin_function.
1522 * Make-lang.in (cp/call.o): Depend on langhooks.h.
1523 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
1524 cxx_builtin_function.
1525 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
1526 Change the signature.
1528 2006-10-22 Nathan Sidwell <nathan@codesourcery.com>
1531 * rtti.c (tinfo_base_init): The type info string is always global.
1533 2006-10-20 Lee Millward <lee.millward@codesourcery.com>
1534 Mark Mitchell <mark@codesourcery.com>
1537 * decl2.c (grokbitfield): Detect invalid non-integral
1538 types earlier when possible.
1540 2006-10-18 Mark Shinwell <shinwell@codesourcery.com>
1543 * typeck2.c (digest_init): Raise error upon attempts to
1544 initialize arrays with variables.
1546 2006-10-17 Lee Millward <lee.millward@codesourcery.com>
1549 * cp-tree.h (xref_basetypes): Return bool instead of void.
1550 * decl.c (xref_basetypes): Adjust definition. Return false
1551 if the class bases are invalid.
1552 * parser.c (cp_parser_class_head): Check the return value
1553 from xref_basetypes.
1555 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1558 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
1562 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
1564 (cp_parser_constructor_declarator_p): Use it.
1565 (cp_parser_check_type_definition): Return a value indicating
1566 whether or not the definition is valid.
1567 (cp_parser_enum_specifier): Skip invalid enum definitions.
1569 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1572 * typeck2.c (build_functional_cast): Don't zero-initialize
1573 non-PODs; instead, call their constructors.
1574 * method.c (synthesize_method): Always build mem-initializers, if
1575 we're synthesizing the default constructor.
1577 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1580 * decl.c (reshape_init_class): Move check for designated
1582 * parser.c (cp_parser_initializer_list): ... here.
1583 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
1585 2006-10-16 Mark Mitchell <mark@codesourcery.com>
1588 * typeck2.c (process_init_constructor_array): Reword comment.
1589 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
1593 * parser.c (cp_parser_using_declaration): Stop parsing when
1594 something goes wrong with an access declaration.
1597 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
1598 types when their sizes are required. Refine test for VLAs.
1601 * parser.c (cp_parser_template_argument): Don't consider "&var" a
1602 possible constant-expression.
1603 * pt.c (convert_nontype_argument): Refine handling of arguments of
1606 2006-10-13 Mark Mitchell <mark@codesourcery.com>
1609 * parser.c (function_declarator_p): New function.
1610 (cp_parser_init_declarator): Use it.
1611 (cp_parser_member_declaration): Likewise.
1613 2006-10-12 Mark Mitchell <mark@codesourcery.com>
1616 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
1617 variably modified types.
1619 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
1622 * decl.c (start_decl): Return error_mark_node if a
1623 function is initialized like a variable.
1624 (check_var_type): If a variable of field is declared void,
1625 set the type to error_mark_node.
1626 (grokdeclarator): Check the return type of check_var_type.
1627 * class.c (finish_struct_1): Robustify.
1629 2006-10-11 Mark Mitchell <mark@codesourcery.com>
1632 * decl.c (check_initializer): Issue errors about trying to
1633 initialize arrays whose elements have variable size.
1635 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
1638 * cp-tree (struct cp_decl_specifier_seq): Rename to
1639 conflicting_specifiers_p
1640 * parser.c (cp_parser_set_storage_class): Set
1641 conflicting_specifiers_p for the input decl specifier
1642 if a typedef specifier is present. Rename uses of
1643 multiple_specifiers_p to conflicting_specifiers_p.
1644 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
1645 class specifier has already been set for this declaration,
1646 set conflicting_specifiers_p to true on the decl_specs.
1647 * decl.c (grokdeclarator): Rename uses of
1648 multiple_specifiers_p to conflicting_specifiers_p.
1650 2006-10-10 Brooks Moses <bmoses@stanford.edu>
1652 * Make-lang.in: Added "c++.pdf" target support.
1654 2006-10-10 Richard Guenther <rguenther@suse.de>
1656 PR rtl-optimization/29323
1657 * decl.c (finish_function): Set TREE_NOTHROW only for
1658 functions that bind local.
1660 2006-10-09 Richard Henderson <rth@redhat.com>
1662 Revert emutls patch.
1664 2006-10-04 Richard Henderson <rth@redhat.com>
1665 Jakub Jelinek <jakub@redhat.com>
1667 * decl.c (grokvardecl): Don't error if !have_tls.
1668 (grokdeclarator): Likewise.
1669 * parser.c (cp_parser_omp_threadprivate): Likewise.
1671 2006-10-03 Mark Mitchell <mark@codesourcery.com>
1674 * friend.c (do_friend): Improve comments; add assertion.
1675 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
1676 typenames for qualified names used in declarations, even when
1677 caching qualified name lookup.
1680 * decl2.c (grokfield): Don't handle access declarations here.
1681 * parser.c (cp_parser_using_declaration): Handle access
1683 (cp_parser_block_declaration): Adjust calls to
1684 cp_parser_using_declaration.
1685 (cp_parser_member_declaration): Likewise. Use
1686 cp_parser_using_declaration to look for access_declarations.
1688 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1691 * init.c (build_new): Check for invalid init.
1693 2006-10-02 Mark Mitchell <mark@codesourcery.com>
1696 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
1697 not try to actually evaluate sizeof for a VLA type.
1699 2006-10-01 Mark Mitchell <mark@codesourcery.com>
1702 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
1703 * semantics.c (baselink_for_fns): Build a baselink, even when
1704 processing a template.
1707 * parser.c (cp_parser_postfix_dot_deref_expression): Use
1708 BASELINK_ACCESS_BINFO as the qualifying scope when calling
1709 adjust_result_of_qualified_name_lookup.
1711 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
1715 * cp-tree.h (redeclare_class_template): Adjust declaration
1716 to return bool instead of void.
1717 * pt.c (redeclare_class_template): Update definition.
1718 Return false on error.
1719 * decl.c (xref_tag): Return error_mark_node if
1720 redeclare_class_template returned false.
1723 * cp-tree.h (begin_specialization): Return bool
1725 * pt.c (check_specialization_scope): Likwise.
1726 Adjust comment. Return false if a specialization
1727 isn't permitted in the current scope.
1728 (begin_specialization): Use the return value of
1729 check_specialization_scope.
1730 * parser.c (cp_parser_explicit_specialization): If
1731 begin_specialization returned false, skip the rest
1732 of the specialization.
1734 2006-09-21 Mark Mitchell <mark@codesourcery.com>
1737 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
1740 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
1743 * decl.c (shadow_tag): Return error_mark_node
1744 if maybe_process_partial_specialization failed.
1747 * decl.c (grokdeclarator): Return error_mark_node on
1748 declaration with two or more data types.
1750 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
1753 * class.c (check_for_override): Remove dllimport from virtual
1756 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
1759 * parser.c (cp_parser_labeled_statement): Return nothing. Do
1760 not take in_statement_expr and in_compound as arguments. Rename
1761 to cp_parser_label_for_labeled_statement. Parse only the label,
1763 (cp_parser_statement): Parse the statement of a labeled-statement
1764 from here, using tail recursion.
1766 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
1769 * init.c (build_zero_init): If we have an error mark node for
1770 the array size, return.
1772 2006-09-10 Mark Mitchell <mark@codesourcery.com>
1775 * cp-objcp-common.c (cxx_staticp): New function.
1776 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
1777 * cp-tree.h (cxx_staticp): New function.
1779 2006-09-09 Jason Merrill <jason@redhat.com>
1782 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
1784 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1787 * parser.c (cp_parser_skip_until_found): Rename to
1788 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
1789 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
1790 Reorganize. Adjust comment.
1791 (cp_parser_template_declaration_after_export): Adjust call.
1792 (cp_parser_enclosed_template_argument_list): Likewise.
1794 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
1797 * init.c (build_new_1): Build a distinct type copy
1798 for the array type that was returned from
1799 build_cplus_array_type.
1801 2006-09-07 Jason Merrill <jason@redhat.com>
1804 * cvt.c (convert_to_void): Enable previous change.
1807 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
1810 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
1813 * pt.c (fold_non_dependent_expr): Make sure expr is not
1814 dereferenced if it is NULL.
1816 2006-09-06 Zak Kipling <zak@transversal.com>
1819 * decl.c (make_rtl_for_nonlocal_decl),
1820 (start_preparsed_function): Don't use lbasename on
1821 input_filename when calling get_fileinfo.
1822 * semantics.c (begin_class_definition): Likewise.
1823 * lex.c (cxx_make_type): Likewise.
1824 (handle_pragma_interface): Call get_fileinfo on input_filename,
1825 not on the parameter to the directive.
1827 2006-09-06 Mark Mitchell <mark@codesourcery.com>
1830 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
1834 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
1837 2006-09-06 Jason Merrill <jason@redhat.com>
1840 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
1841 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
1842 * tree.c (build_cplus_new): Set it.
1845 * cvt.c (convert_to_void): Replace a subexpression with no side
1846 effects with void_zero_node.
1847 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
1848 (get_first_fn): Ditto.
1849 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
1851 2006-09-05 Jason Merrill <jason@redhat.com>
1854 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
1855 where the name is a type used incorrectly.
1858 * typeck.c (maybe_warn_about_returning_address_of_local): Look
1859 through COMPONENT_REF and ARRAY_REF.
1862 * name-lookup.c (do_class_using_decl): Try to find the base even
1863 if bases_dependent_p.
1864 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
1867 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
1869 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
1871 PR 23287 Revert my 2006-09-01 patch.
1872 * parser.c: Reverted.
1875 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
1881 * parser.c (cp_parser_template_parameter_list): Add
1882 invalid template parameters to the parameter list as
1885 2006-09-02 Jakub Jelinek <jakub@redhat.com>
1888 * except.c (build_throw): Only set current_function_returns_abnormally
1889 if cfun is not NULL.
1892 * repo.c (repo_file): Remove.
1893 (open_repo_file, reopen_repo_file_for_write): Return fopened
1894 FILE * instead of setting global repo_file variable.
1895 (init_repo): Adjust caller.
1896 (finish_repo): Likewise. Return instead of goto out before
1897 reopen_repo_file_for_write has been called.
1899 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
1902 * semantics.c (finish_call_expr): Add assert.
1903 * name-lookup.c (lookup_arg_dependent): Check we found an overload
1907 * parser.c (cp_parser_id_expression): Add member_p
1908 argument. Update all callers.
1909 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
1910 the object's scope, if valid.
1911 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
1913 (cp_parser_postfix_dot_deref_expression): Set object_scope.
1914 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
1916 2006-08-30 Jason Merrill <jason@redhat.com>
1919 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
1920 the fields have been processed.
1922 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
1925 * call.c (build_x_va_arg): Remove the reference type
1926 from the type before creating the pointer type.
1928 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
1931 * except.c (expand_start_catch_block): Use correct types for bitwise
1934 2006-08-28 Jason Merrill <jason@redhat.com>
1937 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
1938 fields can't be packed.
1941 * cvt.c (convert_to_void): Don't automatically load from volatiles
1942 of TREE_ADDRESSABLE type.
1944 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1947 * cp-tree.h (maybe_process_partial_specialization): Return
1948 tree instead of void.
1949 * parser.c (cp_parser_class_head): Use return value of
1950 maybe_process_partial_specialization.
1951 * pt.c (maybe_process_partial_specialization): Return error_mark_node
1952 for broken specializations, TYPE otherwise. Check for template
1953 template parameters.
1955 2006-08-27 Mark Mitchell <mark@codesourcery.com>
1958 * pt.c (register_specialization): Return error_mark_node for
1959 specialization-after-instantiation.
1960 * decl2.c (mark_used): Mark the main function used when one of its
1963 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
1966 * class.c (check_field_decls): Don't issue error about
1967 local classes containing static data members.
1969 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
1972 * parser.c (struct cp_token): Add input_file_stack_index.
1973 (eof_token): Update.
1974 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
1975 (cp_lexer_set_source_position_from_token): Restore input file
1978 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
1983 * pt.c (process_template_parm): Store invalid template
1984 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
1985 (push_inline_template_parms_recursive): Check for template
1986 parameters having a TREE_VALUE of error_mark_node rather than
1987 check the parameter itself.
1988 (mangle_class_name_for_template): Likewise.
1989 (comp_template_parms): When comparing the individual template
1990 parameters, return 1 if either is error_mark_node.
1991 (current_template_args): Robustify.
1992 (redeclare_class_template): Likewise.
1994 2006-08-26 Mark Mitchell <mark@codesourcery.com>
1997 * class.c (resolve_address_of_overloaded_function): Add
1998 access_path parameter. Perform access checks.
1999 (instantiate_type): Adjust call to
2000 resolve_address_of_overloaded_function. Remove unnecessary code.
2001 * tree.c (is_overloaded_fn): Document. Return 2 when there are
2002 acutally multiple functions.
2003 (really_overloaded_fn): Use is_overloaded_fn.
2004 * mangle.c (write_expression): Handle BASELINKs.
2005 * cp-tree.h (really_overloaded_fn): Return bool.
2006 (baselink_for_fns): Declare.
2007 * search.c (lookup_member): Check access for single static
2009 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
2010 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
2011 * semantics.c (finish_call_expr): Use baselink_for_fns.
2012 (baselink_for_fns): New function.
2013 (finish_id_expression): Use it.
2014 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
2017 * pt.c (tsubst): Issue errors about attempts to create VLAs at
2018 template-instantiation time.
2020 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2023 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
2024 template parameters. Improve error message for template type
2028 * cp-tree.h (grok_op_properties): Return bool instead of void.
2029 * decl.c (grokfndecl): Discard invalid operator declarations.
2030 (copy_fn_p): Revert change for PR 27547.
2031 (grok_op_properties): Return error status (true on success).
2032 * pt.c (tsubst_decl): Discard invalid operator declarations.
2034 2006-08-25 Mark Mitchell <mark@codesourcery.com>
2037 * decl.c (grokdeclarator): Disallow declarations with qualified
2038 names in local scopes.
2040 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
2043 * decl.c (make_typename_type): Only try and resolve it when
2044 context is not dependent. Refactor.
2045 * decl2.c (check_classfn): Push to class scope before looking for
2048 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
2051 * g++spec.c (lang_specific_driver): Always check if we need to
2052 swallow a space-separated arg to '-x'.
2053 * lang-specs.h: Don't create ouput files for '-xc++-header'
2056 2006-08-23 Jason Merrill <jason@redhat.com>
2059 * pt.c (push_template_decl_real): A friend template with class
2060 scope isn't primary.
2062 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
2065 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
2066 Move -fno-rtti check to be more specific.
2068 2006-08-22 Jason Merrill <jason@redhat.com>
2071 * call.c (build_over_call): Don't make a copy here if build_call
2074 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
2077 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
2080 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
2083 * parser.c (cp_parser_postfix_expression): Make sure that the
2084 saved value for parser->type_definition_forbidden_message is
2085 restored before returning to avoid an invalid free().
2087 2006-08-22 Jason Merrill <jason@redhat.com>
2090 * typeck.c (merge_types): If either of the types have the right
2091 attributes, return that one.
2093 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
2094 doing this to class types.
2095 * typeck.c (original_type): Deal with type quals properly.
2097 2006-08-21 Jason Merrill <jason@redhat.com>
2100 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
2101 just leave the expression as it is.
2102 (finish_stmt_expr): If the statement-expression has class type,
2103 wrap it in a TARGET_EXPR.
2104 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
2106 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
2108 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
2111 * decl.c (duplicate_decls): Return early if either
2112 newdecl or olddecl is error_mark_node.
2115 * decl.c (grokdeclarator): Return early after
2116 issuing diagnostic about an incomplete type.
2119 * tree.c (decl_anon_ns_mem_p): Robustify.
2120 * decl2.c (determine_visibility): Likewise.
2122 2006-08-20 Mark Mitchell <mark@codesourcery.com>
2125 * tree.c (cast_valid_in_integral_constant_expression_p): New
2127 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
2128 * pt.c (tsubst_expr): Add integral_constant_expression_p
2130 (fold_non_dependent_expr): Adjust callers of
2131 tsubst_{expr,copy_and_build}.
2132 (tsubst_friend_function): Likewise.
2133 (tsubst_template_arg): Likewise.
2134 (tsubst_default_argument): Likewise.
2135 (tsubst_decl): Likewise.
2137 (tsubst_omp_clasuses): Likewise.
2138 (regenerate_decl_fromp_template): Likewise.
2139 (instantiate_decl): Likewise.
2140 (tsubst_initializer_list): Likewise.
2141 (tsubst_enum): Likewise.
2142 (tsubst_expr): Use RECUR throughout.
2143 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
2144 invalid casts in integral constant expressions.
2145 * parser.c (cp_parser_postfix_expression): Use
2146 cast_valid_in_integral_constant_expression_p.
2147 (cp_parser_cast_expression): Likewise.
2148 (cp_parser_functional_cast): Likewise.
2151 * pt.c (tsubst_qualified_id): Do not strip references from
2154 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2157 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
2159 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
2160 for valid type-names.
2161 (cp_parser_unqualified_id): Fix error handling for destructors.
2164 * decl.c (xref_tag): Improve error message. Return early on error.
2167 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
2169 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
2172 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
2174 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
2177 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
2178 perform_integral_promotions for non integral type.
2180 2006-08-16 Jason Merrill <jason@redhat.com>
2183 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
2184 if arg is a function.
2186 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2189 * init.c (build_new): Return early on invalid placement.
2191 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
2194 * pt.c (process_template_parm): Robustify.
2196 2006-08-14 Steve Ellcey <sje@cup.hp.com>
2200 * operators.def: Remove <?, ?>, <?=, and >?= operators.
2201 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
2202 (cp_parser_warn_min_max): Remove.
2204 2006-08-11 Jason Merrill <jason@redhat.com>
2207 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
2208 attributes applied to a TYPENAME_TYPE.
2210 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
2213 * pt.c (coerce_template_parms): Copy across the
2214 invalid template arguments to the new template inner arguments.
2215 (retrieve_specialization): Robustify.
2218 * pt.c (coerce_template_template_parms): Robustify.
2221 * error.c (dump_template_parms): Robustify.
2224 * pt.c (redeclare_class_template): Robustify.
2227 * pt.c (type_unification_real): Robustify.
2229 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
2232 * decl.c (start_decl): Return error_mark_node if a
2233 diagnostic was issed for an invalid typedef initialization.
2235 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2238 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
2239 when parsing destructor names.
2242 * decl.c (duplicate_decls): Call check_default_args here.
2243 (start_preparsed_function): Do not call check_default_args.
2244 * name-lookup.c (pushdecl_maybe_friend): Only call
2245 check_default_args if duplicate_decls got bypassed.
2247 2006-08-02 Richard Guenther <rguenther@suse.de>
2251 2006-07-05 Richard Guenther <rguenther@suse.de>
2252 Andrew Pinski <pinskia@gcc.gnu.org>
2255 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2256 top level qualifiers for pointer type comparisons.
2258 2006-08-02 Mark Mitchell <mark@codesourcery.com>
2261 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
2263 2006-07-31 Mark Mitchell <mark@codesourcery.com>
2266 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
2267 (stabilize_call): Tweak documentation.
2268 (stabilize_init): Only call stabilize_call for calls.
2270 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2273 * decl2.c (check_classfn): Remove early return.
2274 * search.c (lookup_member): Return NULL with bad type.
2276 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2279 * decl.c (check_initializer): Check for 1 initializer on scalar types.
2281 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
2284 * pt.c (tsubst_copy_and_build): Mark used enum types.
2285 * semantics.c (finish_id_expression): Likewise.
2287 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2290 * decl.c (grokdeclarator): Check whether "long" or "short" was
2291 specified for non-integral types.
2293 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2295 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2297 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
2301 * pt.c (process_template_parm) Store invalid template
2302 parameters as error_mark_node in the paramater list.
2303 (push_inline_template_parms_recursive): Handle invalid
2304 template parameters.
2305 (comp_template_parms): Likewise.
2306 (check_default_tmpl_arg): Likewise.
2307 (coerce_template_template_parms): Likewise.
2308 (mangle_class_name_for_template): Likewise.
2309 (tsubst_template_parms): Likewise.
2310 * error.c (dump_template_argument_list): Likewise.
2312 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
2314 * cp-tree.h: Fix a comment typo.
2316 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2319 * decl.c (grokdeclarator): Return error_mark_node after invalid
2322 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
2325 * decl.c (grokvardecl): Use FROB_CONTEXT.
2326 * pt.c (register_specialization): Likewise.
2328 2006-07-23 Mark Mitchell <mark@codesourcery.com>
2331 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
2332 * name-lookup.c (unqualified_namespace_lookup): There is no way to
2333 have a hidden name in non-namespace scopes.
2334 * pt.c (tsubst_friend_class): Look for hidden names.
2335 * decl.c (lookup_and_check_tag): Fix typo in comment.
2337 * semantics.c (finish_compound_literal): Fix typo in comment.
2339 2006-07-21 Jason Merrill <jason@redhat.com>
2341 * decl2.c (determine_visibility): Don't propagate visibility from
2343 (constrain_class_visibility): Don't warn in system headers.
2344 Don't warn about pointer fields.
2346 2006-07-20 Mike Stump <mrs@apple.com>
2348 * decl2.c (determine_visibility_from_class): Don't use hidden
2349 visibility for explicit instantiations.
2351 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2354 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
2355 valid decls. Cleanup.
2358 * semantics.c (check_template_template_default_arg): Simplify
2361 2006-07-20 Jason Merrill <jason@redhat.com>
2364 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
2365 const variables with implicit internal linkage.
2366 * tree.c (decl_linkage): Only return lk_external if it's set.
2369 * decl2.c (constrain_visibility): Ignore the anonymous namespace
2370 for extern "C" decls.
2371 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
2373 * decl2.c (constrain_visibility): Remove specified and reason
2374 parameters. Don't touch decls that already have explicit visibility.
2375 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
2377 (determine_visibility_from_class): Reverse sense of
2378 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
2379 (constrain_class_visibility): Only complain about member visibility
2380 if the member type is another class. Don't change visibility of the
2383 2006-07-19 Mark Mitchell <mark@codesourcery.com>
2386 * decl.c (layout_var_decl): Don't call push_local_name here.
2387 (initialize_artificial_var): Assert artificiality.
2388 (cp_finish_decl): Call push_local_name here.
2390 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2393 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
2396 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2399 * semantics.c (check_accessibility_of_qualified_id): Robustify.
2402 * pt.c (tsubst_decl): Handling substitutions into a static data
2403 member from within the scope of the tempalte itself.
2405 2006-07-18 Lee Millward <lee.millward@gmail.com>
2408 * method.c (locate_copy): Check for non_reference
2409 returning error_mark_node.
2412 * decl.c (duplicate_decls): Return error_mark_node
2413 on ambiguous declaration.
2415 2006-07-18 Steve Ellcey <sje@cup.hp.com>
2418 * search.c (adjust_result_of_qualified_name_lookup): Change
2419 assert to part of if statement.
2421 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2424 * decl.c (reshape_init_class): Return error_mark_node on error.
2426 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2429 * decl2.c (check_classfn): Return NULL_TREE on error.
2431 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2434 * name-lookup.c (pushdecl_maybe_friend): Return early on
2436 * except.c (expand_start_catch_block): Use error_mark_node instead
2437 of NULL_TREE for invalid decls.
2438 * parser.c (cp_parser_exception_declaration): Return error_mark_node
2439 on invalid catch parameter. Simplify.
2441 2006-07-16 Jakub Jelinek <jakub@redhat.com>
2444 * decl2.c (note_vague_linkage_var): Removed.
2445 (finish_static_data_member_decl): Add decl to pending_statics vector
2446 directly. Do it even for non-public decls.
2448 2006-07-15 Lee Millward <lee.millward@gmail.com>
2451 * decl2.c (acceptable_java_type): Robustify. Use
2452 proper Boolean return type instead of return 1.
2453 (check_java_method): Don't issue error about
2454 type not being an acceptable Java parameter if
2455 it's error_mark_node.
2458 * parser.c (cp_parser_elaborated_type_specifier):
2459 Return early if an invalid type was detected.
2461 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2464 * parser.c (cp_parser_check_decl_spec): New function.
2465 (cp_parser_decl_specifier_seq): Factor out check for repeated
2466 decl-specifiers into cp_parser_check_decl_spec. Use it.
2467 (cp_parser_type_specifier_seq): Use it.
2470 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
2474 * decl2.c (cplus_decl_attributes): Check for invalid decls.
2476 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2479 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
2480 * decl2.c (grokfield): Likewise.
2482 2006-07-12 Geoffrey Keating <geoffk@apple.com>
2484 * decl2.c (determine_visibility): Don't change visibility of
2485 function locals because of -fvisibility-inlines-hidden.
2487 2006-07-12 Jason Merrill <jason@redhat.com>
2490 * semantics.c (note_decl_for_pch): Don't premangle templates.
2492 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
2494 * typeck.c (string_conv_p): Remove spurious quotation mark in
2497 2006-07-07 Lee Millward <lee.millward@gmail.com>
2498 Andrew Pinski <pinskia@gmail.com>
2501 * decl.c (define_label): Return error_mark_node on error.
2502 * semantics.c (finish_label_stmt): Don't call
2503 add_stmt for invalid labels.
2505 2006-07-06 Jason Merrill <jason@redhat.com>
2508 * decl2.c (finish_static_data_member_decl): Don't assert
2511 2006-07-05 Jason Merrill <jason@redhat.com>
2515 * class.c (check_field_decls): Check TYPE_PACKED after
2516 stripping array types.
2517 (finish_struct_bits): Don't copy TYPE_SIZE here.
2520 * friend.c (is_friend): Fix DR 45 implementation.
2522 2006-07-05 Richard Guenther <rguenther@suse.de>
2523 Andrew Pinski <pinskia@gcc.gnu.org>
2526 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2527 top level qualifiers for pointer type comparisons.
2529 2006-07-01 Jason Merrill <jason@redhat.com>
2532 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
2535 2006-06-30 Jason Merrill <jason@redhat.com>
2538 * call.c (build_new_method_call): Force evaluation of the
2539 instance pointer, not the object.
2541 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
2543 * decl2.c: Fix a comment typo.
2545 2006-06-30 Jason Merrill <jason@redhat.com>
2548 * decl2.c (grokfield): Only try to treat the decl as an access
2549 declaration if the scope is a class.
2551 2006-06-29 Jason Merrill <jason@redhat.com>
2558 * decl2.c (determine_visibility): Overhaul.
2559 (determine_visibility_from_class): Likewise.
2560 (min_vis_r, type_visibility, constrain_visibility): New fns.
2561 (constrain_visibility_for_template): Likewise.
2562 (constrain_class_visibility): Likewise.
2563 * decl.c (cp_finish_decl): Call determine_visibility for function
2565 * name-lookup.c (pushtag): Call determine_visibility.
2566 * decl.c (duplicate_decls): Don't copy visibility from template to
2568 * pt.c (check_explicit_specialization): Likewise.
2569 (lookup_template_class, tsubst_decl): Call determine_visibility.
2570 * class.c (finish_struct_1): Call constrain_class_visibility.
2575 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
2577 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
2578 (cp_parser_enum_specifier): Likewise.
2579 (cp_parser_elaborated_type_specifier): Apply attributes if this
2580 declares only the class.
2581 (cp_parser_class_specifier): Apply leading attributes immediately.
2582 * semantics.c (begin_class_definition): Add attributes parameter,
2583 apply them to the type.
2587 * tree.c (decl_anon_ns_mem_p): New function.
2588 * cp-tree.h: Declare it.
2589 * decl2.c (determine_visibility): Make anonymous namespace
2591 (min_vis_r, constrain_visibility): Likewise.
2592 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
2594 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
2596 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
2597 on anonymous namespaces.
2599 2006-06-28 Jason Merrill <jason@redhat.com>
2602 * pt.c (convert_template_argument): Pass all template arguments
2603 on to coerce_template_template_parms.
2605 2006-06-25 Lee Millward <lee.millward@gmail.com>
2606 Mark Mitchell <mark@codesuorcery.com>
2609 * decl2.c (grokbitfied): Remove check for grokdeclarator
2610 returning NULL_TREE, instead check for error_mark_node
2611 to indicate failure.
2612 * decl.c (grokdeclarator): Adjust block comment.
2614 2006-06-25 Lee Millward <lee.millward@gmail.com>
2617 * mangle.c (mangle_conv_op_name_for_type): Check for
2619 * name-lookup.c (push_class_level_binding): Robustify.
2620 (do_class_using_decl): Return early if name is error_mark_node.
2622 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2625 * name-lookup.c (pushtag): Return if we have error_mark_node.
2627 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2630 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
2632 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2635 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
2636 arguments. Fix comment.
2639 * init.c (build_new_1): Handle error_mark_nodes returned by
2640 build_java_class_ref.
2641 (build_java_class_ref): Do not abort compilation, but return
2642 error_mark_node. Improve error message. Fix indentation.
2644 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
2647 * decl.c (start_decl): Check that dllimports are not initialized.
2649 2006-06-22 Lee Millward <lee.millward@gmail.com>
2652 * typeck2.c (build_m_component_ref): Use error_operand_p.
2655 * decl.c (grokdeclarator): Return error_mark_node on
2656 invalid uses of the scope resolution operator.
2658 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2661 * pt.c (determine_specialization): Check for invalid decls.
2664 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
2668 * rtti.c (get_tinfo_decl_dynamic): Robustify.
2670 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2673 * init.c (push_base_cleanups): Skip members with invalid types.
2674 * typeck.c (build_class_member_access_expr): Robustify.
2676 2006-06-19 Mark Mitchell <mark@codesourcery.com>
2678 * pt.c (instantiate_template): Fix typo in comment.
2680 2006-06-19 Richard Guenther <rguenther@suse.de>
2682 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
2683 power-of-two token vector size.
2685 2006-06-16 Mark Mitchell <mark@codesourcery.com>
2688 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
2692 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
2696 * decl.c (have_extern_spec): Remove.
2697 (start_decl): Do not check have_extern_spec.
2698 (start_function): Likewise.
2699 * cp-tree.h (have_extern_spec): Remove.
2700 * parser.c (cp_parser_linkage_specification): Don't set
2702 (cp_parser_init_declarator): Likewise.
2703 (cp_parser_parameter_declaration): Do not treat parameters as
2704 within the scope of an unbraced linkage specification.
2706 2006-06-15 Mark Mitchell <mark@codesourcery.com>
2709 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
2711 * pt.c (unify): Use it.
2714 * call.c (build_conditional_expr): Robustify.
2717 * pt.c (instantiate_template): Set processing_template_decl to
2718 zero while performing substitutions.
2720 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2723 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
2724 identify destructors.
2725 (cp_parser_nested_name_specifier_opt): Remove invalid
2727 (cp_parser_template_id): Refine heuristic for determining whether
2728 we are entering a scope.
2731 * parser.c (cp_parser_declarator): Robustify.
2734 * pt.c (tsubst_expr): Use finish_omp_atomic.
2735 (value_dependent_expression_p): All CALL_EXPRs are dependent.
2736 * semantics.c (finish_omp_atomic): Rework to use standard
2737 paradigms for handling non-dependent expressions.
2739 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2741 * typeck.c (build_modify_expr): Tidy diagnostic message.
2743 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2746 * typeck.c (build_modify_expr): Disallow array assignment.
2748 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2750 * cp-tree.def: Fix typo.
2752 2006-06-13 Mark Mitchell <mark@codesourcery.com>
2755 * decl.c (decls_match): Allow an extern "C" variable declarations
2756 from different namespaces to match.
2757 (duplicate_decls): Disallow redeclaring a variable with a
2758 different linkage specification.
2760 2006-06-13 Jakub Jelinek <jakub@redhat.com>
2763 * cp-tree.h (cxx_int_tree_map): New struct.
2764 (struct language_function): Add extern_decl_map field.
2765 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
2766 to cp_function_chain->extern_decl_map hash table instead of
2767 copying over DECL_UID.
2768 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
2770 (cp_genericize_r): Remap DECL_EXTERN local decls using
2771 cp_function_chain->extern_decl_map hash table.
2772 * decl.c (finish_function): Clear extern_decl_map.
2774 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2777 * semantics.c (finish_offsetof): Handle pseudo-destructors.
2780 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
2784 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
2787 2006-06-12 Roger Sayle <roger@eyesopen.com>
2790 * typeck2.c (build_functional_cast): Use cp_convert to construct
2791 non-aggregate initializers instead of the user-level build_c_cast.
2793 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2796 * cp-tree.h (finish_offsetof): Add prototype.
2797 * semantics.c (finish_offsetof): New function.
2798 * parser.c (cp_parser_builtin_offsetof): Call it instead of
2800 * pt.c (tsubst_copy_and_build): Likewise.
2802 2006-06-06 Mark Mitchell <mark@codesourcery.com>
2805 * call.c (standard_conversion): Require that the derived type be
2806 complete when performing a derived-to-base conversion.
2808 2006-06-04 Mark Mitchell <mark@codesourcery.com>
2811 * decl.c (cp_finish_decl): Process initializers for static data
2812 members with non-dependent initializers, even in templates.
2815 * decl.c (maybe_deduce_size_from_array_init): If the declaration
2816 is erroneous, give it an erroneous type.
2817 (layout_var_decl): If the type is erroneous, give up.
2818 (check_initializer): Likewise.
2821 * cp-tree.h (TYPE_OBJ_P): New macro.
2822 (TYPE_PTROB_P): Use it.
2823 (TYPE_REF_OBJ_P): Likewise.
2824 * semantics.c (finish_compound_literal): Do not permit compound
2825 literals of non-object types.
2828 * typeck.c (original_type): Robustify.
2830 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2833 * init.c (constant_value_1): Return decl instead of error_mark_node
2834 for invalid initializers.
2836 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2839 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
2840 on operand of the COND_EXPR for the null pointer check.
2842 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2845 * typeck.c (build_unary_op): Mark the function as being used.
2847 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
2850 * parser.c (cp_parser_initial_pragma): Read one more token for
2851 caller after reading PCH file in.
2853 2006-05-31 Mark Mitchell <mark@codesourcery.com>
2856 * call.c (perform_implicit_conversion): Do not actually perform
2857 conversions in templates.
2860 * call.c (resolve_args): Check for invalid uses of bound
2861 non-static member functions.
2862 * init.c (build_offset_ref): Return error_mark_node for errors.
2865 * decl.c (reshape_init): Robustify.
2866 (reshape_init_array_1): Likewise.
2868 2006-05-30 Mark Mitchell <mark@codesourcery.com>
2871 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
2872 "friend" specifiers that do not appear in class scopes.
2875 * class.c (check_bitfield_decl): Ensure that all bitfields have
2878 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
2880 * pt.c (convert_nontype_argument): Fix a typo in an error
2883 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2885 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
2886 spelling conventions.
2888 2006-05-24 Mark Mitchell <mark@codesourcery.com>
2891 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
2892 error_mark_node to indicate an initialization is OK.
2893 (start_decl): Likewise. Adjust call to start_decl_1.
2894 (start_decl_1): Add initialized parameter. Simplify.
2895 * except.c (initialize_handler_parm): Adjust call to
2897 (expand_start_catch_block): Let cp_finish_decl initialize catch
2899 * cp-tree.h (start_decl_1): Adjust prototype.
2900 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
2901 (instantiate_decl): Let cp_finish_decl handle initialization.
2902 * semantics.c (finish_compound_literal): Create a temporary
2903 variable for the literal.
2904 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
2906 * decl2.c (finish_static_data_member_decl): Don't set
2908 (grokfield): Do not try to initialize functions.
2910 2006-05-23 Mark Mitchell <mark@codesourcery.com>
2913 * pt.c (determine_specialization): Disallow partial
2914 specializations of templates.
2916 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2919 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
2921 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
2923 2006-05-21 Mark Mitchell <mark@codesourcery.com>
2926 * cp-tree.h (cp_save_expr): New function.
2927 * init.c (build_new): Correct logic for zero-element array
2928 warning. Use cp_save_expr.
2929 * tree.c (cp_save_expr): New function.
2931 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2934 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
2937 2006-05-19 Mike Stump <mrs@apple.com>
2939 * typeck.c (default_conversion): Remove static.
2941 2006-05-19 Mark Mitchell <mark@codesourcery.com>
2944 * cp-tree.h (begin_function_try_block): Change prototype.
2945 (finish_function_handler_sequence): Likewise.
2946 * parser.c (cp_parser_function_try_block): Adjust calls.
2947 * pt.c (tsubst_expr): Adjust calls.
2948 * semantics.c (begin_function_try_block): Create an artificial
2950 (finish_function_handler_sequence): Close it.
2952 2006-05-18 Mark Mitchell <mark@codesourcery.com>
2956 * typeck.c (decay_conversion): Convert bitfields to their declared
2957 types here. Improve documentation. Avoid use of cp_convert.
2958 (default_conversion): Make it static. Perform integral promotions
2959 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
2961 * init.c (build_init): Remove.
2962 (expand_default_init): Do not call rvalue.
2963 * call.c (null_ptr_cst_p): Robustify.
2964 (build_conditional_expr): Tidy.
2965 * except.c (build_throw): Do not perform lvalue-to-rvalue
2966 conversion on operand before initializing temporary.
2967 * tree.c (convert.h): Include it.
2968 (convert_bitfield_to_declared_type): Use convert_to_integer, not
2970 (rvalue): Don't convert bitfields to their declared type here.
2971 * cp-tree.h (build_init): Remove.
2972 (default_conversion): Likewise.
2973 * typeck2.c (build_m_component_ref): Do not perform
2974 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
2975 conversions here. Correct error message.
2977 2006-05-17 Mark Mitchell <mark@codesourcery.com>
2980 * decl2.c (check_member_template): Remove checks for virtual
2982 * parser.c (cp_parser_function_specifier_opt): Complain about
2984 (cp_parser_pure_specifier): Likewise.
2987 * parser.c (cp_parser_set_storage_class): Check for
2988 invalid uses of storage classes on unbraced linkage
2990 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
2991 to cp_parser_set_storage_class.
2993 2006-05-17 Jakub Jelinek <jakub@redhat.com>
2996 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
3000 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3001 on combined parallel workshare constructs.
3002 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
3004 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3007 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
3009 2006-05-15 Mark Mitchell <mark@codesourcery.com>
3012 * cp-tree.h (perform_access_checks): New function.
3013 * semantics.c (perform_access_checks): New function.
3014 (perform_deferred_access_checks): Use it.
3015 * parser.c (cp_parser_simple_declaration): Adjust call to
3016 cp_parser_init_declarator.
3017 (cp_parser_type_parameter): Do not defer checks in default
3019 (cp_parser_explicit_specialization): Adjust call to
3020 cp_parser_single_declaration.
3021 (cp_parser_init_declarator): Perform template-parameter access
3023 (cp_parser_parameter_declaration): Do not defer checks for
3024 template parameter default arguments.
3025 (cp_parser_template_declaration_after_export): Gather access
3026 checks for template parameters, and pass them to
3027 cp_parser_single_declaration.
3028 (cp_parser_template_parameter_access_checks): New function.
3029 (cp_parser_single_declaration): Add checks parameter.
3032 * call.c (convert_like_real): Convert bitfields to their declared
3033 types when forming an rvalue.
3034 * tree.c (convert_bitfield_to_declared_type): New function.
3036 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
3038 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3041 * pt.c (any_dependent_template_arguments_p): Return early on invalid
3045 * search.c (adjust_result_of_qualified_name_lookup): Skip on
3046 invalid context_class.
3049 * pt.c (do_decl_instantiation): Return early on invalid decl.
3052 * pt.c (push_template_decl_real): Return error_mark_node instead
3056 * pt.c (tsubst_friend_class): Return early on invalid friend
3059 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3061 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
3062 (cp/decl2.o): Likewise.
3063 (cp/typeck.o): Likewise.
3064 (cp/cvt.o): Likewise.
3065 (cp/parser.o): Likewise.
3066 (cp/call.o): Replace target.h with $(TARGET_H).
3068 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
3070 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
3071 COMPONENT_REF alone.
3073 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3076 * decl.c (copy_fn_p): Return early on non-member functions.
3078 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3081 * decl2.c (build_memfn_type): Skip invalid functions and class types.
3083 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3086 * pt.c (convert_nontype_argument): Return early on invalid arguments.
3088 * pt.c (process_template_parm): Remove superfluous temporary.
3091 * pt.c (process_template_parm): Handle erroneous non-type parameters.
3094 * typeck.c (convert_for_initialization): Skip erroneous types.
3097 * typeck.c (convert_arguments): Return early on args with
3100 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
3103 * typeck.c (build_static_cast_1): Save casted types in used types
3105 (build_reinterpret_cast_1): Same.
3106 * rtti.c (build_dynamic_cast_1): Same.
3108 2006-05-04 Jakub Jelinek <jakub@redhat.com>
3111 * parser.c (cp_parser_omp_for_loop): Only call
3112 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
3115 2006-05-02 Mark Mitchell <mark@codesourcery.com>
3118 * decl.c (grokdeclarator): Robustify checks for defining members
3119 of incomplete types.
3122 * class.c (add_method): Call grok_special_member_properties.
3123 * decl.c (grokdeclarator): Don't call it here.
3124 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
3125 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
3127 (start_method): Don't call grok_special_member_properties.
3128 * method.c (implicitly_declare_fn): Likewise.
3129 * pt.c (instantiate_class_template): Likewise.
3130 * decl2.c (grokfield): Likewise.
3132 2006-05-02 Jakub Jelinek <jakub@redhat.com>
3135 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
3136 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
3137 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
3139 2006-04-30 Mark Mitchell <mark@codesourcery.com>
3142 * pt.c (tsubst_default_argument): Increment function_depth around
3143 call to tsubst_expr.
3144 * parser.c (cp_parser_parameter_declaration): Likewise.
3145 * decl2.c (mark_used): Tidy.
3147 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3150 * decl.c (grok_op_properties): Skip operators with invalid args
3151 when checking for class-type or enum-type args.
3153 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3156 * decl.c (copy_fn_p): Skip functions with invalid first arg.
3158 2006-04-27 Mark Mitchell <mark@codesourcery.com>
3161 * tree.c (rvalue): Convert bitfields to their declared types.
3164 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
3167 2006-04-24 Mark Mitchell <mark@codesourcery.com>
3170 * typeck.c (decay_conversion): Don't adjust bitfield types.
3171 (perform_integral_promotions): Treat bitfield enums as enums, not
3172 as short integer types.
3173 * tree.c (rvalue): Convert bitfields to their correct types.
3175 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3178 * class.c (layout_class_type): Skip fields with invalid types.
3180 2006-04-23 Mark Mitchell <mark@codesourcery.com>
3183 * cp-tree.h (build_this_parm): Declare.
3184 (grok_method_quals): Remove.
3185 (build_memfn_type): Declare.
3186 (build_artificial_parm): Declare.
3187 (do_friend): Remove quals parameter.
3188 * decl.c (build_this_parm): New function.
3189 (grokfndecl): Use it. Do not pass quals to grokclassfn.
3190 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
3191 unnecessary TYPE_DECLs. Correct qualification of member function
3193 * method.c (implicitly_declare_fn): Use build_this_parm.
3194 * friend.c (do_friend): Remove quals parameter.
3195 * decl2.c (grok_method_quals): Remove.
3196 (build_memfn_type): New function.
3197 (build_artificial_parm): Give it external linkage.
3198 (grokclassfn): Remove quals parameter. Do not build "this"
3202 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
3203 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
3204 (decay_conversion): Convert bitfield expressions to the correct
3206 (build_modify_expr): Remove spurious conversions.
3207 * class.c (layout_class_type): Modify the type of bitfields to
3208 indicate a limited range.
3209 * call.c (standard_conversion): Adjust the type of bitfield
3210 expressions used in an rvalue context.
3211 (build_conditional_expr): Likewise.
3213 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
3215 * decl.c: Fix comment typos.
3217 2006-04-21 Eric Christopher <echristo@apple.com>
3219 * decl.c: Fix typo in function name.
3221 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3224 * parser.c (cp_parser_class_name): Check for invalid typenames.
3228 * pt.c (tsubst_friend_function): Return early if
3229 pushdecl_namespace_level fails.
3232 * typeck.c (convert_arguments): Return error_mark_node instead of
3234 * cp-tree.h (error_mark_list): Remove declaration.
3235 * decl.c (error_mark_list): Remove definition.
3236 (cxx_init_decl_processing): Do not initialize error_mark_list.
3239 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
3240 before calling convert_to_reference.
3241 * cvt.c (convert_to_reference): Assert that reftype is a
3244 2006-04-19 Mark Mitchell <mark@codesourcery.com>
3247 * class.c (currently_open_class): Tidy.
3248 * decl.c (grokdeclarator): If we encounter an erroneous
3249 declarator, assume that we have already issued an error message
3250 and return. Return error_mark_node instead of NULL_TREE in more
3251 places. Issue errors about function definitions that do not have
3252 a function declarator. Check for complete types for all function
3254 * cp-tree.h (cp_error_declarator): Remove.
3255 (currently_open_class): Change return type.
3256 * parser.c (cp_parser_id_expression): Add optional_p parameter.
3257 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
3258 (cp_parser_id_expression): Likewise.
3259 (cp_parser_unqualified_id): If the name is optional, return
3261 (cp_parser_postfix_dot_deref_expression): Adjust calls.
3262 (cp_parser_type_parameter): Likewise.
3263 (cp_parser_unqualified_id): Likewise.
3264 (cp_parser_direct_declarator): Likewise.
3265 (cp_parser_declarator_id): Add optional_p parameter.
3266 (cp_parser_function_definition_from_specifiers_and_declarator):
3267 Assume that start_function indicates failure only if it has issued
3269 (cp_parser_omp_var_list_no_open): Adjust calls.
3271 2006-04-17 Janis Johnson <janis187@us.ibm.com>
3273 PR c++/26114, c++/26115
3274 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
3275 * class.c (check_field_decls): Ditto.
3277 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3279 * init.c (build_offset_ref): Remove superfluous temporary.
3281 2006-04-16 Mark Mitchell <mark@codesourcery.com>
3284 * typeck.c (finish_class_member_access_expr): Robustify
3286 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
3288 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
3289 * pt.c: Include vecprim.h.
3290 (inline_parm_levels): Change the type to VEC(int,heap) *.
3291 (inline_parm_levels_used): Remove.
3292 (maybe_begin_member_template_processing,
3293 maybe_end_member_template_processing): Use VEC instead of
3296 * cp/call.c: Fix comment typos.
3298 2006-04-12 Mark Mitchell <mark@codesourcery.com>
3300 * parser.c (cp_parser_init_declarator): Initialize local variables
3303 2006-04-12 Roger Sayle <roger@eyesopen.com>
3305 * parser.c (cp_parser_init_declarator): Initialise
3306 is_parenthesized_init to false to avoid compiler warning.
3308 2006-04-11 Mark Mitchell <mark@codesourcery.com>
3310 * cp-tree.h (build_operator_new_call): Adjust prototype.
3311 (build_new_method_call): Likewise.
3312 (build_op_delete_call): Likewise.
3313 * init.c (build_raw_new_expr): New function.
3314 (build_new_1): Pass information as parameters, rather than
3315 bundling it into a NEW_EXPR.
3316 (build_new): Adjust accordingly.
3317 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
3318 (build_delete): Likewise.
3319 * decl.c (finish_destructor_body): Likewise.
3320 * call.c (build_operator_new_call): Return the allocation function
3322 (build_op_delete_call): Take allocation function as parameter.
3323 (build_special_member_call): Adjust call to build_new_method_call.
3324 (build_new_method_call): Return function called.
3325 * pt.c (tsubst_copy_and_build): Adjust call to
3326 build_new_method_call.
3327 * semantics.c (finish_call_expr): Likewise.
3328 * parser.c (cp_parser_postfix_expression): Likewise.
3329 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
3330 "incomplete", not "undefined", types.
3333 * decl.c (grokdeclarator): Remove namespace-handling code for
3334 pointers-to-members.
3335 * parser.c (cp_parser_ptr_operator): Check for qualified names
3339 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
3340 whether or not to look for a pure-specifier.
3341 (cp_parser_member_declaration): Likewise.
3343 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3345 * decl2.c, pt.c, semantics.c: Fix comment typos.
3347 2006-04-06 Roger Sayle <roger@eyesopen.com>
3349 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
3351 2006-04-05 Jason Merrill <jason@redhat.com>
3353 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
3354 default hidden visibility for anonymous namespace.
3356 2006-03-29 Roger Sayle <roger@eyesopen.com>
3359 * init.c (build_vec_delete_1): Convert BASE pointer's type to
3360 the base pointer type to avoid a type mismatch in the EQ_EXPR.
3362 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
3364 * search.c (maybe_suppress_debug_info): If
3365 flag_emit_class_debug_always then don't suppress.
3367 2006-03-22 Jason Merrill <jason@redhat.com>
3369 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
3370 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
3372 2006-03-21 Jakub Jelinek <jakub@redhat.com>
3375 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
3377 2006-03-21 Jason Merrill <jason@redhat.com>
3380 * parser.c (cp_parser_declaration): Support attributes on
3381 anonymous namespaces.
3382 * name-lookup.c (push_namespace_with_attribs): Anonymous
3383 namespaces default to hidden visibility.
3385 2006-03-20 Jason Merrill <jason@redhat.com>
3387 PR c++/21764, c++/19238
3388 * decl.c (cp_finish_decl): Call determine_visibility later.
3389 (start_preparsed_function): Likewise.
3390 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
3391 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
3392 * name-lookup.h (struct cp_binding_level): Add has_visibility
3394 * name-lookup.c: Include c-pragma.h.
3395 (push_namespace_with_attribs): Split out from push_namespace.
3396 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
3397 (leave_scope): Pop visibility if appropriate.
3398 * decl2.c (determine_visibility_from_class): Split out from...
3399 (determine_visibility): ...here. Handle function scope and
3401 (import_export_decl): Move visibility handling to
3402 determine_visibility_from_class.
3403 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
3404 attributes on namespace declarations.
3406 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3409 * decl.c (grokdeclarator): Do not accept long long double.
3410 Reorganize checks for invalid (combinations of) type modifiers.
3411 Quote modifiers in messages.
3413 2006-03-09 Jason Merrill <jason@redhat.com>
3415 PR c++/16387, c++/16389
3416 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
3417 (cxx_sizeof_or_alignof_expr): Split out from here.
3419 2006-03-09 Diego Novillo <dnovillo@redhat.com>
3421 Merge from gomp-20050608-branch
3423 2006-02-02 Diego Novillo <dnovillo@redhat.com>
3425 * decl.c (pop_labels_1): Use appropriate pointer casting.
3426 (poplevel_named_label_1): Likewise.
3427 (named_label_entry_hash): Likewise.
3428 (named_label_entry_eq): Likewise.
3429 (check_goto): Likewise.
3430 (define_label): Likewise.
3432 2006-01-26 Diego Novillo <dnovillo@redhat.com>
3434 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
3436 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
3437 instead of TREE_CODE/TREE_OPERAND.
3438 * semantics.c: Likewise.
3439 * parser.c: Likewise.
3441 2005-11-10 Diego Novillo <dnovillo@redhat.com>
3443 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
3444 target does not support TLS.
3446 2005-11-09 Jakub Jelinek <jakub@redhat.com>
3448 * decl.c (redeclaration_error_message): Don't error about
3449 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
3452 2005-11-08 Jakub Jelinek <jakub@redhat.com>
3455 * semantics.c (finish_omp_barrier, finish_omp_flush): New
3457 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
3458 (cp_parser_omp_flush): Call finish_omp_flush.
3459 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
3463 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
3465 2005-11-03 Jakub Jelinek <jakub@redhat.com>
3467 * semantics.c (finish_omp_threadprivate): Error on class-scope
3470 2005-11-02 Jakub Jelinek <jakub@redhat.com>