1 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5 integeral types from vectors types.
7 2007-04-26 Jakub Jelinek <jakub@redhat.com>
10 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
11 for type dependent OMP_CLAUSE_DECLs.
13 2007-04-24 Mark Mitchell <mark@codesourcery.com>
16 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
17 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
18 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
19 * init.c (build_zero_init): Adjust, as
20 COMPLEX_TYPE is now a SCALAR_TYPE.
21 * typeck2.c (digest_init): Allow brace-enclosed initializers for
22 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
24 2007-04-25 Paolo Carlini <pcarlini@suse.de>
26 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
27 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
28 (trait_expr_value): Adjust.
30 2007-04-23 Simon Baldwin <simonb@google.com>
32 * decl.c (grokparms): Added new error for duplicate function
33 parameters names in function prototypes, to match gcc behavior.
35 2007-04-23 Jan Hubicka <jh@suse.cz>
37 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
40 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
42 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
43 instead of checking GIMPLE_STMT_P in chain_next.
45 2007-04-17 Mark Mitchell <mark@codesourcery.com>
48 * call.c (convert_for_arg_passing): Convert bitfields to their
51 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
54 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
56 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
60 * cp/decl2.c (constrain_class_visibility):
61 Do not warn about the use of anonymous namespace in the main input file.
63 2007-04-15 Mark Mitchell <mark@codesourcery.com>
65 * cp-tree.h (current_template_parms): Fix typo in comment.
67 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
69 * cp-tree.h, error.c: Fix comment typos.
71 2007-04-13 Jason Merrill <jason@redhat.com>
74 * call.c (reference_binding): Add c_cast_p parm. If true,
75 add quals to TO as needed to make it reference-compatible.
77 2007-04-11 Jan Hubicka <jh@suse.cz>
79 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
80 that we are not processing template_decl.
82 2007-04-09 Mark Mitchell <mark@codesourcery.com>
85 * class.c (build_base_path): Ensure that the converted pointer has
86 the same cv-qualification as the input.
88 2007-04-09 Paolo Carlini <pcarlini@suse.de>
90 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
92 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
94 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
96 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
97 * tree.c (cp_add_pending_fn_decls): Remove.
98 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
100 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
102 Revert change removing staticp.
104 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
106 * cp-objcp-common.c (cxx_staticp): Remove.
107 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
108 * cp-tree.h (cxx_staticp):
110 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
112 * class.c (check_for_override): Don't remove dllmport attribute
115 2007-04-03 Jakub Jelinek <jakub@redhat.com>
118 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
119 type issue error and return early.
121 2007-03-30 Jason Merrill <jason@redhat.com>
124 * typeck.c (cp_type_readonly): New fn.
125 * cp-tree.h: Declare it.
126 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
127 (cp_finish_decl): Not here.
129 2007-03-31 Richard Guenther <rguenther@suse.de>
131 * optimize.c (maybe_clone_body): Replace splay-tree usage by
134 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
139 * parser.c (declarator_can_be_parameter_pack): New.
140 (cp_parser_template_parameter): Only parse the `...' if the
141 declarator can be a parameter pack.
142 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
144 * pt.c (find_parameter_packs_r): Look into the bounds on integer
145 types (they could be used as array bounds).
146 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
147 (tsubst_pack_expansion): Handle failure to expand parameter
150 2007-03-30 Paolo Carlini <pcarlini@suse.de>
153 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
154 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
155 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
156 (CLASS_TYPE_NON_UNION_P): Add.
157 (struct lang_type_class): Add has_complex_dflt.
158 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
159 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
160 * cp-tree.def: Add TRAIT_EXPR.
161 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
162 * lex.c (struct resword): Add __has_nothrow_assign,
163 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
164 __has_trivial_constructor, __has_trivial_copy,
165 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
166 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
167 __is_pod, __is_polymorphic, __is_union.
168 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
169 (cp_parser_trait_expr): New.
170 * semantics.c (finish_trait_expr, trait_expr_value
171 classtype_has_nothrow_copy_or_assign_p): New.
172 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
174 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
175 * class.c (check_bases, check_field_decl, check_bases_and_members):
176 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
177 * pt.c (uses_template_parms, tsubst_copy_and_build,
178 value_dependent_expression_p, type_dependent_expression_p): Deal with
180 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
182 2007-03-29 Richard Guenther <rguenther@suse.de>
184 * tree.c (cp_walk_subtrees): Do not set input_location.
186 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
189 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
192 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
194 * parser.c (struct cp_parser): Update comment for
195 greater_than_is_operator_p.
196 (cp_parser_primary_expression): In C++0x mode, a cast operator can
197 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
198 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
199 !GREATER_THAN_IS_OPERATOR_P.
200 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
201 `>>' operators that will become two `>' tokens in C++0x.
202 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
203 mode, allowing it to terminate default arguments.
204 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
205 `>>' like two consecutive `>' tokens.
206 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
207 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
208 ends a template argument.
210 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
212 * decl.c (redeclaration_error_message): Complain when redeclaring
213 a friend function with default template arguments (C++0x mode only).
214 * cp-tree.h (check_default_tmpl_args): Declare.
215 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
216 template arguments in function templates. Add support for checking
217 the default template arguments of friend templates.
218 (push_template_decl_real): Fix call to check_default_tmpl_args.
219 (type_unification_real): If a template parameter has not been
220 deduced but provides a default template argument, substitute into
221 that default template argument.
222 * parser.c (cp_parser_init_declarator): When declaring (but not
223 defining!) a function template in C++0x mode, check for default
226 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
229 * decl.c (grokdeclarator): Deal with cv-qualified function type
230 typedefs in the same way for member and non-member functions.
232 2007-03-26 Dirk Mueller <dmueller@suse.de>
234 * parser.c (cp_parser_member_declaration): Pedwarn
235 about stray semicolons after member declarations.
237 2007-03-26 Paolo Carlini <pcarlini@suse.de>
240 * pt.c (instantiate_decl): Set in_system_header.
242 2007-03-22 Mark Mitchell <mark@codesourcery.com>
244 * cp-tree.h (current_tempalte_parms): Improve documentation.
245 * pt.c (current_template_args): Likewise.
248 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
249 not consume tokens when failing.
251 2007-03-22 Jim Wilson <wilson@specifix.com>
252 Mark Mitchell <mark@codesourcery.com>
255 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
256 consistent with FROM.
258 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
260 * error.c (dump_expr): Handle dependent names that designate types.
261 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
263 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
265 * cp-tree.def, parser.c, pt.c: Fix comment typos.
267 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
269 * cvt.c (cp_convert_and_check) : Define.
270 * cp-tree.h (cp_convert_and_check): Declare.
271 * call.c (convert_conversion_warnings): Rename to
272 conversion_null_warnings. The warning for floating-point to
273 integer is handled by convert_and_check in convert_like_real.
274 (convert_like_real): convert_conversion_warnings was renamed as
275 conversion_null_warnings.
276 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
277 overflow and changes of value during conversion.
279 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
282 * parser.c (cp_parser_statement): If 'namespace' is found, this
283 only can be a namespace alias definition, so parse it now.
284 (cp_parser_namespace_alias_definition): if we find an open brace
285 instead of '=', then this is actually a misplaced namespace
288 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
291 * decl.c (cxx_init_decl_processing): Move command-line options
292 processing to c-opts.c.
294 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
296 * ptree.c (cxx_print_type): Use formatting markup for integers
297 when printing template parameter index/level/orig level.
298 (cxx_print_xnode): Ditto.
299 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
300 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
301 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
303 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
304 rather than a HOST_WIDE_INT.
305 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
306 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
308 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
309 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
310 IN_BASE_INITIALIZER bool bitfields.
311 (struct cp_declarator): Make KIND a 4-bit field. Make
312 PARAMETER_PACK_P a bool bitfield just after KIND.
313 * pt.c (uses_parameter_packs): Destroy the pointer set.
314 (make_pack_expansion): Ditto.
315 (check_for_bare_parameter_packs): Ditto.
316 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
318 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
321 * call.c (convert_default_arg): Instead of copying the node,
324 2007-03-15 Dirk Mueller <dmueller@suse.de>
327 * call.c (convert_conversion_warnings): New..
328 (convert_like_real): .. factored out from here.
329 (convert_conversion_warnings): Add warning about
330 false being converted to NULL in argument passing.
332 2007-03-14 Dirk Mueller <dmueller@suse.de>
334 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
335 (finish_do_body): Warn about empty body in do/while statement.
337 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
339 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
341 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
344 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
347 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
349 * cp/repo.c (init_repo): Initialize random_seed saved options.
350 (finish_repo): Adjust.
352 2007-03-13 Mark Mitchell <mark@codesourcery.com>
355 * Make-lang.in (doc/g++.1): Use $< to specify the location from
358 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
360 * decl.c (compute_array_index_type): New warning flag warn_vla.
362 2007-03-12 Mark Mitchell <mark@codesourcery.com>
365 * call.c (convert_default_arg): Copy non-constant arguments.
367 2007-03-11 Mark Mitchell <mark@codesourcery.com>
370 * parser.c (cp_parser_postfix_expression): Disallow compound
371 literals in constant expressions.
374 * semantics.c (finish_typeof): Use unlowered_expr_type.
376 2007-03-10 Mark Mitchell <mark@codesourcery.com>
379 * cp-tree.h (unlowered_expr_type): New function.
380 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
381 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
382 (unlowered_expr_type): New function.
383 (build_unary_op): Disallow predecrements of bool bitfields.
384 * call.c (build_conditional_expr): Use unlowered_expr_type.
385 * pt.c (type_unification_real): Likewise.
387 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
390 * typeck.c (check_return_expr): Check for bare parameter packs.
391 (comptypes): Compare template parameter packs and
392 type pack expansions.
393 * decl.c (grokdeclarator): Deal with the declaration of function
395 (grokparms): Verify that the (optional) function parameter pack is
396 at the end of the parameter list.
397 (xref_basetypes): Handle pack expansions in the base class.
398 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
399 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
400 (NONTYPE_ARGUMENT_PACK): New.
401 (TYPE_PACK_EXPANSION): New.
402 (EXPR_PACK_EXPANSION): New.
403 (ARGUMENT_PACK_SELECT): New.
404 * cp-objcp-common.c (cp_tree_size): Compute size of
405 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
406 ARGUMENT_PACK_SELECT.
407 * error.c (dump_template_argument): Print template argument packs.
408 (dump_template_argument_list): Ditto.
409 (dump_template_parameter): Dump `...' for template type parameter
411 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
412 (dump_parameters): Print function parameter packs.
413 (dump_template_parms): Print template argument packs.
414 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
415 (maybe_warn_variadic_templates): New.
416 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
417 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
418 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
420 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
421 (write_template_arg): Write argument packs as separate arguments.
422 * cp-tree.h (struct template_parm_index_s): Add flag that
423 indicates that the template parameter is actually a parameter
425 (struct tree_argument_pack_select): New.
426 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
427 (union lang_tree_node): Add argument_pack_select.
428 (FUNCTION_PARAMETER_PACK_P): New.
429 (PACK_EXPANSION_P): New.
430 (PACK_EXPANSION_PATTERN): New.
431 (SET_PACK_EXPANSION_PATTERN): New.
432 (PACK_EXPANSION_PARAMETER_PACKS): New.
433 (ARGUMENT_PACK_P): New.
434 (ARGUMENT_PACK_ARGS): New.
435 (SET_ARGUMENT_PACK_ARGS): New.
436 (ARGUMENT_PACK_INCOMPLETE_P): New.
437 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
438 (TEMPLATE_PARM_PARAMETER_PACK): New.
439 (TEMPLATE_TYPE_PARAMETER_PACK): New.
440 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
441 (ARGUMENT_PACK_SELECT_INDEX): New.
442 (ARGUMENT_PACK_SELECT_ARG): New.
443 (struct cp_declarator): Add parameter_pack_p flag.
444 (maybe_warn_variadic_templates): Declare.
445 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
446 indicate a template parameter pack.
447 (uses_parameter_packs): Declare.
448 (template_parameter_pack_p): Declare.
449 (template_parms_variadic_p): Declare.
450 (make_pack_expansion): Declare.
451 (check_for_bare_parameter_packs): Declare.
452 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
453 sizeof... expressions.
454 (pp_cxx_expression): Print pack expansions and non-type argument
456 (pp_cxx_exception_specification): Print pack expansions.
457 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
458 (pp_cxx_ctor_initializer): Print pack expansions.
459 (pp_cxx_type_id): Print pack expansions.
460 (pp_cxx_template_argument_list): Print argument packs.
461 (pp_cxx_template_parameter): Print ellipsis for template parameter
463 * pt.c (comp_template_parms): Compare template parameter packs.
464 (template_parameter_pack_p): New.
465 (template_parms_variadic_p): New.
466 (template_args_variadic_p): New.
467 (make_ith_pack_parameter_name): New.
468 (struct find_parameter_pack_data): New.
469 (find_parameter_packs_r): New.
470 (uses_parameter_packs): New.
471 (make_pack_expansion): New.
472 (check_for_bare_parameter_packs): New.
473 (expand_template_argument_pack): New.
474 (reduce_template_parm_level): Propagate parameter pack flag.
475 (process_template_parm): Add is_parameter_pack parameter to state
476 when the parameter is actually a parameter pack. Create template
477 parameter packs when is_parameter_pack is true.
478 (current_template_args): The argument for a template parameter
479 pack is an argument pack containing a single pack expansion.
480 (process_partial_specialization): When checking that non-type
481 argument expressions do not involve template parameters, loop over
482 the arguments in argument packs separately.
483 (push_template_decl_real): Check that the type of the declaration
484 does not have any bare parameter packs. Check that primary
485 templates have no more than one parameter pack, and that it comes
486 at the end of the template parameter list.
487 (convert_template_argument): Handle coercions for pack expansion
488 expressions by coercing the pattern then rebuilding the expansion.
489 (coerce_template_parms): When coercing the arguments for a
490 variadic template, pack "extra" arguments into an argument pack.
491 (coerce_template_template_parms): Cannot coerce between parameter
492 packs and non-pack parameters.
493 (template_args_equal): Compare PACK_EXPANSION_P expressions.
494 (comp_template_args): Expand all template arguments packs before
495 comparing template argument lists.
496 (mangle_class_name_for_template): Make argument packs as separate
498 (for_each_template_parm_r): No need to handle BASELINK.
499 (instantiate_class_template): Handle pack expansions in the base
501 (tsubst_pack_expansion): New.
502 (tsubst_template_args): Handle substitutions of argument packs and
503 pack expansion into template argument lists.
504 (tsubst_decl): Expand function parameter packs into separate
506 (tsubst_arg_types): Expand a type pack expansion into separate
508 (tsubst_exception_specification): Handle pack expansions in
509 exception specifiers.
510 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
511 replacing a template parameter with its argument. If we encounter
512 a substitution for an argument pack, just return the parameter
514 (tsubst_copy): sizeof(X...) returns the number of elements in
515 parameter pack X. See through ARGUMENT_PACK_SELECT when the
516 PARM_DECL is a parameter pack.
517 (tsubst_expr): Expression pack expansions and argument packs
518 cannot show up here; they will all be handled through function
519 calls, sizeof, and template argument lists.
520 (tsubst_copy_and_build): sizeof(X...) returns the number of
521 elements in parameter pack X. Handle pack expansions in TREE_LIST
522 and CONSTRUCTOR nodes.
523 (fn_type_unification): Handle "incomplete" explicit template
524 argument lists that specify some of the arguments for a template
526 (type_unification_real): Unify arguments against pack expansions.
527 (template_parm_level_and_index): New, helper function.
528 (unify_pack_expansion): New.
529 (unify): Unify argument packs on an argument-by-argument basis,
530 handling variadic argument packs as well.
531 (more_specialized_fn): Handle unification of function parameter
532 packs. All things being equal, prefer non-variadic function
533 templates to variadic function templates.
534 (more_specialized_class): Prefer the variadic class template
535 partial specialization that binds fewer arguments to a parameter
537 (regenerate_decl_from_template): Expand function parameter packs
538 into separate parameters.
539 (instantiate_decl): Ditto.
540 (tsubst_initializer_list): Handle pack expansions for base-class
542 (dependent_type_p_r): Determine dependent types in argument packs
544 (value_dependent_expression_p): Determine value-dependence of
545 non-type argument packs.
546 (dependent_template_arg_p): Handle argument packs.
547 * semantics.c (finish_cond): Check for bare parameter packs.
548 (finish_expr_stmt): Ditto.
549 (finish_for_expr): Ditto.
550 (finish_switch_cond): Ditto.
551 (finish_mem_initializers): Ditto.
552 * name-lookup.c (arg_assoc_type): Handle pack expansions and
554 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
555 * parser.c (make_declarator): Declarator is not an expansion.
556 (make_pointer_declarator): Transfer parameter pack flag to outer
558 (make_reference_declarator): Ditto.
559 (make_ptrmem_declarator): Ditto.
560 (make_call_declarator): Ditto.
561 (make_array_declarator): Ditto.
562 (cp_parser_postfix_expression): Allow pack expansion expressions
563 in the argument list for a call expression.
564 (cp_parser_parenthesized_expression_list): Add new parameter
565 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
566 into separate arguments."
567 (cp_parser_new_placement): Allow pack expansion expressions.
568 (cp_parser_new_initializer): Ditto.
569 (cp_parser_mem_initializer_list): Allow ellipsis to create a
570 base-class initializer expansion.
571 (cp_parser_mem_initializer): Ditto.
572 (cp_parser_template_parameter_list): Keep track of whether the
573 template parameter is a template parameter pack.
574 (cp_parser_template_parameter): Parse the ellipsis to indicate a
575 template parameter pack.
576 (cp_parser_type_parameter): Ditto.
577 (cp_parser_template_argument_list): Parse the ellipsis to indicate
579 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
580 this declarator is a parameter pack.
581 (cp_parser_parameter_declaration): The ellipsis does not end the
582 parameter declaration, because it might be a parameter pack. Parse
583 the ellipsis to indicate a parameter pack.
584 (cp_parser_initializer): Allow pack expansions.
585 (cp_parser_initializer_list): Allow ellipsis to create an
586 initializer expansion.
587 (cp_parser_base_clause): Allow ellipsis to create a base specifier
589 (cp_parser_type_id_list): Allow ellipsis to create an exception
591 (cp_parser_attribute_list): Don't allow pack expansions.
592 (cp_parser_functional_cast): Allow pack expansions.
593 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
594 compute the length of a parameter pack.
595 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
596 end a template argument.
597 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
598 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
601 2007-03-09 Dirk Mueller <dmueller@suse.de>
603 * cp/call.c (build_new_op): Call warn_logical_operator.
605 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
608 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
611 * pt.c (any_template_arguments_need_structural_equality_p):
614 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
616 * decl.c (grokdeclarator): Disable warnings for anonymous
619 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
621 * typeck2.c (readonly_error): Always emit a hard error.
622 Remove last argument.
623 * cp-tree.h (readonly_error): Adjust prototype.
624 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
625 * typeck.c (build_unary_op): Likewise.
626 (build_modify_expr): Likewise.
628 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
631 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
633 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
636 * parser.c (struct cp_parser): New IN_IF_STMT.
637 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
638 returning if parsing the body of an 'if' statement or issuing an
639 error and continuing.
640 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
642 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
644 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
647 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
650 2007-03-02 Geoffrey Keating <geoffk@apple.com>
652 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
653 Objective-C++. Don't exit early if -shared-libgcc needs to be
656 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
658 * typeck.c (common_base_type): Delete unused function.
660 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
662 * Make-lang.in: Add dummy lang.install-pdf target.
664 2007-03-01 Simon Baldwin <simonb@google.com>
667 * decl.c (check_tag_decl): Added new warning for typedef ignored
668 when it precedes an otherwise valid non-typedef declaration.
670 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
672 * typeck.c (build_function_call): Store converted arguments
673 in a stack-allocated array instead of building a list.
674 (convert_arguments): Store arguments in the array passed in as an
675 argument, and return the actual number of arguments.
676 * call.c (build_call): Delete, and replace with...
677 (build_call_n, build_call_a): New.
678 (build_op_delete_call): Rewrite to avoid constructing argument lists.
679 (build_over_call): Store converted arguments in a stack-allocated
680 array instead of building a list.
681 (build_cxx_call): Pass arguments in an array instead of as a list.
682 (build_java_interface_fn_ref): Rewrite to avoid constructing
684 * tree.h: Update declarations to reflect above changes.
685 * method.c (use_thunk): Use a stack-allocated array to hold
686 the arguments instead of a list.
687 * rtti.c (throw_bad_cast): Update call to cxx_call.
688 (throw_bad_typeid): Likewise.
689 (build_dynamic_cast_1): Likewise.
690 * init.c (build_builtin_delete_call): Use build_call_n.
691 * decl.c (expand_static_init): Likewise.
692 * except.c (cp_protect_cleanup_actions): Likewise.
693 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
694 (gimplify_must_not_throw_expr): Likewise.
695 (cxx_omp_apply_fn): Use build_call_a.
697 2007-02-26 Mark Mitchell <mark@codesourcery.com>
699 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
700 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
702 2007-02-25 Mark Mitchell <mark@codesourcery.com>
704 * cp-tree.h (static_ctors): Remove.
705 * cp-tree.h (static_dtors): Likewise.
706 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
707 refactoring of tree_map hierarchy.
708 (decl_shadowed_for_var_insert): Likewise.
709 * semantics.c (expand_body): Use c_expand_body.
710 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
711 * decl2.c (static_ctors): Remove.
712 (static_dtors): Likewise.
713 (generate_ctor_or_dtor_function): Pass NULL_TREE to
714 objc_generate_static_init_call. Do not call static_[cd]tors.
715 (generate_ctor_and_dtor_functions_for_priority): Do not check for
717 (cp_write_global_declarations): Likewise.
719 2007-02-23 Richard Guenther <rguenther@suse.de>
721 * class.c (note_name_declared_in_class): Make declaration
722 changes meaning a pedwarn.
724 2007-02-22 Michael Matz <matz@suse.de>
727 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
728 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
729 dump_function_decl): Guard emitting outer scopes by new flag.
730 * cp-lang.c (cxx_dwarf_name): New function.
731 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
732 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
734 (push_template_decl_real, lookup_template_class): Remove calls
737 2007-02-19 Mark Mitchell <mark@codesourcery.com>
739 * call.c (build_new_method_call): Ensure that explicit calls of
740 destructors have type "void".
742 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
744 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
745 and -Walways-true with -Waddress.
746 * cvt.c (convert_to_void): Replace unconditional warning with
749 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
751 * decl.c, tree.c: Fix comment typos.
753 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
756 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
757 statement expression if we had an error mark node.
759 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
760 Brooks Moses <brooks.moses@codesourcery.com>
761 Lee Millward <lee.millward@codesourcery.com>
763 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
764 Change class to tcc_vl_exp.
766 * call.c (build_call): Use build_call_list instead
768 (build_over_call): Likewise.
769 (build_new_method_call): Use build_min_non_dep_call_list
770 instead of build_min_non_dep.
772 * error.c (dump_call_expr_args): New function.
773 (dump_aggr_init_expr_args): New function.
774 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
775 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
777 * cvt.c (convert_to_void): Use build_call_array instead
778 of build3; use new AGGR_INIT_EXPR accessor macros.
780 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
781 instead of TREE_CODE_LENGTH.
783 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
784 AGGR_INIT_EXPR accessor macros.
786 * cp-gimplify.c (cp_gimplify_init_expr): Use
787 AGGR_INIT_EXPR_SLOT to set the slot operand.
789 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
790 (AGGR_INIT_EXPR_SLOT): New macro.
791 (AGGR_INIT_EXPR_ARG): New macro.
792 (aggr_init_expr_nargs): New macro.
793 (AGGR_INIT_EXPR_ARGP): New macro.
794 (aggr_init_expr_arg_iterator): New.
795 (init_aggr_init_expr_arg_iterator): New.
796 (next_aggr_init_expr_arg): New.
797 (first_aggr_init_expr_arg): New.
798 (more_aggr_init_expr_args_p): New.
799 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
800 (stabilize_aggr_init): New declaration.
801 (build_min_non_dep_call_list): Likewise.
803 * tree.c (process_aggr_init_operands): New function.
804 (build_aggr_init_array) New function.
805 (build_cplus_new): Update to use new CALL_EXPR and
806 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
807 build_aggr_init_array.
808 (build_min_non_dep_call_list) New function.
809 (build_min_nt): Assert input code parameter is not a variable
810 length expression class.
811 (build_min, build_min_non_dep): Likewise.
812 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
813 to check for equality instead of recursing. Handle tcc_vl_exp
815 (stabilize_call): Update to only handle CALL_EXPRs, not
816 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
817 (stabilize_aggr_init): New function.
818 (stabilize_init): Use it.
820 * cxx-pretty-print.c (pp_cxx_postfix_expression)
821 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
822 AGGR_INIT_EXPR accessor macros and argument iterators.
824 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
825 build_vl_exp. Iterate through the operands, recursively
827 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
828 CALL_EXPR accessor macros.
829 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
830 tree code classes. Use TREE_OPERAND_LENGTH instead of
833 * semantics.c (finish_call_expr): Use build_nt_call_list
835 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
836 accessor macros. Use build_call_array to construct the
837 CALL_EXPR node instead of build3
839 * decl2.c (build_offset_ref_call_from_tree): Use
840 build_nt_call_list and build_min_non_dep_call_list instead
841 of build_min_nt and build_min_non_dep.
843 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
844 Use build_nt_call_list instead of build_min_nt.
846 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
849 * call.c (build_conditional_expr): Improve error message.
851 2007-02-13 Dirk Mueller <dmueller@suse.de>
853 * friend.c (do_friend): Annotate warning about friend
854 declarations in templates with OPT_Wnon_template_friend.
855 Convert informal message from warning() to inform().
857 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
858 Mark Mitchell <mark@codesourcery.com>
861 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
862 instantiations for variables.
864 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
867 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
868 Check warn_unused_value just once.
870 2007-02-11 Mark Mitchell <mark@codesourcery.com>
873 * pt.c (determine_specialization): Use skip_artificial_parms_for.
874 (fn_type_unificiation): Likewise.
875 (get_bindings): Likewise.
877 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
880 * decl.c (finish_function): Use DECL_REPLACEABLE.
881 * tree.c (cp_cannot_inline_tree_fn): Likewise.
883 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
885 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
887 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
889 * decl.c (grokvardecl): Don't error if !have_tls.
890 (grokdeclarator): Likewise.
891 * parser.c (cp_parser_omp_threadprivate): Likewise.
893 2007-02-07 Jakub Jelinek <jakub@redhat.com>
896 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
897 parameters and result decls in omp clauses.
898 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
901 2007-02-05 Dirk Mueller <dmueller@suse.de>
904 * parser.c (cp_parser_class_specifier): Always initialize bases.
906 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
908 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
909 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
910 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
912 * semantics.c (finish_omp_atomic): Store a whole expression node
913 in operand 1, and integer_zero_node in operand 0, for dependent
914 OMP_ATOMIC. Rewrite to make flow easier to understand.
916 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
918 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
920 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
922 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
923 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
925 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
927 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
928 keyword warning to -Wc++0x-compat.
930 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
932 * decl.c (grokdeclarator): Update documentation.
934 2007-02-02 Jakub Jelinek <jakub@redhat.com>
937 * decl.c (grokdeclarator): If __thread is used together with
938 a storage class other than extern and static, clear thread_p
939 after issuing diagnostics and fall through to checking the
942 2007-01-30 Roger Sayle <roger@eyesopen.com>
944 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
945 calculating the size of an array (to avoid recursive errors).
947 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
950 * typeck.c (build_binary_op): Fix logic for warning. Move warning
952 * call.c (convert_like_real): Don't warn when converting to
955 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
957 * decl.c (pop_label): Replace warning with call to
958 warn_for_unused_label.
960 2007-01-28 Andrew Pinski <pinskia@gmail.com>
963 * semantics.c (finish_pseudo_destructor_expr): Check the
964 destrutor name by calling check_dtor_name.
966 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
968 * lex.c (D_CPP0X): Rename.
970 (reswords): D_CPP0X -> D_CXX0X.
971 (init_reswords): Ditto.
972 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
973 of C++0x keywords as identifiers.
975 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
978 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
981 2007-01-23 Ian Lance Taylor <iant@google.com>
983 * typeck.c (convert_for_assignment): Only warn about a = b = c
984 when converting to bool.
986 2007-01-23 Roger Sayle <roger@eyesopen.com>
988 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
990 * typeck.c (ignore_overflows): Remove the remaining uses of
991 TREE_CONSTANT_OVERFLOW.
993 2007-01-20 Jan Hubicka <jh@suse.cz>
995 * decl2.c (start_objects, start_static_storage_duration_function):
996 Do not make the functions uninlinable.
998 2007-01-17 Ian Lance Taylor <iant@google.com>
1000 * class.c (add_method): Call VEC_reserve_exact rather than passing
1001 a negative size to VEC_reserve.
1003 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
1006 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1008 2007-01-10 Mark Mitchell <mark@codesourcery.com>
1011 * decl.c (make_typename_type): If the qualified name is not a
1012 type, issue an error.
1013 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1016 2007-01-08 Geoffrey Keating <geoffk@apple.com>
1018 * rtti.c: Include target.h.
1019 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1020 don't emit typeinfo for fundamental types as weak.
1021 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1023 2007-01-08 Richard Guenther <rguenther@suse.de>
1025 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1027 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
1029 * call.c (standard_conversion): Pass flag to
1030 vector_types_convertible_p to disallow emission of note.
1031 * typeck.c (convert_for_assignment): Pass flag to
1032 vector_types_convertible_p to allow emission of note.
1033 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1034 to disallow emission of note.
1036 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1039 * typeck.c (build_binary_op): Call overflow_warning if
1040 TREE_OVERFLOW_P is true for the result and not for any of the
1043 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
1046 * class.c (add_method): Don't wait until template
1047 instantiation time to complain about duplicate methods.
1049 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1052 * semantics.c (finish_unary_op_expr): Warn only if result
1053 overflowed and operands did not.
1055 2007-01-05 Ian Lance Taylor <iant@google.com>
1057 * typeck.c (build_binary_op): Warn about comparing a non-weak
1060 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
1062 * pt.c (tsubst): Propagate the need for structural equality checks
1063 when reducing the level of template parameters.
1065 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
1067 * pt.c: Fix a comment typo.
1069 2006-01-02 Ian Lance Taylor <iant@google.com>
1071 * semantics.c (maybe_convert_cond): Optionally warn when using an
1072 assignment as a condition.
1073 * typeck.c (convert_for_assignment): Optionally warn about
1074 assigning the result of an assignment to a bool.
1076 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1078 * pt.c (canonical_template_parms): Correct typo in comment.
1080 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1082 * typeck.c (structural_comptypes): Renamed from "comptypes".
1083 (comptypes): Use canonical type information to perform fast type
1084 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1085 canonical type comparison returns the same results as we would see
1086 from the current, structural check. Support COMPARE_STRUCTURAL
1087 when we need structural checks.
1088 * decl.c (typename_compare): Fix comment.
1089 (build_typename_type): TYPENAME_TYPE nodes require structural
1090 equality checks, because they resolve different based on the
1092 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1093 require structural equality checks (for now).
1094 (build_ptrmemfunc_type): Build the canonical pointer to member
1096 (compute_array_index_type): Whenever we build a new index type
1097 to represent the size of an array in a template, we need to mark
1098 this index type as requiring structural equality. This goes for
1099 arrays with value-dependent sizes with the current ABI, or all
1101 * tree.c (cplus_array_hash): New.
1102 (struct cplus_array_info): New.
1103 (cplus_array_compare): New.
1104 (cplus_array_htab): New.
1105 (build_cplus_array_type_1): Use a hash table to cache the array
1106 types we build. Build the canonical array type for each array
1108 (cp_build_qualified_type_real): When building a cv-qualified array
1109 type, use the hash table of array types and build canonical array
1111 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1112 use structural equality (for now).
1113 * cp-tree.h (COMPARE_STRUCTURAL): New.
1114 * pt.c (canonical_template_parms): New.
1115 (canonical_type_parameter): New.
1116 (process_template_parm): Find the canonical type parameter.
1117 (lookup_template_class): When we have named the primary template
1118 type, set the canonical type for our template class to the primary
1119 template type. If any of the template arguments need structural
1120 equality checks, the template class needs structural equality
1122 (tsubst): When reducing the level of a template template
1123 parameter, we require structural equality tests for the resulting
1124 parameter because its template parameters have not had their types
1125 canonicalized. When reducing a template type parameter, find the
1126 canonical reduced type parameter.
1127 (any_template_arguments_need_structural_equality_p): New.
1129 2006-12-31 Simon Martin <simartin@users.sourceforge.net>
1132 * parser.c (cp_parser_primary_expression): Return error_mark_node when
1133 a statement-expression is found outside of a function body.
1135 2006-12-28 Kazu Hirata <kazu@codesourcery.com>
1137 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P, TYPE_FUNCTION_SCOPE_P):
1140 * decl2.c: Fix a comment typo.
1142 2006-12-21 Andrew Pinski <pinskia@gmail.com>
1145 * decl.c (cxx_builtin_function): Only copy the decl if adding
1146 it to the std namespace.
1148 2006-12-21 Andrew Pinski <pinskia@gmail.com>
1151 * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
1153 2006-12-22 Kazu Hirata <kazu@codesourcery.com>
1155 * decl.c: Fix a coment typo.
1157 2006-12-18 Ian Lance Taylor <iant@google.com>
1159 * decl.c (start_preparsed_function): Add support for
1160 -Wmissing-declarations.
1162 2006-12-16 Simon Martin <simartin@users.sourceforge.net>
1165 * cp-tree.h (struct deferred_access_check): New structure to represent a
1166 deferred access check. It replaces the previous representation as a tree.
1167 (get_deferred_access_checks): Return a vector of struct
1168 deferred_access_check instead of a tree list.
1169 (perform_access_checks): Take a vector of struct deferred_access_check
1170 instead of a tree list.
1171 * semantics.c (struct deferred_access): Store the deferred access checks
1172 as a vector of struct deferred_access_check instead of a tree list.
1173 (push_deferring_access_checks): Handle the change in struct
1175 (get_deferred_access_checks): Likewise.
1176 (pop_to_parent_deferring_access_checks): Likewise.
1177 (perform_or_defer_access_check): Likewise.
1178 (perform_access_checks): Take a vector of struct deferred_access_check
1179 instead of a tree list.
1180 * parser.c (struct tree_check): New structure to store various data
1181 associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
1182 (struct cp_token): Changed the value field to be a union with a pointer to
1183 a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
1184 tokens and a tree field for all other tokens.
1185 (eof_token): Adjusted due to the change in struct cp_token.
1186 (cp_lexer_get_preprocessor_token): Likewise.
1187 (cp_lexer_purge_token): Likewise.
1188 (cp_lexer_purge_tokens_after): Likewise.
1189 (cp_lexer_print_token): Likewise.
1190 (cp_parser_error): Likewise.
1191 (cp_parser_identifier): Likewise.
1192 (cp_parser_string_literal): Likewise.
1193 (cp_parser_primary_expression): Likewise.
1194 (cp_parser_unqualified_id): Likewise.
1195 (cp_parser_parenthesized_expression_list): Likewise.
1196 (cp_parser_storage_class_specifier_opt): Likewise.
1197 (cp_parser_function_specifier_opt): Likewise.
1198 (cp_parser_type_specifier): Likewise.
1199 (cp_parser_simple_type_specifier): Likewise.
1200 (cp_parser_initializer_list): Likewise.
1201 (cp_parser_member_specification_opt): Likewise.
1202 (cp_parser_attribute_list): Likewise.
1203 (cp_parser_objc_expression): Likewise.
1204 (cp_parser_objc_protocol_qualifiers): Likewise.
1205 (cp_parser_objc_selector): Likewise.
1206 (cp_parser_objc_declaration): Likewise.
1207 (cp_parser_objc_statement): Likewise.
1208 (cp_parser_omp_clause_name): Likewise.
1209 (cp_parser_omp_clause_default): Likewise.
1210 (cp_parser_omp_clause_schedule): Likewise.
1211 (cp_parser_omp_parallel): Likewise.
1212 (cp_parser_initial_pragma): Likewise.
1213 (pragma_lex): Likewise.
1214 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1215 (cp_parser_nested_name_specifier_opt): Likewise.
1216 Use cp_token::u::tree_check_value to save the token's value, the
1217 associated deferred checks and its qualifying scope.
1218 (cp_parser_template_id): Likewise.
1219 (cp_parser_template_declaration_after_export): Adjusted the call to
1220 get_deferred_access_checks.
1221 (cp_parser_init_declarator): Take the access checks as a vector of struct
1222 deferred_access_check instead of a tree list.
1223 (cp_parser_single_declaration): Likewise.
1224 (cp_parser_perform_template_parameter_access_checks): Likewise.
1225 (cp_parser_simple_declaration): Adjusted the call to
1226 cp_parser_init_declarator.
1227 (cp_parser_explicit_specialization): Adjusted the call to
1228 cp_parser_single_declaration.
1230 2006-12-13 Ian Lance Taylor <iant@google.com>
1234 * parser.c (cp_parser_expression_stack_entry): Add field
1236 (cp_parser_binary_expression): Track tree code of left hand side
1237 of expression. Use it when calling build_x_binary_op.
1238 (cp_parser_selection_statement): Add if_p parameter. Change all
1239 callers. Warn about ambiguous else.
1240 (cp_parser_statement): Add if_p parameter. Change all callers.
1241 (cp_parser_implicitly_scoped_statement): Likewise.
1242 * typeck.c (build_x_binary_op): Add parameters arg1_code and
1243 arg2_code. Change all callers. Call warn_about_parentheses.
1244 * cp-tree.h (build_x_binary_op): Update declaration.
1246 2006-12-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1248 * decl.c (build_enumerator): Update error message to match C
1251 2006-12-11 Jan Hubicka <jh@suse.cz>
1253 * decl2.c (var_finalized_p): Update for renamed varpool functions.
1255 2006-12-09 Zack Weinberg <zackw@panix.com>
1257 * parser.c (yydebug, enum pragma_omp_clause): Delete.
1259 2006-12-07 Mark Mitchell <mark@codesourcery.com>
1262 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
1263 (explicit_class_specialization_p): Declare.
1264 * pt.c (explicit_class_specialization_p): New function.
1265 * parser.c (cp_parser_init_declarator): Check correct number of
1266 template parameters for in-class function definitions.
1267 (cp_parser_check_declrator_template_parameters): Stop looking for
1268 template classes when we find an explicit specialization.
1270 2006-12-07 Lee Millward <lee.millward@codesourcery.com>
1273 * cp_parser_elaborated_type_specifier: Check
1274 the return value of check_elaborated_type_specifier.
1276 2006-12-06 Mark Mitchell <mark@codesourcery.com>
1279 * parser.c (cp_parser_init_declarator): Reject initialization of
1282 2006-12-05 Mark Mitchell <mark@codesourcery.com>
1285 * decl2.c (check_member_template): Move check for member
1286 templates in local classes to ...
1287 * parser.c (cp_parser_template_declaration_after_export):
1291 * decl.c (check_array_designated_initializer): New function.
1292 (maybe_deduce_size_from_array_init): Use it.
1293 (reshape_init_array): Likewise.
1295 2006-12-05 Aldy Hernandez <aldyh@redhat.com>
1297 Merge from gimple-tuples-branch.
1299 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
1301 * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
1302 (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
1303 (cxx_omp_clause_copy_ctor): Same.
1304 (cxx_omp_clause_assign_op): Same.
1306 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
1308 * cp-tree.h (union lang_tree_node): Gimple statements do not
1310 (TREE_INDIRECT_USING): Look in base.
1312 2006-12-04 Jan Hubicka <jh@suse.cz>
1314 * cp-objcp-common.c (cp_expr_size): Return NULL in the case
1317 2006-12-04 Mark Mitchell <mark@codesourcery.com>
1320 * pt.c (tsubst_decl): Disallow variables of function type.
1323 * call.c (add_builtin_candidate): Do not permit NULL pointer
1324 constants to be compared with template parameters.
1326 2006-12-04 Eric Botcazou <ebotcazou@adacore.com>
1328 * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
1329 Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1331 2006-12-03 Richard Henderson <rth@redhat.com>
1332 Andrew Pinski <pinskia@gmail.com>
1335 * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
1337 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
1340 * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
1342 2006-12-02 Kazu Hirata <kazu@codesourcery.com>
1344 * name-lookup.c: Follow spelling conventions.
1346 2006-12-01 Geoffrey Keating <geoffk@apple.com>
1348 * decl.c (poplevel): Check DECL_INITIAL invariant.
1349 (duplicate_decls): Preserve DECL_INITIAL when eliminating
1350 a new definition in favour of an old declaration.
1351 (start_preparsed_function): Define and document value of
1352 DECL_INITIAL before and after routine.
1353 (finish_function): Check DECL_INITIAL invariant.
1355 (cp_parser_function_definition_from_specifiers_and_declarator):
1356 Skip duplicate function definitions.
1358 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1361 * typeck.c (type_after_usual_arithmetic_conversions):
1362 Fix assertion for vector types.
1363 (build_binary_op): Use temporary for inner type of vector types.
1365 2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
1368 * typeck.c (build_binary_op): Fix pointer to member function
1369 comparison for ptrmemfunc_vbit_in_delta targets.
1371 2006-12-01 Dirk Mueller <dmueller@suse.de>
1374 * decl.c (grokdeclarator): Warn for type qualifiers on return
1375 type for non-dependent types.
1376 * pt.c (tsubst_function_type): Warn for type qualifiers on
1377 return type for dependent types.
1379 2006-11-30 Geoffrey Keating <geoffk@apple.com>
1381 * rtti.c (get_tinfo_decl): Handle return value from
1382 pushdecl_top_level_and_finish.
1384 2006-11-29 Lee Millward <lee.millward@codesourcery.com>
1387 * parser.c (cp_parser_class_head): Move processing
1388 of any base classes to...
1389 (cp_parser_class_specifier) ...here. Take an extra
1390 tree* parameter for any base classes. Only process
1391 them if the opening brace was found.
1393 2006-11-28 Jakub Jelinek <jakub@redhat.com>
1396 * decl.c (grokfndecl): Check main's type after applying
1397 attributes, not before.
1399 2006-11-27 Mark Mitchell <mark@codesourcery.com>
1401 * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
1402 entries for a primary construction virtual table.
1404 2006-11-26 Mark Mitchell <mark@codesourcery.com>
1407 * parser.c (cp_parser): Add in_function_body.
1408 (cp_parser_new): Initialize it.
1409 (cp_parser_primary_expression): Use parser->in_function_body
1410 instead of at_function_scope_p.
1411 (cp_parser_asm_definition): Likewise.
1412 (cp_parser_direct_declarator): Likewise.
1413 (cp_parser_class_specifier): Clear parser->in_function_body.
1414 (cp_parser_constructor_declarator_p): Use parser->in_function_body
1415 instead of at_function_scope_p.
1416 (cp_parser_function_body_after_declarator): Set
1417 parser->in_function_body.
1419 2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
1421 * cp-tree.def (STATIC_ASSERT): New.
1422 * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
1423 * error.c (dump_decl): Handle STATIC_ASSERT.
1424 * cp-tree.h (STATIC_ASSERT_CONDITION): New.
1425 (STATIC_ASSERT_MESSAGE): New.
1426 (STATIC_ASSERT_SOURCE_LOCATION): New.
1427 (struct tree_static_assert): New.
1428 (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
1429 (union lang_tree_node): Add static_assertion.
1430 (finish_static_assert): Declare.
1431 * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
1432 (pp_cxx_declaration): Handle STATIC_ASSERT.
1433 * pt.c (instantiate_class_template): Handle
1434 STATIC_ASSERT members.
1435 (tsubst_expr): Handle STATIC_ASSERT statements.
1436 * semantics.c (finish_static_assert): New.
1437 * lex.c (D_CPP0X): New.
1438 (reswords): Add static_assert keyword.
1439 (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
1440 * parser.c (cp_parser_block_declaration): Parse static
1442 (cp_parser_static_assert): New.
1443 (cp_parser_member_declaration): Parse static assertions.
1445 2006-11-21 Jakub Jelinek <jakub@redhat.com>
1448 * decl.c (cp_finish_decl): Check for value dependent brace enclosed
1452 * cp-tree.h (WANT_VECTOR): Define.
1453 (WANT_ARITH): Add WANT_VECTOR.
1454 * cvt.c (build_expr_type_conversion): Handle vector types.
1455 * typeck.c (build_unary_op): Add WANT_VECTOR to
1456 build_expr_type_conversion flags.
1458 2006-11-20 Simon Martin <simartin@users.sourceforge.net>
1461 * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
1462 extra argument that represents the declaration to use to print
1463 potential error messages.
1464 * init.c (build_offset_ref): Adjusted the call to
1465 perform_or_defer_access_check.
1466 * class.c (alter_access, resolve_address_of_overloaded_function):
1468 * decl.c (make_typename_type, make_unbound_class_template): Likewise.
1469 * search.c (lookup_member): Likewise.
1470 * friend.c (add_friend): Likewise.
1471 * parser.c (cp_parser_template_id,
1472 cp_parser_pre_parsed_nested_name_specifier): Likewise.
1473 * semantics.c (finish_non_static_data_member,
1474 check_accessibility_of_qualified_id, finish_id_expression): Likewise.
1475 (pop_to_parent_deferring_access_checks, perform_access_checks,
1476 perform_or_defer_access_check): Adjusted the call to enforce_access.
1477 * call.c (enforce_access): Use the new extra argument to build the
1479 (build_op_delete_call): Adjusted the call to
1480 perform_or_defer_access_check.
1481 (build_over_call): Likewise.
1483 2006-11-16 Dirk Mueller <dmueller@suse.de>
1485 * name-lookup.c (begin_scope): Use GGC_CNEW instead of
1488 2006-11-13 Roger Sayle <roger@eyesopen.com>
1490 * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
1491 base type info initializer has the correct type.
1493 2006-11-13 Mark Mitchell <mark@codesourcery.com>
1496 * pt.c (coerce_template_parms): Do not skip_evaluation while
1497 substituting template arguments.
1499 2006-11-11 Richard Guenther <rguenther@suse.de>
1501 * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
1502 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1504 2006-11-03 Roger Sayle <roger@eyesopen.com>
1506 * call.c (build_op_delete_call): Test user-visible type against
1507 size_type_node, instead of against the internal type, sizetype.
1508 * class.c (type_requires_array_cookie): Likewise.
1509 * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
1510 handling of TYPE_IS_SIZETYPE.
1511 * typeck.c (type_after_usual_arithmetic_conversions): Remove
1512 special case handling of TYPE_IS_SIZETYPE.
1513 (comptypes): Likewise.
1515 2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
1517 * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
1518 if targetm.cxx.use_atexit_for cxa_atexit.
1519 (start_cleanup_fn): Likewise.
1520 (register_dtor_fn): Likewise.
1522 2006-09-25 Geoffrey Keating <geoffk@apple.com>
1524 * decl2.c (cp_write_global_declarations): Rename from
1526 * cp-lang.c (finish_file): Don't call cp_finish_file.
1527 * cp-tree.h (cp_write_global_declarations): Rename from
1529 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
1530 cp_write_global_declarations.
1532 2006-10-31 Geoffrey Keating <geoffk@apple.com>
1534 * name-lookup.c (get_anonymous_namespace_name): New.
1535 (push_namespace_with_attribs): Use get_anonymous_namespace_name.
1536 * decl2.c (start_objects): Update for rename of
1537 get_file_function_name_long.
1539 2006-10-30 Dirk Mueller <dmueller@suse.de>
1542 * decl.c (grokdeclarator): Duplicate diagnostic message
1543 for easier translation.
1544 * decl.c (grokdeclarator): Fix line-wrapping.
1546 2006-10-30 Dirk Mueller <dmueller@suse.de>
1549 * decl.c (grokfndecl): Use check_main_parameter_types.
1551 2006-10-30 Dirk Mueller <dmueller@suse.de>
1554 * decl.c (grokfndecl): Duplicate warning message for
1557 2006-10-30 Dirk Mueller <dmueller@suse.de>
1559 * typeck.c (build_unary_op): Fix indenting. Use G_().
1561 2006-10-29 Dirk Mueller <dmueller@suse.de>
1564 * typeck.c (build_unary_op): Duplicate warning message
1565 for easier translation.
1567 2006-10-29 Dirk Mueller <dmueller@suse.de>
1570 * typeck.c (build_array_ref): Warn for char subscriptions
1573 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
1575 * decl.c: Fix a comment typo.
1577 2006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1580 * typeck.c (build_unary_op): Use same_type_p when comparing to
1583 2006-10-29 Dirk Mueller <dmueller@suse.de>
1586 * typeck.c (build_binary_op): Duplicate warning message
1587 for better translation.
1589 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
1591 * decl.c (builtin_function_1): Move common code to
1592 add_builtin_function.
1593 (builtin_function): Rename to cxx_builtin_function.
1594 Change the signature.
1595 * call.c: Include langhooks.h.
1596 (build_java_interface_fn_ref): Replace calls to
1597 builtin_function with add_builtin_function.
1598 * Make-lang.in (cp/call.o): Depend on langhooks.h.
1599 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
1600 cxx_builtin_function.
1601 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
1602 Change the signature.
1604 2006-10-22 Nathan Sidwell <nathan@codesourcery.com>
1607 * rtti.c (tinfo_base_init): The type info string is always global.
1609 2006-10-20 Lee Millward <lee.millward@codesourcery.com>
1610 Mark Mitchell <mark@codesourcery.com>
1613 * decl2.c (grokbitfield): Detect invalid non-integral
1614 types earlier when possible.
1616 2006-10-18 Mark Shinwell <shinwell@codesourcery.com>
1619 * typeck2.c (digest_init): Raise error upon attempts to
1620 initialize arrays with variables.
1622 2006-10-17 Lee Millward <lee.millward@codesourcery.com>
1625 * cp-tree.h (xref_basetypes): Return bool instead of void.
1626 * decl.c (xref_basetypes): Adjust definition. Return false
1627 if the class bases are invalid.
1628 * parser.c (cp_parser_class_head): Check the return value
1629 from xref_basetypes.
1631 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1634 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
1638 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
1640 (cp_parser_constructor_declarator_p): Use it.
1641 (cp_parser_check_type_definition): Return a value indicating
1642 whether or not the definition is valid.
1643 (cp_parser_enum_specifier): Skip invalid enum definitions.
1645 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1648 * typeck2.c (build_functional_cast): Don't zero-initialize
1649 non-PODs; instead, call their constructors.
1650 * method.c (synthesize_method): Always build mem-initializers, if
1651 we're synthesizing the default constructor.
1653 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1656 * decl.c (reshape_init_class): Move check for designated
1658 * parser.c (cp_parser_initializer_list): ... here.
1659 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
1661 2006-10-16 Mark Mitchell <mark@codesourcery.com>
1664 * typeck2.c (process_init_constructor_array): Reword comment.
1665 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
1669 * parser.c (cp_parser_using_declaration): Stop parsing when
1670 something goes wrong with an access declaration.
1673 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
1674 types when their sizes are required. Refine test for VLAs.
1677 * parser.c (cp_parser_template_argument): Don't consider "&var" a
1678 possible constant-expression.
1679 * pt.c (convert_nontype_argument): Refine handling of arguments of
1682 2006-10-13 Mark Mitchell <mark@codesourcery.com>
1685 * parser.c (function_declarator_p): New function.
1686 (cp_parser_init_declarator): Use it.
1687 (cp_parser_member_declaration): Likewise.
1689 2006-10-12 Mark Mitchell <mark@codesourcery.com>
1692 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
1693 variably modified types.
1695 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
1698 * decl.c (start_decl): Return error_mark_node if a
1699 function is initialized like a variable.
1700 (check_var_type): If a variable of field is declared void,
1701 set the type to error_mark_node.
1702 (grokdeclarator): Check the return type of check_var_type.
1703 * class.c (finish_struct_1): Robustify.
1705 2006-10-11 Mark Mitchell <mark@codesourcery.com>
1708 * decl.c (check_initializer): Issue errors about trying to
1709 initialize arrays whose elements have variable size.
1711 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
1714 * cp-tree (struct cp_decl_specifier_seq): Rename to
1715 conflicting_specifiers_p
1716 * parser.c (cp_parser_set_storage_class): Set
1717 conflicting_specifiers_p for the input decl specifier
1718 if a typedef specifier is present. Rename uses of
1719 multiple_specifiers_p to conflicting_specifiers_p.
1720 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
1721 class specifier has already been set for this declaration,
1722 set conflicting_specifiers_p to true on the decl_specs.
1723 * decl.c (grokdeclarator): Rename uses of
1724 multiple_specifiers_p to conflicting_specifiers_p.
1726 2006-10-10 Brooks Moses <bmoses@stanford.edu>
1728 * Make-lang.in: Added "c++.pdf" target support.
1730 2006-10-10 Richard Guenther <rguenther@suse.de>
1732 PR rtl-optimization/29323
1733 * decl.c (finish_function): Set TREE_NOTHROW only for
1734 functions that bind local.
1736 2006-10-09 Richard Henderson <rth@redhat.com>
1738 Revert emutls patch.
1740 2006-10-04 Richard Henderson <rth@redhat.com>
1741 Jakub Jelinek <jakub@redhat.com>
1743 * decl.c (grokvardecl): Don't error if !have_tls.
1744 (grokdeclarator): Likewise.
1745 * parser.c (cp_parser_omp_threadprivate): Likewise.
1747 2006-10-03 Mark Mitchell <mark@codesourcery.com>
1750 * friend.c (do_friend): Improve comments; add assertion.
1751 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
1752 typenames for qualified names used in declarations, even when
1753 caching qualified name lookup.
1756 * decl2.c (grokfield): Don't handle access declarations here.
1757 * parser.c (cp_parser_using_declaration): Handle access
1759 (cp_parser_block_declaration): Adjust calls to
1760 cp_parser_using_declaration.
1761 (cp_parser_member_declaration): Likewise. Use
1762 cp_parser_using_declaration to look for access_declarations.
1764 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1767 * init.c (build_new): Check for invalid init.
1769 2006-10-02 Mark Mitchell <mark@codesourcery.com>
1772 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
1773 not try to actually evaluate sizeof for a VLA type.
1775 2006-10-01 Mark Mitchell <mark@codesourcery.com>
1778 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
1779 * semantics.c (baselink_for_fns): Build a baselink, even when
1780 processing a template.
1783 * parser.c (cp_parser_postfix_dot_deref_expression): Use
1784 BASELINK_ACCESS_BINFO as the qualifying scope when calling
1785 adjust_result_of_qualified_name_lookup.
1787 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
1791 * cp-tree.h (redeclare_class_template): Adjust declaration
1792 to return bool instead of void.
1793 * pt.c (redeclare_class_template): Update definition.
1794 Return false on error.
1795 * decl.c (xref_tag): Return error_mark_node if
1796 redeclare_class_template returned false.
1799 * cp-tree.h (begin_specialization): Return bool
1801 * pt.c (check_specialization_scope): Likwise.
1802 Adjust comment. Return false if a specialization
1803 isn't permitted in the current scope.
1804 (begin_specialization): Use the return value of
1805 check_specialization_scope.
1806 * parser.c (cp_parser_explicit_specialization): If
1807 begin_specialization returned false, skip the rest
1808 of the specialization.
1810 2006-09-21 Mark Mitchell <mark@codesourcery.com>
1813 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
1816 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
1819 * decl.c (shadow_tag): Return error_mark_node
1820 if maybe_process_partial_specialization failed.
1823 * decl.c (grokdeclarator): Return error_mark_node on
1824 declaration with two or more data types.
1826 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
1829 * class.c (check_for_override): Remove dllimport from virtual
1832 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
1835 * parser.c (cp_parser_labeled_statement): Return nothing. Do
1836 not take in_statement_expr and in_compound as arguments. Rename
1837 to cp_parser_label_for_labeled_statement. Parse only the label,
1839 (cp_parser_statement): Parse the statement of a labeled-statement
1840 from here, using tail recursion.
1842 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
1845 * init.c (build_zero_init): If we have an error mark node for
1846 the array size, return.
1848 2006-09-10 Mark Mitchell <mark@codesourcery.com>
1851 * cp-objcp-common.c (cxx_staticp): New function.
1852 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
1853 * cp-tree.h (cxx_staticp): New function.
1855 2006-09-09 Jason Merrill <jason@redhat.com>
1858 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
1860 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1863 * parser.c (cp_parser_skip_until_found): Rename to
1864 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
1865 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
1866 Reorganize. Adjust comment.
1867 (cp_parser_template_declaration_after_export): Adjust call.
1868 (cp_parser_enclosed_template_argument_list): Likewise.
1870 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
1873 * init.c (build_new_1): Build a distinct type copy
1874 for the array type that was returned from
1875 build_cplus_array_type.
1877 2006-09-07 Jason Merrill <jason@redhat.com>
1880 * cvt.c (convert_to_void): Enable previous change.
1883 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
1886 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
1889 * pt.c (fold_non_dependent_expr): Make sure expr is not
1890 dereferenced if it is NULL.
1892 2006-09-06 Zak Kipling <zak@transversal.com>
1895 * decl.c (make_rtl_for_nonlocal_decl),
1896 (start_preparsed_function): Don't use lbasename on
1897 input_filename when calling get_fileinfo.
1898 * semantics.c (begin_class_definition): Likewise.
1899 * lex.c (cxx_make_type): Likewise.
1900 (handle_pragma_interface): Call get_fileinfo on input_filename,
1901 not on the parameter to the directive.
1903 2006-09-06 Mark Mitchell <mark@codesourcery.com>
1906 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
1910 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
1913 2006-09-06 Jason Merrill <jason@redhat.com>
1916 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
1917 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
1918 * tree.c (build_cplus_new): Set it.
1921 * cvt.c (convert_to_void): Replace a subexpression with no side
1922 effects with void_zero_node.
1923 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
1924 (get_first_fn): Ditto.
1925 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
1927 2006-09-05 Jason Merrill <jason@redhat.com>
1930 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
1931 where the name is a type used incorrectly.
1934 * typeck.c (maybe_warn_about_returning_address_of_local): Look
1935 through COMPONENT_REF and ARRAY_REF.
1938 * name-lookup.c (do_class_using_decl): Try to find the base even
1939 if bases_dependent_p.
1940 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
1943 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
1945 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
1947 PR 23287 Revert my 2006-09-01 patch.
1948 * parser.c: Reverted.
1951 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
1957 * parser.c (cp_parser_template_parameter_list): Add
1958 invalid template parameters to the parameter list as
1961 2006-09-02 Jakub Jelinek <jakub@redhat.com>
1964 * except.c (build_throw): Only set current_function_returns_abnormally
1965 if cfun is not NULL.
1968 * repo.c (repo_file): Remove.
1969 (open_repo_file, reopen_repo_file_for_write): Return fopened
1970 FILE * instead of setting global repo_file variable.
1971 (init_repo): Adjust caller.
1972 (finish_repo): Likewise. Return instead of goto out before
1973 reopen_repo_file_for_write has been called.
1975 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
1978 * semantics.c (finish_call_expr): Add assert.
1979 * name-lookup.c (lookup_arg_dependent): Check we found an overload
1983 * parser.c (cp_parser_id_expression): Add member_p
1984 argument. Update all callers.
1985 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
1986 the object's scope, if valid.
1987 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
1989 (cp_parser_postfix_dot_deref_expression): Set object_scope.
1990 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
1992 2006-08-30 Jason Merrill <jason@redhat.com>
1995 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
1996 the fields have been processed.
1998 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
2001 * call.c (build_x_va_arg): Remove the reference type
2002 from the type before creating the pointer type.
2004 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
2007 * except.c (expand_start_catch_block): Use correct types for bitwise
2010 2006-08-28 Jason Merrill <jason@redhat.com>
2013 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
2014 fields can't be packed.
2017 * cvt.c (convert_to_void): Don't automatically load from volatiles
2018 of TREE_ADDRESSABLE type.
2020 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2023 * cp-tree.h (maybe_process_partial_specialization): Return
2024 tree instead of void.
2025 * parser.c (cp_parser_class_head): Use return value of
2026 maybe_process_partial_specialization.
2027 * pt.c (maybe_process_partial_specialization): Return error_mark_node
2028 for broken specializations, TYPE otherwise. Check for template
2029 template parameters.
2031 2006-08-27 Mark Mitchell <mark@codesourcery.com>
2034 * pt.c (register_specialization): Return error_mark_node for
2035 specialization-after-instantiation.
2036 * decl2.c (mark_used): Mark the main function used when one of its
2039 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
2042 * class.c (check_field_decls): Don't issue error about
2043 local classes containing static data members.
2045 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
2048 * parser.c (struct cp_token): Add input_file_stack_index.
2049 (eof_token): Update.
2050 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
2051 (cp_lexer_set_source_position_from_token): Restore input file
2054 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
2059 * pt.c (process_template_parm): Store invalid template
2060 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
2061 (push_inline_template_parms_recursive): Check for template
2062 parameters having a TREE_VALUE of error_mark_node rather than
2063 check the parameter itself.
2064 (mangle_class_name_for_template): Likewise.
2065 (comp_template_parms): When comparing the individual template
2066 parameters, return 1 if either is error_mark_node.
2067 (current_template_args): Robustify.
2068 (redeclare_class_template): Likewise.
2070 2006-08-26 Mark Mitchell <mark@codesourcery.com>
2073 * class.c (resolve_address_of_overloaded_function): Add
2074 access_path parameter. Perform access checks.
2075 (instantiate_type): Adjust call to
2076 resolve_address_of_overloaded_function. Remove unnecessary code.
2077 * tree.c (is_overloaded_fn): Document. Return 2 when there are
2078 acutally multiple functions.
2079 (really_overloaded_fn): Use is_overloaded_fn.
2080 * mangle.c (write_expression): Handle BASELINKs.
2081 * cp-tree.h (really_overloaded_fn): Return bool.
2082 (baselink_for_fns): Declare.
2083 * search.c (lookup_member): Check access for single static
2085 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
2086 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
2087 * semantics.c (finish_call_expr): Use baselink_for_fns.
2088 (baselink_for_fns): New function.
2089 (finish_id_expression): Use it.
2090 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
2093 * pt.c (tsubst): Issue errors about attempts to create VLAs at
2094 template-instantiation time.
2096 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2099 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
2100 template parameters. Improve error message for template type
2104 * cp-tree.h (grok_op_properties): Return bool instead of void.
2105 * decl.c (grokfndecl): Discard invalid operator declarations.
2106 (copy_fn_p): Revert change for PR 27547.
2107 (grok_op_properties): Return error status (true on success).
2108 * pt.c (tsubst_decl): Discard invalid operator declarations.
2110 2006-08-25 Mark Mitchell <mark@codesourcery.com>
2113 * decl.c (grokdeclarator): Disallow declarations with qualified
2114 names in local scopes.
2116 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
2119 * decl.c (make_typename_type): Only try and resolve it when
2120 context is not dependent. Refactor.
2121 * decl2.c (check_classfn): Push to class scope before looking for
2124 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
2127 * g++spec.c (lang_specific_driver): Always check if we need to
2128 swallow a space-separated arg to '-x'.
2129 * lang-specs.h: Don't create ouput files for '-xc++-header'
2132 2006-08-23 Jason Merrill <jason@redhat.com>
2135 * pt.c (push_template_decl_real): A friend template with class
2136 scope isn't primary.
2138 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
2141 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
2142 Move -fno-rtti check to be more specific.
2144 2006-08-22 Jason Merrill <jason@redhat.com>
2147 * call.c (build_over_call): Don't make a copy here if build_call
2150 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
2153 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
2156 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
2159 * parser.c (cp_parser_postfix_expression): Make sure that the
2160 saved value for parser->type_definition_forbidden_message is
2161 restored before returning to avoid an invalid free().
2163 2006-08-22 Jason Merrill <jason@redhat.com>
2166 * typeck.c (merge_types): If either of the types have the right
2167 attributes, return that one.
2169 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
2170 doing this to class types.
2171 * typeck.c (original_type): Deal with type quals properly.
2173 2006-08-21 Jason Merrill <jason@redhat.com>
2176 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
2177 just leave the expression as it is.
2178 (finish_stmt_expr): If the statement-expression has class type,
2179 wrap it in a TARGET_EXPR.
2180 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
2182 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
2184 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
2187 * decl.c (duplicate_decls): Return early if either
2188 newdecl or olddecl is error_mark_node.
2191 * decl.c (grokdeclarator): Return early after
2192 issuing diagnostic about an incomplete type.
2195 * tree.c (decl_anon_ns_mem_p): Robustify.
2196 * decl2.c (determine_visibility): Likewise.
2198 2006-08-20 Mark Mitchell <mark@codesourcery.com>
2201 * tree.c (cast_valid_in_integral_constant_expression_p): New
2203 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
2204 * pt.c (tsubst_expr): Add integral_constant_expression_p
2206 (fold_non_dependent_expr): Adjust callers of
2207 tsubst_{expr,copy_and_build}.
2208 (tsubst_friend_function): Likewise.
2209 (tsubst_template_arg): Likewise.
2210 (tsubst_default_argument): Likewise.
2211 (tsubst_decl): Likewise.
2213 (tsubst_omp_clasuses): Likewise.
2214 (regenerate_decl_fromp_template): Likewise.
2215 (instantiate_decl): Likewise.
2216 (tsubst_initializer_list): Likewise.
2217 (tsubst_enum): Likewise.
2218 (tsubst_expr): Use RECUR throughout.
2219 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
2220 invalid casts in integral constant expressions.
2221 * parser.c (cp_parser_postfix_expression): Use
2222 cast_valid_in_integral_constant_expression_p.
2223 (cp_parser_cast_expression): Likewise.
2224 (cp_parser_functional_cast): Likewise.
2227 * pt.c (tsubst_qualified_id): Do not strip references from
2230 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2233 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
2235 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
2236 for valid type-names.
2237 (cp_parser_unqualified_id): Fix error handling for destructors.
2240 * decl.c (xref_tag): Improve error message. Return early on error.
2243 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
2245 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
2248 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
2250 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
2253 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
2254 perform_integral_promotions for non integral type.
2256 2006-08-16 Jason Merrill <jason@redhat.com>
2259 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
2260 if arg is a function.
2262 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2265 * init.c (build_new): Return early on invalid placement.
2267 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
2270 * pt.c (process_template_parm): Robustify.
2272 2006-08-14 Steve Ellcey <sje@cup.hp.com>
2276 * operators.def: Remove <?, ?>, <?=, and >?= operators.
2277 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
2278 (cp_parser_warn_min_max): Remove.
2280 2006-08-11 Jason Merrill <jason@redhat.com>
2283 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
2284 attributes applied to a TYPENAME_TYPE.
2286 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
2289 * pt.c (coerce_template_parms): Copy across the
2290 invalid template arguments to the new template inner arguments.
2291 (retrieve_specialization): Robustify.
2294 * pt.c (coerce_template_template_parms): Robustify.
2297 * error.c (dump_template_parms): Robustify.
2300 * pt.c (redeclare_class_template): Robustify.
2303 * pt.c (type_unification_real): Robustify.
2305 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
2308 * decl.c (start_decl): Return error_mark_node if a
2309 diagnostic was issed for an invalid typedef initialization.
2311 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2314 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
2315 when parsing destructor names.
2318 * decl.c (duplicate_decls): Call check_default_args here.
2319 (start_preparsed_function): Do not call check_default_args.
2320 * name-lookup.c (pushdecl_maybe_friend): Only call
2321 check_default_args if duplicate_decls got bypassed.
2323 2006-08-02 Richard Guenther <rguenther@suse.de>
2327 2006-07-05 Richard Guenther <rguenther@suse.de>
2328 Andrew Pinski <pinskia@gcc.gnu.org>
2331 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2332 top level qualifiers for pointer type comparisons.
2334 2006-08-02 Mark Mitchell <mark@codesourcery.com>
2337 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
2339 2006-07-31 Mark Mitchell <mark@codesourcery.com>
2342 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
2343 (stabilize_call): Tweak documentation.
2344 (stabilize_init): Only call stabilize_call for calls.
2346 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2349 * decl2.c (check_classfn): Remove early return.
2350 * search.c (lookup_member): Return NULL with bad type.
2352 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2355 * decl.c (check_initializer): Check for 1 initializer on scalar types.
2357 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
2360 * pt.c (tsubst_copy_and_build): Mark used enum types.
2361 * semantics.c (finish_id_expression): Likewise.
2363 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2366 * decl.c (grokdeclarator): Check whether "long" or "short" was
2367 specified for non-integral types.
2369 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2371 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2373 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
2377 * pt.c (process_template_parm) Store invalid template
2378 parameters as error_mark_node in the paramater list.
2379 (push_inline_template_parms_recursive): Handle invalid
2380 template parameters.
2381 (comp_template_parms): Likewise.
2382 (check_default_tmpl_arg): Likewise.
2383 (coerce_template_template_parms): Likewise.
2384 (mangle_class_name_for_template): Likewise.
2385 (tsubst_template_parms): Likewise.
2386 * error.c (dump_template_argument_list): Likewise.
2388 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
2390 * cp-tree.h: Fix a comment typo.
2392 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2395 * decl.c (grokdeclarator): Return error_mark_node after invalid
2398 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
2401 * decl.c (grokvardecl): Use FROB_CONTEXT.
2402 * pt.c (register_specialization): Likewise.
2404 2006-07-23 Mark Mitchell <mark@codesourcery.com>
2407 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
2408 * name-lookup.c (unqualified_namespace_lookup): There is no way to
2409 have a hidden name in non-namespace scopes.
2410 * pt.c (tsubst_friend_class): Look for hidden names.
2411 * decl.c (lookup_and_check_tag): Fix typo in comment.
2413 * semantics.c (finish_compound_literal): Fix typo in comment.
2415 2006-07-21 Jason Merrill <jason@redhat.com>
2417 * decl2.c (determine_visibility): Don't propagate visibility from
2419 (constrain_class_visibility): Don't warn in system headers.
2420 Don't warn about pointer fields.
2422 2006-07-20 Mike Stump <mrs@apple.com>
2424 * decl2.c (determine_visibility_from_class): Don't use hidden
2425 visibility for explicit instantiations.
2427 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2430 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
2431 valid decls. Cleanup.
2434 * semantics.c (check_template_template_default_arg): Simplify
2437 2006-07-20 Jason Merrill <jason@redhat.com>
2440 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
2441 const variables with implicit internal linkage.
2442 * tree.c (decl_linkage): Only return lk_external if it's set.
2445 * decl2.c (constrain_visibility): Ignore the anonymous namespace
2446 for extern "C" decls.
2447 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
2449 * decl2.c (constrain_visibility): Remove specified and reason
2450 parameters. Don't touch decls that already have explicit visibility.
2451 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
2453 (determine_visibility_from_class): Reverse sense of
2454 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
2455 (constrain_class_visibility): Only complain about member visibility
2456 if the member type is another class. Don't change visibility of the
2459 2006-07-19 Mark Mitchell <mark@codesourcery.com>
2462 * decl.c (layout_var_decl): Don't call push_local_name here.
2463 (initialize_artificial_var): Assert artificiality.
2464 (cp_finish_decl): Call push_local_name here.
2466 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2469 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
2472 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2475 * semantics.c (check_accessibility_of_qualified_id): Robustify.
2478 * pt.c (tsubst_decl): Handling substitutions into a static data
2479 member from within the scope of the tempalte itself.
2481 2006-07-18 Lee Millward <lee.millward@gmail.com>
2484 * method.c (locate_copy): Check for non_reference
2485 returning error_mark_node.
2488 * decl.c (duplicate_decls): Return error_mark_node
2489 on ambiguous declaration.
2491 2006-07-18 Steve Ellcey <sje@cup.hp.com>
2494 * search.c (adjust_result_of_qualified_name_lookup): Change
2495 assert to part of if statement.
2497 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2500 * decl.c (reshape_init_class): Return error_mark_node on error.
2502 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2505 * decl2.c (check_classfn): Return NULL_TREE on error.
2507 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2510 * name-lookup.c (pushdecl_maybe_friend): Return early on
2512 * except.c (expand_start_catch_block): Use error_mark_node instead
2513 of NULL_TREE for invalid decls.
2514 * parser.c (cp_parser_exception_declaration): Return error_mark_node
2515 on invalid catch parameter. Simplify.
2517 2006-07-16 Jakub Jelinek <jakub@redhat.com>
2520 * decl2.c (note_vague_linkage_var): Removed.
2521 (finish_static_data_member_decl): Add decl to pending_statics vector
2522 directly. Do it even for non-public decls.
2524 2006-07-15 Lee Millward <lee.millward@gmail.com>
2527 * decl2.c (acceptable_java_type): Robustify. Use
2528 proper Boolean return type instead of return 1.
2529 (check_java_method): Don't issue error about
2530 type not being an acceptable Java parameter if
2531 it's error_mark_node.
2534 * parser.c (cp_parser_elaborated_type_specifier):
2535 Return early if an invalid type was detected.
2537 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2540 * parser.c (cp_parser_check_decl_spec): New function.
2541 (cp_parser_decl_specifier_seq): Factor out check for repeated
2542 decl-specifiers into cp_parser_check_decl_spec. Use it.
2543 (cp_parser_type_specifier_seq): Use it.
2546 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
2550 * decl2.c (cplus_decl_attributes): Check for invalid decls.
2552 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2555 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
2556 * decl2.c (grokfield): Likewise.
2558 2006-07-12 Geoffrey Keating <geoffk@apple.com>
2560 * decl2.c (determine_visibility): Don't change visibility of
2561 function locals because of -fvisibility-inlines-hidden.
2563 2006-07-12 Jason Merrill <jason@redhat.com>
2566 * semantics.c (note_decl_for_pch): Don't premangle templates.
2568 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
2570 * typeck.c (string_conv_p): Remove spurious quotation mark in
2573 2006-07-07 Lee Millward <lee.millward@gmail.com>
2574 Andrew Pinski <pinskia@gmail.com>
2577 * decl.c (define_label): Return error_mark_node on error.
2578 * semantics.c (finish_label_stmt): Don't call
2579 add_stmt for invalid labels.
2581 2006-07-06 Jason Merrill <jason@redhat.com>
2584 * decl2.c (finish_static_data_member_decl): Don't assert
2587 2006-07-05 Jason Merrill <jason@redhat.com>
2591 * class.c (check_field_decls): Check TYPE_PACKED after
2592 stripping array types.
2593 (finish_struct_bits): Don't copy TYPE_SIZE here.
2596 * friend.c (is_friend): Fix DR 45 implementation.
2598 2006-07-05 Richard Guenther <rguenther@suse.de>
2599 Andrew Pinski <pinskia@gcc.gnu.org>
2602 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2603 top level qualifiers for pointer type comparisons.
2605 2006-07-01 Jason Merrill <jason@redhat.com>
2608 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
2611 2006-06-30 Jason Merrill <jason@redhat.com>
2614 * call.c (build_new_method_call): Force evaluation of the
2615 instance pointer, not the object.
2617 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
2619 * decl2.c: Fix a comment typo.
2621 2006-06-30 Jason Merrill <jason@redhat.com>
2624 * decl2.c (grokfield): Only try to treat the decl as an access
2625 declaration if the scope is a class.
2627 2006-06-29 Jason Merrill <jason@redhat.com>
2634 * decl2.c (determine_visibility): Overhaul.
2635 (determine_visibility_from_class): Likewise.
2636 (min_vis_r, type_visibility, constrain_visibility): New fns.
2637 (constrain_visibility_for_template): Likewise.
2638 (constrain_class_visibility): Likewise.
2639 * decl.c (cp_finish_decl): Call determine_visibility for function
2641 * name-lookup.c (pushtag): Call determine_visibility.
2642 * decl.c (duplicate_decls): Don't copy visibility from template to
2644 * pt.c (check_explicit_specialization): Likewise.
2645 (lookup_template_class, tsubst_decl): Call determine_visibility.
2646 * class.c (finish_struct_1): Call constrain_class_visibility.
2651 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
2653 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
2654 (cp_parser_enum_specifier): Likewise.
2655 (cp_parser_elaborated_type_specifier): Apply attributes if this
2656 declares only the class.
2657 (cp_parser_class_specifier): Apply leading attributes immediately.
2658 * semantics.c (begin_class_definition): Add attributes parameter,
2659 apply them to the type.
2663 * tree.c (decl_anon_ns_mem_p): New function.
2664 * cp-tree.h: Declare it.
2665 * decl2.c (determine_visibility): Make anonymous namespace
2667 (min_vis_r, constrain_visibility): Likewise.
2668 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
2670 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
2672 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
2673 on anonymous namespaces.
2675 2006-06-28 Jason Merrill <jason@redhat.com>
2678 * pt.c (convert_template_argument): Pass all template arguments
2679 on to coerce_template_template_parms.
2681 2006-06-25 Lee Millward <lee.millward@gmail.com>
2682 Mark Mitchell <mark@codesuorcery.com>
2685 * decl2.c (grokbitfied): Remove check for grokdeclarator
2686 returning NULL_TREE, instead check for error_mark_node
2687 to indicate failure.
2688 * decl.c (grokdeclarator): Adjust block comment.
2690 2006-06-25 Lee Millward <lee.millward@gmail.com>
2693 * mangle.c (mangle_conv_op_name_for_type): Check for
2695 * name-lookup.c (push_class_level_binding): Robustify.
2696 (do_class_using_decl): Return early if name is error_mark_node.
2698 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2701 * name-lookup.c (pushtag): Return if we have error_mark_node.
2703 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2706 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
2708 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2711 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
2712 arguments. Fix comment.
2715 * init.c (build_new_1): Handle error_mark_nodes returned by
2716 build_java_class_ref.
2717 (build_java_class_ref): Do not abort compilation, but return
2718 error_mark_node. Improve error message. Fix indentation.
2720 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
2723 * decl.c (start_decl): Check that dllimports are not initialized.
2725 2006-06-22 Lee Millward <lee.millward@gmail.com>
2728 * typeck2.c (build_m_component_ref): Use error_operand_p.
2731 * decl.c (grokdeclarator): Return error_mark_node on
2732 invalid uses of the scope resolution operator.
2734 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2737 * pt.c (determine_specialization): Check for invalid decls.
2740 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
2744 * rtti.c (get_tinfo_decl_dynamic): Robustify.
2746 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2749 * init.c (push_base_cleanups): Skip members with invalid types.
2750 * typeck.c (build_class_member_access_expr): Robustify.
2752 2006-06-19 Mark Mitchell <mark@codesourcery.com>
2754 * pt.c (instantiate_template): Fix typo in comment.
2756 2006-06-19 Richard Guenther <rguenther@suse.de>
2758 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
2759 power-of-two token vector size.
2761 2006-06-16 Mark Mitchell <mark@codesourcery.com>
2764 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
2768 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
2772 * decl.c (have_extern_spec): Remove.
2773 (start_decl): Do not check have_extern_spec.
2774 (start_function): Likewise.
2775 * cp-tree.h (have_extern_spec): Remove.
2776 * parser.c (cp_parser_linkage_specification): Don't set
2778 (cp_parser_init_declarator): Likewise.
2779 (cp_parser_parameter_declaration): Do not treat parameters as
2780 within the scope of an unbraced linkage specification.
2782 2006-06-15 Mark Mitchell <mark@codesourcery.com>
2785 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
2787 * pt.c (unify): Use it.
2790 * call.c (build_conditional_expr): Robustify.
2793 * pt.c (instantiate_template): Set processing_template_decl to
2794 zero while performing substitutions.
2796 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2799 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
2800 identify destructors.
2801 (cp_parser_nested_name_specifier_opt): Remove invalid
2803 (cp_parser_template_id): Refine heuristic for determining whether
2804 we are entering a scope.
2807 * parser.c (cp_parser_declarator): Robustify.
2810 * pt.c (tsubst_expr): Use finish_omp_atomic.
2811 (value_dependent_expression_p): All CALL_EXPRs are dependent.
2812 * semantics.c (finish_omp_atomic): Rework to use standard
2813 paradigms for handling non-dependent expressions.
2815 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2817 * typeck.c (build_modify_expr): Tidy diagnostic message.
2819 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2822 * typeck.c (build_modify_expr): Disallow array assignment.
2824 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2826 * cp-tree.def: Fix typo.
2828 2006-06-13 Mark Mitchell <mark@codesourcery.com>
2831 * decl.c (decls_match): Allow an extern "C" variable declarations
2832 from different namespaces to match.
2833 (duplicate_decls): Disallow redeclaring a variable with a
2834 different linkage specification.
2836 2006-06-13 Jakub Jelinek <jakub@redhat.com>
2839 * cp-tree.h (cxx_int_tree_map): New struct.
2840 (struct language_function): Add extern_decl_map field.
2841 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
2842 to cp_function_chain->extern_decl_map hash table instead of
2843 copying over DECL_UID.
2844 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
2846 (cp_genericize_r): Remap DECL_EXTERN local decls using
2847 cp_function_chain->extern_decl_map hash table.
2848 * decl.c (finish_function): Clear extern_decl_map.
2850 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2853 * semantics.c (finish_offsetof): Handle pseudo-destructors.
2856 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
2860 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
2863 2006-06-12 Roger Sayle <roger@eyesopen.com>
2866 * typeck2.c (build_functional_cast): Use cp_convert to construct
2867 non-aggregate initializers instead of the user-level build_c_cast.
2869 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2872 * cp-tree.h (finish_offsetof): Add prototype.
2873 * semantics.c (finish_offsetof): New function.
2874 * parser.c (cp_parser_builtin_offsetof): Call it instead of
2876 * pt.c (tsubst_copy_and_build): Likewise.
2878 2006-06-06 Mark Mitchell <mark@codesourcery.com>
2881 * call.c (standard_conversion): Require that the derived type be
2882 complete when performing a derived-to-base conversion.
2884 2006-06-04 Mark Mitchell <mark@codesourcery.com>
2887 * decl.c (cp_finish_decl): Process initializers for static data
2888 members with non-dependent initializers, even in templates.
2891 * decl.c (maybe_deduce_size_from_array_init): If the declaration
2892 is erroneous, give it an erroneous type.
2893 (layout_var_decl): If the type is erroneous, give up.
2894 (check_initializer): Likewise.
2897 * cp-tree.h (TYPE_OBJ_P): New macro.
2898 (TYPE_PTROB_P): Use it.
2899 (TYPE_REF_OBJ_P): Likewise.
2900 * semantics.c (finish_compound_literal): Do not permit compound
2901 literals of non-object types.
2904 * typeck.c (original_type): Robustify.
2906 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2909 * init.c (constant_value_1): Return decl instead of error_mark_node
2910 for invalid initializers.
2912 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2915 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
2916 on operand of the COND_EXPR for the null pointer check.
2918 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2921 * typeck.c (build_unary_op): Mark the function as being used.
2923 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
2926 * parser.c (cp_parser_initial_pragma): Read one more token for
2927 caller after reading PCH file in.
2929 2006-05-31 Mark Mitchell <mark@codesourcery.com>
2932 * call.c (perform_implicit_conversion): Do not actually perform
2933 conversions in templates.
2936 * call.c (resolve_args): Check for invalid uses of bound
2937 non-static member functions.
2938 * init.c (build_offset_ref): Return error_mark_node for errors.
2941 * decl.c (reshape_init): Robustify.
2942 (reshape_init_array_1): Likewise.
2944 2006-05-30 Mark Mitchell <mark@codesourcery.com>
2947 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
2948 "friend" specifiers that do not appear in class scopes.
2951 * class.c (check_bitfield_decl): Ensure that all bitfields have
2954 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
2956 * pt.c (convert_nontype_argument): Fix a typo in an error
2959 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2961 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
2962 spelling conventions.
2964 2006-05-24 Mark Mitchell <mark@codesourcery.com>
2967 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
2968 error_mark_node to indicate an initialization is OK.
2969 (start_decl): Likewise. Adjust call to start_decl_1.
2970 (start_decl_1): Add initialized parameter. Simplify.
2971 * except.c (initialize_handler_parm): Adjust call to
2973 (expand_start_catch_block): Let cp_finish_decl initialize catch
2975 * cp-tree.h (start_decl_1): Adjust prototype.
2976 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
2977 (instantiate_decl): Let cp_finish_decl handle initialization.
2978 * semantics.c (finish_compound_literal): Create a temporary
2979 variable for the literal.
2980 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
2982 * decl2.c (finish_static_data_member_decl): Don't set
2984 (grokfield): Do not try to initialize functions.
2986 2006-05-23 Mark Mitchell <mark@codesourcery.com>
2989 * pt.c (determine_specialization): Disallow partial
2990 specializations of templates.
2992 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2995 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
2997 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
2999 2006-05-21 Mark Mitchell <mark@codesourcery.com>
3002 * cp-tree.h (cp_save_expr): New function.
3003 * init.c (build_new): Correct logic for zero-element array
3004 warning. Use cp_save_expr.
3005 * tree.c (cp_save_expr): New function.
3007 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3010 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
3013 2006-05-19 Mike Stump <mrs@apple.com>
3015 * typeck.c (default_conversion): Remove static.
3017 2006-05-19 Mark Mitchell <mark@codesourcery.com>
3020 * cp-tree.h (begin_function_try_block): Change prototype.
3021 (finish_function_handler_sequence): Likewise.
3022 * parser.c (cp_parser_function_try_block): Adjust calls.
3023 * pt.c (tsubst_expr): Adjust calls.
3024 * semantics.c (begin_function_try_block): Create an artificial
3026 (finish_function_handler_sequence): Close it.
3028 2006-05-18 Mark Mitchell <mark@codesourcery.com>
3032 * typeck.c (decay_conversion): Convert bitfields to their declared
3033 types here. Improve documentation. Avoid use of cp_convert.
3034 (default_conversion): Make it static. Perform integral promotions
3035 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
3037 * init.c (build_init): Remove.
3038 (expand_default_init): Do not call rvalue.
3039 * call.c (null_ptr_cst_p): Robustify.
3040 (build_conditional_expr): Tidy.
3041 * except.c (build_throw): Do not perform lvalue-to-rvalue
3042 conversion on operand before initializing temporary.
3043 * tree.c (convert.h): Include it.
3044 (convert_bitfield_to_declared_type): Use convert_to_integer, not
3046 (rvalue): Don't convert bitfields to their declared type here.
3047 * cp-tree.h (build_init): Remove.
3048 (default_conversion): Likewise.
3049 * typeck2.c (build_m_component_ref): Do not perform
3050 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
3051 conversions here. Correct error message.
3053 2006-05-17 Mark Mitchell <mark@codesourcery.com>
3056 * decl2.c (check_member_template): Remove checks for virtual
3058 * parser.c (cp_parser_function_specifier_opt): Complain about
3060 (cp_parser_pure_specifier): Likewise.
3063 * parser.c (cp_parser_set_storage_class): Check for
3064 invalid uses of storage classes on unbraced linkage
3066 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
3067 to cp_parser_set_storage_class.
3069 2006-05-17 Jakub Jelinek <jakub@redhat.com>
3072 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
3076 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3077 on combined parallel workshare constructs.
3078 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
3080 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3083 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
3085 2006-05-15 Mark Mitchell <mark@codesourcery.com>
3088 * cp-tree.h (perform_access_checks): New function.
3089 * semantics.c (perform_access_checks): New function.
3090 (perform_deferred_access_checks): Use it.
3091 * parser.c (cp_parser_simple_declaration): Adjust call to
3092 cp_parser_init_declarator.
3093 (cp_parser_type_parameter): Do not defer checks in default
3095 (cp_parser_explicit_specialization): Adjust call to
3096 cp_parser_single_declaration.
3097 (cp_parser_init_declarator): Perform template-parameter access
3099 (cp_parser_parameter_declaration): Do not defer checks for
3100 template parameter default arguments.
3101 (cp_parser_template_declaration_after_export): Gather access
3102 checks for template parameters, and pass them to
3103 cp_parser_single_declaration.
3104 (cp_parser_template_parameter_access_checks): New function.
3105 (cp_parser_single_declaration): Add checks parameter.
3108 * call.c (convert_like_real): Convert bitfields to their declared
3109 types when forming an rvalue.
3110 * tree.c (convert_bitfield_to_declared_type): New function.
3112 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
3114 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3117 * pt.c (any_dependent_template_arguments_p): Return early on invalid
3121 * search.c (adjust_result_of_qualified_name_lookup): Skip on
3122 invalid context_class.
3125 * pt.c (do_decl_instantiation): Return early on invalid decl.
3128 * pt.c (push_template_decl_real): Return error_mark_node instead
3132 * pt.c (tsubst_friend_class): Return early on invalid friend
3135 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3137 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
3138 (cp/decl2.o): Likewise.
3139 (cp/typeck.o): Likewise.
3140 (cp/cvt.o): Likewise.
3141 (cp/parser.o): Likewise.
3142 (cp/call.o): Replace target.h with $(TARGET_H).
3144 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
3146 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
3147 COMPONENT_REF alone.
3149 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3152 * decl.c (copy_fn_p): Return early on non-member functions.
3154 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3157 * decl2.c (build_memfn_type): Skip invalid functions and class types.
3159 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3162 * pt.c (convert_nontype_argument): Return early on invalid arguments.
3164 * pt.c (process_template_parm): Remove superfluous temporary.
3167 * pt.c (process_template_parm): Handle erroneous non-type parameters.
3170 * typeck.c (convert_for_initialization): Skip erroneous types.
3173 * typeck.c (convert_arguments): Return early on args with
3176 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
3179 * typeck.c (build_static_cast_1): Save casted types in used types
3181 (build_reinterpret_cast_1): Same.
3182 * rtti.c (build_dynamic_cast_1): Same.
3184 2006-05-04 Jakub Jelinek <jakub@redhat.com>
3187 * parser.c (cp_parser_omp_for_loop): Only call
3188 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
3191 2006-05-02 Mark Mitchell <mark@codesourcery.com>
3194 * decl.c (grokdeclarator): Robustify checks for defining members
3195 of incomplete types.
3198 * class.c (add_method): Call grok_special_member_properties.
3199 * decl.c (grokdeclarator): Don't call it here.
3200 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
3201 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
3203 (start_method): Don't call grok_special_member_properties.
3204 * method.c (implicitly_declare_fn): Likewise.
3205 * pt.c (instantiate_class_template): Likewise.
3206 * decl2.c (grokfield): Likewise.
3208 2006-05-02 Jakub Jelinek <jakub@redhat.com>
3211 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
3212 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
3213 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
3215 2006-04-30 Mark Mitchell <mark@codesourcery.com>
3218 * pt.c (tsubst_default_argument): Increment function_depth around
3219 call to tsubst_expr.
3220 * parser.c (cp_parser_parameter_declaration): Likewise.
3221 * decl2.c (mark_used): Tidy.
3223 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3226 * decl.c (grok_op_properties): Skip operators with invalid args
3227 when checking for class-type or enum-type args.
3229 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3232 * decl.c (copy_fn_p): Skip functions with invalid first arg.
3234 2006-04-27 Mark Mitchell <mark@codesourcery.com>
3237 * tree.c (rvalue): Convert bitfields to their declared types.
3240 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
3243 2006-04-24 Mark Mitchell <mark@codesourcery.com>
3246 * typeck.c (decay_conversion): Don't adjust bitfield types.
3247 (perform_integral_promotions): Treat bitfield enums as enums, not
3248 as short integer types.
3249 * tree.c (rvalue): Convert bitfields to their correct types.
3251 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3254 * class.c (layout_class_type): Skip fields with invalid types.
3256 2006-04-23 Mark Mitchell <mark@codesourcery.com>
3259 * cp-tree.h (build_this_parm): Declare.
3260 (grok_method_quals): Remove.
3261 (build_memfn_type): Declare.
3262 (build_artificial_parm): Declare.
3263 (do_friend): Remove quals parameter.
3264 * decl.c (build_this_parm): New function.
3265 (grokfndecl): Use it. Do not pass quals to grokclassfn.
3266 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
3267 unnecessary TYPE_DECLs. Correct qualification of member function
3269 * method.c (implicitly_declare_fn): Use build_this_parm.
3270 * friend.c (do_friend): Remove quals parameter.
3271 * decl2.c (grok_method_quals): Remove.
3272 (build_memfn_type): New function.
3273 (build_artificial_parm): Give it external linkage.
3274 (grokclassfn): Remove quals parameter. Do not build "this"
3278 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
3279 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
3280 (decay_conversion): Convert bitfield expressions to the correct
3282 (build_modify_expr): Remove spurious conversions.
3283 * class.c (layout_class_type): Modify the type of bitfields to
3284 indicate a limited range.
3285 * call.c (standard_conversion): Adjust the type of bitfield
3286 expressions used in an rvalue context.
3287 (build_conditional_expr): Likewise.
3289 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
3291 * decl.c: Fix comment typos.
3293 2006-04-21 Eric Christopher <echristo@apple.com>
3295 * decl.c: Fix typo in function name.
3297 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3300 * parser.c (cp_parser_class_name): Check for invalid typenames.
3304 * pt.c (tsubst_friend_function): Return early if
3305 pushdecl_namespace_level fails.
3308 * typeck.c (convert_arguments): Return error_mark_node instead of
3310 * cp-tree.h (error_mark_list): Remove declaration.
3311 * decl.c (error_mark_list): Remove definition.
3312 (cxx_init_decl_processing): Do not initialize error_mark_list.
3315 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
3316 before calling convert_to_reference.
3317 * cvt.c (convert_to_reference): Assert that reftype is a
3320 2006-04-19 Mark Mitchell <mark@codesourcery.com>
3323 * class.c (currently_open_class): Tidy.
3324 * decl.c (grokdeclarator): If we encounter an erroneous
3325 declarator, assume that we have already issued an error message
3326 and return. Return error_mark_node instead of NULL_TREE in more
3327 places. Issue errors about function definitions that do not have
3328 a function declarator. Check for complete types for all function
3330 * cp-tree.h (cp_error_declarator): Remove.
3331 (currently_open_class): Change return type.
3332 * parser.c (cp_parser_id_expression): Add optional_p parameter.
3333 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
3334 (cp_parser_id_expression): Likewise.
3335 (cp_parser_unqualified_id): If the name is optional, return
3337 (cp_parser_postfix_dot_deref_expression): Adjust calls.
3338 (cp_parser_type_parameter): Likewise.
3339 (cp_parser_unqualified_id): Likewise.
3340 (cp_parser_direct_declarator): Likewise.
3341 (cp_parser_declarator_id): Add optional_p parameter.
3342 (cp_parser_function_definition_from_specifiers_and_declarator):
3343 Assume that start_function indicates failure only if it has issued
3345 (cp_parser_omp_var_list_no_open): Adjust calls.
3347 2006-04-17 Janis Johnson <janis187@us.ibm.com>
3349 PR c++/26114, c++/26115
3350 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
3351 * class.c (check_field_decls): Ditto.
3353 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3355 * init.c (build_offset_ref): Remove superfluous temporary.
3357 2006-04-16 Mark Mitchell <mark@codesourcery.com>
3360 * typeck.c (finish_class_member_access_expr): Robustify
3362 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
3364 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
3365 * pt.c: Include vecprim.h.
3366 (inline_parm_levels): Change the type to VEC(int,heap) *.
3367 (inline_parm_levels_used): Remove.
3368 (maybe_begin_member_template_processing,
3369 maybe_end_member_template_processing): Use VEC instead of
3372 * cp/call.c: Fix comment typos.
3374 2006-04-12 Mark Mitchell <mark@codesourcery.com>
3376 * parser.c (cp_parser_init_declarator): Initialize local variables
3379 2006-04-12 Roger Sayle <roger@eyesopen.com>
3381 * parser.c (cp_parser_init_declarator): Initialise
3382 is_parenthesized_init to false to avoid compiler warning.
3384 2006-04-11 Mark Mitchell <mark@codesourcery.com>
3386 * cp-tree.h (build_operator_new_call): Adjust prototype.
3387 (build_new_method_call): Likewise.
3388 (build_op_delete_call): Likewise.
3389 * init.c (build_raw_new_expr): New function.
3390 (build_new_1): Pass information as parameters, rather than
3391 bundling it into a NEW_EXPR.
3392 (build_new): Adjust accordingly.
3393 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
3394 (build_delete): Likewise.
3395 * decl.c (finish_destructor_body): Likewise.
3396 * call.c (build_operator_new_call): Return the allocation function
3398 (build_op_delete_call): Take allocation function as parameter.
3399 (build_special_member_call): Adjust call to build_new_method_call.
3400 (build_new_method_call): Return function called.
3401 * pt.c (tsubst_copy_and_build): Adjust call to
3402 build_new_method_call.
3403 * semantics.c (finish_call_expr): Likewise.
3404 * parser.c (cp_parser_postfix_expression): Likewise.
3405 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
3406 "incomplete", not "undefined", types.
3409 * decl.c (grokdeclarator): Remove namespace-handling code for
3410 pointers-to-members.
3411 * parser.c (cp_parser_ptr_operator): Check for qualified names
3415 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
3416 whether or not to look for a pure-specifier.
3417 (cp_parser_member_declaration): Likewise.
3419 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3421 * decl2.c, pt.c, semantics.c: Fix comment typos.
3423 2006-04-06 Roger Sayle <roger@eyesopen.com>
3425 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
3427 2006-04-05 Jason Merrill <jason@redhat.com>
3429 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
3430 default hidden visibility for anonymous namespace.
3432 2006-03-29 Roger Sayle <roger@eyesopen.com>
3435 * init.c (build_vec_delete_1): Convert BASE pointer's type to
3436 the base pointer type to avoid a type mismatch in the EQ_EXPR.
3438 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
3440 * search.c (maybe_suppress_debug_info): If
3441 flag_emit_class_debug_always then don't suppress.
3443 2006-03-22 Jason Merrill <jason@redhat.com>
3445 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
3446 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
3448 2006-03-21 Jakub Jelinek <jakub@redhat.com>
3451 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
3453 2006-03-21 Jason Merrill <jason@redhat.com>
3456 * parser.c (cp_parser_declaration): Support attributes on
3457 anonymous namespaces.
3458 * name-lookup.c (push_namespace_with_attribs): Anonymous
3459 namespaces default to hidden visibility.
3461 2006-03-20 Jason Merrill <jason@redhat.com>
3463 PR c++/21764, c++/19238
3464 * decl.c (cp_finish_decl): Call determine_visibility later.
3465 (start_preparsed_function): Likewise.
3466 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
3467 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
3468 * name-lookup.h (struct cp_binding_level): Add has_visibility
3470 * name-lookup.c: Include c-pragma.h.
3471 (push_namespace_with_attribs): Split out from push_namespace.
3472 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
3473 (leave_scope): Pop visibility if appropriate.
3474 * decl2.c (determine_visibility_from_class): Split out from...
3475 (determine_visibility): ...here. Handle function scope and
3477 (import_export_decl): Move visibility handling to
3478 determine_visibility_from_class.
3479 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
3480 attributes on namespace declarations.
3482 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3485 * decl.c (grokdeclarator): Do not accept long long double.
3486 Reorganize checks for invalid (combinations of) type modifiers.
3487 Quote modifiers in messages.
3489 2006-03-09 Jason Merrill <jason@redhat.com>
3491 PR c++/16387, c++/16389
3492 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
3493 (cxx_sizeof_or_alignof_expr): Split out from here.
3495 2006-03-09 Diego Novillo <dnovillo@redhat.com>
3497 Merge from gomp-20050608-branch
3499 2006-02-02 Diego Novillo <dnovillo@redhat.com>
3501 * decl.c (pop_labels_1): Use appropriate pointer casting.
3502 (poplevel_named_label_1): Likewise.
3503 (named_label_entry_hash): Likewise.
3504 (named_label_entry_eq): Likewise.
3505 (check_goto): Likewise.
3506 (define_label): Likewise.
3508 2006-01-26 Diego Novillo <dnovillo@redhat.com>
3510 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
3512 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
3513 instead of TREE_CODE/TREE_OPERAND.
3514 * semantics.c: Likewise.
3515 * parser.c: Likewise.
3517 2005-11-10 Diego Novillo <dnovillo@redhat.com>
3519 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
3520 target does not support TLS.
3522 2005-11-09 Jakub Jelinek <jakub@redhat.com>
3524 * decl.c (redeclaration_error_message): Don't error about
3525 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
3528 2005-11-08 Jakub Jelinek <jakub@redhat.com>
3531 * semantics.c (finish_omp_barrier, finish_omp_flush): New
3533 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
3534 (cp_parser_omp_flush): Call finish_omp_flush.
3535 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
3539 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
3541 2005-11-03 Jakub Jelinek <jakub@redhat.com>
3543 * semantics.c (finish_omp_threadprivate): Error on class-scope
3546 2005-11-02 Jakub Jelinek <jakub@redhat.com>
3548 * parser.c (cp_parser_omp_all_clauses): If some clause
3549 type is not allowed, don't remove just one of the
3550 clauses, but all clauses added in that loop round.
3552 * semantics.c (finish_omp_clauses): Fix function
3553 comment. Don't handle non-const or mutable specially,
3554 as const and not mutable is predetermined shared and
3555 that leads to double error. Don't ICE if copyin var is
3559 * parser.c (cp_parser_pragma): Diagnose
3560 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
3563 * semantics.c (finish_omp_threadprivate): Error if V
3564 is automatic variable or has incomplete type.
3566 2005-11-01 Diego Novillo <dnovillo@redhat.com>
3568 * parser.c (cp_parser_omp_all_clauses): Use
3569 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
3571 2005-11-01 Diego Novillo <dnovillo@redhat.com>
3573 * parser.c (cp_parser_omp_all_clauses): When emitting an
3574 error message, remove the invalid clause from the list.
3576 2005-10-31 Diego Novillo <dnovillo@redhat.com>
3578 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
3579 combined parallel+workshare directives.
3581 2005-10-31 Richard Henderson <rth@redhat.com>
3583 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
3584 Use cxx_omp_clause_dtor.
3585 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
3586 (cxx_omp_clause_dtor): New.
3587 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
3588 (cxx_omp_clause_default_ctor): Use it.
3589 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
3591 (cxx_omp_clause_dtor): New.
3592 * semantics.c (finish_omp_clauses): Rewrite cdtor
3593 checking to fill in CP_OMP_CLAUSE_INFO. Don't
3594 specialcase LASTPRIVATE for removal.
3595 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
3596 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
3598 2005-10-28 Jakub Jelinek <jakub@redhat.com>
3600 * semantics.c (finish_omp_threadprivate): If
3601 DECL_RTL_SET_P, call make_decl_rtl again so that
3602 encode_section_info can update SYMBOL_REF's flags.
3604 2005-10-26 Jakub Jelinek <jakub@redhat.com>
3606 * semantics.c (finish_omp_for): Don't segfault if COND
3607 or INCR is NULL. If not calling c_finish_omp_for
3608 right away and one of COND and INCR is NULL, issue
3609 error and don't expand anything.
3612 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
3613 * semantics.c (finish_omp_for): Likewise. Set
3614 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
3615 into the current statement list if not processing
3616 template decl or pass it to c_finish_omp_for.
3618 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
3619 into PRE_BODY statement list. Pass it to finish_omp_for.
3620 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
3621 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
3622 finish_omp_for. Put all the statements into sk_omp
3625 2005-10-25 Jakub Jelinek <jakub@redhat.com>
3628 * parser.c (struct cp_parser): Rename in_iteration_statement
3629 field to in_statement.
3630 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
3631 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
3632 (cp_parser_new, cp_parser_begin_omp_structured_block,
3633 cp_parser_end_omp_structured_block,
3634 cp_parser_omp_for_loop): Adjust for
3635 in_iteration_statement renaming.
3636 (cp_parser_selection_statement): Save
3637 parser->in_iteration, or it temporarily with
3638 IN_SWITCH_STMT for the
3639 cp_parser_implicitly_scoped_statement call.
3640 (cp_parser_iteration_statement): Adjust for
3641 in_iteration_statement renaming. Use
3642 IN_ITERATION_STMT rather than true.
3643 (cp_parser_jump_statement): Adjust for
3644 in_iteration_statement renaming and new values. Don't
3645 error on break in a switch statement within OMP_FOR or
3646 OpenMP structured block.
3649 * parser.c (cp_parser_cache_group): Don't stop if next
3650 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
3651 well. If current token is CPP_PRAGMA, consume
3652 everything until CPP_PRAGMA_EOL inclusive.
3654 2005-10-24 Jakub Jelinek <jakub@redhat.com>
3657 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
3658 addition to MODIFY_EXPR.
3660 2005-10-23 Richard Henderson <rth@redhat.com>
3662 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
3664 (begin_bc_block, finish_bc_block): Use it.
3665 (push_context, pop_context): Remove.
3666 (cp_genericize): Don't use them. Assert bc_label is null.
3667 * semantics.c (finish_omp_clauses): Create a fake data
3668 element of TYPE for probing ctors.
3670 2005-10-23 Richard Henderson <rth@redhat.com>
3672 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
3673 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
3674 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
3675 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
3676 * semantics.c (finish_omp_clauses): Look through
3677 arrays when looking up special member calls. Also
3678 remove FIRSTPRIVATE when LASTPRIVATE fails.
3679 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
3680 (cxx_omp_clause_assign_op): New.
3681 * cp-tree.h: Declare them.
3683 2005-10-21 Richard Henderson <rth@redhat.com>
3685 * decl.c (check_previous_goto_1): Return false if error.
3686 (check_switch_goto): Likewise.
3687 (finish_case_label): Don't emit the case label on error.
3688 * parser.c (struct cp_parser): Revert
3689 in_switch_statement_p changes.
3690 (cp_parser_labeled_statement,
3691 cp_parser_selection_statement): Likewise.
3692 (cp_parser_begin_omp_structured_block): Don't save...
3693 (cp_parser_end_omp_structured_block): or restore
3694 in_switch_statement_p.
3696 2005-10-21 Richard Henderson <rth@redhat.com>
3698 * semantics.c (finish_omp_threadprivate): Set
3699 decl_flags.u2sel when necessary.
3701 2005-10-21 Richard Henderson <rth@redhat.com>
3703 * decl.c (poplevel_named_label_1): Restore creation of the
3705 (decl_jump_unsafe): Check for error_mark_node types.
3706 (check_goto): Don't check cdtor_label. Don't use identify_goto.
3707 * semantics.c (finish_return_stmt): Do check_omp_return before
3708 converting to cdtor_label goto.
3710 2005-10-21 Richard Henderson <rth@redhat.com>
3713 * decl.c (check_omp_return): Return false on error.
3714 * cp-tree.h (check_omp_return): Update decl.
3715 * semantics.c (finish_return_stmt): Avoid adding
3718 2005-10-21 Richard Henderson <rth@redhat.com>
3720 * cp-tree.h (struct language_function): Remove
3722 Change x_named_labels to a hashtable.
3723 (check_omp_return): Declare.
3724 * decl.c (struct named_label_use_entry): Rename from
3725 named_label_use_list. Remove label_decl.
3726 (struct named_label_entry): Rename from
3727 named_label_list. Remove old_value and next. Change
3728 in_try_scope and in_catch_scope to bool. Add
3730 (pop_labels_1): New.
3731 (pop_labels): Use it.
3732 (pop_local_label, poplevel_named_label_1): New.
3733 (poplevel): Use them.
3734 (named_label_entry_hash, named_label_entry_eq): New.
3735 (make_label_decl): Create named_labels. Move label
3736 creation bits from lookup_label.
3737 (declare_local_label): Tidy.
3738 (identify_goto): Split out from ...
3739 (check_previous_goto_1): Add exited_omp argument.
3742 (use_label): Merge into...
3743 (check_goto): ... here. Handle omp scopes.
3744 (check_omp_return): New.
3745 (check_previous_gotos): Merge into...
3746 (define_label): ... here.
3747 (save_function_data): Remove x_named_label_uses reference.
3748 (finish_function): Likewise.
3749 * name-lookup.h (sk_omp): New.
3750 * name-lookup.c (begin_scope): Handle it.
3751 * parser.c (cp_parser_omp_for): Don't create extra
3754 (cp_parser_omp_sections): Likewise.
3755 * semantics.c (finish_return_stmt): Call check_omp_return.
3756 (begin_omp_structured_block): Use sk_omp.
3757 (finish_omp_structured_block): Use do_poplevel. Don't build a
3758 MUST_NOT_THROW expression here.
3759 (begin_omp_parallel, finish_omp_parallel): Don't create extra
3760 compound statements.
3762 2005-10-21 Diego Novillo <dnovillo@redhat.com>
3765 * cp/cp-tree.h (struct lang_decl_flags): Add field
3767 (CP_DECL_IS_THREADPRIVATE): Define.
3768 * cp/semantics.c (finish_omp_threadprivate): Set. Do
3769 not error out if CP_DECL_IS_THREADPRIVATE is set
3771 * cp/decl.c (duplicate_decls): Merge
3772 CP_DECL_THREADPRIVATE_P.
3774 2005-10-20 Richard Henderson <rth@redhat.com>
3776 * cp-gimplify.c (cp_gimplify_omp_for): New.
3777 (cp_gimplify_expr): Call it.
3778 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
3779 * parser.c (struct cp_parser): Rename
3780 in_iteration_statement_p to in_iteration_statement and
3781 change to unsigned char. Similarly with
3782 in_switch_statement. Update all users.
3783 (IN_OMP_BLOCK, IN_OMP_FOR): New.
3784 (cp_parser_labeled_statement): Diagnose case labels
3785 binding closer to an openmp block nested than the
3787 (cp_parser_jump_statement): Diagnose break and
3788 continue labels binding closer to an openmp block than
3789 an iteration or switch.
3790 (cp_parser_omp_for_loop): Mark in_iteration_statement
3792 (cp_parser_begin_omp_structured_block): New.
3793 (cp_parser_end_omp_structured_block): New.
3794 (cp_parser_omp_structured_block): Use them.
3795 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
3796 (cp_parser_omp_parallel): Likewise.
3798 2005-10-20 Richard Henderson <rth@redhat.com>
3800 * semantics.c (begin_omp_structured_block): New.
3801 (finish_omp_structured_block): New.
3802 (begin_omp_parallel, finish_omp_parallel): Use them.
3803 * parser.c (cp_parser_omp_structured_block): Likewise.
3804 (cp_parser_omp_for): Likewise.
3805 (cp_parser_omp_sections_scope): Likewise.
3806 * cp-tree.h: Declare them.
3808 2005-10-20 Richard Henderson <rth@redhat.com>
3810 * parser.c (cp_parser_omp_master): Return the statement.
3811 (cp_parser_omp_ordered): Likewise.
3812 (cp_parser_omp_construct): Set the locus for them.
3814 2005-10-19 Richard Henderson <rth@redhat.com>
3816 * semantics.c (finish_omp_atomic): Revert to
3817 uses_template_parms.
3819 2005-10-19 Richard Henderson <rth@redhat.com>
3821 * semantics.c (finish_omp_clauses): Avoid
3822 DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some
3823 stub asserts guaranteed to fail.
3825 2005-10-19 Richard Henderson <rth@redhat.com>
3827 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
3828 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
3829 * parser.c (cp_parser_omp_clause_copyin): Remove.
3830 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
3831 Call finish_omp_clauses.
3832 (cp_parser_omp_clause_if): Don't do error checking here.
3833 (cp_parser_omp_clause_num_threads): Likewise.
3834 (cp_parser_omp_clause_schedule): Likewise.
3835 (cp_parser_omp_atomic): Use finish_omp_atomic.
3836 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
3837 Don't decompose assignment statment here. Use
3840 * pt.c (tsubst_omp_clauses): New.
3841 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
3842 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
3843 * semantics.c (finish_omp_clauses): New.
3844 (begin_omp_parallel, finish_omp_parallel): Know Less about the
3845 internals of the stmt_list stack.
3846 (finish_omp_for, finish_omp_atomic): New.
3848 2005-10-18 Jakub Jelinek <jakub@redhat.com>
3850 * semantics.c (cxx_omp_predetermined_sharing): New function.
3851 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
3853 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
3855 2005-10-18 Richard Henderson <rth@redhat.com>
3857 * parser.c (cp_parser_omp_single): Use make_node and accessors
3860 2005-10-17 Richard Henderson <rth@redhat.com>
3862 * parser.c (cp_parser_omp_for_loop): Handle declarations.
3864 2005-10-12 Richard Henderson <rth@redhat.com>
3866 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
3867 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
3868 (finish_omp_threadprivate): Declare.
3869 * parser.c (struct cp_lexer): Add in_pragma.
3870 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
3872 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
3873 (cp_parser_skip_to_end_of_statement): Likewise.
3874 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
3875 (cp_parser_skip_to_closing_brace): Likewise.
3876 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
3877 (cp_parser_require_pragma_eol): New.
3878 (cp_parser_statement): Add in_compound argument;
3880 Restart if a non-statement pragma seen outside a
3882 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
3883 (cp_parser_declaration_seq_opt): Likewise.
3884 (cp_parser_member_specification_opt): Likewise.
3885 (cp_parser_function_definition_after_decl): Likewise.
3886 (cp_parser_skip_until_found): Likewise.
3887 (cp_parser_cache_group): Likewise.
3888 (enum pragma_omp_clause, cp_parser_omp_clause_name,
3889 check_no_duplicate_clause,
3890 cp_parser_omp_var_list_no_open,
3891 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
3892 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
3893 cp_parser_omp_clause_nowait,
3894 cp_parser_omp_clause_num_threads,
3895 cp_parser_omp_clause_ordered,
3896 cp_parser_omp_clause_reduction,
3897 cp_parser_omp_clause_schedule,
3898 cp_parser_omp_all_clauses,
3899 cp_parser_omp_structured_block, cp_parser_omp_atomic,
3900 cp_parser_omp_barrier, cp_parser_omp_critical,
3901 cp_parser_omp_flush, cp_parser_omp_for_loop,
3902 cp_parser_omp_for, cp_parser_omp_master,
3903 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
3904 cp_parser_omp_sections, cp_parser_omp_parallel,
3905 cp_parser_omp_single, cp_parser_omp_threadprivate,
3906 cp_parser_omp_construct): New.
3907 (cp_parser_pragma): Handle OpenMP pragmas.
3908 * semantics.c (finish_omp_threadprivate): New.
3909 (begin_omp_parallel, finish_omp_parallel): New.
3911 2005-10-11 Richard Henderson <rth@redhat.com>
3913 * parser.c (struct cp_token): Add pragma_kind.
3914 (eof_token): Initialize it.
3915 (cp_lexer_handle_pragma): Remove.
3916 (cp_parser_initial_pragma): New.
3917 (cp_lexer_new_main): Use it.
3918 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
3919 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
3920 (cp_parser_skip_to_pragma_eol): New.
3921 (cp_parser_error): Use it.
3924 2005-10-09 Richard Henderson <rth@redhat.com>
3926 * lex.c (parse_strconst_pragma): Update for c_lex name change.
3927 (handle_pragma_java_exceptions): Likewise.
3928 * parser.c (cp_lexer_new_main): Likewise.
3930 2005-10-06 Richard Henderson <rth@redhat.com>
3932 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
3933 (cp_lexer_handle_pragma): Comment out
3934 cpp_handle_deferred_pragma.
3936 2005-10-01 Richard Henderson <rth@redhat.com>
3938 * name-lookup.c (lookup_name): Remove prefer_type argument.
3939 (lookup_name_prefer_type): New function.
3940 * name-lookup.h (lookup_name_prefer_type): Declare it.
3941 * decl.c (lookup_and_check_tag): Use it.
3942 * pt.c (tsubst_friend_class): Likewise. Update for
3944 (lookup_template_class, tsubst_copy_and_build): Likewise.
3946 2006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3949 * tree.c (bot_manip): Don't call mark_used.
3951 2006-03-02 Mike Stump <mrs@apple.com>
3953 * decl2.c (import_export_decl): Remove redundant call to
3954 targetm.cxx.key_method_may_be_inline ().
3956 2006-03-02 Richard Sandiford <richard@codesourcery.com>
3958 * decl.c (start_decl): Use have_global_bss_p when deciding
3959 whether to make the decl common.
3961 2006-03-01 Mike Stump <mrs@apple.com>
3964 * decl2.c (import_export_decl): Fix ABI breakage on darwin.
3966 2006-02-24 Geoffrey Keating <geoffk@apple.com>
3968 * except.c (expand_start_catch_block): Handle
3969 flag_use_cxa_get_exception_ptr.
3971 2006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3974 * decl.c (grok_op_properties): Check for ellipsis in arguments of
3977 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3979 * Make-lang.in (C++): Remove.
3980 (.PHONY): Remove C++.
3982 2006-02-18 Mark Mitchell <mark@codesourcery.com>
3985 * cp-tree.h (cp_finish_decl): Adjust declaration.
3986 (grokbitfield): Likewise.
3987 (finish_static_data_member_decl): Likewise.
3988 * init.c (constant_value_1): Ensure processing_template_decl when
3989 folding non-dependent initializers for static data members of
3990 dependent types. Return error_mark_node for erroneous
3992 * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
3993 * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
3994 (cp_finish_decl): Add init_const_expr_p parameter. Set
3995 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
3996 (finish_decl): Adjust call to cp_finish_decl.
3997 (compute_array_index_type): Robustify.
3998 (start_method): Use finish_decl, not cp_finish_decl.
3999 * rtti.c (emit_tinfo_decl): Likewise.
4000 * except.c (initialize_handler_parm): Adjust call to
4002 (expand_start_catch_block): Likewise.
4003 * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
4004 * pt.c (instantiate_class_template): Adjust call to
4005 finish_static_data_member_decl.
4006 (tsubst_expr): Use finish_decl, not cp_finish_decl.
4007 (instantiate_decl): Adjust call to cp_finish_decl.
4008 * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
4010 * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
4012 (grokfield): Likewise.
4013 * parser.c (cp_parser_condition): Check for constant initializers.
4014 (cp_parser_init_declarator): Adjust calls to grokfield and
4015 cp_finish_decl. Don't set
4016 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
4017 (cp_parser_member_declaration): Likewise.
4018 (cp_parser_objc_class_ivars): Likewise.
4020 2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4022 * call.c (standard_conversion): Return NULL instead of 0.
4023 (build_user_type_conversion_1): Likewise.
4024 (tourney): Likewise.
4025 * decl.c (redeclaration_error_message): Likewise.
4026 * error.c (language_to_string): Likewise.
4028 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4030 * cp-tree.h (warn_hidden): Remove prototype.
4031 * class.c (warn_hidden): Make static.
4033 * cp-tree.h (build_type_conversion): Remove prototype.
4034 * cvt.c (build_type_conversion): Add prototype, make static.
4036 * cp-tree.h (push_tinst_level): Remove prototype.
4037 (pop_tinst_level): Likewise.
4038 * pt.c (push_tinst_level): Add prototype, make static.
4039 (pop_tinst_level): Likewise.
4041 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4043 * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
4044 * typeck.c (unary_complex_lvalue): Likewise.
4046 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4048 * lex.c (parse_strconst_pragma): Return error_mark_node instead of
4049 "(tree)-1" to indicate failure. Simplify.
4050 (handle_pragma_interface): Test for error_mark_node instead of
4052 (handle_pragma_implementation): Likewise.
4054 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4057 * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
4058 decl-specifiers. Remove extra check for duplicate 'friend'.
4059 * decl.c (grokdeclarator): Remove check for duplicate
4060 decl-specifiers. Set longlong together with long_p.
4062 2006-02-12 Jason Merrill <jason@redhat.com>
4065 * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
4066 TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
4068 2006-02-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4070 * class.c (debug_class): Remove extern.
4071 (debug_thunks): Likewise.
4073 2006-02-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
4075 * typeck.c (string_conv_p): Don't test for flag_const_strings.
4077 2006-02-08 Jason Merrill <jason@redhat.com>
4080 * cp-gimplify.c (cp_gimplify_expr): Don't call
4081 cp_gimplify_init_expr for MODIFY_EXPRs.
4082 * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
4084 2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4087 * decl.c (grokdeclarator): Set dname also for destructor.
4090 * decl.c (grokdeclarator): Clear storage_class together with staticp.
4092 2006-02-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4094 * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
4095 (cp_build_qualified_type): Propogate renaming.
4096 * call.c (convert_like_real): Likewise.
4097 * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
4098 * decl.c (make_typename_type, grokdeclarator): Likewise.
4099 * pt.c (tsubst_friend_function, instantiate_class_template,
4100 tsubst_default_argument, instantiate_decl,
4101 tsubst_initializer_list, tsubst_enum): Likewise.
4102 * semantics.c (finish_template_type): Likewise.
4103 * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
4105 2006-02-07 Dirk Mueller <dmueller@suse.com>
4107 * typeck.c (build_binary_op): Annotate div-by-zero
4108 warnings to make -Wno-div-by-zero have an effect.
4110 2006-02-07 Mark Mitchell <mark@codesourcery.com>
4113 * pt.c (coerce_template_template_parms): Do not templates with
4114 excess default arguments to match template template parameters
4115 with fewer parameters.
4116 (coerce_template_parms): Add use_default_args parameter; use
4117 default arguments only when true.
4118 (lookup_template_class): Adjust call to coerce_template_parms.
4119 (fn_type_unification): Likewise.
4121 (get_bindings): Likewise.
4122 (dependent_type_p): Add assertions.
4124 2006-02-06 Roger Sayle <roger@eyesopen.com>
4126 * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
4127 * rtti.c (typeinfo_in_lib_p): Likewise.
4128 * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
4129 * name-lookup.c (arg_assoc_type): Likewise.
4131 2006-02-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4133 * cp-tree.h (tf_warn_or_error): New substituion flag.
4134 (cp_build_qualified_type): Use it.
4135 * call.c (convert_like_real): Likewise.
4136 * cvt.c (cp_convert_to_pointer): Likewise.
4137 (convert_to_reference): Likewise.
4138 * decl.c (make_typename_type): Likewise.
4139 (grokdeclarator): Likewise.
4140 * pt.c (tsubst_friend_function): Likewise.
4141 (tsubst_friend_class): Likewise.
4142 (instantiate_class_template): Likewise.
4143 (tsubst_default_argument): Likewise.
4144 (instantiate_decl): Likewise.
4145 (tsubst_initializer_list): Likewise.
4146 (tsubst_enum): Likewise.
4147 * semantics.c (finish_template_type): Likewise.
4148 * typeck.c (build_ptrmemfunc): Likewise.
4149 (convert_for_assignment): Likewise.
4151 2006-02-03 Lee Millward <lee.millward@gmail.com>
4153 * typeck.c (string_conv_p): Pass appropiate
4154 OPT_Wxxxx values when calling warning().
4155 (build_array_ref, cxx_mark_addressable): Likewise.
4156 (check_return_expr): Likewise.
4158 * init.c (perform_member_init): Likewise.
4159 (sort_mem_initializers, emit_mem_initializers): Likewise.
4161 * class.c (check_field_decls): Likewise.
4162 (warn_about_ambiguous_bases): Likewise.
4164 * decl.c (pop_label, poplevel): Likewise.
4165 (duplicate_decls, grok_op_properties): Likewise.
4166 (start_preparsed_function, finish_function): Likewise.
4168 * name-lookup.c (pushdecl_maybe_friend): Likewise.
4169 (pushdecl_maybe_friend): Likewise.
4171 * parser.c (cp_parser_warn_min_max): Likewise.
4172 (cp_parser_cast_expression): Likewise.
4174 * method.c (lazily_declare_fn): Likewise.
4175 * cvt.c (convert_to_void): Likewise.
4176 * mangle.c (finish_mangling): Likewise.
4177 * cp-gimplify.c (gimplify_expr_stmt): Likewise.
4179 2006-02-03 Mark Mitchell <mark@codesourcery.com>
4181 * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
4182 not IDENTIFIER_OPNAME_P.
4184 2006-01-31 Mark Mitchell <mark@codesourcery.com>
4187 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
4189 * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
4191 (instantiate_class_template): Simplify.
4192 (verify_class_unification): Remove.
4193 (unify): Document parameters. Use INNERMOST_TEMPLATE_ARGS to
4194 permit multiple levels of template arguments.
4195 (more_specialized_class): Simplify.
4196 (get_class_bindings): Pass full arguments to unify. Fold
4197 verify_class_unification into this function. Return full
4199 (most_specialized_class): Adjust for changes to
4200 get_class_bindings. Issue errors here for ambiguity. Return the
4201 fully deduced arguments for the most specialized class, in
4202 addition to the partial specialization.
4204 2006-01-31 Ben Elliston <bje@au.ibm.com>
4206 * mangle.c: Comment fix.
4208 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
4210 * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
4211 * repo.c (extract_string, afgets): Use cast when converting from
4214 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
4216 * call.c (alloc_conversion): Use cast when converting from void *.
4217 (alloc_conversions): Likewise.
4218 (add_candidate): Likewise.
4219 (print_z_candidates): Likewise.
4220 (add_warning): Likewise.
4221 * pt.c (retrieve_local_specialization): Likewise.
4222 (process_partial_specialization): Likewise.
4223 (mangle_class_name_for_template): Likewise.
4224 (tsubst_template_args): Likewise.
4225 * typeck2.c (pat_calc_hash): Likewise.
4226 (pat_compare): Likewise.
4227 (abstract_virtuals_error): Likewise.
4228 * class.c (method_name_cmp): Likewise.
4229 (resort_method_name_cmp): Likewise.
4230 (get_vfield_name): Likewise.
4231 * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
4232 * lex.c (init_reswords): Likewise.
4233 * rtti.c (create_pseudo_type_info): Likewise.
4234 * search.c (dfs_lookup_base): Likewise.
4235 (dfs_dcast_hint_pre): Likewise.
4236 (dfs_dcast_hint_post): Likewise.
4237 * tree.c (hash_tree_cons): Likewise.
4238 * repo.c (extract_string): Likewise.
4240 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
4241 * g++spec.c (lang_specific_driver): Likewise.
4243 2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4245 * call.c (joust): Pass option code to warning. Use inform for
4247 * class.c (check_bases): Likewise.
4248 (maybe_warn_about_overly_private_class): Likewise.
4249 (check_field_decls): Likewise.
4250 (layout_empty_base): Likewise.
4251 (layout_virtual_bases): Likewise.
4252 (layout_class_type): Likewise.
4254 2006-01-28 Mark Mitchell <mark@codesourcery.com>
4257 * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
4259 (start_function): ... here.
4261 2006-01-28 Mark Mitchell <mark@codesourcery.com>
4264 * class.c (resolve_address_of_overloaded_function): Adjust use of
4265 return value from most_specialized_instantiation.
4266 * pt.c (determine_specialization): Avoid multiple calls to
4268 (most_specialized_instantiation): When a tie occurs, set the
4269 current presumed champion to the next template. Return the
4270 TREE_LIST node containing the template, rather than the template
4272 (most_specialized): Remove.
4273 * name-lookup.c (push_overloaded_decl): When duplicate_decls
4274 indicates a failed redeclaration, report that to callers.
4276 2006-01-26 Jason Merrill <jason@redhat.com>
4279 * name-lookup.c (parse_using_directive): Require strong using to
4280 name a nested namespace.
4282 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4285 * cp-tree.h (do_poplevel): Remove prototype.
4286 * semantics.c (do_poplevel): Add prototype. Make static.
4289 * cp-tree.h (default_conversion): Remove prototype.
4290 * typeck.c (default_conversion): Make static.
4292 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4294 * cp-tree.h (get_primary_binfo): Remove prototype.
4295 (push_using_decl): Likewise.
4296 (current_template_args): Likewise.
4297 (more_specialized_class): Likewise.
4298 (mark_class_instantiated): Likewise.
4299 (default_conversion): Likewise.
4300 (pfn_from_ptrmemfunc): Likewise.
4301 * class.c (get_primary_binfo): Add prototype, make static, simplify.
4302 * name-lookup.c (push_using_decl): Make static.
4303 * pt.c (current_template_args): Likewise.
4304 (more_specialized_class): Likewise.
4305 (mark_class_instantiated): Likewise.
4306 * typeck.c (default_conversion): Make static.
4307 (pfn_from_ptrmemfunc): Add prototype, make static.
4309 2006-01-24 Dirk Mueller <dmueller@suse.de>
4311 * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
4313 2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4316 * parser.c (cp_parser_unqualified_id): Check that destructor name
4318 * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
4319 Adjust comment. Return early if possible.
4320 Use same_type_p to compare types.
4321 * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
4323 2006-01-24 Mark Mitchell <mark@codesourcery.com>
4325 * semantics.c: Remove outdated comment.
4327 2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4329 * cp-tree.h (do_poplevel): Remove prototype.
4330 * semantics.c (do_poplevel): Add prototype. Make static.
4332 * cp-tree.h (original_type): Remove prototype.
4333 * typeck.c (original_type): Make static.
4335 * cp-tree.h (declare_global_var): Remove prototype.
4336 * decl.c (declare_global_var): Make static.
4338 * cp-tree.h (implicitly_declare_fn): Remove prototype.
4339 * method.c (implicitly_declare_fn): Make static.
4341 * cp-tree.h (fold_decl_constant_value): Remove prototype.
4342 * pt.c (fold_decl_constant_value): Make static.
4344 * cp-tree.h (build_x_delete): Remove prototype.
4345 * init.c (build_vec_delete_1): Call build_op_delete_call directly
4346 and not via build_x_delete.
4347 (build_x_delete): Remove.
4349 * cp-tree.h (get_vtt_name): Remove prototype.
4350 * class.c (get_vtt_name): Remove.
4351 (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
4353 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4355 * rtti.c (build_dynamic_cast): Fix comment.
4357 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4360 * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
4363 2006-01-21 Mark Mitchell <mark@codesourcery.com>
4366 * class.c (build_base_path): Generate a NOP_EXPR instead of a
4367 COMPONENT_REF if the base and derived classes are at the same
4371 * decl.c (begin_destructor_body): Robustify.
4374 * parser.c (cp_parser_direct_declarator): Robustify.
4376 2006-01-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4378 * parser.c (cp_lexer_next_token_is_keyword): Simplify.
4380 * parser.c (clear_decl_specs): Remove prototype.
4382 * parser.c (cp_parser_expression_fn): Remove.
4384 * call.c (add_builtin_candidates): Remove superfluous return.
4385 * name-lookup.c (do_toplevel_using_decl): Likewise.
4386 * parser.c (cp_parser_type_specifier_seq): Likewise.
4387 (cp_parser_save_default_args): Likewise.
4389 2006-01-20 Dirk Mueller <dmueller@suse.com>
4392 * semantics.c (finish_if_stmt): Call empty_body_warning.
4393 * parser.c (cp_parser_implicitly_scoped_statement):
4394 Mark empty statement with an empty stmt.
4396 2006-01-19 Mark Mitchell <mark@codesourcery.com>
4399 * name-lookup.c (do_class_using_decl): Don't try to look up base
4400 classes in templates with dependent base types.
4402 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4405 * pt.c (maybe_process_partial_specialization): Return early on
4408 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4411 * decl.c (start_preparsed_function): Check default arguments
4413 * name-lookup.c (pushdecl_maybe_friend): Check default arguments
4414 of all functions and function templates.
4415 * parser.c (cp_parser_late_parsing_default_args): Check default
4417 * decl2.c (check_default_args): Set missing default arguments to
4420 2006-01-18 Mark Mitchell <mark@codesourcery.com>
4423 * cp-tree.h (push_class_stack): New function.
4424 (pop_class_stack): Likewise.
4425 * class.c (class_stack_node): Add hidden field.
4426 (pushclass): Clear it.
4427 (push_class_stack): New function.
4428 (pop_class_stack): Likewise.
4429 (currently_open_class): Ignore hidden classes.
4430 (currently_open_derived_class): Likewise.
4431 * name-lookup.c (push_to_top_level): Call push_class_stack.
4432 (pop_from_top_level): Call pop_class_stack.
4434 2006-01-18 Kazu Hirata <kazu@codesourcery.com>
4436 * tree.c (find_tree_t, find_tree): Remove.
4437 * cp-tree.h: Remove the prototype for find_tree.
4439 2006-01-18 Jakub Jelinek <jakub@redhat.com>
4441 * search.c (lookup_conversions_r): Fix a pasto.
4443 2006-01-17 Eric Christopher <echristo@apple.com>
4445 * call.c (convert_like_real): When issuing conversion
4446 warnings, depend on OPT_Wconversion.
4447 * cvt.c (build_expr_type_conversion): Ditto.
4449 2006-01-17 Kazu Hirata <kazu@codesourcery.com>
4451 * name-lookup.c (lookup_namespace_name): Remove.
4452 * name-lookup.h: Remove the prototype for
4453 lookup_namespace_name.
4455 2006-01-17 Jakub Jelinek <jakub@redhat.com>
4458 * decl.c (compute_array_index_type): After issuing not an integral
4459 constant-expression error, set size to 1 to avoid ICEs later on.
4461 2006-01-16 Ian Lance Taylor <ian@airs.com>
4463 * parser.c: Include "cgraph.h".
4464 (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
4467 2006-01-16 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
4469 * g++spec.c (lang_specific_spec_functions): Remove.
4471 2006-01-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4473 * decl.c (check_initializer): Fix thinko.
4475 2006-01-14 Mark Mitchell <mark@codesourcery.com>
4478 * parser.c (cp_parser_direct_declarator): Use cp_parser_error
4481 2006-01-13 Jason Merrill <jason@redhat.com>
4483 * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
4485 * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
4486 * pt.c (check_explicit_specialization): Likewise.
4488 2006-01-12 Jason Merrill <jason@redhat.com>
4491 * pt.c (check_explicit_specialization): Handle namespace
4493 * name-lookup.c (set_decl_namespace): Likewise.
4495 2006-01-12 Nathan Sidwell <nathan@codesourcery.com>
4498 * class.c (handle_using_decl): Pass correct scope to
4499 cp_emit_debug_info_for_using.
4501 2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
4504 * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
4507 2006-01-06 Gabriel Dos Reis <gdr@integrablesolutions.net>
4509 * parser.c (cp_parser_primary_expression): Document the grammar
4510 for the built-in offsetof, a GNU extension.
4512 2006-01-04 Zdenek Dvorak <dvorakz@suse.cz>
4515 * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo
4518 2006-01-04 Chris Lattner <sabre@gnu.org>
4520 * typeck2.c: update copyright to 2006
4521 (split_nonconstant_init_1): Set TREE_CONSTANT to true.
4523 2006-01-04 Mark Mitchell <mark@codesourcery.com>
4526 * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
4527 checks, even when parsing tentatively.
4529 2006-01-04 Richard Henderson <rth@redhat.com>
4531 Merge from gomp branch.
4532 * lex.c (handle_pragma_java_exceptions): Fix whitespace.
4533 * parser.c (struct cp_token): Add pragma_kind.
4534 (eof_token): Update to match.
4535 (struct cp_lexer): Add in_pragma; rearrange next for better packing.
4536 (cp_parser_initial_pragma): New.
4537 (cp_lexer_new_main): Use it. Don't bother clearing
4538 c_lex_return_raw_strings.
4539 (cp_lexer_get_preprocessor_token): Always initialize keyword
4540 and pragma_kind fields. Handle CPP_PRAGMA.
4541 (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
4543 (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma.
4544 (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
4545 (cp_parser_skip_to_pragma_eol): New.
4546 (cp_parser_error): Use it.
4547 (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
4548 rearrange with switch statement.
4549 (cp_parser_skip_to_end_of_statement): Likewise.
4550 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
4551 (cp_parser_skip_to_closing_brace): Likewise.
4552 (cp_parser_skip_until_found): Likewise.
4553 (cp_parser_statement): Add in_compound argument; update callers.
4554 Use it to decide how to handle pragma parsing.
4555 (cp_parser_labeled_statement): Add in_compound argument; pass
4556 it on to cp_parser_statement.
4557 (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
4558 (cp_parser_declaration_seq_opt): Likewise.
4559 (cp_parser_parameter_declaration): Likewise.
4560 (cp_parser_member_specification_opt): Likewise.
4561 (cp_parser_function_definition_after_decl): Likewise.
4562 (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
4563 (cp_parser_pragma): New.
4566 2006-01-04 Dirk Mueller <dmueller@suse.com>
4568 * decl.c (finish_constructor_body): create simple
4569 compound stmt instead of a if(1) { } construct.
4571 2006-01-03 Mark Mitchell <mark@codesourcery.com>
4574 * name-lookup.c (push_class_level_binding): When a derived class
4575 provides a type binding, eliminate any type binding from a base
4579 * repo.c (repo_emit_p): Always instantiate static data members
4580 initialized by constant expressions, so that there values are
4583 2006-01-02 Mark Mitchell <mark@codesourcery.com>
4586 * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
4587 conversion operator.
4588 * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
4591 * class.c (add_method): Never associate more than one destructor
4592 with a single class.
4595 * cp-tree.h (do_friend): Adjust prototype.
4596 * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
4597 (grokdeclarator): Likewise. Refine check for invalid
4598 declarations/definitions of member functions outside of their own
4600 * friend.c (do_friend): Make funcdef_flag a bool, not an int.
4603 * parser.c (cp_parser_mem_initializer_list): Check result of
4604 cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
4605 (cp_parser_mem_initializer): Return error_mark_node for failure.
4608 * parser.c (cp_parser_template_parameter_list): Call
4609 begin_template_parm_list and end_template_parm_list here.
4610 (cp_parser_type_parameter): Not here.
4611 (cp_parser_template_declaration_after_export): Or here.
4612 (cp_parser_elaborated_type_specifier): Call
4613 cp_parser_check_template_parameters.
4615 * tree.c (build_target_expr_with_type): Use force_target_expr.
4617 * decl2.c (mark_used): Fix typo in comment.
4619 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4621 * parser.c (cp_parser_using_declaration): Skip name-lookup on
4624 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4626 * cxx-pretty-print.c (pp_cxx_constant): New. Print
4627 string-literal in parens if input program says so.
4628 (pp_cxx_primary_expression): Hand off constant printing to
4630 (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
4631 (pp_cxx_expression): Use pp_cxx_constant for literals.
4632 * error.c (dump_expr): Use pp_constant for literals.
4634 2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
4636 * method.c (make_thunk): Don't set comdat_linkage here.
4637 (use_thunk): Make thunk one only here, if thunk target is
4640 2005-12-26 Mark Mitchell <mark@codesourcery.com>
4643 * decl.c (grokdeclarator): Remove dead code.
4644 * ptree.c (cxx_print_xnode): Handle BASELINK.
4645 * parser.c (make_id_declarator): Add sfk parameter.
4646 (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
4648 (cp_parser_declarator_id): Simplify BASELINKs here.
4649 (cp_parser_member_declaration): Adjust calls to
4652 2005-12-26 Mark Mitchell <mark@codesourcery.com>
4654 PR c++/23171, c++/23172, c++/25417.
4655 * typeck.c (build_unary_op): Create temporary variables for
4656 compound literals whose addresses are taken.
4657 * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
4658 * decl.c (reshape_init_vector): Likewise.
4659 (reshape_init): Give it external linkage.
4660 (check_initializer): Use COMPOUND_LITERAL_P.
4661 (initialize_artificial_var): Allow the initializer to be a
4663 * call.c (make_temporary_var_for_ref_to_temp): Use
4664 create_temporary_var.
4665 * cp-tree.h (COMPOUND_LITERAL_P): New macro.
4666 (rehape_init): Declare.
4667 * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
4668 * semantics.c (finish_compound_literal): Use reshape_init.
4670 2005-12-23 Mark Mitchell <mark@codesourcery.com>
4673 * pt.c (instantiate_template): Handle SFINAE.
4675 2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4677 * decl.c (grokdeclarator): Improve diagnostic for friend
4678 declarations of class members.
4680 2005-12-22 Mark Mitchell <mark@codesourcery.com>
4683 * tree.c (really_overloaded_fn): Tweak comment.
4684 * pt.c (tsubst_call_declarator_parms): Remove.
4685 (tsubst_copy): Call mark_used on the member referenced by an
4687 * semantics.c (finish_qualified_id_expr): Simplify.
4688 * decl2.c (mark_used): Accept BASELINKs.
4691 * typeck.c (build_unary_op): Pass DECLs not names to
4693 * init.c (build_offset_ref): Do not do name lookup. Do not call
4695 * call.c (build_call): Simplify and tidy.
4696 * semantics.c (finish_qualified_id_expr): Call mark_used.
4698 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4701 * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
4702 identify a single '0'.
4704 2005-12-20 Mark Mitchell <mark@codesourcery.com>
4707 * decl.c (use_eh_spec_block): New function.
4708 (store_parm_decls): Use it.
4709 (finish_function): Likewise.
4711 2005-12-19 Mark Mitchell <mark@codesourcery.com>
4714 * init.c (expand_member_init): Print messages about baseclasses
4715 using %T rather than %D.
4718 * class.c (add_method): Do not treat templates as identical unless
4719 their return types are the same.
4721 2005-12-12 Mark Mitchell <mark@codesourcery.com>
4724 * tree.c (build_qualified_name): Return error_mark_node for
4727 2005-12-10 Mark Mitchell <mark@codesourcery.com>
4730 * pt.c (tsubst_copy_and_build): Permit dependent types for the
4731 object in a class member access expression.
4733 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
4736 * mangle.c (write_bare_function_type): Mangle return type for
4737 methods of Java classes
4739 2005-12-08 Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4741 * call.c (build_conditional_expr): Print types in error messages.
4743 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4745 * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
4747 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4749 * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
4751 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
4753 * Make-lang.in (c++.all.build, c++.install-normal): Remove.
4755 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
4757 * Make-lang.in: Remove all dependencies on s-gtype.
4759 2005-12-06 Aldy Hernandez <aldyh@redhat.com>
4762 * decl.c (reshape_init_array_1): Handle max_index of -1.
4764 2005-12-06 Roger Sayle <roger@eyesopen.com>
4766 * typeck.c (build_binary_op): Issue warning if either operand of a
4767 comparison operator is a string literal, except for testing equality
4768 or inequality against NULL.
4770 2005-12-06 Roger Sayle <roger@eyesopen.com>
4773 * decl.c (compute_array_index_type): Check that itype is an
4774 INTEGER_CST node before testing/clearing TREE_OVERFLOW.
4776 2005-12-05 Daniel Berlin <dberlin@dberlin.org>
4778 * ptree.c (cxx_print_decl): Update to check for decl_common
4781 2005-12-02 Mark Mitchell <mark@codesourcery.com>
4784 * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
4787 2005-12-02 Richard Guenther <rguenther@suse.de>
4789 * semantics.c (simplify_aggr_init_expr): Use buildN instead
4792 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
4794 * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
4796 (cp_parser_template_argument_list): Use XRESIZEVEC instead of
4798 * class.c (pushclass): Likewise.
4800 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
4802 * decl2.c (get_priority_info): Use XNEW, not xmalloc.
4803 * decl.c (push_switch): Likewise.
4804 * lex.c (handle_pragma_implementation): Likewise.
4805 * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
4807 (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
4808 * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
4809 * g++spec.c (lang_specific_driver): Likewise.
4810 * mangle.c (save_partially_mangled_name): Likewise.
4811 * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
4812 (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
4813 (cp_parser_sizeof_operand): Likewise.
4814 * repo.c (open_repo_file, open_repo_file): Likewise.
4816 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4818 * parser.c (cp_parser_make_typename_type): Call make_typename_type
4819 with tf_none instead of magic value 0.
4820 (cp_parser_explicit_instantiation): Call do_type_instantiation
4821 with tf_error instead of magic value 1.
4822 (cp_parser_elaborated_type_specifier): Call make_typename_type
4823 with tf_error instead of magic value 1.
4824 (cp_parser_class_name): Likewise.
4825 (cp_parser_lookup_name): Likewise.
4827 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4829 * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
4832 2005-11-30 Jason Merrill <jason@redhat.com>
4835 * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
4838 2005-11-30 Ben Elliston <bje@au.ibm.com>
4840 * typeck.c (build_x_unary_op): Correct spelling in error message.
4842 2005-11-28 Nathan Sidwell <nathan@codesourcery.com>
4845 * class.c (check_field_decls): Only set DECL_PACKED on a field
4846 when its natural alignment is > BITS_PER_UNIT.
4848 2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4851 * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
4853 2005-11-26 Richard Henderson <rth@redhat.com>
4855 * lex.c: Update for pragma_lex rename.
4856 * parser.c: Likewise.
4858 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4861 * decl.c (grokparms): Do not allow typedef-names in a '(void)'
4864 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4866 * typeck2.c (process_init_constructor_union): Remove check for
4867 unnamed union members.
4869 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4871 * name-lookup.c (lookup_name_real): Merge two if's.
4873 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4875 * pt.c (instantiate_class_template): Clean-up.
4877 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4879 * pt.c (template_class_depth_real): Remove. Move functionality to ...
4880 (template_class_depth): ... here, replacing count_specializations
4881 with 0. Adjust comment.
4883 2005-11-24 Richard Guenther <rguenther@suse.de>
4884 Dirk Mueller <dmueller@suse.de>
4887 * typeck.c (build_reinterpret_cast_1): Use
4888 strict_aliasing_warning.
4890 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4893 * pt.c (check_instantiated_args): Reword diagnostic message about
4894 template argument involving local types.
4896 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4899 * typeck.c (build_array_ref): Avoid code duplicate. Use common
4900 C/C++ diagnostic function warn_array_subscript_with_type_char.
4902 2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
4905 * error.c (resolve_virtual_fun_from_obj_type_ref): New.
4906 (dump_expr): Use it in <case CALL_EXPR>.
4908 2005-11-21 Richard Henderson <rth@redhat.com>
4910 * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
4912 * name-lookup.c (lookup_name): Remove prefer_type argument.
4913 (lookup_name_prefer_type): New.
4914 * decl.c (lookup_and_check_tag): Use them.
4915 * pt.c (tsubst_friend_class): Likewise.
4916 (lookup_template_class): Likewise.
4917 (tsubst_copy_and_build): Likewise.
4918 * name-lookup.h (lookup_name_prefer_type): New.
4919 (lookup_name): Remove declaration.
4921 2005-11-18 Mark Mitchell <mark@codesourcery.com>
4924 * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
4926 * name-lookup.c (set_decl_namespace):
4928 2005-11-18 Mike Stump <mrs@apple.com>
4930 * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
4931 * name-lookup.c (lookup_name_two): Remove.
4932 (lookup_name_one): Add.
4933 * name-lookup.h (lookup_name_two): Remove.
4934 (lookup_name_one): Add.
4936 2005-11-15 Jason Merrill <jason@redhat.com>
4939 * method.c (locate_copy): Also use skip_artificial_parms here.
4940 (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
4942 (locate_ctor): Abort if we fail to find a default constructor.
4944 2005-11-15 Mike Stump <mrs@apple.com>
4946 * name-lookup.c (lookup_name_two): Add.
4947 * name-lookup.h: Likewise.
4949 2005-11-15 Mark Mitchell <mark@codesourcery.com>
4952 * typeck.c (check_for_casting_away_constness): Use the diag_fn.
4953 (build_const_cast_1): Call it, for C-style casts.
4955 2005-11-14 Mark Mitchell <mark@codesourcery.com>
4958 * pt.c (check_explicit_specialization): Don't check for C linkage.
4959 (push_template_decl_real): Likewise.
4960 * parser.c (cp_parser_explicit_specialization): Check here.
4961 (cp_parser_template_declaration_after_export): And here.
4963 * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
4966 2005-11-14 Jason Merrill <jason@redhat.com>
4969 * method.c (locate_ctor): Skip all artificial parms, not just
4972 2005-11-14 Mark Mitchell <mark@codesourcery.com>
4974 * parser.c (eof_token): Add initializer for ambiguous_p.
4976 2005-11-13 Mark Mitchell <mark@codesourcery.com>
4979 * decl.c (check_redeclaration_exception_specification): New
4981 (duplicate_decls): Use it.
4982 * error.c (fndecl_to_string): Print the template parameter list.
4985 * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
4987 (pp_cxx_original_namespace_definition): Likewise.
4988 * name-lookup.c (ambiguous_decl): Don't issue error messages;
4989 instead return lists of ambiguous candidates.
4990 (select_decl): Handle ambiguous namespace lookups.
4991 * parser.c (cp_token): Add ambiguous_p.
4992 (cp_lexer_get_preprocessor_token): Set it.
4993 (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
4994 when a qualified name uses an invalid scope.
4995 (cp_parser_primary_expression): Print ambiguous candidates.
4996 (cp_parser_type_parameter): Adjust comment to reflect new
4997 parameter name for cp_parser_lookup_name.
4998 (cp_parser_template_argument): Likewise.
4999 (cp_parser_elaborated_type_specifier): Likewise.
5000 (cp_parser_namespace_name): Likewise.
5001 (cp_parser_class_name): Print ambiguous candidates.
5002 (cp_parser_lookup_name): Rename ambiguous_p parameter to
5003 ambiguous_decls. Use it to return a list of ambiguous candiates
5004 when a lookup is ambiguous.
5005 (cp_parser_lookup_name_simple): Adjust comment to reflect new
5006 parameter name for cp_parser_lookup_name.
5008 2005-11-12 Jakub Jelinek <jakub@redhat.com>
5011 * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
5012 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
5016 * pt.c (tsubst_copy_asm_operands): New function.
5017 (tsubst_expr) <case ASM_EXPR>: Use it.
5019 2005-11-08 Jakub Jelinek <jakub@redhat.com>
5022 * decl.c (redeclaration_error_message): Issue diagnostics about
5023 olddecl and newdecl disagreement on __thread property.
5024 (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
5026 2005-11-08 Jason Merrill <jason@redhat.com>
5029 * method.c (use_thunk): Use build_cplus_new instead of
5032 2005-11-06 Jason Merrill <jason@redhat.com>
5033 James A. Morrison <phython@gcc.gnu.org>
5036 * decl2.c (cp_finish_file): Fix conditions for undefined warning.
5037 Set TREE_NO_WARNING instead of TREE_PUBLIC.
5038 * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
5039 a warning on a function we didn't instantiate because of excessive
5042 2005-11-06 Mark Mitchell <mark@codesourcery.com>
5044 * class.c (record_subobject_offsets): Don't record offsets past
5045 biggest empty class for non-empty base classes.
5046 (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
5047 keeping track of the size of emptyclasses.
5050 * class.c (sizeof_biggest_empty_class): New variable.
5051 (record_subobject_offsets): Don't record offsets past biggest
5052 empty class for data members. Replace vbases_p parameter with
5053 is_data_member parameter.
5054 (build_base_field): Adjust call.
5055 (layout_class_type): Likewise. Maintain
5056 sizeof_biggest_empty_class.
5058 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
5060 * decl2.c, init.c, typeck.c: Fix comment typos.
5062 2005-11-04 Richard Guenther <rguenther@suse.de>
5065 * init.c (build_vec_init): Build comparison of matching
5068 2005-11-03 Josh Conner <jconner@apple.com>
5071 pt.c (tsubst): Accept zero-length array if tf_error is set
5072 in complain flags. Change error message for negative-
5075 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
5077 * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
5080 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
5083 * error.c (cp_cpp_error): New function.
5084 * cp-tree.h (cp_cpp_error): Declare.
5085 * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
5086 and error callback after lexing.
5088 2005-11-03 Mark Mitchell <mark@codesourcery.com>
5091 * pt.c (register_specialization): Update inline flags on clones.y
5093 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
5096 * decl.c (declare_local_label): Return 0 for variables
5097 with error_mark_node as their types.
5099 2005-11-02 Mark Mitchell <mark@codesourcery.com>
5102 * call.c (build_conditional_expr): Do bad conversions, if there's
5106 * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
5107 message for use of overloaded functions on LHS of "." operator.
5110 * parser.c (cp_parser_postfix_expression): Use
5111 cp_parser_elaborated_type_specifier to handle typename-types in
5113 (cp_parser_enclosed_argument_list): Skip ahead to the end of the
5114 template argument list if the closing ">" is not found.
5117 * pt.c (instantiate_decl): Use cp_finish_decl, not
5118 finish_static_data_member_decl.
5120 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
5122 * decl.c (grokfndecl): Remove the setting
5123 of the return type of the function type
5124 of main after erroring about must returning
5127 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
5130 * decl.c (grokfndecl): Create a new function type
5131 after erroring out about main not returning int.
5133 2005-10-28 Josh Conner <jconner@apple.com>
5136 * parser.c (cp_parser_member_declaration): Detect and handle
5137 a template specialization.
5139 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
5142 * decl.c (start_decl): Check that the decl is an
5143 error_mark_node before getting the type.
5144 Remove the check for the decl's type being an
5147 2005-10-21 Mark Mitchell <mark@codesourcery.com>
5150 * parser.c (cp_parser_init_declarator): Pass attributes to
5153 2005-10-20 Mark Mitchell <mark@codesourcery.com>
5156 * search.c (accessible_p): Check access in the outermost set of
5157 template parameters.
5159 2005-10-20 Richard Guenther <rguenther@suse.de>
5161 * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
5163 2005-10-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5166 * decl.c (grokdeclarator): Reject unqualified destructors in
5167 friend declarations.
5169 2005-10-18 Mark Mitchell <mark@codesourcery.com>
5172 * pt.c (convert_template_argument): Use canonical type variants in
5173 template specializations.
5175 2005-10-18 Nathan Sidwell <nathan@codesourcery.com>
5178 * name-lookup.c (arg_assoc): Template args can be null in a
5182 * class.c (update_vtable_entry_for_fn): Don't process invalid
5183 covariant overriders.
5186 * cp-tree.h (add_method): Add return value.
5187 * class.c (add_method): Return success indicator.
5188 * semantics.c (finish_member_declaration): Don't add an invalid
5189 method to the method list.
5191 2005-10-17 Mark Mitchell <mark@codesourcery.com>
5194 * call.c (build_new_method_call): Do not show VTT parameters to
5197 2005-10-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5200 * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
5201 only complain about missing statement.
5203 2005-10-17 Nathan Sidwell <nathan@codesourcery.com>
5206 * cp-tree.h (BASELINK_QUALIFIED_P): New.
5207 * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
5208 * typeck.c (finish_class_member_access_expr): Set it.
5211 * decl.c (check_default_argument): Don't check
5212 processing_template_decl or uses_template_parms here.
5213 (grokparms): Only call check_default_argument when not processing
5215 * parser.c (cp_parser_late_parsing_default_arg): Call
5216 check_default_argument when not processing a template decl.
5218 2005-10-16 Mark Mitchell <mark@codesourcery.com>
5221 * decl2.c (mark_used): Use uses_template_parms instead of
5223 * init.c (constant_value_1): Handle uninstantiated templates
5225 * pt.c (instantiate_decl): Add sanity check.
5227 2005-10-16 Mark Mitchell <mark@codesourcery.com>
5230 * typeck.c (check_template_keyword): Fix thinko.
5232 2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
5235 * decl.c (pop_switch): Only call c_do_switch_warnings
5236 when not processing templates.
5238 2005-10-16 Mark Mitchell <mark@codesourcery.com>
5241 * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
5242 (check_template_keyword): New function.
5243 (finish_id_expression): Change prototoype.
5244 (finish_qualified_id_expr): Change prototype.
5245 (build_qualified_name): New function.
5246 (finish_class_member_access_expr): Change prototype.
5247 * init.c (build_offset_ref): Use build_qualified_name.
5248 * mangle.c (write_expression): Likewise.
5249 * parser.c (cp_parser_primary_expression): Remove qualifying_class
5250 parameter. Add address_p and template_arg_p. Use
5251 build_qualified_name.
5252 (cp_parser_id_expression): Default *template_p to
5253 template_keyword_p. Check for invalid uses of the template
5255 (cp_parser_postfix_expression): Eliminate special handling for
5256 qualified names. Adjust call to cp_parser_primary_expression.
5257 (cp_parser_postfix_dot_deref_expression): Adjust call to
5258 cp_parser_id_expression and finish_class_member_access_expr.
5259 (cp_parser_template_argument_list): Add comment.
5260 (cp_parser_template_argument): Adjust use of
5261 cp_parser_primary_expression. Remove call to
5262 finish_qualified_id_expr.
5263 (cp_parser_lookup_name): Use build_qualified_name.
5264 * pt.c (tsubst): Use build_qualified_name.
5265 (tsubst_qualified_id): Likewise. Adjust call to
5266 finish_qualified_id_expr.
5267 (tsubst_copy): Use build_qualified_name.
5268 (tsubst_copy_and_build): Adjusts call to finish_id_expression and
5269 finish_class_member_access_expr.
5270 * semantics.c (finish_non_static_data_member): Use
5271 build_qualified_name.
5272 (finish_qualified_id_expr): Add template_p and template_arg_p
5274 (finish_id_expression): Remove qualifiying_class parameter. Add
5275 template_p, done, address_p, and template_arg_p. Use
5276 build_qualified_name. Adjust calls to
5277 finish_class_member_acess_expr.
5278 * tree.c (build_qualified_name): New function.
5279 * typeck.c (check_template_keyword): New function.
5280 (finish_class_member_access_expr): Add template_p argument. Check
5281 for invalid uses of the template keyword.
5283 2005-10-15 Mark Mitchell <mark@codesourcery.com>
5286 * class.c (maybe_warn_about_overly_private_class): Lazy
5287 constructors are public.
5289 2005-10-14 Mark Mitchell <mark@codesourcery.com>
5292 * call.c (convert_like_real): Rely on convert_and_check to issue
5293 warnings about overflow and conversion to unsigned.
5294 * decl.c (finish_enum): Use the location of the enumerators, not
5295 the closing brace of the enumeration, when reporting warnings
5297 (build_enumerator): Use error_mark_node for erroneous values.
5298 * typeck2.c (digest_init): Remove reference to "signature pointer"
5301 2005-10-14 Nathan Sidwell <nathan@codesourcery.com>
5304 * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
5305 (maybe_clone_body): Track the first clone.
5307 2005-10-13 Nathan Sidwell <nathan@codesourcery.com>
5310 * class.c (build_base_path): The vtable is always the first thing
5313 2005-10-13 Mark Mitchell <mark@codesourcery.com>
5316 * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
5317 * decl.c (duplicate_decls): Merge it into new declarations.
5318 (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
5319 (cp_finish_decl): Set it, when appropriate.
5322 * call.c (build_new_method_call): Correct pretty-printing of
5324 * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
5328 * decl.c (start_method): Return error_mark_node for errors.
5331 * pt.c (push_template_decl_real): Complain about attempts to
5332 declare template variables.
5335 * pt.c (tsubst_template_parms): Set processing_template_decl while
5336 processing the parameters.
5337 (tsubst_decl): Set processing_template_decl when substituting into
5341 * pt.c (most_specialized_instantiation): Robustify.
5344 * semantics.c (finish_id_expression): Issue errors about uses of
5345 local variables in containing functions even in templates.
5347 2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
5351 * class.c (finish_struct_1): Call
5352 targetm.cxx.adjust_class_at_definition.
5355 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
5358 * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
5359 with already looked up member functions. Assert we're not
5360 returning a NON_DEPENDENT_EXPR with unknown type.
5361 * typeck.c (finish_class_member_access_expr): We can get
5362 non-template-id-expr baselinks. If the lookup finds a baselink,
5363 remember it even inside templates.
5366 * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
5367 TYPE_DECL. Use dependent_type_p to check type.
5368 * pt.c (uses_template_parms_p): Use dependent_type_p for a
5370 (type_dependent_expression_p): Assert we've not been given a
5374 * decl.c (check_function_type): Correctly overwrite incomplete
5375 return type with void type.
5376 * typeck.c (check_return_expr): If the function's return type is
5377 void, don't try and convert a return expr.
5379 2005-10-12 David Edelsohn <edelsohn@gnu.org>
5382 * call.c (build_object_call): If BINFO is NULL, bypass
5383 lookup_fnfields and set fns to NULL_TREE.
5385 2005-10-12 Paolo Bonzini <bonzini@gnu.org>
5388 * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print
5389 an ADDR_EXPR of a LABEL_DECL as &&.
5391 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
5394 * class.c (walk_subobject_offsets): Don't walk error_mark_node.
5396 2005-10-11 Ian Lance Taylor <ian@airs.com>
5399 * cvt.c (convert_to_void): Don't warn about unused values when
5400 processing a template declaration.
5402 2005-10-11 Mark Mitchell <mark@codesourcery.com>
5405 * call.c (convert_like_real): Use decl_constant_value, not
5406 integral_constant_value.
5407 * init.c (constant_value_1): New function.
5408 (integral_constant_value): Use it.
5409 (decl_constant_value): Likewise.
5410 * typeck.c (decay_conversion): Use decl_constant_value, not
5411 integral_constant_value.
5414 * parser.c (cp_parser_elaborated_type_specifier): Don't treat
5415 class types as templates if the type is not appearing as part of a
5416 type definition or declaration.
5418 2005-10-10 Mark Mitchell <mark@codesourcery.com>
5421 * pt.c (instantiate_decl): Call finish_static_data_member_decl for
5422 static data members.
5424 2005-10-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5425 Mark Mitchell <mark@codesourcery.com>
5428 * parser.c (cp_parser_template_argument_list): Do not treat
5429 contents of argument list as part of a constant expression.
5431 2005-10-10 Mark Mitchell <mark@codesourcery.com>
5434 * decl.c (grokdeclarator): Do not require template parameter lists
5435 for explicitly specialized class.
5436 * error.c (dump_aggr_type): Do not dump template arguments for
5437 non-primary specializations.
5438 (dump_function_name): Likewise.
5441 * pt.c (instantiate_decl): Instantiate the initializer of
5442 a static data member in the namespace containing the class
5443 containing the static data member.
5445 2005-10-08 James A. Morrison <phython@gcc.gnu.org>
5448 * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
5449 scopes as nondependent.
5451 2005-10-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5453 * call.c (resolve_args): Remove redundant test.
5455 2005-10-05 Paolo Bonzini <bonzini@gnu.org>
5457 PR tree-optimization/21419
5458 PR tree-optimization/24146
5459 PR tree-optimization/24151
5461 * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
5462 read-only. Set ASM_VOLATILE_P for asms without outputs.
5464 2005-10-05 Nathan Sidwell <nathan@codesourcery.com>
5467 * call.c (joust): Adjust length count to more_specialized_fn.
5468 * pt.c (more_specialized_fn): Cope with non-static member vs
5471 2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
5474 * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
5475 instead of change_decl_assembler_name.
5477 2005-10-03 Alexandre Oliva <aoliva@redhat.com>
5479 * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
5481 2005-10-03 Mark Mitchell <mark@codesourcery.com>
5484 * repo.c: Include flags.h.
5485 (finish_repo): Add -frandom-seed to the arguments.
5487 2005-10-02 Mark Mitchell <mark@codesourcery.com>
5490 * parser.c (cp_parser_template_argument): Don't turn "T::f" into
5492 * pt.c (convert_nontype_argument): Remove ??? comment.
5495 * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
5496 when class rvalues are lvalues.
5498 2005-09-28 Mark Mitchell <mark@codesourcery.com>
5501 * decl.c (grokdeclarator): Always pedwarn about overqualified
5504 2005-09-27 Mark Mitchell <mark@codesourcery.com>
5507 * name-lookup.c (maybe_process_template_type_declaration): Don't
5508 treat forward declarations of classes as templates just because
5509 we're processing_template_decl.
5510 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
5513 2005-09-26 Jason Merrill <jason@redhat.com>
5516 * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
5517 * name-lookup.c (pushdecl_maybe_friend): Check it.
5518 * decl.c (begin_function_body): Do nothing if it's false.
5519 (finish_function_body): Ditto.
5520 (outer_curly_brace_block): New fn.
5521 (finish_function): Use it.
5523 2005-09-26 Richard Guenther <rguenther@suse.de>
5526 * decl2.c (do_static_destruction): Remove.
5527 (finish_static_initialization_or_destruction): Likewise.
5528 (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
5529 (NEEDS_GUARD_P): Likewise.
5530 (do_static_initialization): Rename to
5531 do_static_initialization_or_destruction. Process all
5532 initializers/destructors and handle common conditionalizing.
5533 (start_static_initialization_or_destruction): Rename to
5534 one_static_initialization_or_destruction. Handle only
5535 decl-specific conditionalizing.
5536 (cp_finish_file): Call do_static_initialization_or_destruction.
5538 2005-09-22 Jakub Jelinek <jakub@redhat.com>
5541 * class.c (find_final_overrider): Move diagnostic about no unique final
5543 (update_vtable_entry_for_fn): ... here.
5545 2005-09-21 Mark Mitchell <mark@codesourcery.com>
5548 * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
5550 2005-09-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5553 * call.c (resolve_args): Return error_mark_node on arguments
5554 whose TREE_TYPE is error_mark_node.
5556 2005-09-20 Jakub Jelinek <jakub@redhat.com>
5559 * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
5560 get_tinfo_ptr calls.
5562 2005-09-16 Mark Mitchell <mark@codesourcery.com>
5565 * parser.c (cp_parser_enclosed_template_argument_list): Make sure
5566 skip_evaluation is false when processing template arguments.
5569 * pt.c (check_instantiated_args): Treat uses of anonymous types as
5570 causing type-deduction failure.
5572 2005-09-15 Jason Merrill <jason@redhat.com>
5575 * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
5578 2005-09-15 Mark Mitchell <mark@codesourcery.com>
5581 * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
5582 processing template arguments.
5584 * pt.c (check_explicit_instantiation_namespace): Fix typo.
5587 * decl.c (check_class_member_definition_namespace): New function.
5588 (grokfndecl): Use it.
5589 (grokvardecl): Likewise.
5590 (grokdecl): Improve documentation.
5591 * pt.c (check_explicit_instantiation_namespace): New function.
5592 (register_specialization): Call check_specialization_namespace
5593 when replacing an implicitly instantiated function.
5594 (check_explicit_specialization): Ensure that DECL_CONTEXT is set
5595 correctly for namespace-scope specializations.
5596 (do_decl_instantiation): Use
5597 check_explicit_instantiation_namespace.
5598 (do_type_instantiation): Likewise.
5600 2005-09-15 Nathan Sidwell <nathan@codesourcery.com>
5603 * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
5605 2005-09-13 Bastian Blank <waldi@debian.org>
5608 * mangle.c (find_substitution): Do not use special substitutions
5609 for identifiers not in std::.
5611 2005-09-13 Mark Mitchell <mark@codesourcery.com>
5614 * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
5617 2005-09-13 Mark Mitchell <mark@codesourcery.com>
5620 * pt.c (tsubst_default_argument): Do treat default argument
5621 expressions as occurring in the context of the function called.
5623 2005-09-12 Mark Mitchell <mark@codesourcery.com>
5626 * parser.c (cp_parser_primary_expression): Recognize the closing
5627 ">" of a template-argument-list after a floating-point literal as
5628 the end of a cast expression.
5630 2005-09-12 Mark Mitchell <mark@codesourcery.com>
5633 * cvt.c (perform_qualification_conversions): Don't create
5634 unnecessary NOP_EXPRs.
5635 * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
5637 2005-09-12 Ian Lance Taylor <ian@airs.com>
5640 * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
5641 bitfield. Make dummy bitfield one bit smaller.
5642 (DECL_HIDDEN_FRIEND_P): Define.
5643 (pushdecl_maybe_friend): Declare.
5644 (pushdecl_top_level_maybe_friend): Declare.
5645 * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
5646 Change prototype and all callers. Add assertion that a
5647 DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P. Set
5648 DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
5650 * name-lookup.c (supplement_binding): Don't ignore a
5651 DECL_HIDDEN_FRIEND_P.
5652 (pushdecl_maybe_friend): Break out contents of pushdecl. Add
5653 is_friend parameter. Set DECL_ANTICIPATED and
5654 DECL_HIDDEN_FRIEND_P for a friend function.
5655 (pushdecl): Just call pushdecl_maybe_friend.
5656 (pushdecl_with_scope): Add is_friend parameter. Change prototype
5658 (pushdecl_namespace_level): Likewise.
5659 (push_overloaded_decl): Likewise. Check DECL_HIDDEN_FRIEND_P as
5660 well as DECL_ANTICIPATED when checking for a builtin.
5661 (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
5662 DECL_ANTICIPATED when checking for a builtin.
5663 (do_nonmember_using_decl): Likewise.
5664 (pushdecl_top_level_1): Add is_friend parameter. Change all
5666 (pushdecl_top_level_maybe_friend): New function.
5667 (remove_hidden_names): New function.
5668 (struct arg_lookup): Add args field.
5669 (friend_of_associated_class_p): New static function.
5670 (arg_assoc_namespace): Ignore hidden functions which are not
5671 friends of an associated class of some argument.
5672 (lookup_arg_dependent): Remove hidden functions from list passed
5673 in. Initialize k.args.
5674 * name-lookup.h (remove_hidden_names): Declare.
5675 * friend.c (do_friend): Call pushdecl_maybe_friend instead of
5677 * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
5678 an assertion, with a check for DECL_HIDDEN_FRIEND_P.
5679 (build_new_function_call): Add koenig_p parameter. Change
5680 prototype and callers.
5681 * pt.c (register_specialization): Add is_friend parameter. Change
5683 (push_template_decl_real): Change is_friend parameter to bool.
5684 Change prototype and all callers.
5685 (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
5686 instead of pushdecl_top_level.
5688 2005-09-11 Richard Henderson <rth@redhat.com>
5690 * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
5691 * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
5693 2005-09-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
5695 * parser.c (cp_parser_translation_unit): Simplify. The while-block
5696 was actually executed at most once.
5698 2005-09-09 Richard Henderson <rth@redhat.com>
5701 * cp-tree.def (ALIAS_DECL): Remove.
5702 * cp-lang.c (cp_init_ts): Remove support for it.
5703 * error.c (dump_decl): Likewise.
5704 * name-lookup.c (pushdecl): Likewise.
5705 * semantics.c (finish_id_expression): Likewise.
5706 * decl2.c (build_anon_union_vars): Use a VAR_DECL with
5707 DECL_VALUE_EXPR instead.
5709 2005-09-09 Mark Mitchell <mark@codesourcery.com>
5712 * decl.c (start_preparsed_function): Do not pay attention to
5713 #pragma interface for implicitly-defined methods.
5714 * decl2.c (cp_finish_file): Do not complain about uses of inline
5715 functions that have bodies, even if we decided not to emit the
5716 body in this translation unit.
5717 * semantics.c (note_decl_for_pch): Do not mess with linkage.
5718 (expand_or_defer_fn): Make inline, non-template functions COMDAT
5721 2005-09-08 Richard Henderson <rth@redhat.com>
5724 * decl.c (wrapup_globals_for_namespace): Call
5725 emit_debug_global_declarations.
5726 * decl2.c (cp_finish_file): Likewise.
5728 2005-09-08 Mark Mitchell <mark@codesourcery.com>
5731 * decl2.c (mark_used): Instantiate static data members initialized
5732 by constants, even in a template.
5734 2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
5737 * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
5740 2005-09-07 Richard Guenther <rguenther@suse.de>
5742 * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
5743 for EMPTY_CLASS_EXPR.
5745 2005-09-06 Jakub Jelinek <jakub@redhat.com>
5748 * typeck.c (check_return_expr): Add no_warning argument. Set
5749 *no_warning to true if "return-statement with no value, in function
5750 returning" warning has been issued.
5751 * cp-tree.h (check_return_expr): Adjust prototype.
5752 * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
5753 check_return_expr set *no_warning to true.
5755 2005-09-06 Mark Mitchell <mark@codesourcery.com>
5757 * cp-tree.h (rvalue): New function.
5758 * call.c (build_conditional_expr): Use it.
5759 * init.c (build_new_1): Likewise.
5760 * rtti.c (build_dynamic_cast_1): Likewise.
5761 * tree.c (rvalue): New function.
5762 * typeck.c (build_unary_op): Use it.
5763 (build_static_cast_1): Likewise.
5766 * init.c (build_new_1): Make sure the entire array type is
5767 complete, not just its element types.
5769 2005-09-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5771 * decl.c (check_elaborated_type_specifier): Remove redundant check.
5773 2005-09-06 Jakub Jelinek <jakub@redhat.com>
5776 * typeck.c (ignore_overflows): New helper function.
5777 (build_static_cast_1): Use it.
5779 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
5781 * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
5782 Follow spelling conventions.
5784 2005-09-05 Mark Mitchell <mark@codesourcery.com>
5787 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
5790 2005-09-05 Mark Mitchell <mark@codesourcery.com>
5793 * semantics.c (finish_stmt_expr_expr): Add an explicit
5794 initialization to the last statement in the statement-expression.
5795 * (finish_stmt_expr): Adjust accordingly.
5797 2005-09-03 Mark Mitchell <mark@codesourcery.com>
5800 * decl2.c (mark_used): Always instantiate static data members
5801 initialized by constant expressions.
5802 * pt.c (instantiate_decl): Instantiate the initializers for static
5803 data members initialized by constant expressions.
5806 * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
5807 finishing processing for a template function in a local class.
5809 2005-09-02 Mark Mitchell <mark@codesourcery.com>
5810 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
5811 around functions in local classes.
5813 2005-09-02 Mark Mitchell <mark@codesourcery.com>
5816 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
5817 around functions in local classes.
5819 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
5822 * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
5823 init, call generate_ctor_or_dtor_function.
5825 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5828 * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
5829 lookup_name_real on final parse.
5831 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5834 * semantics.c (qualified_name_lookup_error): Do not complain again
5837 2005-08-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5840 * parser.c (cp_parser_namespace_name): Move diagnostic for
5841 invalid namespace-name to here from ...
5842 * name-lookup.c (do_namespace_alias): ... here and ...
5843 (do_using_directive): ... here. Remove dead code.
5845 2005-08-28 Mark Mitchell <mark@codesourcery.com>
5848 * cp-tree.h (saved_scope): Add skip_evaluation.
5849 * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
5850 DECL_INITIAL, to determine whether or not a static data member was
5851 initialized in the class-specifier.
5852 (cp_finish_decl): Add comment.
5853 * init.c (integral_constant_value): Subtitute into the
5854 initializers for static data members in templates.
5855 * name-lookup.c (push_to_top_level): Save skip_evaluation.
5856 (pop_from_top_level): Restore it.
5857 * pt.c (instantiate_class_template): Do not substitute into the
5858 intializers of static data members when instantiating a class.
5859 (regenerate_decl_from_template): Simplify.
5860 (instantiate_decl): Tidy. Substitute into the initializer for a
5861 static data member even when the definition of the data member is
5864 2005-08-26 Mark Mitchell <mark@codesourcery.com>
5867 * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
5868 (type_dependent_expression_p): Allow BASELINKs whose associated
5869 functions are simply a FUNCTION_DECL.
5872 * cp-tree.h (build_vec_init): Adjust prototype.
5873 * init.c (perform_member_init): Adjust call to build_vec_init.
5874 (build_aggr_init): Likewise.
5875 (build_new_1): Do not call build_default_init for array types.
5876 (build_vec_init): Add explicit_default_init_p parameter. Perform
5877 default initialization of vector elements when set.
5878 * typeck.c (build_modify_expr): Adjust call to build_vec_init.
5880 2005-08-25 Nathan Sidwell <nathan@codesourcery.com>
5883 * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
5886 2005-08-24 Nathan Sidwell <nathan@codesourcery.com>
5889 * parser.c (cp_lexer_peek_nth_token): Relax assert.
5891 2005-08-23 Nathan Sidwell <nathan@codesourcery.com>
5894 * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
5896 2005-08-22 James E Wilson <wilson@specifix.com>
5898 PR tree-optimization/23426
5899 * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
5902 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5905 * pt.c (push_template_decl_real): Return error_mark_node if the
5906 number of template parameters does not match previous definition.
5908 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5911 * decl.c (require_complete_types_for_parms): Mark incomplete types
5914 2005-08-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5916 * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
5917 Fix typo in leading comment.
5919 2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5921 * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
5923 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
5925 * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
5926 * call.c (add_template_candidate_real): Pass down 'flags' to
5927 fn_type_unification.
5928 (can_convert_arg): New 'flags' argument. Pass it to call to
5929 implicit_conversion instead of LOOKUP_NORMAL.
5930 (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
5931 * class.c (resolve_address_of_overloaded_function): Ditto.
5932 (resolve_address_of_overloaded_function): Ditto.
5933 * decl.c (reshape_init, check_default_argument): Ditto.
5934 * typeck.c (build_ptrmemfunc): Ditto.
5935 * pt.c (type_unification_real): Add 'flags' argument.
5936 (fn_type_unification): Pass 'flags' to type_unification_real.
5937 (type_unification_real): Pass new 'flags' argument to call to
5940 2005-08-12 Giovanni Bajo <giovannibajo@libero.it>
5941 Nathan Sidwell <nathan@codesourcery.com>
5945 * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
5948 2005-08-12 Nathan Sidwell <nathan@codesourcery.com>
5951 Revert my 2005-07-08 patch
5952 * pt.c (type_unification_real): Remove is_method_argument and
5954 (fn_type_unification, unify): Adjust type_unification_real calls.
5956 2005-08-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5959 * decl2.c (grokfield): Check that method is not static before
5962 2005-08-11 Nathan Sidwell <nathan@codesourcery.com>
5965 * name-lookup.c (pushtag): Process the template type before
5966 altering the identifier lookup fields. Remove unreachable code
5967 creating an empty stub decl.
5969 2005-08-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5972 * decl.c (grokdeclarator): Reset storage_class after error.
5974 2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5977 * init.c (build_new_1): Check for empty candidate list.
5979 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5982 * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
5983 before calling build_exception_variant.
5985 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5988 * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
5989 if substitution of template args did not succeed.
5991 2005-08-06 Michael Matz <matz@suse.de>
5993 * method.c (use_thunk): Call init_insn_lengths.
5995 2005-08-05 James A. Morrison <phython@gcc.gnu.org>
5998 * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
5999 sorrycount or errorcount are nonzero.
6001 2005-08-05 Mark Mitchell <mark@codesourcery.com>
6003 * name-lookup.c (pushtag): Remove accidental commit from:
6004 2004-12-21 Mark Mitchell <mark@codesourcery.com>
6006 * decl.c (grokdeclarator): Return error_mark_node, not
6007 void_type_node, to indicate errors.
6008 * parser.c (cp_parser_template_parameter_list): Robustify.
6009 (cp_parser_template_parameter): Likewise.
6011 2005-08-01 Kazu Hirata <kazu@codesourcery.com>
6013 * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
6016 2005-07-29 Kazu Hirata <kazu@codesourcery.com>
6018 * method.c: Fix a comment typo.
6020 2005-07-28 Mark Mitchell <mark@codesourcery.com>
6023 * call.c (add_builtin_candidate): Adjust for changes in
6024 representation of pointer-to-member types.
6026 2005-07-28 Mike Stump <mrs@apple.com>
6028 * pt.c (check_explicit_specialization): Add visibility logic.
6029 (lookup_template_class): Likewise.
6030 (instantiate_class_template): Likewise.
6032 2005-07-27 Devang Patel <dpatel@apple.com>
6034 * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
6036 2005-07-25 Ian Lance Taylor <ian@airs.com>
6038 * ptree.c (cxx_print_identifier): Print a leading space if the
6041 2005-07-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6043 * call.c (convert_for_arg_passing): Check function pointers when
6044 -Wmissing-format-attribute is activated.
6045 * typeck.c (convert_for_assignment): Likewise.
6047 2005-07-22 Manfred Hollstein <mh@suse.com>
6049 * parser.c (cp_parser_declaration): Fix unitialised warnings.
6051 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
6053 * class.c (build_base_path): Fix typo.
6055 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
6058 * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
6060 2005-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6062 * call.c: Fix comment typo(s).
6063 * cxx-pretty-print.h: Likewise.
6064 * name-lookup.c: Likewise.
6065 * parser.c: Likewise.
6067 2005-07-20 Douglas Gregor <doug.gregor@gmail.com>
6070 * semantics.c (perform_koenig_lookup): For dependent calls, just
6071 return the set of functions we've found so far. Later, it will be
6072 augmented by those found through argument-dependent lookup.
6073 * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing
6074 the optimization that skips namespaces where the functions were
6077 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
6079 Make CONSTRUCTOR use VEC to store initializers.
6080 * call.c (convert_default_arg): Update call to digest_init.
6081 * class.c (dump_class_hierarchy, dump_array): Update to cope with
6082 VEC in CONSTRUCTOR_ELTS.
6083 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
6084 (finish_compound_literal, digest_init): Update declaration.
6085 * decl.c (struct reshape_iter): New data type.
6086 (reshape_init_array): Rename to...
6087 (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
6088 (reshape_init): Rewrite from scratch. Split parts into...
6089 (reshape_init_array, reshape_init_vector, reshape_init_class,
6090 reshape_init_r): New functions.
6091 (check_initializer): Update call to reshape_init. Remove obsolete
6093 (initialize_artificial_var, cp_complete_array_type): Update to cope
6094 with VEC in CONSTRUCTOR_ELTS.
6095 * decl2.c (grokfield): Update calls to digest_init.
6096 (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
6097 * error.c (dump_expr_init_vec): New function.
6098 (dump_expr): Use dump_expr_init_vec.
6099 * init.c (build_zero_init, build_vec_init): Update to cope with VEC
6100 in CONSTRUCTOR_ELTS.
6101 (expand_default_init): Update call to digest_init.
6102 * parser.c (cp_parser_postfix_expression): Use a VEC for the
6104 (cp_parser_initializer_list): Build a VEC of initializers.
6105 * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
6106 in CONSTRUCTOR_ELTS.
6107 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
6108 ptm_initializer, class_initializer, get_pseudo_ti_init): Use
6109 build_constructor_from_list instead of build_constructor.
6110 * semantics.c (finish_compound_literal): Update call to digest_init.
6111 * tree.c (stabilize_init): Update to cope with VEC in
6113 * typeck.c (build_ptrmemfunc1): Likewise.
6114 * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
6116 (store_init_value): Use build_constructor_from_list and update call
6118 (digest_init): Rewrite.
6119 (process_init_constructor): Rewrite from scratch. Split into...
6120 (process_init_constructor_array, picflag_from_initializer,
6121 process_init_constructor_record, process_init_constructor_union):
6123 (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
6125 (build_functional_cast): Use build_constructor_from_list instead of
6128 2005-07-18 Mark Mitchell <mark@codesourcery.com>
6131 * cp-tree.h (instantiate_decl): Change prototype.
6132 * decl2.c (mark_used): Adjust accordingly.
6133 * pt.c (do_decl_instantiation): Likewise.
6134 (instantiate_class_member): Likewise.
6135 (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p.
6136 Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template
6137 that has no definition available.
6138 (instantiate_pending_templates): Adjust call to instantiate_decl.
6140 2005-07-17 Mark Mitchell <mark@codesourcery.com>
6143 * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation.
6144 * decl.c (duplicate_decls): Re-register template specializations
6145 for functions that have DECL_TEMLPLATE_INFO, even if they do not
6146 have DECL_TEMPLATE_INSTANTIATION set.
6148 2005-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6150 * call.c (diagnostic_fn_t): New.
6151 (build_temp, convert_like_real): Use diagnostic_fn_t.
6153 2005-07-15 Mark Mitchell <mark@codesourcery.com>
6156 * repo.c (repo_emit_p): Robustify.
6158 2005-07-14 Daniel Berlin <dberlin@dberlin.org>
6161 * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
6163 2005-07-15 Mark Mitchell <mark@codesourcery.com>
6166 * call.c (implicit_conversion): Add c_cast_p parameter.
6167 (standard_conversion): Likewise. Allow conversions between
6168 differently-qualified pointer types when performing a C-style
6170 (add_function_candidate): Adjust callee.
6171 (build_builtin_candidate): Likewise.
6172 (build_user_type_conversion_1): Likewise.
6173 (conditional_conversion): Likewise.
6174 (can_convert_arg): Likewise.
6175 (can_convert_arg_bad): Likewise.
6176 (perform_implicit_conversion): Likewise.
6177 * cp-tree.h (comp_ptr_ttypes_const): Declare.
6178 * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
6181 2005-07-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6182 Nathan Sidwell <nathan@codesourcery.com>
6185 * pt.c (tsubst_template_parms): Check for invalid non-type
6188 2005-07-09 Andrew Pinski <pinskia@physics.uc.edu>
6190 * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
6191 decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
6192 (cp_init_ts): Call init_shadowed_var_for_decl.
6193 Remove include of gt-cp-cp-lang.h.
6194 * cp-objcp-common.c (shadowed_var_for_decl,
6195 decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
6197 (init_shadowed_var_for_decl): New function to initialize
6198 shadowed_var_for_decl.
6199 Include gt-cp-cp-objcp-common.h.
6200 * Make-lang.in (gt-cp-lang.h): Remove.
6201 (gt-cp-cp-objcp-common.h): Add.
6202 (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
6203 (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
6204 * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
6205 * cp-tree (init_shadowed_var_for_decl): Add prototype.
6207 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
6209 * Make-lang.in: Add gt-cp-lang.h.
6211 * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
6213 * config-lang.in: Add cp-lang.c to gtfiles.
6214 * cp-lang.c: Include hashtab.h.
6215 (cp_init_ts): New function.
6216 (LANG_HOOK_INIT_TS): Use macro.
6217 (decl_shadowed_for_var_lookup): New function.
6218 (decl_shadowed_for_var_insert): Ditto.
6219 * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
6220 (NON_THUNK_FUNCTION_CHECK): Ditto.
6221 (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
6222 (DECL_INIT_PRIORITY): Ditto.
6223 (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
6224 (DECL_SHADOWED_FOR_VAR): Use hashtable.
6225 (SET_DECL_SHADOWED_FOR_VAR): Ditto.
6226 * decl.c (duplicate_decls): Update for new/updated structures.
6227 (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
6228 * decl2.c (start_static_initialization_or_destruction): Deal with
6230 * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
6232 * tree.c (handle_init_priority_attribute): Handle priority.
6234 2005-07-08 Nathan Sidwell <nathan@codesourcery.com>
6237 * pt.c (type_unification_real): Add is_method argument. Use it
6238 for this pointer unification.
6239 (fn_type_unification): Adjust type_unification_real call.
6242 2005-07-07 Nathan Sidwell <nathan@codesourcery.com>
6244 * pt.c (type_unification_real): Remove allow_incomplete argument.
6245 Remove unreachable code.
6246 (fn_type_unification): Adjust call to type_unification_real.
6249 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
6251 * Makefile.in (class.o, decl2.o): Adjust dependencies.
6252 * class.c: Include tree-dump.h.
6253 * decl2.c: Include tree-dump.h.
6255 2005-07-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
6257 * dump.c: Use dump_string_field.
6259 2005-07-03 Joseph S. Myers <joseph@codesourcery.com>
6261 * cp-tree.h (GCC_DIAG_STYLE): #undef before defining. Change
6262 minimum GCC version for format checking to 4.1.
6264 2005-07-02 Kazu Hirata <kazu@codesourcery.com>
6266 * Make-lang.in (cc1plus-checksum.c): Use
6267 build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
6269 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
6271 * name-lookup.c, parser.c: Use %q, %< and %> to quote in
6274 2005-07-02 Zack Weinberg <zack@codesourcery.com>
6275 Joseph S. Myers <joseph@codesourcery.com>
6277 * error.c (location_of): Add comment.
6278 (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
6279 * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
6280 * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
6281 name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
6282 typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
6283 or cp_pedwarn_at. Mark up some diagnostic strings with N_.
6285 2005-06-30 Daniel Berlin <dberlin@dberlin.org>
6287 * decl.c (require_complete_types_for_parms): Call relayout_decl
6288 instead of layout_decl.
6290 2005-06-30 Zack Weinberg <zack@codesourcery.com>
6291 Jakub Jelinek <jakub@redhat.com>
6293 * cp-lang.c: No need to include cxx-pretty-print.h.
6294 * error.c (cp_printer): Update signature. No need to process
6296 (print_instantiation_partial_context): Output last newline
6297 with pp_base_newline.
6298 * Make-lang.in: Update dependencies.
6300 2005-06-30 Steven Bosscher <stevenb@suse.de>
6302 * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
6303 DECL_THREAD_LOCAL_P.
6304 (cp_finish_decl): Likewise.
6305 (grokvardecl): Set the default DECL_TLS_MODEL here.
6307 2005-06-28 Joseph S. Myers <joseph@codesourcery.com>
6309 * cvt.c (ocp_convert): Use invalid_conversion hook.
6310 * typeck.c (build_binary_op): Use invalid_binary_op hook.
6311 (build_unary_op): Use invalid_unary_op hook.
6313 2005-06-28 Paul Brook <paul@codesourcery.com>
6315 * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
6316 * except.c: Include target.h.
6317 (init_exception_processing): Initialize unwind_resume_libfunc.
6318 * doc/tm.texi: Document TARGET_ASM_TTYPE
6320 2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6322 * call.c (build_over_call): Pass in named argument list to
6323 `check_function_arguments'.
6324 * typeck.c (build_function_call): Likewise.
6326 2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6328 * cp-tree.h (lang_check_failed): Add noreturn attribute.
6330 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
6332 * all files: Update FSF address in copyright headers.
6334 2005-06-23 Jason Merrill <jason@redhat.com>
6337 * semantics.c (simplify_aggr_init_expr): Use
6338 CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6340 2005-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6342 * pt.c (register_specialization): Remove superfluous assertion.
6344 2005-06-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6346 * call.c (convert_like_real): Add format attribute.
6347 * typeck.c (check_for_casting_away_constness,
6348 build_static_cast_1): Likewise.
6349 * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
6352 2005-06-17 Geoffrey Keating <geoffk@apple.com>
6355 * pt.c (type_unification_real): Apply template type deduction even
6356 to procedure parameters that are not dependent on a template
6359 2005-06-16 Nathan Sidwell <nathan@codesourcery.com>
6361 * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
6363 (create_pseudo_type_info): First parameter is an int.
6365 2005-06-15 Nathan Sidwell <nathan@codesourcery.com>
6368 * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
6371 * Make-lang.in: Reformat some long lines.
6372 (gt-cp-rtti.h): New target.
6373 (cp/rtti.o): Add dependency.
6374 * config-lang.in (gtfiles): Add cp/rtti.c.
6375 * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
6376 CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
6377 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
6378 CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
6379 CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
6380 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
6381 ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
6382 class_desc_type_node, si_class_desc_type_node,
6383 vmi_class_desc_type_node, ptm_desc_type_node,
6384 base_desc_type_node): Remove.
6385 * decl.c: Adjust documentation of global trees.
6386 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
6387 TINFO_REAL_NAME): Remove.
6388 (struct tinfo_s): New.
6389 (enum tinfo_kind): New.
6391 (get_tinfo_decl): Adjust use of tinfo descriptor.
6392 (tinfo_base_init, generic_initializer, ptr_initializer,
6393 ptm_initializer, class_initializer): Likewise.
6394 (get_pseudo_ti_init): Take descriptor index. Adjust.
6395 (create_pseudo_type_info): Likewise.
6396 (get_pseudo_ti_desc): Return descriptor index. Adjust.
6397 (create_tinfo_types): Adjust use of create_pseudo_type_info.
6398 (emit_tinfo_decl): Adjust use of tinfo descriptor.
6400 2005-06-14 Roger Sayle <roger@eyesopen.com>
6402 * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
6404 2005-06-13 Geoffrey Keating <geoffk@apple.com>
6406 * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
6407 (rule for installing g++.1 manpage): Does depend on installdirs.
6409 2005-06-13 Nathan Sidwell <nathan@codesourcery.com>
6412 * decl.c (cp_finish_decl): Clear runtime runtime initialization if
6413 in-class decl's initializer is bad.
6416 * parser.c (struct cp_parser): Document that scope could be
6418 (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
6420 (cp_parser_nested_name_specifier): Return NULL_TREE on error.
6421 (cp_parser_postfix_expression): Deal with null or error_mark
6423 (cp_parser_elaborated_type_specifier): Adjust
6424 cp_parser_nested_name_specifier call.
6426 * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
6428 2005-06-12 Roger Sayle <roger@eyesopen.com>
6431 * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
6432 Treat CONVERT_EXPR identically to NOP_EXPR.
6434 2005-06-10 Aldy Hernandez <aldyh@redhat.com>
6437 * cvt.c (build_expr_type_conversion): Same.
6438 * typeck.c (build_binary_op): Handle vectors.
6439 (common_type): Same.
6440 (type_after_usual_arithmetic_conversions): Same.
6442 2005-06-08 Nathan Sidwell <nathan@codesourcery.com>
6445 * cp-tree.def (USING_DECL): Update documentation.
6446 * cp-tree.h (DECL_DEPENDENT_P): New.
6447 (USING_DECL_DECLS, USING_DECL_SCOPE): New.
6448 * class.c (handle_using_decl): Move most of the processing to ...
6449 * name-lookup.c (do_class_using_decl): ... here. Make stricter.
6450 (push_using_decl): Use USING_DECL_SCOPE.
6451 (cp_emit_debug_info_for_using): Make extern.
6452 * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
6453 * name-lookup.h (cp_emit_debug_info_for_using): Declare.
6454 * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
6456 (tsubst_expr): Use USING_DECL_SCOPE.
6457 * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
6458 * semantics.c (finish_member_declaration): Likewise.
6460 2005-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6463 * pt.c (tsubst): Reject pointer-to-member of type void.
6466 * parser.c (cp_parser_label_declaration): Deal with invalid/missing
6469 2005-06-07 Nathan Sidwell <nathan@codesourcery.com>
6471 * cp-tree.def (DEFAULT_ARG): Adjust documentation.
6472 * cp-tree.h (DEFARG_INSTANTIATIONS): New.
6473 (struct tree_default_arg): Add instantiations member.
6474 * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
6476 * pt.c (tsubst_arg_types): Likewise.
6478 * parser.c (cp_parser_late_parsing_default_args): Fix overeager
6479 assert in previous patch.
6481 2005-06-06 Jakub Jelinek <jakub@redhat.com>
6483 * error.c (locate_error): Use gmsgid instead of msgid for argument
6485 (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
6487 2005-06-06 Nathan Sidwell <nathan@codesourcery.com>
6490 * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
6491 * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
6492 argument to any early instantiations.
6493 * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
6496 * cp-tree.h (add_method): Add using_decl parameter.
6497 * class.c (add_method): Add using_decl parameter. Adjust error
6499 (handle_using_decl): Pass the using decl to add_method.
6500 (clone_function_decl): Adjust add_member calls.
6501 * decl2.c (check_classfn): Likewise.
6502 * method.c (lazily_declare_fn): Likewise.
6503 * semantics.c (finish_member_declaration): Likewise.
6505 * method.c (synthesize_method): Use inform, not warning.
6507 2005-06-06 Hans-Peter Nilsson <hp@axis.se>
6509 * config-lang.in (target_libs): Remove target-gperf.
6511 2005-06-05 Mark Mitchell <mark@codesourcery.com>
6514 * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
6515 * parser.c (cp_parser_postfix_expression): Allow non-constant
6516 expressions as arguments to __builtin_constant_p.
6517 * tree.c (builtin_valid_in_constant_expr_p): Use
6518 DECL_IS_BUILTIN_CONSTANT_P.
6520 2005-06-03 Mark Mitchell <mark@codesourcery.com>
6523 * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
6524 the pointed-to type for a pointer-to-member.
6527 * cp-tree.h (grok_op_properties): Remove friendp parameter.
6528 * decl.c (grokfndecl): Adjust call.
6529 (grok_op_properties): Determine the class of which the function is
6530 a member by looking at its DECL_CONTEXT, not current_class_type.
6531 * pt.c (tsubst_decl): Adjust call to grok_op_properties.
6533 2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
6535 * method.c (synthesize_method): Add addtional arg to warning call.
6538 * Make-lang.in (method.o): Add diagnostic.h
6539 * decl.c (start_preparsed_function): Use decl's location for file
6541 * decl2.c (cp_finish_file): Set input_location before synthesizing
6543 (mark_used): When deferring a synthesized function, save current
6544 location. Do not set function's location when actually
6546 * method.c: #include diagnostic.h.
6547 (synthesize_method): Set the functions source location. Show
6548 needed location if errors are emitted.
6550 * decl.c (start_decl): Simplify specialization handling. Remove
6551 unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
6552 * mangle.c (discriminator_for_local_entity): Use VEC_index.
6555 * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
6558 * name-lookup.c (pushtag): Push local class even in a template.
6560 2005-05-31 Nathan Sidwell <nathan@codesourcery.com>
6563 * init.c (integral_constant_value): Check the type of the
6564 initializer, not the decl.
6566 2005-05-30 Mark Mitchell <mark@codesourcery.com>
6569 * name-lookup.c (do_nonmember_using_decl): Ignore builtin
6570 functions, even when the used name is not a function.
6572 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
6574 * operators.def, optimize.c: Update copyright.
6576 2005-05-28 Mark Mitchell <mark@codesourcery.com>
6579 * call.c (standard_conversion): Permit conversions to complex
6580 types if conversion to the corresponding scalar type would be
6584 * method.c (implicitly_declare_fn): Clear processing_template_decl
6585 when generating implicit declaration.
6587 2005-05-27 Mark Mitchell <mark@codesourcery.com>
6590 * typeck.c (get_member_function_from_ptrfunc): Do not attempt
6591 conversions to base classes of incomplete types.
6593 2005-05-27 Ian Lance Taylor <ian@airs.com>
6595 * semantics.c (add_stmt): Add C++ frontend specific version.
6596 * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
6597 (stmts_are_full_exprs_p): Declare.
6599 2005-05-27 Roger Sayle <roger@eyesopen.com>
6600 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6602 * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
6603 * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
6605 (cp_parser_unary_expression): Likewise.
6606 * typeck.c (build_unary_op): Likewise.
6607 * call.c (add_builtin_candidate, build_new_op): Likewise.
6608 * error.c (dump_expr): Likewise.
6609 * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
6610 * decl.c (ambi_op_p, grok_op_properties): Likewise.
6611 * dump.c (dump_op): Likewise.
6612 * lex.c (init_operators): Likewise.
6613 * operators.def ("+"): Likewise.
6614 * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
6615 conversion, if the result and argument types differ.
6616 * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
6617 like a NOP_EXPR when !processing_template_decl.
6619 * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
6620 (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
6622 2005-05-27 Nathan Sidwell <nathan@codesourcery.com>
6625 * typeck.c (get_delta_difference): Cope with incomplete but equal
6626 classes. Reorder if.
6629 * parser.c (cp_parser_late_parsing_for_member): Disable access
6630 checking for template functions.
6632 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6635 * pt.c (redeclare_class_template): Change error message according
6636 to coding conventions.
6638 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6640 * call.c (build_op_delete_call): Fix quoting in error message.
6642 2005-05-25 Richard Henderson <rth@redhat.com>
6645 * cp-tree.h (make_alias_for): Declare.
6646 * decl2.c (build_java_method_aliases): New.
6647 (cp_finish_file): Call it.
6648 * method.c (make_alias_for): Split out from ...
6649 (make_alias_for_thunk): ... here.
6651 2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6654 * semantics.c (finish_id_expression): Fix quoting in error message.
6656 2005-05-25 DJ Delorie <dj@redhat.com>
6658 * decl.c (duplicate_decls): Move warning control from if() to
6660 * name-lookup.c (parse_using_directive): Likewise.
6661 * parser.c (cp_parser_elaborated_type_specifier): Likewise.
6662 (cp_parser_init_declarator): Likewise.
6663 * tree.c (handle_com_interface_attribute): Likewise.
6665 2005-05-24 Ziemowit Laski <zlaski@apple.com>
6667 * class.c (layout_class_type): Do not issue C++ ABI warnings
6669 * decl.c (objc_mark_locals_volatile): Streamline by calling
6670 objc_volatilize_decl().
6671 * parser.c (cp_parser_objc_message_expression): Allow simple
6672 type specifiers (instead of merely type names) as message
6674 * pt.c (template_args_equal): Do not call objc_comptypes().
6675 * typeck.c (composite_pointer_type): If both pointers are
6676 ObjC-esque, arbitrarily choose the first; do not call
6678 (comptypes): Do not call objc_comptypes().
6679 (convert_for_assignment): Call objc_compare_types().
6680 (comp_ptr_ttypes_real): Call objc_type_quals_match() before
6681 concluding that types do not match.
6683 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
6686 * optimize.c (update_cloned_parm): Copy the TYPE also from the
6689 2005-05-19 Jakub Jelinek <jakub@redhat.com>
6692 * decl.c (grokdeclarator): Fix "storage class specified for"
6695 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
6697 * parser.c: Fix comment typos.
6699 2005-05-18 Geoffrey Keating <geoffk@apple.com>
6701 * Make-lang.in (cc1plus-dummy): New.
6702 (cc1plus-checksum.c): New.
6703 (cc1plus-checksum.o): New.
6704 (cc1plus): Add cc1plus-checksum.o.
6706 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
6709 * decl2.c (determine_visibility): Don't set visibility to
6710 hidden if it has been set explicitly by user.
6712 2005-05-17 Ziemowit Laski <zlaski@apple.com>
6713 Mike Stump <mrs@apple.com>
6715 Yet more Objective-C++...
6717 * cp-objcp-common.h (cxx_get_alias_set): Move from
6719 (cxx_warn_unused_global_decl): Likewise.
6720 (cp_expr_size): Likewise.
6721 (cp_tree_size): Likewise.
6722 (cp_var_mod_type_p): Likewise.
6723 (cxx_initialize_diagnostics): Likewise.
6724 (cxx_types_compatible_p): Likewise.
6725 * cp-tree.h: to here.
6727 * lex.c (D_OBJC): Add.
6728 (init_reswords): Add.
6729 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
6730 * parser.c: Add c-common.h include.
6731 * pt.c: Add c-common.h and cp-objcp-common.h includes.
6732 (template_args_equal): Use objc_comptypes as well.
6733 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
6734 * semantics.c (do_poplevel): Remove static.
6736 * decl.c (objc_mark_locals_volatile): Don't change decls that are
6738 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
6739 Objective C++ early enough.
6740 * lex.c (struct resword reswords): Add Objective-C++ support.
6741 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
6742 (cp_parser_objc_message_receiver): Add.
6743 (cp_parser_objc_message_args): Likewise.
6744 (cp_parser_objc_message_expression): Likewise.
6745 (cp_parser_objc_encode_expression): Likewise.
6746 (cp_parser_objc_defs_expression): Likewise.
6747 (cp_parser_objc_protocol_expression): Likewise.
6748 (cp_parser_objc_selector_expression): Likewise.
6749 (cp_parser_objc_expression): Likewise.
6750 (cp_parser_objc_visibility_spec): Likewise.
6751 (cp_parser_objc_method_type): Likewise.
6752 (cp_parser_objc_protocol_qualifiers): Likewise.
6753 (cp_parser_objc_typename): Likewise.
6754 (cp_parser_objc_selector_p): Likewise.
6755 (cp_parser_objc_selector): Likewise.
6756 (cp_parser_objc_method_keyword_params): Likewise.
6757 (cp_parser_objc_method_tail_params_opt): Likewise.
6758 (cp_parser_objc_interstitial_code): Likewise.
6759 (cp_parser_objc_method_signature): Likewise.
6760 (cp_parser_objc_method_prototype_list): Likewise.
6761 (cp_parser_objc_method_definition_list): Likewise.
6762 (cp_parser_objc_class_ivars): Likewise.
6763 (cp_parser_objc_identifier_list): Likewise.
6764 (cp_parser_objc_alias_declaration): Likewise.
6765 (cp_parser_objc_class_declaration): Likewise.
6766 (cp_parser_objc_protocol_declaration): Likewise.
6767 (cp_parser_objc_protocol_refs_opt): Likewise.
6768 (cp_parser_objc_superclass_or_category): Likewise.
6769 (cp_parser_objc_class_interface): Likewise.
6770 (cp_parser_objc_class_implementation): Likewise.
6771 (cp_parser_objc_end_implementation): Likewise.
6772 (cp_parser_objc_declaration): Likewise.
6773 (cp_parser_objc_try_catch_finally_statement): Likewise.
6774 (cp_parser_objc_synchronized_statement): Likewise.
6775 (cp_parser_objc_throw_statement): Likewise.
6776 (cp_parser_objc_statement): Likewise.
6777 (cp_parser_primary_expression): Add Objective-C++.
6778 (cp_parser_statement): Likewise.
6779 (cp_parser_declaration): Likewise.
6780 (cp_parser_simple_type_specifier): Likewise.
6781 (cp_parser_type_name): Likewise.
6782 (cp_parser_parameter_declaration_list): Likewise.
6783 (cp_parser_member_declaration) Likewise.
6784 * tree.c: Include debug.h.
6785 * typeck.c (composite_pointer_type): Add Objective-C++ support.
6786 (finish_class_member_access_expr): Likewise.
6787 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
6788 (build_modify_expr): Allow objc to generate write barriers.
6790 * Make-lang.in (cp/tree.o): Add debug.h.
6791 * tree.c (lvalue_p_1, case CONST_DECL): Add.
6793 2005-05-18 Jan Hubicka <jh@suse.cz>
6795 * method.c: Include tree-pass.h
6796 (use_thunk): Lower body before expanding.
6798 2005-05-17 Jakub Jelinek <jakub@redhat.com>
6801 * decl.c (maybe_deduce_size_from_array_init): Call
6802 cp_apply_type_quals_to_decl after completing array type.
6804 2005-05-16 Richard Henderson <rth@redhat.com>
6806 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
6807 (build_library_fn): ... here.
6809 2005-05-12 Ian Lance Taylor <ian@airs.com>
6811 * cp-tree.h (cp_stmt_codes): Don't define.
6812 (statement_code_p): Declare.
6813 (STATEMENT_CODE_P): Define.
6814 * lex.c (statement_code_p): Define.
6815 (cxx_init): Use actual codes in stmt_codes initializer, not
6816 cp_stmt_codes macro. Initialize statement_code_p directly, rather
6817 than using INIT_STATEMENT_CODES.
6819 2005-05-09 Mark Mitchell <mark@codesourcery.com>
6821 * typeck.c (build_unary_op): Do not resort to address arithmetic
6822 when taking the address of a COMPONENT_REF.
6824 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
6826 * class.c (vtbl_init_data_s): Change the type of fns to
6828 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
6829 Use VEC instead of VARRAY.
6831 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
6833 * mangle.c: Remove a reference to the MIPS -mint64 option.
6835 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
6837 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
6839 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
6840 * name-lookup.h (cp_binding_level): Change the type of
6841 static_decls to VEC(tree,gc)*.
6843 * mangle.c (globals): Change the type of substitutions to
6845 (dump_substitution_candidates, add_substitution,
6846 find_substitution, finish_mangling, init_mangle): Use VEC
6849 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
6851 * decl2.c (spew_debug): Remove.
6853 * decl2.c (ssdf_decls, start_static_storage_duration_function,
6854 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
6856 * decl2.c (pending_statics, note_vague_linkage_var,
6857 cp_finish_file): Use VEC instead of VARRAY.
6858 (pending_statics_used): Remove.
6860 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
6862 * decl2.c (deferred_fns, note_vague_linkage_fn,
6863 cp_finish_file): Use VEC instead of VARRAY.
6865 2005-05-05 Mark Mitchell <mark@codesourcery.com>
6868 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
6870 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
6872 * pt.c: Fix a comment typo.
6874 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
6876 * cp-tree.h (language_function): Change the type of
6877 x_local_names to VEC.
6878 * decl.c (push_local_name): Adjust uses of local_names.
6880 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
6882 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
6884 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
6886 * class.c (local_classes, init_class_processing): Use VEC
6888 * cp-tree.h (local_classes): Likewise.
6889 * mangle.c (discriminator_for_local_entity): Likewise.
6890 * name-lookup.c (pushtag): Likewise.
6892 * class.c (current_lang_depth, push_lang_context,
6893 pop_lang_context): Use VEC instead of VARRAY.
6894 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
6896 * name-lookup.c (push_to_top_level): Use VEC instead of
6899 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
6901 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
6902 for BUILT_IN_MD built-ins.
6904 2005-05-02 Michael Matz <matz@suse.de>
6907 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
6909 (null_node): Remove.
6910 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
6912 2005-04-25 Ian Lance Taylor <ian@airs.com>
6914 * cp-tree.def: Add EXPR_STMT.
6915 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
6916 (EXPR_STMT_EXPR): Define.
6917 * cp-gimplify.c: Include "flags.h".
6918 (gimplify_expr_stmt): New static function.
6919 (cp_gimplify_expr): Handle EXPR_STMT.
6920 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
6921 rather than pp_expression.
6922 (pp_cxx_statement): Handle EXPR_STMT.
6923 * dump.c (cp_dump_tree): Handle EXPR_STMT.
6924 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
6927 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
6930 * rtti.c (ifnonnull): Cast the zero comparison operand
6931 to the correct type.
6933 2005-04-24 Jakub Jelinek <jakub@redhat.com>
6936 * class.c: Include cgraph.h.
6937 (cp_fold_obj_type_ref): Set node->local.vtable_method.
6938 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
6940 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
6942 * mangle.c (write_builtin_type): Handle integer types which are
6943 not one of the shared integer type nodes and emit a "vendor
6944 extended builtin type" with an encoding in the form of "u5int96".
6946 2005-04-24 Ian Lance Taylor <ian@airs.com>
6948 * cp-tree.def (USING_STMT): Change class to tcc_statement.
6949 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
6950 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
6951 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
6953 2005-04-23 DJ Delorie <dj@redhat.com>
6955 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
6956 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
6957 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
6960 2005-04-22 Per Bothner <per@bothner.com>
6962 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
6963 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
6965 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
6968 * name-lookup.c (push_overloaded_decl): Do not overload with
6969 non-duplicate anticipated built-in.
6971 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
6973 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
6974 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
6976 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
6978 * cp-tree.h: Adjust for new VEC API.
6979 Define VEC(tree_pair_s,gc).
6980 (struct save_scope): Adjust.
6981 (struct lang_type_class): Adjust.
6982 (unemitted_tinfo_decls): Adjust.
6983 * class.c (add_method, resort_type_method_vec,
6984 finish_struct_methods, struct find_final_overrider_data,
6985 dfs_find_final_overrider_pre, find_final_overrider,
6986 get_vcall_index, warn_hidden, walk_subobject_offsets,
6987 check_methods, fixup_inline_methods, end_of_class,
6988 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
6989 add_vcall_offset): Adjust.
6990 * decl.c (xref_basetypes, finish_method): Adjust.
6991 * decl2.c (check_classfn): Adjust.
6992 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
6993 * method.c (do_build_copy_constructor): Adjust.
6994 * name-lookup.c (new_class_binding, store_binding,
6995 store_bindings, store_class_bindings): Adjust.
6996 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
6997 VEC(cp_class_binding,gc).
6998 (struct cp_binding_level): Adjust.
6999 * parser.c: Define VEC(cp_token_position,heap).
7000 (struct cp_lexer): Adjust.
7001 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
7002 cp_lexer_save_tokens): Adjust.
7003 * pt.c (retrieve_specialization,
7004 check_explicit_specialization): Adjust.
7005 * rtti.c (unemitted_tinfo_decls): Adjust.
7006 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
7007 get_pseudo_ti_desc): Adjust.
7008 * search.c (dfs_access_in_type, lookup_conversion_operator,
7009 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
7010 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
7011 * semantics.c: Define VEC(deferred_access,gc).
7012 (push_deferring_access_checks): Adjust.
7013 * typeck2.c (abstract_virtuals_error): Adjust.
7015 2005-04-20 Ian Lance Taylor <ian@airs.com>
7017 * cp-tree.def: Add STMT_EXPR.
7018 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
7019 (STMT_EXPR_STMT): Define.
7020 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
7022 (pp_cxx_expression): Likewise.
7023 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
7024 * dump.c (cp_dump_tree): Handle STMT_EXPR.
7026 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
7028 * decl.c (expand_static_init): Call build2 and build3 instead
7031 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
7033 2005-04-17 Ian Lance Taylor <ian@airs.com>
7035 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
7036 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
7038 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
7039 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
7041 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
7042 c_sizeof_or_alignof_type for change in parameter type.
7044 2005-04-16 Mark Mitchell <mark@codesourcery.com>
7047 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
7048 which sizeof/alignof is dependent, rather than just whether we are
7049 processing_template_decl.
7051 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
7053 * cp-tree.h (LOOKUP_GLOBAL): Remove.
7054 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
7055 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
7056 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
7059 2005-04-15 Richard Henderson <rth@redhat.com>
7062 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
7064 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
7066 * cp-tree.h (lang_type_class): Remove redefined. Move
7067 java_interface into where redefined was. Increment the width
7069 (TYPE_REDEFINED): Remove.
7071 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
7073 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
7074 CLASSTYPE_TEMPLATE_LEVEL): Remove.
7076 2005-04-11 Mark Mitchell <mark@codesourcery.com>
7078 * decl2.c (determine_visibility): Don't use export_class_data.
7079 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
7080 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
7082 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
7084 * cp-tree.h (cxx_alignof): Remove.
7086 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
7088 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
7089 CONV_STATIC_CAST): Remove.
7091 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
7093 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
7095 * cp-tree.h (cp_deprecated): Remove.
7097 2005-04-08 Ian Lance Taylor <ian@airs.com>
7099 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
7100 CONTINUE_STMT, SWITCH_STMT.
7101 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
7102 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
7103 (WHILE_COND, WHILE_BODY): Define.
7104 (DO_COND, DO_BODY): Define.
7105 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
7106 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
7107 * cp-gimplify.c (enum bc_t): Define.
7108 (struct cp_gimplify_ctx, ctxp): Define.
7109 (push_context, pop_context): New static functions.
7110 (begin_bc_block, finish_bc_block): New static functions.
7111 (build_bc_goto): New static function.
7112 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
7113 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
7114 (gimplify_switch_stmt): Likewise.
7115 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
7116 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
7117 (cp_genericize): Call push_context and pop_context.
7118 * semantics.c (finish_break_stmt): Just call build_stmt
7119 (BREAK_STMT) rather than build_break_stmt.
7120 (finish_continue_stmt): Corresponding change.
7121 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
7123 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
7124 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
7125 * dump.c (cp_dump_tree): Likewise.
7127 2005-04-08 Mark Mitchell <mark@codesourcery.com>
7130 * parser.c (cp_parser_type_specifier_seq): Add is_condition
7132 (cp_parser_new_type_id): Pass it.
7133 (cp_parser_condition): Likewise.
7134 (cp_parser_conversion_type_id): Likewise.
7135 (cp_parser_type_id): Likewise.
7136 (cp_parser_type_specifier_seq): In a condition, do not allow
7137 invalid type-specifier combinations.
7138 (cp_parser_exception_declaration): Adjust call to
7139 cp_parser_type_specifier_seq.
7141 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
7142 * cp-tree.h (struct tinst_level): Add in_system_header_p.
7143 (TINST_IN_SYSTEM_HEADER_P): New macro.
7144 (make_tinst_level): Remove.
7145 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
7146 the instantiated class.
7147 (push_tinst_level): Do not use make_tinst_level. Set
7148 TINST_IN_SYSTEM_HEADER_P.
7149 (pop_tinst_level): Likewise.
7150 (instantiate_class_template): Set in_system_header.
7151 (instantiate_pending_templates): Likewise.
7152 * tree.c (make_tinst_level): Remove.
7154 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
7156 * decl.c (start_decl): Apply pending #pragma weak regardless of
7159 2005-04-06 Mark Mitchell <mark@codesourcery.com>
7162 * pt.c (regenerate_decl_from_template): Copy attributes for
7163 parameters from the pattern to the instantiation.
7165 2005-04-05 Mark Mitchell <mark@codesourcery.com>
7168 * cp-tree.def (OFFSET_REF): Correct comments.
7169 * init.c (build_offset_ref): Remove misleading comment.
7170 * typeck.c (build_unary_op): Handle pointer-to-member creation
7171 here, rather than ...
7172 (unary_complex_lvalue): ... here.
7174 2005-04-06 Jason Merrill <jason@redhat.com>
7177 * tree.c (stabilize_init): Don't bother trying to stabilize
7178 something with no side-effects.
7180 2005-04-05 Mark Mitchell <mark@codesourcery.com>
7183 * decl.c (grokdeclarator): Correct attribute handling.
7185 2005-04-05 Mark Mitchell <mark@codesourcery.com>
7188 * decl2.c (import_export_decl): Use non-COMDAT external linkage
7189 for virtual tables, typeinfo, etc. that will be emitted in only
7190 one translation unit on systems without weak symbols.
7192 2005-04-04 Mark Mitchell <mark@codesourcery.com>
7195 * parser.c (cp_parser_template_name): Fix thinko.
7197 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
7200 * method.c (use_thunk): Protect covariant pointer return
7201 adjustments from NULL pointers.
7203 2005-04-04 Jan Hubicka <jh@suse.cz>
7205 * decl2.c (finish_objects): Revert my previous patch.
7206 (cp_finish_file): Likewise.
7208 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
7210 * pt.c: Fix comment typos.
7212 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
7215 * pt.c (more_specialized_fn): Member functions are unordered wrt
7216 non-members. Conversion operators are unordered wrt other
7219 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
7221 * call.c (add_template_candidates_real): Remove length parameter
7222 from fn_type_unification call.
7223 * class.c (resolve_address_of_overloaded_function): Likewise
7224 * cp-tree.h (fn_type_unification): Remove length parameter.
7225 * pt.c (get_bindings_overload): Remove.
7226 (get_bindings_real): Rename to ...
7227 (get_bindings): ... here. Remove length and strict
7228 parameters. Change return type flag to boolean. Remove original
7229 forwarding function.
7230 (determine_specialization): Adjust get_bindings call.
7231 (fn_type_unification): Remove length parameter. Adjust.
7232 (type_unification_real): Remove length parameter. Adjust.
7233 (resolve_overloaded_unification): Adjust get_bindings call.
7234 (try_one_overload): Simplify confusing cascaded if control flow.
7235 (unify): Remove length paramter from type_unification_real call.
7236 (most_specialized_instantiation): Adjust get_bindings calls.
7237 (most_specialized): Likewise.
7239 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
7241 PR c++/19203, implement DR 214
7242 * call.c (joust): Use more_specialized_fn.
7243 * cp-tree.h (DEDUCE_ORDER): Remove.
7244 (more_specialized): Replace with ...
7245 (more_specialized_fn): ... this.
7246 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
7248 (type_unification_real): Remove DEDUCE_ORDER case.
7249 (more_specialized): Replace with ...
7250 (more_specialized_fn): ... this. Implement DR 214.
7251 (most_specialized_instantiation): Use get_bindings_real directly.
7253 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
7256 * call.c (build_new_op): Remove check for -Wsynth.
7258 2005-03-31 Jan Hubicka <jh@suse.cz>
7260 * decl2.c (finish_objects): Mark ctor as needed.
7261 (cp_finish_file): Output variables only in nonunit-at-a-time.
7263 2005-03-29 Richard Henderson <rth@redhat.com>
7266 * decl.c (cp_complete_array_type): Rename from complete_array_type.
7267 Use the new complete_array_type in c-common.c. Update all callers.
7268 * cp-tree.h (cp_complete_array_type): Update to match.
7270 2005-03-24 Geoffrey Keating <geoffk@apple.com>
7272 * typeck.c (build_static_cast_1): Allow scalar_cast between
7273 any integral, floating, or enumeration type.
7275 2005-03-24 Steven Bosscher <stevenb@suse.de>
7277 * typeck.c (comptypes): First determine if the types are compatible
7278 from a target-independent point of view. Check target attributes
7281 * class.c (build_base_path):
7282 (build_vbase_offset_vtbl_entries):
7283 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
7284 * error.c (dump_expr): Likewise.
7285 * init.c (build_zero_init, expand_cleanup_for_base,
7286 build_vec_delete_1): Likewise.
7287 * mangle.c (write_integer_cst): Likewise.
7288 * method.c (thunk_adjust): Likewise.
7289 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
7290 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
7291 * typeck.c (build_ptrmemfunc_access_expr,
7292 (get_member_function_from_ptrfunc): Likewise.
7294 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
7296 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
7298 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
7300 * cp-tree.h (perform_integral_promotions): Remove.
7301 (default_conversion): Add.
7303 2005-03-22 Mark Mitchell <mark@codesourcery.com>
7305 * parser.c (cp_parser_warn_min_max): New function.
7306 (cp_parser_binary_expression): Use it.
7307 (cp_parser_assignment_operator_opt): Likewise.
7308 (cp_parser_operator): Likewise.
7310 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7313 * decl.c (start_preparsed_function): Robustify.
7315 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7318 * parser.c (cp_parser_class_head): Return NULL_TREE when
7319 encountering a redefinition.
7321 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
7325 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
7328 2005-03-21 Paolo Carlini <pcarlini@suse.de>
7332 * init.c (emit_mem_initializers): Don't crash on undefined
7335 2005-03-21 Paolo Carlini <pcarlini@suse.de>
7338 * semantics.c (finish_stmt_expr_expr): Return immediately
7339 if error_operand_p (expr).
7341 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
7343 * cp-tree.h (lvalue_or_else, lvalue_p): New.
7344 * typeck.c (lvalue_or_else): New. Call lvalue_error.
7346 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7349 * decl.c (decls_match): Compare context of VAR_DECL.
7351 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7354 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
7355 Check the return value of cp_parser_nested_name_specifier.
7357 2005-03-18 Dale Johannesen <dalej@apple.com>
7359 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
7361 2005-03-18 Paolo Carlini <pcarlini@suse.de>
7364 * parser.c (cp_parser_diagnose_invalid_type_name):
7365 Check TYPE_BINFO (current_class_type) before attempting
7366 to emit inform messages.
7368 2005-03-17 Paolo Carlini <pcarlini@suse.de>
7371 * cp-tree.h (grok_op_properties): Change return type to void.
7372 * decl.c (grok_op_properties): Return early - don't check the
7373 arity - in case of a static member or an operator that cannot
7374 be non-member; tidy a bit.
7376 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
7379 * pt.c (contains_dependent_cast_p): Remove.
7380 (fold_non_dependent_expr): Don't use it.
7381 (value_dependent_expression_p): Use a switch statement.
7382 reference_exprs can be dependent.
7384 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7388 * name-lookup.c (pushtag): Skip template parameter scope when
7389 scope is ts_global. Don't push tag into template parameter
7391 * pt.c (instantiate_class_template): Reorder friend class
7392 template substitution to handle non-dependent friend class
7393 that hasn't been previously declared.
7395 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7397 Friend class name lookup 5/n
7399 * cp-tree.h (pushtag): Adjust declaration.
7400 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
7402 (xref_tag): Adjust call to pushtag. Make hidden class visible.
7403 (start_enum): Adjust call to pushtag.
7404 * name-lookup.c (ambiguous_decl): Ignore hidden names.
7405 (qualify_lookup): Change return type to bool.
7406 (hidden_name_p): New function.
7407 (lookup_namespace_name, unqualified_namespace_lookup,
7408 lookup_name_real): Use it.
7409 (lookup_type_scope): Update comments.
7410 (maybe_process_template_type_declaration): Change parameter name
7411 from globalize to is_friend.
7412 (pushtag): Change globalize parameter of type int to tag_scope.
7413 Hide name if introduced by friend declaration.
7414 * name-lookup.h (hidden_name_p): Add declaration.
7415 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
7417 * pt.c (push_template_decl_real): Make hidden class template
7419 (lookup_template_class, instantiate_class_template): Adjust call
7421 * semantics.c (begin_class_definition): Likewise.
7422 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
7423 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
7426 2005-03-13 Mark Mitchell <mark@codesourcery.com>
7429 * pt.c (determine_specialization): Reject non-specializations.
7431 2005-03-11 Per Bothner <per@bothner.com>
7433 * cp-tree.h (struct cp_declarator): New id_loc field.
7434 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
7435 location using c_lex_with_flags, instead of input_location.
7436 (cp_parser_direct_declarator): Set declarator's id_loc from
7439 2005-03-10 Jakub Jelinek <jakub@redhat.com>
7441 PR c++/18384, c++/18327
7442 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
7443 and index. Convert max_index to size_type_node if it isn't
7444 host_integerp (, 1).
7446 2005-03-09 Mark Mitchell <mark@codesourcery.com>
7449 * pt.c (tsubst_decl): Apply array-to-pointer and
7450 function-to-pointer conversions to function arguments.
7451 (regenerate_decl_from_template): Likewise.
7453 2005-03-09 Paolo Carlini <pcarlini@suse.de>
7456 * decl.c (complete_array_type): In pedantic mode, return
7457 3 for an empty initializer list as the initializer for an
7458 array of unknown bound (8.5.1/4).
7459 (maybe_deduce_size_from_array_init): Fix final test to use
7462 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
7465 * pt.c (contains_dependent_cast_p): New.
7466 (fold_non_dependent_expr): Call it.
7468 2005-03-08 Mark Mitchell <mark@codesourcery.com>
7471 * cp-tree.h (target_type): Remove.
7472 * decl.c (layout_var_decl): Remove #if 0'd code.
7473 (cp_finish_decl): Remove dead code.
7474 * init.c (build_vec_init): When determining whether or not the
7475 element type has an asignment operator, look through all array
7477 * typeck.c (target_type): Remove.
7479 2005-03-07 Mark Mitchell <mark@codesourcery.com>
7481 * class.c (finish_struct_1): Do not warn about non-virtual
7482 destructors in Java classes.
7484 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7487 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
7488 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
7490 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
7491 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
7492 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
7495 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
7497 * name-lookup.c (push_overloaded_decl): Don't error if the new
7498 decl matches the old one.
7499 * decl.c (redeclaration_error_message): Likewise.
7501 2005-03-01 Per Bothner <per@bothner.com>
7503 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
7504 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
7506 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
7509 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
7512 * cp-tree.g (THUNK_TARGET): Expand comment.
7513 * method.c (use_thunk): Make sure we also use the target, if that
7516 2005-02-27 Jakub Jelinek <jakub@redhat.com>
7519 * decl.c (cxx_comdat_group): Put thunks for
7520 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
7521 comdat group as the thunk target.
7523 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7525 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
7526 parser.c: Fix comment typo(s).
7528 2005-02-24 Jakub Jelinek <jakub@redhat.com>
7531 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
7532 initializes a char/wchar_t array.
7534 2005-02-23 Mark Mitchell <mark@codesourcery.com>
7537 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
7538 with internal linkage.
7540 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
7542 * decl.c (grokvardecl): Don't exempt anonymous types from having
7543 linkage for variables that have linkage other than "C".
7545 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
7547 * cp-objcp-common.h, error.c: Update copyright.
7549 2005-02-22 Mark Mitchell <mark@codesourcery.com>
7552 * decl.c (start_decl_1): Don't clear TREE_READONLY.
7553 (cp_finish_decl): Likewise.
7554 (complete_vars): Call cp_apply_type_quals_to_decl.
7555 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
7556 cases where that's not valid.
7559 * init.c (integral_constant_value): Iterate if the value of a decl
7560 is itself a constant.
7563 * parser.c (cp_parser_class_head): Check for redefintions here.
7564 * semantics.c (begin_class_definition): Not here.
7567 * decl2.c (build_anon_union_vars): Add type parameter.
7568 (finish_anon_union): Pass it.
7571 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
7572 Handle STATEMENT_LIST.
7575 * parser.c (cp_parser_direct_declarator): Always complain about
7576 non-constant array bounds when in a function scope.
7577 * semantics.c (finish_id_expression): Do not mark dependent names
7580 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
7584 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
7585 * decl.c (grokdeclarator): Pedwarn about qualifying a function
7587 Add qualifiers when declaring a typedef of a function type.
7588 Member function pointers pick up the qualifiers of the typedef
7589 used to declare them.
7590 Don't complain about creating cv-qualified function types.
7591 Complain about qualified function typedefs that are used to
7592 declare non-static member functions or free functions.
7593 Use cp_apply_type_quals_to_decl.
7594 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
7595 (grokclassfn): Use cp_apply_type_quals_to_decl.
7596 * error.c (dump_type_suffix): Print qualifiers for function
7598 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
7599 (tsubst): When substituting a function type into a member
7600 pointer type, pass along the qualifiers.
7601 (unify): Unify member pointers to member function pointers.
7602 * tree.c (cp_build_qualified_type_real): Function types may be
7603 qualified. This includes restrict qualifiers.
7604 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
7605 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
7606 added to function types.
7608 2005-02-20 Zack Weinberg <zack@codesourcery.com>
7611 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
7612 c_common_to_target_charset. Delete bogus comment.
7614 2005-02-18 Richard Henderson <rth@redhat.com>
7617 * except.c (do_get_exception_ptr): New.
7618 (expand_start_catch_block): Use it.
7620 2005-02-19 Jakub Jelinek <jakub@redhat.com>
7622 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
7623 if type is not error_mark_node.
7625 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7628 * decl2.c (grokfield): Do not apply attributes to template parameters
7629 as they are ignored by tsubst anyway.
7631 2005-02-18 Jakub Jelinek <jakub@redhat.com>
7634 * decl.c (start_decl_1): Clear TREE_READONLY flag if
7635 its type has TYPE_NEEDS_CONSTRUCTING.
7636 (complete_vars): Likewise.
7638 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
7641 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
7642 template along with TYPE_SIZE.
7645 * semantics.c (perform_deferred_access_checks): Use
7646 get_deferred_access_checks to get the top of the stack.
7648 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
7651 * class.c (add_implicitly_declared_members, check_field_decl)
7652 (check_field_decls, check_bases): Remove arguments, tests and
7653 assignments of cant_have_default_ctor-related variables.
7655 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
7657 * decl2.c (mark_used): Set the source location of the used decl to
7658 the current input location here...
7659 * method.c (synthesize_method): ... not here. Set input_location
7660 from the decl instead.
7662 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
7665 * parser.c (cp_parser_late_parsing_for_member): Use
7666 current_function_decl as scope to push to and from.
7669 * pt.c (check_explicit_specialization): Make sure namespace
7670 binding lookup found an overloaded function.
7671 (lookup_template_function): Just assert FNS is an overloaded
7675 * decl.c (grokdeclarator): Check for error mark node in ptrmem
7678 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
7681 * decl.c (redeclaration_error_message): Report redefinition of
7682 pure virtual function.
7684 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
7687 * class.c (build_simple_base_path): Build the component_ref
7689 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
7690 rather than using lookup_base.
7691 * search.c (dfs_walk_once): Add non-recursive assert check.
7692 * typeck.c (build_class_member_access_expr): It is possible for
7693 the member type to be both const and volatile.
7695 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7699 * pt.c (maybe_check_template_type): Remove.
7700 * cp-tree.h (maybe_check_template_type): Remove prototype.
7701 * name-lookup.c (maybe_process_template_type_declaration): Don't
7702 use maybe_check_template_type.
7704 2005-02-11 Richard Henderson <rth@redhat.com>
7707 * pt.c (get_mostly_instantiated_function_type): Save and restore
7708 flag_access_control instead of push/pop_access_scope.
7710 2005-02-10 Mark Mitchell <mark@codesourcery.com>
7713 * decl.c (reshape_init): Issue warnings about missing braces.
7715 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
7717 * cp-tree.def, except.c, ptree.c: Update copyright.
7719 2005-02-09 Mark Mitchell <mark@codesourcery.com>
7722 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
7723 attempting name lookup.
7725 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
7728 * call.c (initialize_reference): Robustify.
7731 * decl.c (grokdeclarator): Check for invalid use of destructor
7735 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
7736 names with invalid types.
7739 * parser.c (cp_parser_direct_declarator): Allow type-dependent
7740 expressions as array bounds.
7743 * parser.c (cp_parser_attributes_list): Allow empty lists.
7745 2005-02-08 Mark Mitchell <mark@codesourcery.com>
7748 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
7749 (check_bases): Give warnings about a base class with a
7750 non-virtual destructor, even if it is implicit.
7751 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
7752 (maybe_warn_about_overly_private_class): Don't use
7753 TYPE_HAS_DESTRUCTOR.
7754 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
7755 (check_for_override): Give it external linkage.
7756 (add_implicitly_declared_members): Generate destructors lazily.
7757 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
7758 TYPE_HAS_DESTRUCTOR.
7759 (check_bases_and_members): Call check_methods before
7761 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
7762 TYPE_HAS_DESTRUCTOR.
7763 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
7764 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
7765 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
7766 (lang_type_class): Add lazy_destructor.
7767 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
7768 (CLASSTYPE_DESTRUCTORS): Robustify.
7769 (TYPE_HAS_DESTRUCTOR): Remove.
7770 (check_for_override): Declare.
7771 (build_vbase_delete): Remove.
7772 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
7774 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
7775 * except.c (dtor_nothrow): Lazily create destructors if necessary.
7776 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7777 * init.c (build_delete): Lazily create destructors, if necessary.
7778 (build_vbase_delete): Remove.
7779 * method.c (locate_dtor): Simplify.
7780 (implicitly_declare_fn): Add support for destructors.
7781 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
7783 * pt.c (check_explicit_specialization): Don't use
7784 TYPE_HAS_DESTRUCTOR.
7785 (instantiate_class_template): Likewise.
7786 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
7787 * rtti.c (emit_support_tinfos): Robustify.
7788 * search.c (lookup_fnfields_1): Lazily create destructors.
7789 * typeck.c (build_class_member_access_expr): Remove
7790 PSEUDO_DTOR_EXPR handling.
7791 (lookup_destructor): Likewise.
7793 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
7795 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
7798 2005-02-07 Mark Mitchell <mark@codesourcery.com>
7800 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
7801 on boolean variables.
7802 (cp_lexer_stop_debugging): Likewise.
7804 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7807 * parser.c (cp_parser_pure_specifier): Emit a specific error
7808 message with an invalid pure specifier.
7809 * decl2.c (grok_function_init): Remove.
7810 (grokfield): An initializer for a method is a always a pure
7813 2005-02-02 Matt Austern <austern@apple.com>
7816 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
7817 * parser.c (cp_parser_postfix_expression): Accept function call in
7818 constant expression if builtin_valid_in_constant_expr_p is true
7820 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
7821 * semantics.c (finish_id_expression): Accept function call in constant
7822 expression if builtin_valid_in_constant_expr_p is true for that
7824 * tree.c (builtin_valid_in_constant_expr_p): New.
7826 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7829 * pt.c (check_instantiated_args): Improve error message.
7830 Fix logic when to print its second part.
7832 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7834 * cp-tree.h (complete_type_or_else): Remove macro.
7835 (complete_type_or_diagnostic): Rename to complete_type_or_else
7836 and remove last argument.
7837 * typeck.c (complete_type_or_diagnostic): Rename to
7838 complete_type_or_else and remove last argument.
7840 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7842 * cp-tree.h (commonparms): Remove prototype.
7843 (convert_arguments): Likewise.
7844 (PFN_FROM_PTRMEMFUNC): Remove.
7845 * typeck.c (commonparms): Make static.
7846 (convert_arguments): Add prototype. Make static.
7847 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
7849 2005-01-31 Mark Mitchell <mark@codesourcery.com>
7851 * parser.c (cp_parser_primary_expression): Don't complain about
7852 floating-point literals in integral constant expressions when
7855 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
7857 * parser.c (cp_parser_template_id): Revert comment patch too.
7862 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
7863 Issue an error when creating the template id.
7864 * pt.c (fn_type_unification): Return early if the explicit
7865 template arg list is an error_mark_node.
7867 2005-01-31 Mark Mitchell <mark@codesourcery.com>
7869 * decl.c (build_enumerator): Do not issue duplicate error messages
7870 about invalid enumeration constants.
7871 * parser.c (cp_parser_non_integral_constant_expression): Always
7872 set parser->non_integral_constant_expression_p.
7873 (cp_parser_primary_expression): Add cast_p parameter. Issue
7874 errors about invalid uses of floating-point literals in
7876 (cp_parser_postfix_expression): Add cast_p parameter.
7877 (cp_parser_open_square_expression): Pass it.
7878 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
7879 (cp_parser_unary_expression): Likewise.
7880 (cp_parser_new_placement): Pass it.
7881 (cp_parser_direct_new_declarator): Likewise.
7882 (cp_parser_new_initializer): Likewise.
7883 (cp_parser_cast_expression): Add cast_p parameter.
7884 (cp_parser_binary_expression): Likewise.
7885 (cp_parser_question_colon_clause): Likewise.
7886 (cp_parser_assignment_expression): Likewise.
7887 (cp_parser_expression): Likewise.
7888 (cp_parser_constant_expression): If an integral constant
7889 expression is invalid, return error_mark_node.
7890 (cp_parser_expression_statement): Pass cast_p.
7891 (cp_parser_condition): Likewise.
7892 (cp_parser_iteration_statement): Likewise.
7893 (cp_parser_jump_statement): Likewise.
7894 (cp_parser_mem_initializer): Likewise.
7895 (cp_parser_template_argument): Likewise.
7896 (cp_parser_parameter_declaration): Likewise.
7897 (cp_parser_initializer): Likewise.
7898 (cp_parser_throw_expression): Likewise.
7899 (cp_parser_attribute_list): Likewise.
7900 (cp_parser_simple_cast_expression): Likewise.
7901 (cp_parser_functional_cast): Likewise.
7902 (cp_parser_late_parsing_default_args): Likewise.
7903 (cp_parser_sizeof_operand): Save/restore
7904 non_integral_constant_expression_p.
7906 2005-01-31 Mike Stump <mrs@apple.com>
7908 * parser.c (cp_lexer_new_main): Get the first token, first, before
7911 2005-01-31 Mark Mitchell <mark@codesourcery.com>
7913 * decl.c (start_decl): Add missing parentheses.
7915 2005-01-30 Mark Mitchell <mark@codesourcery.com>
7918 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
7919 * decl.c (duplicate_decls): Do not discard
7920 DECL_IMPLICIT_INSTANTIATION when merging declarations.
7921 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
7922 variables that do not have DECL_USE_TEMPLATE.
7925 * decl.c (grokdeclarator): Refactor code so that qualified names
7926 are never allowed as the declarator in a typedef.
7929 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
7930 builtin declarations.
7933 * call.c (convert_like_real): Inline call to
7934 dubious_conversion_warnings here.
7935 * cp-tree.h (dubious_conversion_warnings): Remove.
7936 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
7937 setting TREE_NEGATED_INT.
7938 * typeck.c (dubious_conversion_warnings): Remove.
7941 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
7944 2005-01-28 Mark Mitchell <mark@codesourcery.com>
7947 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
7951 * pt.c (redeclare_class_template): Robustify.
7953 2005-01-27 Steven Bosscher <stevenb@suse.de>
7955 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
7956 instead of SWITCH_EXPR ones.
7957 * pt.c (tsubst_expr): Likewise.
7958 * semantics.c (begin_switch_stmt, finish_switch_cond,
7959 finish_switch_stmt): Likewise.
7961 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
7964 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
7966 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
7968 * class.c (abort_fndecl_addr): New variable.
7969 (build_vtbl_initializer): If we have a pure virtual function
7970 share the abort function's address.
7971 Include gt-cp-class.h at the end.
7972 * config-lang.in (gtfiles): Add cp/class.c.
7974 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7976 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
7977 (pp_cxx_function_definition): Make static.
7978 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
7979 (pp_cxx_function_definition): Likewise.
7981 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7983 * name-lookup.c (print_binding_level): Make static.
7984 (constructor_name_full): Make static inline.
7985 (current_decl_namespace): Make static.
7986 * name-lookup.h (constructor_name_full): Remove prototype.
7987 (print_binding_level): Likewise.
7988 (current_decl_namespace): Likewise.
7990 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7992 * decl.h (debug_bindings_indentation): Remove.
7994 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
7996 * typeck.c: Fix a comment typo.
7998 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8001 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
8003 (tsubst): Use fold_decl_constant_value in place of a bare call to
8004 integral_constant_value.
8006 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
8008 * typeck.c (more_qualified_p): Remove.
8009 * cp-tree.h: Remove the corresponding prototype.
8011 2005-01-19 Matt Austern <austern@apple.com>
8013 * typeck.c (comptypes): Handle return code from objc_comptypes
8016 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
8018 * cp-tree.h, name-lookup.h: Remove unused prototypes.
8020 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8023 * semantics.c (finish_id_expression): Disable access checking for
8024 already lookuped FIELD_DECL.
8026 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
8028 * decl.c (delete_block): Remove.
8029 * cp-tree.h: Remove the corresponding prototype.
8031 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
8032 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
8034 * cp-tree.h: Remove the corresponding prototypes.
8036 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
8037 cp_update_decl_after_saving, name_p): Remove.
8038 * cp-tree.h: Remove the corresponding prototypes.
8040 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
8043 * semantics.c (finish_asm_stmt): Strip nops off
8044 input memory operands.
8046 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
8048 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
8049 typeck2.c: Update copyright.
8051 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
8053 * class.c (get_enclosing_class): Remove.
8054 * cp-tree.h: Remove the corresponding prototypes.
8056 * cvt.c (convert_lvalue): Remove.
8057 * cp-tree.h: Remove the corresponding prototype.
8059 * pt.c (tinst_for_decl): Remove.
8060 * cp-tree.h: Remove the corresponding prototypes.
8062 * tree.c (hash_chainon): Remove.
8063 * cp-tree.h: Remove the corresponding prototypes.
8065 2005-01-15 Jakub Jelinek <jakub@redhat.com>
8068 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
8069 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
8071 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8073 * Make-lang.in (cp-warn): Don't append $(WERROR).
8075 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
8077 * cp-tree.h: Fix a comment typo.
8079 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
8082 * pt.c (tsubst_qualified_id): Call convert_from_reference.
8084 2005-01-06 Mark Mitchell <mark@codesourcery.com>
8087 * class.c (add_implicitly_declared_members): Remove dead code.
8088 * decl.c (grokfndecl): Add sfk parameter. Use it do set
8090 (grokdeclarator): Adjust calls to grokfndecl.
8091 * method.c (implicitly_declare_fn): Improve documentation.
8092 * parser.c (cp_parser_direct_declarator): Do not consider a
8093 function to be a constructor if the containing class was
8094 originally anonymous.
8096 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8099 * search.c (lookup_field_1): Handle using declaration in
8100 class template partial specialization.
8102 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8105 * pt.c (push_access_scope): Handle friend defined in class.
8106 (pop_access_scope): Likewise.
8108 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
8111 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
8112 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
8113 array-new handling code. Use build_x_binary_op.
8115 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
8118 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
8119 * name-lookup.h (push_scope): Return pushed scope, not flag.
8120 * name-lookup.c (push_scope): Return scope that should be popped,
8122 * decl.c (start_decl): Adjust.
8123 (grokfndecl): Adjust scope push and pop.
8124 * decl2.c (check_classfn): Likewise.
8125 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
8126 cp_parser_init_declarator, cp_parser_direct_declarator,
8127 cp_parser_class_specifier, cp_parser_class_head,
8128 cp_parser_lookup_name,
8129 cp_parser_constructor_declarator_p): Likewise.
8130 * pt.c (instantiate_class_template,
8131 resolve_typename_type): Likewise.
8133 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8136 * parser.c (cp_parser_unqualified_id): Do not issue error message
8137 for typedef-name as destructor declarator when performing an
8138 uncommitted tentative parse.
8140 2005-01-01 Steven Bosscher <stevenb@suse.de>
8143 * decl.c (finish_function): Fix comment. Annotate the compiler
8144 generated return with the current file name and line 0.