1 2007-04-11 Jan Hubicka <jh@suse.cz>
3 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
4 that we are not processing template_decl.
6 2007-04-09 Mark Mitchell <mark@codesourcery.com>
9 * class.c (build_base_path): Ensure that the converted pointer has
10 the same cv-qualification as the input.
12 2007-04-09 Paolo Carlini <pcarlini@suse.de>
14 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
16 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
18 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
20 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
21 * tree.c (cp_add_pending_fn_decls): Remove.
22 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
24 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
26 Revert change removing staticp.
28 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
30 * cp-objcp-common.c (cxx_staticp): Remove.
31 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
32 * cp-tree.h (cxx_staticp):
34 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
36 * class.c (check_for_override): Don't remove dllmport attribute
41 2007-04-03 Jakub Jelinek <jakub@redhat.com>
44 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
45 type issue error and return early.
47 2007-03-30 Jason Merrill <jason@redhat.com>
50 * typeck.c (cp_type_readonly): New fn.
51 * cp-tree.h: Declare it.
52 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
53 (cp_finish_decl): Not here.
55 2007-03-31 Richard Guenther <rguenther@suse.de>
57 * optimize.c (maybe_clone_body): Replace splay-tree usage by
60 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
65 * parser.c (declarator_can_be_parameter_pack): New.
66 (cp_parser_template_parameter): Only parse the `...' if the
67 declarator can be a parameter pack.
68 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
70 * pt.c (find_parameter_packs_r): Look into the bounds on integer
71 types (they could be used as array bounds).
72 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
73 (tsubst_pack_expansion): Handle failure to expand parameter
76 2007-03-30 Paolo Carlini <pcarlini@suse.de>
79 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
80 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
81 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
82 (CLASS_TYPE_NON_UNION_P): Add.
83 (struct lang_type_class): Add has_complex_dflt.
84 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
85 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
86 * cp-tree.def: Add TRAIT_EXPR.
87 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
88 * lex.c (struct resword): Add __has_nothrow_assign,
89 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
90 __has_trivial_constructor, __has_trivial_copy,
91 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
92 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
93 __is_pod, __is_polymorphic, __is_union.
94 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
95 (cp_parser_trait_expr): New.
96 * semantics.c (finish_trait_expr, trait_expr_value
97 classtype_has_nothrow_copy_or_assign_p): New.
98 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
100 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
101 * class.c (check_bases, check_field_decl, check_bases_and_members):
102 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
103 * pt.c (uses_template_parms, tsubst_copy_and_build,
104 value_dependent_expression_p, type_dependent_expression_p): Deal with
106 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
108 2007-03-29 Richard Guenther <rguenther@suse.de>
110 * tree.c (cp_walk_subtrees): Do not set input_location.
112 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
115 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
118 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
120 * parser.c (struct cp_parser): Update comment for
121 greater_than_is_operator_p.
122 (cp_parser_primary_expression): In C++0x mode, a cast operator can
123 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
124 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
125 !GREATER_THAN_IS_OPERATOR_P.
126 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
127 `>>' operators that will become two `>' tokens in C++0x.
128 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
129 mode, allowing it to terminate default arguments.
130 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
131 `>>' like two consecutive `>' tokens.
132 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
133 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
134 ends a template argument.
136 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
138 * decl.c (redeclaration_error_message): Complain when redeclaring
139 a friend function with default template arguments (C++0x mode only).
140 * cp-tree.h (check_default_tmpl_args): Declare.
141 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
142 template arguments in function templates. Add support for checking
143 the default template arguments of friend templates.
144 (push_template_decl_real): Fix call to check_default_tmpl_args.
145 (type_unification_real): If a template parameter has not been
146 deduced but provides a default template argument, substitute into
147 that default template argument.
148 * parser.c (cp_parser_init_declarator): When declaring (but not
149 defining!) a function template in C++0x mode, check for default
152 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
155 * decl.c (grokdeclarator): Deal with cv-qualified function type
156 typedefs in the same way for member and non-member functions.
158 2007-03-26 Dirk Mueller <dmueller@suse.de>
160 * parser.c (cp_parser_member_declaration): Pedwarn
161 about stray semicolons after member declarations.
163 2007-03-26 Paolo Carlini <pcarlini@suse.de>
166 * pt.c (instantiate_decl): Set in_system_header.
168 2007-03-22 Mark Mitchell <mark@codesourcery.com>
170 * cp-tree.h (current_tempalte_parms): Improve documentation.
171 * pt.c (current_template_args): Likewise.
174 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
175 not consume tokens when failing.
177 2007-03-22 Jim Wilson <wilson@specifix.com>
178 Mark Mitchell <mark@codesourcery.com>
181 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
182 consistent with FROM.
184 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
186 * error.c (dump_expr): Handle dependent names that designate types.
187 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
189 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
191 * cp-tree.def, parser.c, pt.c: Fix comment typos.
193 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
195 * cvt.c (cp_convert_and_check) : Define.
196 * cp-tree.h (cp_convert_and_check): Declare.
197 * call.c (convert_conversion_warnings): Rename to
198 conversion_null_warnings. The warning for floating-point to
199 integer is handled by convert_and_check in convert_like_real.
200 (convert_like_real): convert_conversion_warnings was renamed as
201 conversion_null_warnings.
202 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
203 overflow and changes of value during conversion.
205 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
208 * parser.c (cp_parser_statement): If 'namespace' is found, this
209 only can be a namespace alias definition, so parse it now.
210 (cp_parser_namespace_alias_definition): if we find an open brace
211 instead of '=', then this is actually a misplaced namespace
214 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
217 * decl.c (cxx_init_decl_processing): Move command-line options
218 processing to c-opts.c.
220 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
222 * ptree.c (cxx_print_type): Use formatting markup for integers
223 when printing template parameter index/level/orig level.
224 (cxx_print_xnode): Ditto.
225 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
226 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
227 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
229 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
230 rather than a HOST_WIDE_INT.
231 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
232 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
234 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
235 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
236 IN_BASE_INITIALIZER bool bitfields.
237 (struct cp_declarator): Make KIND a 4-bit field. Make
238 PARAMETER_PACK_P a bool bitfield just after KIND.
239 * pt.c (uses_parameter_packs): Destroy the pointer set.
240 (make_pack_expansion): Ditto.
241 (check_for_bare_parameter_packs): Ditto.
242 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
244 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
247 * call.c (convert_default_arg): Instead of copying the node,
250 2007-03-15 Dirk Mueller <dmueller@suse.de>
253 * call.c (convert_conversion_warnings): New..
254 (convert_like_real): .. factored out from here.
255 (convert_conversion_warnings): Add warning about
256 false being converted to NULL in argument passing.
258 2007-03-14 Dirk Mueller <dmueller@suse.de>
260 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
261 (finish_do_body): Warn about empty body in do/while statement.
263 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
265 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
267 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
270 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
273 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
275 * cp/repo.c (init_repo): Initialize random_seed saved options.
276 (finish_repo): Adjust.
278 2007-03-13 Mark Mitchell <mark@codesourcery.com>
281 * Make-lang.in (doc/g++.1): Use $< to specify the location from
284 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
286 * decl.c (compute_array_index_type): New warning flag warn_vla.
288 2007-03-12 Mark Mitchell <mark@codesourcery.com>
291 * call.c (convert_default_arg): Copy non-constant arguments.
293 2007-03-11 Mark Mitchell <mark@codesourcery.com>
296 * parser.c (cp_parser_postfix_expression): Disallow compound
297 literals in constant expressions.
300 * semantics.c (finish_typeof): Use unlowered_expr_type.
302 2007-03-10 Mark Mitchell <mark@codesourcery.com>
305 * cp-tree.h (unlowered_expr_type): New function.
306 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
307 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
308 (unlowered_expr_type): New function.
309 (build_unary_op): Disallow predecrements of bool bitfields.
310 * call.c (build_conditional_expr): Use unlowered_expr_type.
311 * pt.c (type_unification_real): Likewise.
313 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
316 * typeck.c (check_return_expr): Check for bare parameter packs.
317 (comptypes): Compare template parameter packs and
318 type pack expansions.
319 * decl.c (grokdeclarator): Deal with the declaration of function
321 (grokparms): Verify that the (optional) function parameter pack is
322 at the end of the parameter list.
323 (xref_basetypes): Handle pack expansions in the base class.
324 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
325 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
326 (NONTYPE_ARGUMENT_PACK): New.
327 (TYPE_PACK_EXPANSION): New.
328 (EXPR_PACK_EXPANSION): New.
329 (ARGUMENT_PACK_SELECT): New.
330 * cp-objcp-common.c (cp_tree_size): Compute size of
331 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
332 ARGUMENT_PACK_SELECT.
333 * error.c (dump_template_argument): Print template argument packs.
334 (dump_template_argument_list): Ditto.
335 (dump_template_parameter): Dump `...' for template type parameter
337 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
338 (dump_parameters): Print function parameter packs.
339 (dump_template_parms): Print template argument packs.
340 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
341 (maybe_warn_variadic_templates): New.
342 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
343 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
344 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
346 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
347 (write_template_arg): Write argument packs as separate arguments.
348 * cp-tree.h (struct template_parm_index_s): Add flag that
349 indicates that the template parameter is actually a parameter
351 (struct tree_argument_pack_select): New.
352 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
353 (union lang_tree_node): Add argument_pack_select.
354 (FUNCTION_PARAMETER_PACK_P): New.
355 (PACK_EXPANSION_P): New.
356 (PACK_EXPANSION_PATTERN): New.
357 (SET_PACK_EXPANSION_PATTERN): New.
358 (PACK_EXPANSION_PARAMETER_PACKS): New.
359 (ARGUMENT_PACK_P): New.
360 (ARGUMENT_PACK_ARGS): New.
361 (SET_ARGUMENT_PACK_ARGS): New.
362 (ARGUMENT_PACK_INCOMPLETE_P): New.
363 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
364 (TEMPLATE_PARM_PARAMETER_PACK): New.
365 (TEMPLATE_TYPE_PARAMETER_PACK): New.
366 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
367 (ARGUMENT_PACK_SELECT_INDEX): New.
368 (ARGUMENT_PACK_SELECT_ARG): New.
369 (struct cp_declarator): Add parameter_pack_p flag.
370 (maybe_warn_variadic_templates): Declare.
371 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
372 indicate a template parameter pack.
373 (uses_parameter_packs): Declare.
374 (template_parameter_pack_p): Declare.
375 (template_parms_variadic_p): Declare.
376 (make_pack_expansion): Declare.
377 (check_for_bare_parameter_packs): Declare.
378 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
379 sizeof... expressions.
380 (pp_cxx_expression): Print pack expansions and non-type argument
382 (pp_cxx_exception_specification): Print pack expansions.
383 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
384 (pp_cxx_ctor_initializer): Print pack expansions.
385 (pp_cxx_type_id): Print pack expansions.
386 (pp_cxx_template_argument_list): Print argument packs.
387 (pp_cxx_template_parameter): Print ellipsis for template parameter
389 * pt.c (comp_template_parms): Compare template parameter packs.
390 (template_parameter_pack_p): New.
391 (template_parms_variadic_p): New.
392 (template_args_variadic_p): New.
393 (make_ith_pack_parameter_name): New.
394 (struct find_parameter_pack_data): New.
395 (find_parameter_packs_r): New.
396 (uses_parameter_packs): New.
397 (make_pack_expansion): New.
398 (check_for_bare_parameter_packs): New.
399 (expand_template_argument_pack): New.
400 (reduce_template_parm_level): Propagate parameter pack flag.
401 (process_template_parm): Add is_parameter_pack parameter to state
402 when the parameter is actually a parameter pack. Create template
403 parameter packs when is_parameter_pack is true.
404 (current_template_args): The argument for a template parameter
405 pack is an argument pack containing a single pack expansion.
406 (process_partial_specialization): When checking that non-type
407 argument expressions do not involve template parameters, loop over
408 the arguments in argument packs separately.
409 (push_template_decl_real): Check that the type of the declaration
410 does not have any bare parameter packs. Check that primary
411 templates have no more than one parameter pack, and that it comes
412 at the end of the template parameter list.
413 (convert_template_argument): Handle coercions for pack expansion
414 expressions by coercing the pattern then rebuilding the expansion.
415 (coerce_template_parms): When coercing the arguments for a
416 variadic template, pack "extra" arguments into an argument pack.
417 (coerce_template_template_parms): Cannot coerce between parameter
418 packs and non-pack parameters.
419 (template_args_equal): Compare PACK_EXPANSION_P expressions.
420 (comp_template_args): Expand all template arguments packs before
421 comparing template argument lists.
422 (mangle_class_name_for_template): Make argument packs as separate
424 (for_each_template_parm_r): No need to handle BASELINK.
425 (instantiate_class_template): Handle pack expansions in the base
427 (tsubst_pack_expansion): New.
428 (tsubst_template_args): Handle substitutions of argument packs and
429 pack expansion into template argument lists.
430 (tsubst_decl): Expand function parameter packs into separate
432 (tsubst_arg_types): Expand a type pack expansion into separate
434 (tsubst_exception_specification): Handle pack expansions in
435 exception specifiers.
436 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
437 replacing a template parameter with its argument. If we encounter
438 a substitution for an argument pack, just return the parameter
440 (tsubst_copy): sizeof(X...) returns the number of elements in
441 parameter pack X. See through ARGUMENT_PACK_SELECT when the
442 PARM_DECL is a parameter pack.
443 (tsubst_expr): Expression pack expansions and argument packs
444 cannot show up here; they will all be handled through function
445 calls, sizeof, and template argument lists.
446 (tsubst_copy_and_build): sizeof(X...) returns the number of
447 elements in parameter pack X. Handle pack expansions in TREE_LIST
448 and CONSTRUCTOR nodes.
449 (fn_type_unification): Handle "incomplete" explicit template
450 argument lists that specify some of the arguments for a template
452 (type_unification_real): Unify arguments against pack expansions.
453 (template_parm_level_and_index): New, helper function.
454 (unify_pack_expansion): New.
455 (unify): Unify argument packs on an argument-by-argument basis,
456 handling variadic argument packs as well.
457 (more_specialized_fn): Handle unification of function parameter
458 packs. All things being equal, prefer non-variadic function
459 templates to variadic function templates.
460 (more_specialized_class): Prefer the variadic class template
461 partial specialization that binds fewer arguments to a parameter
463 (regenerate_decl_from_template): Expand function parameter packs
464 into separate parameters.
465 (instantiate_decl): Ditto.
466 (tsubst_initializer_list): Handle pack expansions for base-class
468 (dependent_type_p_r): Determine dependent types in argument packs
470 (value_dependent_expression_p): Determine value-dependence of
471 non-type argument packs.
472 (dependent_template_arg_p): Handle argument packs.
473 * semantics.c (finish_cond): Check for bare parameter packs.
474 (finish_expr_stmt): Ditto.
475 (finish_for_expr): Ditto.
476 (finish_switch_cond): Ditto.
477 (finish_mem_initializers): Ditto.
478 * name-lookup.c (arg_assoc_type): Handle pack expansions and
480 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
481 * parser.c (make_declarator): Declarator is not an expansion.
482 (make_pointer_declarator): Transfer parameter pack flag to outer
484 (make_reference_declarator): Ditto.
485 (make_ptrmem_declarator): Ditto.
486 (make_call_declarator): Ditto.
487 (make_array_declarator): Ditto.
488 (cp_parser_postfix_expression): Allow pack expansion expressions
489 in the argument list for a call expression.
490 (cp_parser_parenthesized_expression_list): Add new parameter
491 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
492 into separate arguments."
493 (cp_parser_new_placement): Allow pack expansion expressions.
494 (cp_parser_new_initializer): Ditto.
495 (cp_parser_mem_initializer_list): Allow ellipsis to create a
496 base-class initializer expansion.
497 (cp_parser_mem_initializer): Ditto.
498 (cp_parser_template_parameter_list): Keep track of whether the
499 template parameter is a template parameter pack.
500 (cp_parser_template_parameter): Parse the ellipsis to indicate a
501 template parameter pack.
502 (cp_parser_type_parameter): Ditto.
503 (cp_parser_template_argument_list): Parse the ellipsis to indicate
505 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
506 this declarator is a parameter pack.
507 (cp_parser_parameter_declaration): The ellipsis does not end the
508 parameter declaration, because it might be a parameter pack. Parse
509 the ellipsis to indicate a parameter pack.
510 (cp_parser_initializer): Allow pack expansions.
511 (cp_parser_initializer_list): Allow ellipsis to create an
512 initializer expansion.
513 (cp_parser_base_clause): Allow ellipsis to create a base specifier
515 (cp_parser_type_id_list): Allow ellipsis to create an exception
517 (cp_parser_attribute_list): Don't allow pack expansions.
518 (cp_parser_functional_cast): Allow pack expansions.
519 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
520 compute the length of a parameter pack.
521 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
522 end a template argument.
523 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
524 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
527 2007-03-09 Dirk Mueller <dmueller@suse.de>
529 * cp/call.c (build_new_op): Call warn_logical_operator.
531 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
534 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
537 * pt.c (any_template_arguments_need_structural_equality_p):
540 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
542 * decl.c (grokdeclarator): Disable warnings for anonymous
545 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
547 * typeck2.c (readonly_error): Always emit a hard error.
548 Remove last argument.
549 * cp-tree.h (readonly_error): Adjust prototype.
550 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
551 * typeck.c (build_unary_op): Likewise.
552 (build_modify_expr): Likewise.
554 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
557 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
559 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
562 * parser.c (struct cp_parser): New IN_IF_STMT.
563 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
564 returning if parsing the body of an 'if' statement or issuing an
565 error and continuing.
566 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
568 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
570 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
573 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
576 2007-03-02 Geoffrey Keating <geoffk@apple.com>
578 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
579 Objective-C++. Don't exit early if -shared-libgcc needs to be
582 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
584 * typeck.c (common_base_type): Delete unused function.
586 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
588 * Make-lang.in: Add dummy lang.install-pdf target.
590 2007-03-01 Simon Baldwin <simonb@google.com>
593 * decl.c (check_tag_decl): Added new warning for typedef ignored
594 when it precedes an otherwise valid non-typedef declaration.
596 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
598 * typeck.c (build_function_call): Store converted arguments
599 in a stack-allocated array instead of building a list.
600 (convert_arguments): Store arguments in the array passed in as an
601 argument, and return the actual number of arguments.
602 * call.c (build_call): Delete, and replace with...
603 (build_call_n, build_call_a): New.
604 (build_op_delete_call): Rewrite to avoid constructing argument lists.
605 (build_over_call): Store converted arguments in a stack-allocated
606 array instead of building a list.
607 (build_cxx_call): Pass arguments in an array instead of as a list.
608 (build_java_interface_fn_ref): Rewrite to avoid constructing
610 * tree.h: Update declarations to reflect above changes.
611 * method.c (use_thunk): Use a stack-allocated array to hold
612 the arguments instead of a list.
613 * rtti.c (throw_bad_cast): Update call to cxx_call.
614 (throw_bad_typeid): Likewise.
615 (build_dynamic_cast_1): Likewise.
616 * init.c (build_builtin_delete_call): Use build_call_n.
617 * decl.c (expand_static_init): Likewise.
618 * except.c (cp_protect_cleanup_actions): Likewise.
619 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
620 (gimplify_must_not_throw_expr): Likewise.
621 (cxx_omp_apply_fn): Use build_call_a.
623 2007-02-26 Mark Mitchell <mark@codesourcery.com>
625 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
626 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
628 2007-02-25 Mark Mitchell <mark@codesourcery.com>
630 * cp-tree.h (static_ctors): Remove.
631 * cp-tree.h (static_dtors): Likewise.
632 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
633 refactoring of tree_map hierarchy.
634 (decl_shadowed_for_var_insert): Likewise.
635 * semantics.c (expand_body): Use c_expand_body.
636 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
637 * decl2.c (static_ctors): Remove.
638 (static_dtors): Likewise.
639 (generate_ctor_or_dtor_function): Pass NULL_TREE to
640 objc_generate_static_init_call. Do not call static_[cd]tors.
641 (generate_ctor_and_dtor_functions_for_priority): Do not check for
643 (cp_write_global_declarations): Likewise.
645 2007-02-23 Richard Guenther <rguenther@suse.de>
647 * class.c (note_name_declared_in_class): Make declaration
648 changes meaning a pedwarn.
650 2007-02-22 Michael Matz <matz@suse.de>
653 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
654 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
655 dump_function_decl): Guard emitting outer scopes by new flag.
656 * cp-lang.c (cxx_dwarf_name): New function.
657 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
658 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
660 (push_template_decl_real, lookup_template_class): Remove calls
663 2007-02-19 Mark Mitchell <mark@codesourcery.com>
665 * call.c (build_new_method_call): Ensure that explicit calls of
666 destructors have type "void".
668 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
670 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
671 and -Walways-true with -Waddress.
672 * cvt.c (convert_to_void): Replace unconditional warning with
675 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
677 * decl.c, tree.c: Fix comment typos.
679 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
682 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
683 statement expression if we had an error mark node.
685 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
686 Brooks Moses <brooks.moses@codesourcery.com>
687 Lee Millward <lee.millward@codesourcery.com>
689 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
690 Change class to tcc_vl_exp.
692 * call.c (build_call): Use build_call_list instead
694 (build_over_call): Likewise.
695 (build_new_method_call): Use build_min_non_dep_call_list
696 instead of build_min_non_dep.
698 * error.c (dump_call_expr_args): New function.
699 (dump_aggr_init_expr_args): New function.
700 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
701 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
703 * cvt.c (convert_to_void): Use build_call_array instead
704 of build3; use new AGGR_INIT_EXPR accessor macros.
706 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
707 instead of TREE_CODE_LENGTH.
709 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
710 AGGR_INIT_EXPR accessor macros.
712 * cp-gimplify.c (cp_gimplify_init_expr): Use
713 AGGR_INIT_EXPR_SLOT to set the slot operand.
715 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
716 (AGGR_INIT_EXPR_SLOT): New macro.
717 (AGGR_INIT_EXPR_ARG): New macro.
718 (aggr_init_expr_nargs): New macro.
719 (AGGR_INIT_EXPR_ARGP): New macro.
720 (aggr_init_expr_arg_iterator): New.
721 (init_aggr_init_expr_arg_iterator): New.
722 (next_aggr_init_expr_arg): New.
723 (first_aggr_init_expr_arg): New.
724 (more_aggr_init_expr_args_p): New.
725 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
726 (stabilize_aggr_init): New declaration.
727 (build_min_non_dep_call_list): Likewise.
729 * tree.c (process_aggr_init_operands): New function.
730 (build_aggr_init_array) New function.
731 (build_cplus_new): Update to use new CALL_EXPR and
732 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
733 build_aggr_init_array.
734 (build_min_non_dep_call_list) New function.
735 (build_min_nt): Assert input code parameter is not a variable
736 length expression class.
737 (build_min, build_min_non_dep): Likewise.
738 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
739 to check for equality instead of recursing. Handle tcc_vl_exp
741 (stabilize_call): Update to only handle CALL_EXPRs, not
742 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
743 (stabilize_aggr_init): New function.
744 (stabilize_init): Use it.
746 * cxx-pretty-print.c (pp_cxx_postfix_expression)
747 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
748 AGGR_INIT_EXPR accessor macros and argument iterators.
750 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
751 build_vl_exp. Iterate through the operands, recursively
753 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
754 CALL_EXPR accessor macros.
755 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
756 tree code classes. Use TREE_OPERAND_LENGTH instead of
759 * semantics.c (finish_call_expr): Use build_nt_call_list
761 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
762 accessor macros. Use build_call_array to construct the
763 CALL_EXPR node instead of build3
765 * decl2.c (build_offset_ref_call_from_tree): Use
766 build_nt_call_list and build_min_non_dep_call_list instead
767 of build_min_nt and build_min_non_dep.
769 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
770 Use build_nt_call_list instead of build_min_nt.
772 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
775 * call.c (build_conditional_expr): Improve error message.
777 2007-02-13 Dirk Mueller <dmueller@suse.de>
779 * friend.c (do_friend): Annotate warning about friend
780 declarations in templates with OPT_Wnon_template_friend.
781 Convert informal message from warning() to inform().
783 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
784 Mark Mitchell <mark@codesourcery.com>
787 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
788 instantiations for variables.
790 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
793 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
794 Check warn_unused_value just once.
796 2007-02-11 Mark Mitchell <mark@codesourcery.com>
799 * pt.c (determine_specialization): Use skip_artificial_parms_for.
800 (fn_type_unificiation): Likewise.
801 (get_bindings): Likewise.
803 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
806 * decl.c (finish_function): Use DECL_REPLACEABLE.
807 * tree.c (cp_cannot_inline_tree_fn): Likewise.
809 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
811 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
813 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
815 * decl.c (grokvardecl): Don't error if !have_tls.
816 (grokdeclarator): Likewise.
817 * parser.c (cp_parser_omp_threadprivate): Likewise.
819 2007-02-07 Jakub Jelinek <jakub@redhat.com>
822 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
823 parameters and result decls in omp clauses.
824 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
827 2007-02-05 Dirk Mueller <dmueller@suse.de>
830 * parser.c (cp_parser_class_specifier): Always initialize bases.
832 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
834 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
835 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
836 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
838 * semantics.c (finish_omp_atomic): Store a whole expression node
839 in operand 1, and integer_zero_node in operand 0, for dependent
840 OMP_ATOMIC. Rewrite to make flow easier to understand.
842 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
844 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
846 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
848 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
849 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
851 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
853 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
854 keyword warning to -Wc++0x-compat.
856 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
858 * decl.c (grokdeclarator): Update documentation.
860 2007-02-02 Jakub Jelinek <jakub@redhat.com>
863 * decl.c (grokdeclarator): If __thread is used together with
864 a storage class other than extern and static, clear thread_p
865 after issuing diagnostics and fall through to checking the
868 2007-01-30 Roger Sayle <roger@eyesopen.com>
870 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
871 calculating the size of an array (to avoid recursive errors).
873 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
876 * typeck.c (build_binary_op): Fix logic for warning. Move warning
878 * call.c (convert_like_real): Don't warn when converting to
881 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
883 * decl.c (pop_label): Replace warning with call to
884 warn_for_unused_label.
886 2007-01-28 Andrew Pinski <pinskia@gmail.com>
889 * semantics.c (finish_pseudo_destructor_expr): Check the
890 destrutor name by calling check_dtor_name.
892 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
894 * lex.c (D_CPP0X): Rename.
896 (reswords): D_CPP0X -> D_CXX0X.
897 (init_reswords): Ditto.
898 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
899 of C++0x keywords as identifiers.
901 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
904 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
907 2007-01-23 Ian Lance Taylor <iant@google.com>
909 * typeck.c (convert_for_assignment): Only warn about a = b = c
910 when converting to bool.
912 2007-01-23 Roger Sayle <roger@eyesopen.com>
914 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
916 * typeck.c (ignore_overflows): Remove the remaining uses of
917 TREE_CONSTANT_OVERFLOW.
919 2007-01-20 Jan Hubicka <jh@suse.cz>
921 * decl2.c (start_objects, start_static_storage_duration_function):
922 Do not make the functions uninlinable.
924 2007-01-17 Ian Lance Taylor <iant@google.com>
926 * class.c (add_method): Call VEC_reserve_exact rather than passing
927 a negative size to VEC_reserve.
929 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
932 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
934 2007-01-10 Mark Mitchell <mark@codesourcery.com>
937 * decl.c (make_typename_type): If the qualified name is not a
938 type, issue an error.
939 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
942 2007-01-08 Geoffrey Keating <geoffk@apple.com>
944 * rtti.c: Include target.h.
945 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
946 don't emit typeinfo for fundamental types as weak.
947 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
949 2007-01-08 Richard Guenther <rguenther@suse.de>
951 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
953 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
955 * call.c (standard_conversion): Pass flag to
956 vector_types_convertible_p to disallow emission of note.
957 * typeck.c (convert_for_assignment): Pass flag to
958 vector_types_convertible_p to allow emission of note.
959 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
960 to disallow emission of note.
962 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
965 * typeck.c (build_binary_op): Call overflow_warning if
966 TREE_OVERFLOW_P is true for the result and not for any of the
969 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
972 * class.c (add_method): Don't wait until template
973 instantiation time to complain about duplicate methods.
975 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
978 * semantics.c (finish_unary_op_expr): Warn only if result
979 overflowed and operands did not.
981 2007-01-05 Ian Lance Taylor <iant@google.com>
983 * typeck.c (build_binary_op): Warn about comparing a non-weak
986 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
988 * pt.c (tsubst): Propagate the need for structural equality checks
989 when reducing the level of template parameters.
991 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
993 * pt.c: Fix a comment typo.
995 2006-01-02 Ian Lance Taylor <iant@google.com>
997 * semantics.c (maybe_convert_cond): Optionally warn when using an
998 assignment as a condition.
999 * typeck.c (convert_for_assignment): Optionally warn about
1000 assigning the result of an assignment to a bool.
1002 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1004 * pt.c (canonical_template_parms): Correct typo in comment.
1006 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
1008 * typeck.c (structural_comptypes): Renamed from "comptypes".
1009 (comptypes): Use canonical type information to perform fast type
1010 comparison. When VERIFY_CANONICAL_TYPES, verify that the
1011 canonical type comparison returns the same results as we would see
1012 from the current, structural check. Support COMPARE_STRUCTURAL
1013 when we need structural checks.
1014 * decl.c (typename_compare): Fix comment.
1015 (build_typename_type): TYPENAME_TYPE nodes require structural
1016 equality checks, because they resolve different based on the
1018 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1019 require structural equality checks (for now).
1020 (build_ptrmemfunc_type): Build the canonical pointer to member
1022 (compute_array_index_type): Whenever we build a new index type
1023 to represent the size of an array in a template, we need to mark
1024 this index type as requiring structural equality. This goes for
1025 arrays with value-dependent sizes with the current ABI, or all
1027 * tree.c (cplus_array_hash): New.
1028 (struct cplus_array_info): New.
1029 (cplus_array_compare): New.
1030 (cplus_array_htab): New.
1031 (build_cplus_array_type_1): Use a hash table to cache the array
1032 types we build. Build the canonical array type for each array
1034 (cp_build_qualified_type_real): When building a cv-qualified array
1035 type, use the hash table of array types and build canonical array
1037 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1038 use structural equality (for now).
1039 * cp-tree.h (COMPARE_STRUCTURAL): New.
1040 * pt.c (canonical_template_parms): New.
1041 (canonical_type_parameter): New.
1042 (process_template_parm): Find the canonical type parameter.
1043 (lookup_template_class): When we have named the primary template
1044 type, set the canonical type for our template class to the primary
1045 template type. If any of the template arguments need structural
1046 equality checks, the template class needs structural equality
1048 (tsubst): When reducing the level of a template template
1049 parameter, we require structural equality tests for the resulting
1050 parameter because its template parameters have not had their types
1051 canonicalized. When reducing a template type parameter, find the
1052 canonical reduced type parameter.
1053 (any_template_arguments_need_structural_equality_p): New.
1055 2006-12-31 Simon Martin <simartin@users.sourceforge.net>
1058 * parser.c (cp_parser_primary_expression): Return error_mark_node when
1059 a statement-expression is found outside of a function body.
1061 2006-12-28 Kazu Hirata <kazu@codesourcery.com>
1063 * cp-tree.h (TYPE_NAMESPACE_SCOPE_P, TYPE_FUNCTION_SCOPE_P):
1066 * decl2.c: Fix a comment typo.
1068 2006-12-21 Andrew Pinski <pinskia@gmail.com>
1071 * decl.c (cxx_builtin_function): Only copy the decl if adding
1072 it to the std namespace.
1074 2006-12-21 Andrew Pinski <pinskia@gmail.com>
1077 * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
1079 2006-12-22 Kazu Hirata <kazu@codesourcery.com>
1081 * decl.c: Fix a coment typo.
1083 2006-12-18 Ian Lance Taylor <iant@google.com>
1085 * decl.c (start_preparsed_function): Add support for
1086 -Wmissing-declarations.
1088 2006-12-16 Simon Martin <simartin@users.sourceforge.net>
1091 * cp-tree.h (struct deferred_access_check): New structure to represent a
1092 deferred access check. It replaces the previous representation as a tree.
1093 (get_deferred_access_checks): Return a vector of struct
1094 deferred_access_check instead of a tree list.
1095 (perform_access_checks): Take a vector of struct deferred_access_check
1096 instead of a tree list.
1097 * semantics.c (struct deferred_access): Store the deferred access checks
1098 as a vector of struct deferred_access_check instead of a tree list.
1099 (push_deferring_access_checks): Handle the change in struct
1101 (get_deferred_access_checks): Likewise.
1102 (pop_to_parent_deferring_access_checks): Likewise.
1103 (perform_or_defer_access_check): Likewise.
1104 (perform_access_checks): Take a vector of struct deferred_access_check
1105 instead of a tree list.
1106 * parser.c (struct tree_check): New structure to store various data
1107 associated with a CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID token.
1108 (struct cp_token): Changed the value field to be a union with a pointer to
1109 a struct tree_check for CPP_NESTED_NAME_SPECIFIER or CPP_TEMPLATE_ID
1110 tokens and a tree field for all other tokens.
1111 (eof_token): Adjusted due to the change in struct cp_token.
1112 (cp_lexer_get_preprocessor_token): Likewise.
1113 (cp_lexer_purge_token): Likewise.
1114 (cp_lexer_purge_tokens_after): Likewise.
1115 (cp_lexer_print_token): Likewise.
1116 (cp_parser_error): Likewise.
1117 (cp_parser_identifier): Likewise.
1118 (cp_parser_string_literal): Likewise.
1119 (cp_parser_primary_expression): Likewise.
1120 (cp_parser_unqualified_id): Likewise.
1121 (cp_parser_parenthesized_expression_list): Likewise.
1122 (cp_parser_storage_class_specifier_opt): Likewise.
1123 (cp_parser_function_specifier_opt): Likewise.
1124 (cp_parser_type_specifier): Likewise.
1125 (cp_parser_simple_type_specifier): Likewise.
1126 (cp_parser_initializer_list): Likewise.
1127 (cp_parser_member_specification_opt): Likewise.
1128 (cp_parser_attribute_list): Likewise.
1129 (cp_parser_objc_expression): Likewise.
1130 (cp_parser_objc_protocol_qualifiers): Likewise.
1131 (cp_parser_objc_selector): Likewise.
1132 (cp_parser_objc_declaration): Likewise.
1133 (cp_parser_objc_statement): Likewise.
1134 (cp_parser_omp_clause_name): Likewise.
1135 (cp_parser_omp_clause_default): Likewise.
1136 (cp_parser_omp_clause_schedule): Likewise.
1137 (cp_parser_omp_parallel): Likewise.
1138 (cp_parser_initial_pragma): Likewise.
1139 (pragma_lex): Likewise.
1140 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1141 (cp_parser_nested_name_specifier_opt): Likewise.
1142 Use cp_token::u::tree_check_value to save the token's value, the
1143 associated deferred checks and its qualifying scope.
1144 (cp_parser_template_id): Likewise.
1145 (cp_parser_template_declaration_after_export): Adjusted the call to
1146 get_deferred_access_checks.
1147 (cp_parser_init_declarator): Take the access checks as a vector of struct
1148 deferred_access_check instead of a tree list.
1149 (cp_parser_single_declaration): Likewise.
1150 (cp_parser_perform_template_parameter_access_checks): Likewise.
1151 (cp_parser_simple_declaration): Adjusted the call to
1152 cp_parser_init_declarator.
1153 (cp_parser_explicit_specialization): Adjusted the call to
1154 cp_parser_single_declaration.
1156 2006-12-13 Ian Lance Taylor <iant@google.com>
1160 * parser.c (cp_parser_expression_stack_entry): Add field
1162 (cp_parser_binary_expression): Track tree code of left hand side
1163 of expression. Use it when calling build_x_binary_op.
1164 (cp_parser_selection_statement): Add if_p parameter. Change all
1165 callers. Warn about ambiguous else.
1166 (cp_parser_statement): Add if_p parameter. Change all callers.
1167 (cp_parser_implicitly_scoped_statement): Likewise.
1168 * typeck.c (build_x_binary_op): Add parameters arg1_code and
1169 arg2_code. Change all callers. Call warn_about_parentheses.
1170 * cp-tree.h (build_x_binary_op): Update declaration.
1172 2006-12-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1174 * decl.c (build_enumerator): Update error message to match C
1177 2006-12-11 Jan Hubicka <jh@suse.cz>
1179 * decl2.c (var_finalized_p): Update for renamed varpool functions.
1181 2006-12-09 Zack Weinberg <zackw@panix.com>
1183 * parser.c (yydebug, enum pragma_omp_clause): Delete.
1185 2006-12-07 Mark Mitchell <mark@codesourcery.com>
1188 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
1189 (explicit_class_specialization_p): Declare.
1190 * pt.c (explicit_class_specialization_p): New function.
1191 * parser.c (cp_parser_init_declarator): Check correct number of
1192 template parameters for in-class function definitions.
1193 (cp_parser_check_declrator_template_parameters): Stop looking for
1194 template classes when we find an explicit specialization.
1196 2006-12-07 Lee Millward <lee.millward@codesourcery.com>
1199 * cp_parser_elaborated_type_specifier: Check
1200 the return value of check_elaborated_type_specifier.
1202 2006-12-06 Mark Mitchell <mark@codesourcery.com>
1205 * parser.c (cp_parser_init_declarator): Reject initialization of
1208 2006-12-05 Mark Mitchell <mark@codesourcery.com>
1211 * decl2.c (check_member_template): Move check for member
1212 templates in local classes to ...
1213 * parser.c (cp_parser_template_declaration_after_export):
1217 * decl.c (check_array_designated_initializer): New function.
1218 (maybe_deduce_size_from_array_init): Use it.
1219 (reshape_init_array): Likewise.
1221 2006-12-05 Aldy Hernandez <aldyh@redhat.com>
1223 Merge from gimple-tuples-branch.
1225 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
1227 * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
1228 (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
1229 (cxx_omp_clause_copy_ctor): Same.
1230 (cxx_omp_clause_assign_op): Same.
1232 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
1234 * cp-tree.h (union lang_tree_node): Gimple statements do not
1236 (TREE_INDIRECT_USING): Look in base.
1238 2006-12-04 Jan Hubicka <jh@suse.cz>
1240 * cp-objcp-common.c (cp_expr_size): Return NULL in the case
1243 2006-12-04 Mark Mitchell <mark@codesourcery.com>
1246 * pt.c (tsubst_decl): Disallow variables of function type.
1249 * call.c (add_builtin_candidate): Do not permit NULL pointer
1250 constants to be compared with template parameters.
1252 2006-12-04 Eric Botcazou <ebotcazou@adacore.com>
1254 * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
1255 Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1257 2006-12-03 Richard Henderson <rth@redhat.com>
1258 Andrew Pinski <pinskia@gmail.com>
1261 * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
1263 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
1266 * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
1268 2006-12-02 Kazu Hirata <kazu@codesourcery.com>
1270 * name-lookup.c: Follow spelling conventions.
1272 2006-12-01 Geoffrey Keating <geoffk@apple.com>
1274 * decl.c (poplevel): Check DECL_INITIAL invariant.
1275 (duplicate_decls): Preserve DECL_INITIAL when eliminating
1276 a new definition in favour of an old declaration.
1277 (start_preparsed_function): Define and document value of
1278 DECL_INITIAL before and after routine.
1279 (finish_function): Check DECL_INITIAL invariant.
1281 (cp_parser_function_definition_from_specifiers_and_declarator):
1282 Skip duplicate function definitions.
1284 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1287 * typeck.c (type_after_usual_arithmetic_conversions):
1288 Fix assertion for vector types.
1289 (build_binary_op): Use temporary for inner type of vector types.
1291 2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
1294 * typeck.c (build_binary_op): Fix pointer to member function
1295 comparison for ptrmemfunc_vbit_in_delta targets.
1297 2006-12-01 Dirk Mueller <dmueller@suse.de>
1300 * decl.c (grokdeclarator): Warn for type qualifiers on return
1301 type for non-dependent types.
1302 * pt.c (tsubst_function_type): Warn for type qualifiers on
1303 return type for dependent types.
1305 2006-11-30 Geoffrey Keating <geoffk@apple.com>
1307 * rtti.c (get_tinfo_decl): Handle return value from
1308 pushdecl_top_level_and_finish.
1310 2006-11-29 Lee Millward <lee.millward@codesourcery.com>
1313 * parser.c (cp_parser_class_head): Move processing
1314 of any base classes to...
1315 (cp_parser_class_specifier) ...here. Take an extra
1316 tree* parameter for any base classes. Only process
1317 them if the opening brace was found.
1319 2006-11-28 Jakub Jelinek <jakub@redhat.com>
1322 * decl.c (grokfndecl): Check main's type after applying
1323 attributes, not before.
1325 2006-11-27 Mark Mitchell <mark@codesourcery.com>
1327 * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
1328 entries for a primary construction virtual table.
1330 2006-11-26 Mark Mitchell <mark@codesourcery.com>
1333 * parser.c (cp_parser): Add in_function_body.
1334 (cp_parser_new): Initialize it.
1335 (cp_parser_primary_expression): Use parser->in_function_body
1336 instead of at_function_scope_p.
1337 (cp_parser_asm_definition): Likewise.
1338 (cp_parser_direct_declarator): Likewise.
1339 (cp_parser_class_specifier): Clear parser->in_function_body.
1340 (cp_parser_constructor_declarator_p): Use parser->in_function_body
1341 instead of at_function_scope_p.
1342 (cp_parser_function_body_after_declarator): Set
1343 parser->in_function_body.
1345 2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
1347 * cp-tree.def (STATIC_ASSERT): New.
1348 * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
1349 * error.c (dump_decl): Handle STATIC_ASSERT.
1350 * cp-tree.h (STATIC_ASSERT_CONDITION): New.
1351 (STATIC_ASSERT_MESSAGE): New.
1352 (STATIC_ASSERT_SOURCE_LOCATION): New.
1353 (struct tree_static_assert): New.
1354 (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
1355 (union lang_tree_node): Add static_assertion.
1356 (finish_static_assert): Declare.
1357 * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
1358 (pp_cxx_declaration): Handle STATIC_ASSERT.
1359 * pt.c (instantiate_class_template): Handle
1360 STATIC_ASSERT members.
1361 (tsubst_expr): Handle STATIC_ASSERT statements.
1362 * semantics.c (finish_static_assert): New.
1363 * lex.c (D_CPP0X): New.
1364 (reswords): Add static_assert keyword.
1365 (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
1366 * parser.c (cp_parser_block_declaration): Parse static
1368 (cp_parser_static_assert): New.
1369 (cp_parser_member_declaration): Parse static assertions.
1371 2006-11-21 Jakub Jelinek <jakub@redhat.com>
1374 * decl.c (cp_finish_decl): Check for value dependent brace enclosed
1378 * cp-tree.h (WANT_VECTOR): Define.
1379 (WANT_ARITH): Add WANT_VECTOR.
1380 * cvt.c (build_expr_type_conversion): Handle vector types.
1381 * typeck.c (build_unary_op): Add WANT_VECTOR to
1382 build_expr_type_conversion flags.
1384 2006-11-20 Simon Martin <simartin@users.sourceforge.net>
1387 * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
1388 extra argument that represents the declaration to use to print
1389 potential error messages.
1390 * init.c (build_offset_ref): Adjusted the call to
1391 perform_or_defer_access_check.
1392 * class.c (alter_access, resolve_address_of_overloaded_function):
1394 * decl.c (make_typename_type, make_unbound_class_template): Likewise.
1395 * search.c (lookup_member): Likewise.
1396 * friend.c (add_friend): Likewise.
1397 * parser.c (cp_parser_template_id,
1398 cp_parser_pre_parsed_nested_name_specifier): Likewise.
1399 * semantics.c (finish_non_static_data_member,
1400 check_accessibility_of_qualified_id, finish_id_expression): Likewise.
1401 (pop_to_parent_deferring_access_checks, perform_access_checks,
1402 perform_or_defer_access_check): Adjusted the call to enforce_access.
1403 * call.c (enforce_access): Use the new extra argument to build the
1405 (build_op_delete_call): Adjusted the call to
1406 perform_or_defer_access_check.
1407 (build_over_call): Likewise.
1409 2006-11-16 Dirk Mueller <dmueller@suse.de>
1411 * name-lookup.c (begin_scope): Use GGC_CNEW instead of
1414 2006-11-13 Roger Sayle <roger@eyesopen.com>
1416 * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
1417 base type info initializer has the correct type.
1419 2006-11-13 Mark Mitchell <mark@codesourcery.com>
1422 * pt.c (coerce_template_parms): Do not skip_evaluation while
1423 substituting template arguments.
1425 2006-11-11 Richard Guenther <rguenther@suse.de>
1427 * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
1428 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1430 2006-11-03 Roger Sayle <roger@eyesopen.com>
1432 * call.c (build_op_delete_call): Test user-visible type against
1433 size_type_node, instead of against the internal type, sizetype.
1434 * class.c (type_requires_array_cookie): Likewise.
1435 * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
1436 handling of TYPE_IS_SIZETYPE.
1437 * typeck.c (type_after_usual_arithmetic_conversions): Remove
1438 special case handling of TYPE_IS_SIZETYPE.
1439 (comptypes): Likewise.
1441 2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
1443 * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
1444 if targetm.cxx.use_atexit_for cxa_atexit.
1445 (start_cleanup_fn): Likewise.
1446 (register_dtor_fn): Likewise.
1448 2006-09-25 Geoffrey Keating <geoffk@apple.com>
1450 * decl2.c (cp_write_global_declarations): Rename from
1452 * cp-lang.c (finish_file): Don't call cp_finish_file.
1453 * cp-tree.h (cp_write_global_declarations): Rename from
1455 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
1456 cp_write_global_declarations.
1458 2006-10-31 Geoffrey Keating <geoffk@apple.com>
1460 * name-lookup.c (get_anonymous_namespace_name): New.
1461 (push_namespace_with_attribs): Use get_anonymous_namespace_name.
1462 * decl2.c (start_objects): Update for rename of
1463 get_file_function_name_long.
1465 2006-10-30 Dirk Mueller <dmueller@suse.de>
1468 * decl.c (grokdeclarator): Duplicate diagnostic message
1469 for easier translation.
1470 * decl.c (grokdeclarator): Fix line-wrapping.
1472 2006-10-30 Dirk Mueller <dmueller@suse.de>
1475 * decl.c (grokfndecl): Use check_main_parameter_types.
1477 2006-10-30 Dirk Mueller <dmueller@suse.de>
1480 * decl.c (grokfndecl): Duplicate warning message for
1483 2006-10-30 Dirk Mueller <dmueller@suse.de>
1485 * typeck.c (build_unary_op): Fix indenting. Use G_().
1487 2006-10-29 Dirk Mueller <dmueller@suse.de>
1490 * typeck.c (build_unary_op): Duplicate warning message
1491 for easier translation.
1493 2006-10-29 Dirk Mueller <dmueller@suse.de>
1496 * typeck.c (build_array_ref): Warn for char subscriptions
1499 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
1501 * decl.c: Fix a comment typo.
1503 2006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1506 * typeck.c (build_unary_op): Use same_type_p when comparing to
1509 2006-10-29 Dirk Mueller <dmueller@suse.de>
1512 * typeck.c (build_binary_op): Duplicate warning message
1513 for better translation.
1515 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
1517 * decl.c (builtin_function_1): Move common code to
1518 add_builtin_function.
1519 (builtin_function): Rename to cxx_builtin_function.
1520 Change the signature.
1521 * call.c: Include langhooks.h.
1522 (build_java_interface_fn_ref): Replace calls to
1523 builtin_function with add_builtin_function.
1524 * Make-lang.in (cp/call.o): Depend on langhooks.h.
1525 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
1526 cxx_builtin_function.
1527 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
1528 Change the signature.
1530 2006-10-22 Nathan Sidwell <nathan@codesourcery.com>
1533 * rtti.c (tinfo_base_init): The type info string is always global.
1535 2006-10-20 Lee Millward <lee.millward@codesourcery.com>
1536 Mark Mitchell <mark@codesourcery.com>
1539 * decl2.c (grokbitfield): Detect invalid non-integral
1540 types earlier when possible.
1542 2006-10-18 Mark Shinwell <shinwell@codesourcery.com>
1545 * typeck2.c (digest_init): Raise error upon attempts to
1546 initialize arrays with variables.
1548 2006-10-17 Lee Millward <lee.millward@codesourcery.com>
1551 * cp-tree.h (xref_basetypes): Return bool instead of void.
1552 * decl.c (xref_basetypes): Adjust definition. Return false
1553 if the class bases are invalid.
1554 * parser.c (cp_parser_class_head): Check the return value
1555 from xref_basetypes.
1557 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1560 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
1564 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
1566 (cp_parser_constructor_declarator_p): Use it.
1567 (cp_parser_check_type_definition): Return a value indicating
1568 whether or not the definition is valid.
1569 (cp_parser_enum_specifier): Skip invalid enum definitions.
1571 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1574 * typeck2.c (build_functional_cast): Don't zero-initialize
1575 non-PODs; instead, call their constructors.
1576 * method.c (synthesize_method): Always build mem-initializers, if
1577 we're synthesizing the default constructor.
1579 2006-10-17 Mark Mitchell <mark@codesourcery.com>
1582 * decl.c (reshape_init_class): Move check for designated
1584 * parser.c (cp_parser_initializer_list): ... here.
1585 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
1587 2006-10-16 Mark Mitchell <mark@codesourcery.com>
1590 * typeck2.c (process_init_constructor_array): Reword comment.
1591 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
1595 * parser.c (cp_parser_using_declaration): Stop parsing when
1596 something goes wrong with an access declaration.
1599 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
1600 types when their sizes are required. Refine test for VLAs.
1603 * parser.c (cp_parser_template_argument): Don't consider "&var" a
1604 possible constant-expression.
1605 * pt.c (convert_nontype_argument): Refine handling of arguments of
1608 2006-10-13 Mark Mitchell <mark@codesourcery.com>
1611 * parser.c (function_declarator_p): New function.
1612 (cp_parser_init_declarator): Use it.
1613 (cp_parser_member_declaration): Likewise.
1615 2006-10-12 Mark Mitchell <mark@codesourcery.com>
1618 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
1619 variably modified types.
1621 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
1624 * decl.c (start_decl): Return error_mark_node if a
1625 function is initialized like a variable.
1626 (check_var_type): If a variable of field is declared void,
1627 set the type to error_mark_node.
1628 (grokdeclarator): Check the return type of check_var_type.
1629 * class.c (finish_struct_1): Robustify.
1631 2006-10-11 Mark Mitchell <mark@codesourcery.com>
1634 * decl.c (check_initializer): Issue errors about trying to
1635 initialize arrays whose elements have variable size.
1637 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
1640 * cp-tree (struct cp_decl_specifier_seq): Rename to
1641 conflicting_specifiers_p
1642 * parser.c (cp_parser_set_storage_class): Set
1643 conflicting_specifiers_p for the input decl specifier
1644 if a typedef specifier is present. Rename uses of
1645 multiple_specifiers_p to conflicting_specifiers_p.
1646 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
1647 class specifier has already been set for this declaration,
1648 set conflicting_specifiers_p to true on the decl_specs.
1649 * decl.c (grokdeclarator): Rename uses of
1650 multiple_specifiers_p to conflicting_specifiers_p.
1652 2006-10-10 Brooks Moses <bmoses@stanford.edu>
1654 * Make-lang.in: Added "c++.pdf" target support.
1656 2006-10-10 Richard Guenther <rguenther@suse.de>
1658 PR rtl-optimization/29323
1659 * decl.c (finish_function): Set TREE_NOTHROW only for
1660 functions that bind local.
1662 2006-10-09 Richard Henderson <rth@redhat.com>
1664 Revert emutls patch.
1666 2006-10-04 Richard Henderson <rth@redhat.com>
1667 Jakub Jelinek <jakub@redhat.com>
1669 * decl.c (grokvardecl): Don't error if !have_tls.
1670 (grokdeclarator): Likewise.
1671 * parser.c (cp_parser_omp_threadprivate): Likewise.
1673 2006-10-03 Mark Mitchell <mark@codesourcery.com>
1676 * friend.c (do_friend): Improve comments; add assertion.
1677 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
1678 typenames for qualified names used in declarations, even when
1679 caching qualified name lookup.
1682 * decl2.c (grokfield): Don't handle access declarations here.
1683 * parser.c (cp_parser_using_declaration): Handle access
1685 (cp_parser_block_declaration): Adjust calls to
1686 cp_parser_using_declaration.
1687 (cp_parser_member_declaration): Likewise. Use
1688 cp_parser_using_declaration to look for access_declarations.
1690 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1693 * init.c (build_new): Check for invalid init.
1695 2006-10-02 Mark Mitchell <mark@codesourcery.com>
1698 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
1699 not try to actually evaluate sizeof for a VLA type.
1701 2006-10-01 Mark Mitchell <mark@codesourcery.com>
1704 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
1705 * semantics.c (baselink_for_fns): Build a baselink, even when
1706 processing a template.
1709 * parser.c (cp_parser_postfix_dot_deref_expression): Use
1710 BASELINK_ACCESS_BINFO as the qualifying scope when calling
1711 adjust_result_of_qualified_name_lookup.
1713 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
1717 * cp-tree.h (redeclare_class_template): Adjust declaration
1718 to return bool instead of void.
1719 * pt.c (redeclare_class_template): Update definition.
1720 Return false on error.
1721 * decl.c (xref_tag): Return error_mark_node if
1722 redeclare_class_template returned false.
1725 * cp-tree.h (begin_specialization): Return bool
1727 * pt.c (check_specialization_scope): Likwise.
1728 Adjust comment. Return false if a specialization
1729 isn't permitted in the current scope.
1730 (begin_specialization): Use the return value of
1731 check_specialization_scope.
1732 * parser.c (cp_parser_explicit_specialization): If
1733 begin_specialization returned false, skip the rest
1734 of the specialization.
1736 2006-09-21 Mark Mitchell <mark@codesourcery.com>
1739 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
1742 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
1745 * decl.c (shadow_tag): Return error_mark_node
1746 if maybe_process_partial_specialization failed.
1749 * decl.c (grokdeclarator): Return error_mark_node on
1750 declaration with two or more data types.
1752 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
1755 * class.c (check_for_override): Remove dllimport from virtual
1758 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
1761 * parser.c (cp_parser_labeled_statement): Return nothing. Do
1762 not take in_statement_expr and in_compound as arguments. Rename
1763 to cp_parser_label_for_labeled_statement. Parse only the label,
1765 (cp_parser_statement): Parse the statement of a labeled-statement
1766 from here, using tail recursion.
1768 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
1771 * init.c (build_zero_init): If we have an error mark node for
1772 the array size, return.
1774 2006-09-10 Mark Mitchell <mark@codesourcery.com>
1777 * cp-objcp-common.c (cxx_staticp): New function.
1778 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
1779 * cp-tree.h (cxx_staticp): New function.
1781 2006-09-09 Jason Merrill <jason@redhat.com>
1784 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
1786 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1789 * parser.c (cp_parser_skip_until_found): Rename to
1790 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
1791 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
1792 Reorganize. Adjust comment.
1793 (cp_parser_template_declaration_after_export): Adjust call.
1794 (cp_parser_enclosed_template_argument_list): Likewise.
1796 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
1799 * init.c (build_new_1): Build a distinct type copy
1800 for the array type that was returned from
1801 build_cplus_array_type.
1803 2006-09-07 Jason Merrill <jason@redhat.com>
1806 * cvt.c (convert_to_void): Enable previous change.
1809 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
1812 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
1815 * pt.c (fold_non_dependent_expr): Make sure expr is not
1816 dereferenced if it is NULL.
1818 2006-09-06 Zak Kipling <zak@transversal.com>
1821 * decl.c (make_rtl_for_nonlocal_decl),
1822 (start_preparsed_function): Don't use lbasename on
1823 input_filename when calling get_fileinfo.
1824 * semantics.c (begin_class_definition): Likewise.
1825 * lex.c (cxx_make_type): Likewise.
1826 (handle_pragma_interface): Call get_fileinfo on input_filename,
1827 not on the parameter to the directive.
1829 2006-09-06 Mark Mitchell <mark@codesourcery.com>
1832 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
1836 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
1839 2006-09-06 Jason Merrill <jason@redhat.com>
1842 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
1843 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
1844 * tree.c (build_cplus_new): Set it.
1847 * cvt.c (convert_to_void): Replace a subexpression with no side
1848 effects with void_zero_node.
1849 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
1850 (get_first_fn): Ditto.
1851 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
1853 2006-09-05 Jason Merrill <jason@redhat.com>
1856 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
1857 where the name is a type used incorrectly.
1860 * typeck.c (maybe_warn_about_returning_address_of_local): Look
1861 through COMPONENT_REF and ARRAY_REF.
1864 * name-lookup.c (do_class_using_decl): Try to find the base even
1865 if bases_dependent_p.
1866 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
1869 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
1871 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
1873 PR 23287 Revert my 2006-09-01 patch.
1874 * parser.c: Reverted.
1877 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
1883 * parser.c (cp_parser_template_parameter_list): Add
1884 invalid template parameters to the parameter list as
1887 2006-09-02 Jakub Jelinek <jakub@redhat.com>
1890 * except.c (build_throw): Only set current_function_returns_abnormally
1891 if cfun is not NULL.
1894 * repo.c (repo_file): Remove.
1895 (open_repo_file, reopen_repo_file_for_write): Return fopened
1896 FILE * instead of setting global repo_file variable.
1897 (init_repo): Adjust caller.
1898 (finish_repo): Likewise. Return instead of goto out before
1899 reopen_repo_file_for_write has been called.
1901 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
1904 * semantics.c (finish_call_expr): Add assert.
1905 * name-lookup.c (lookup_arg_dependent): Check we found an overload
1909 * parser.c (cp_parser_id_expression): Add member_p
1910 argument. Update all callers.
1911 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
1912 the object's scope, if valid.
1913 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
1915 (cp_parser_postfix_dot_deref_expression): Set object_scope.
1916 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
1918 2006-08-30 Jason Merrill <jason@redhat.com>
1921 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
1922 the fields have been processed.
1924 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
1927 * call.c (build_x_va_arg): Remove the reference type
1928 from the type before creating the pointer type.
1930 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
1933 * except.c (expand_start_catch_block): Use correct types for bitwise
1936 2006-08-28 Jason Merrill <jason@redhat.com>
1939 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
1940 fields can't be packed.
1943 * cvt.c (convert_to_void): Don't automatically load from volatiles
1944 of TREE_ADDRESSABLE type.
1946 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1949 * cp-tree.h (maybe_process_partial_specialization): Return
1950 tree instead of void.
1951 * parser.c (cp_parser_class_head): Use return value of
1952 maybe_process_partial_specialization.
1953 * pt.c (maybe_process_partial_specialization): Return error_mark_node
1954 for broken specializations, TYPE otherwise. Check for template
1955 template parameters.
1957 2006-08-27 Mark Mitchell <mark@codesourcery.com>
1960 * pt.c (register_specialization): Return error_mark_node for
1961 specialization-after-instantiation.
1962 * decl2.c (mark_used): Mark the main function used when one of its
1965 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
1968 * class.c (check_field_decls): Don't issue error about
1969 local classes containing static data members.
1971 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
1974 * parser.c (struct cp_token): Add input_file_stack_index.
1975 (eof_token): Update.
1976 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
1977 (cp_lexer_set_source_position_from_token): Restore input file
1980 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
1985 * pt.c (process_template_parm): Store invalid template
1986 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
1987 (push_inline_template_parms_recursive): Check for template
1988 parameters having a TREE_VALUE of error_mark_node rather than
1989 check the parameter itself.
1990 (mangle_class_name_for_template): Likewise.
1991 (comp_template_parms): When comparing the individual template
1992 parameters, return 1 if either is error_mark_node.
1993 (current_template_args): Robustify.
1994 (redeclare_class_template): Likewise.
1996 2006-08-26 Mark Mitchell <mark@codesourcery.com>
1999 * class.c (resolve_address_of_overloaded_function): Add
2000 access_path parameter. Perform access checks.
2001 (instantiate_type): Adjust call to
2002 resolve_address_of_overloaded_function. Remove unnecessary code.
2003 * tree.c (is_overloaded_fn): Document. Return 2 when there are
2004 acutally multiple functions.
2005 (really_overloaded_fn): Use is_overloaded_fn.
2006 * mangle.c (write_expression): Handle BASELINKs.
2007 * cp-tree.h (really_overloaded_fn): Return bool.
2008 (baselink_for_fns): Declare.
2009 * search.c (lookup_member): Check access for single static
2011 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
2012 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
2013 * semantics.c (finish_call_expr): Use baselink_for_fns.
2014 (baselink_for_fns): New function.
2015 (finish_id_expression): Use it.
2016 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
2019 * pt.c (tsubst): Issue errors about attempts to create VLAs at
2020 template-instantiation time.
2022 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2025 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
2026 template parameters. Improve error message for template type
2030 * cp-tree.h (grok_op_properties): Return bool instead of void.
2031 * decl.c (grokfndecl): Discard invalid operator declarations.
2032 (copy_fn_p): Revert change for PR 27547.
2033 (grok_op_properties): Return error status (true on success).
2034 * pt.c (tsubst_decl): Discard invalid operator declarations.
2036 2006-08-25 Mark Mitchell <mark@codesourcery.com>
2039 * decl.c (grokdeclarator): Disallow declarations with qualified
2040 names in local scopes.
2042 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
2045 * decl.c (make_typename_type): Only try and resolve it when
2046 context is not dependent. Refactor.
2047 * decl2.c (check_classfn): Push to class scope before looking for
2050 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
2053 * g++spec.c (lang_specific_driver): Always check if we need to
2054 swallow a space-separated arg to '-x'.
2055 * lang-specs.h: Don't create ouput files for '-xc++-header'
2058 2006-08-23 Jason Merrill <jason@redhat.com>
2061 * pt.c (push_template_decl_real): A friend template with class
2062 scope isn't primary.
2064 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
2067 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
2068 Move -fno-rtti check to be more specific.
2070 2006-08-22 Jason Merrill <jason@redhat.com>
2073 * call.c (build_over_call): Don't make a copy here if build_call
2076 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
2079 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
2082 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
2085 * parser.c (cp_parser_postfix_expression): Make sure that the
2086 saved value for parser->type_definition_forbidden_message is
2087 restored before returning to avoid an invalid free().
2089 2006-08-22 Jason Merrill <jason@redhat.com>
2092 * typeck.c (merge_types): If either of the types have the right
2093 attributes, return that one.
2095 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
2096 doing this to class types.
2097 * typeck.c (original_type): Deal with type quals properly.
2099 2006-08-21 Jason Merrill <jason@redhat.com>
2102 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
2103 just leave the expression as it is.
2104 (finish_stmt_expr): If the statement-expression has class type,
2105 wrap it in a TARGET_EXPR.
2106 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
2108 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
2110 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
2113 * decl.c (duplicate_decls): Return early if either
2114 newdecl or olddecl is error_mark_node.
2117 * decl.c (grokdeclarator): Return early after
2118 issuing diagnostic about an incomplete type.
2121 * tree.c (decl_anon_ns_mem_p): Robustify.
2122 * decl2.c (determine_visibility): Likewise.
2124 2006-08-20 Mark Mitchell <mark@codesourcery.com>
2127 * tree.c (cast_valid_in_integral_constant_expression_p): New
2129 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
2130 * pt.c (tsubst_expr): Add integral_constant_expression_p
2132 (fold_non_dependent_expr): Adjust callers of
2133 tsubst_{expr,copy_and_build}.
2134 (tsubst_friend_function): Likewise.
2135 (tsubst_template_arg): Likewise.
2136 (tsubst_default_argument): Likewise.
2137 (tsubst_decl): Likewise.
2139 (tsubst_omp_clasuses): Likewise.
2140 (regenerate_decl_fromp_template): Likewise.
2141 (instantiate_decl): Likewise.
2142 (tsubst_initializer_list): Likewise.
2143 (tsubst_enum): Likewise.
2144 (tsubst_expr): Use RECUR throughout.
2145 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
2146 invalid casts in integral constant expressions.
2147 * parser.c (cp_parser_postfix_expression): Use
2148 cast_valid_in_integral_constant_expression_p.
2149 (cp_parser_cast_expression): Likewise.
2150 (cp_parser_functional_cast): Likewise.
2153 * pt.c (tsubst_qualified_id): Do not strip references from
2156 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2159 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
2161 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
2162 for valid type-names.
2163 (cp_parser_unqualified_id): Fix error handling for destructors.
2166 * decl.c (xref_tag): Improve error message. Return early on error.
2169 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
2171 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
2174 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
2176 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
2179 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
2180 perform_integral_promotions for non integral type.
2182 2006-08-16 Jason Merrill <jason@redhat.com>
2185 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
2186 if arg is a function.
2188 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2191 * init.c (build_new): Return early on invalid placement.
2193 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
2196 * pt.c (process_template_parm): Robustify.
2198 2006-08-14 Steve Ellcey <sje@cup.hp.com>
2202 * operators.def: Remove <?, ?>, <?=, and >?= operators.
2203 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
2204 (cp_parser_warn_min_max): Remove.
2206 2006-08-11 Jason Merrill <jason@redhat.com>
2209 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
2210 attributes applied to a TYPENAME_TYPE.
2212 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
2215 * pt.c (coerce_template_parms): Copy across the
2216 invalid template arguments to the new template inner arguments.
2217 (retrieve_specialization): Robustify.
2220 * pt.c (coerce_template_template_parms): Robustify.
2223 * error.c (dump_template_parms): Robustify.
2226 * pt.c (redeclare_class_template): Robustify.
2229 * pt.c (type_unification_real): Robustify.
2231 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
2234 * decl.c (start_decl): Return error_mark_node if a
2235 diagnostic was issed for an invalid typedef initialization.
2237 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2240 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
2241 when parsing destructor names.
2244 * decl.c (duplicate_decls): Call check_default_args here.
2245 (start_preparsed_function): Do not call check_default_args.
2246 * name-lookup.c (pushdecl_maybe_friend): Only call
2247 check_default_args if duplicate_decls got bypassed.
2249 2006-08-02 Richard Guenther <rguenther@suse.de>
2253 2006-07-05 Richard Guenther <rguenther@suse.de>
2254 Andrew Pinski <pinskia@gcc.gnu.org>
2257 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2258 top level qualifiers for pointer type comparisons.
2260 2006-08-02 Mark Mitchell <mark@codesourcery.com>
2263 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
2265 2006-07-31 Mark Mitchell <mark@codesourcery.com>
2268 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
2269 (stabilize_call): Tweak documentation.
2270 (stabilize_init): Only call stabilize_call for calls.
2272 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2275 * decl2.c (check_classfn): Remove early return.
2276 * search.c (lookup_member): Return NULL with bad type.
2278 2006-08-01 Steve Ellcey <sje@cup.hp.com>
2281 * decl.c (check_initializer): Check for 1 initializer on scalar types.
2283 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
2286 * pt.c (tsubst_copy_and_build): Mark used enum types.
2287 * semantics.c (finish_id_expression): Likewise.
2289 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2292 * decl.c (grokdeclarator): Check whether "long" or "short" was
2293 specified for non-integral types.
2295 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2297 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2299 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
2303 * pt.c (process_template_parm) Store invalid template
2304 parameters as error_mark_node in the paramater list.
2305 (push_inline_template_parms_recursive): Handle invalid
2306 template parameters.
2307 (comp_template_parms): Likewise.
2308 (check_default_tmpl_arg): Likewise.
2309 (coerce_template_template_parms): Likewise.
2310 (mangle_class_name_for_template): Likewise.
2311 (tsubst_template_parms): Likewise.
2312 * error.c (dump_template_argument_list): Likewise.
2314 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
2316 * cp-tree.h: Fix a comment typo.
2318 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2321 * decl.c (grokdeclarator): Return error_mark_node after invalid
2324 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
2327 * decl.c (grokvardecl): Use FROB_CONTEXT.
2328 * pt.c (register_specialization): Likewise.
2330 2006-07-23 Mark Mitchell <mark@codesourcery.com>
2333 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
2334 * name-lookup.c (unqualified_namespace_lookup): There is no way to
2335 have a hidden name in non-namespace scopes.
2336 * pt.c (tsubst_friend_class): Look for hidden names.
2337 * decl.c (lookup_and_check_tag): Fix typo in comment.
2339 * semantics.c (finish_compound_literal): Fix typo in comment.
2341 2006-07-21 Jason Merrill <jason@redhat.com>
2343 * decl2.c (determine_visibility): Don't propagate visibility from
2345 (constrain_class_visibility): Don't warn in system headers.
2346 Don't warn about pointer fields.
2348 2006-07-20 Mike Stump <mrs@apple.com>
2350 * decl2.c (determine_visibility_from_class): Don't use hidden
2351 visibility for explicit instantiations.
2353 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2356 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
2357 valid decls. Cleanup.
2360 * semantics.c (check_template_template_default_arg): Simplify
2363 2006-07-20 Jason Merrill <jason@redhat.com>
2366 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
2367 const variables with implicit internal linkage.
2368 * tree.c (decl_linkage): Only return lk_external if it's set.
2371 * decl2.c (constrain_visibility): Ignore the anonymous namespace
2372 for extern "C" decls.
2373 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
2375 * decl2.c (constrain_visibility): Remove specified and reason
2376 parameters. Don't touch decls that already have explicit visibility.
2377 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
2379 (determine_visibility_from_class): Reverse sense of
2380 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
2381 (constrain_class_visibility): Only complain about member visibility
2382 if the member type is another class. Don't change visibility of the
2385 2006-07-19 Mark Mitchell <mark@codesourcery.com>
2388 * decl.c (layout_var_decl): Don't call push_local_name here.
2389 (initialize_artificial_var): Assert artificiality.
2390 (cp_finish_decl): Call push_local_name here.
2392 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2395 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
2398 2006-07-18 Mark Mitchell <mark@codesourcery.com>
2401 * semantics.c (check_accessibility_of_qualified_id): Robustify.
2404 * pt.c (tsubst_decl): Handling substitutions into a static data
2405 member from within the scope of the tempalte itself.
2407 2006-07-18 Lee Millward <lee.millward@gmail.com>
2410 * method.c (locate_copy): Check for non_reference
2411 returning error_mark_node.
2414 * decl.c (duplicate_decls): Return error_mark_node
2415 on ambiguous declaration.
2417 2006-07-18 Steve Ellcey <sje@cup.hp.com>
2420 * search.c (adjust_result_of_qualified_name_lookup): Change
2421 assert to part of if statement.
2423 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2426 * decl.c (reshape_init_class): Return error_mark_node on error.
2428 2006-07-17 Steve Ellcey <sje@cup.hp.com>
2431 * decl2.c (check_classfn): Return NULL_TREE on error.
2433 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2436 * name-lookup.c (pushdecl_maybe_friend): Return early on
2438 * except.c (expand_start_catch_block): Use error_mark_node instead
2439 of NULL_TREE for invalid decls.
2440 * parser.c (cp_parser_exception_declaration): Return error_mark_node
2441 on invalid catch parameter. Simplify.
2443 2006-07-16 Jakub Jelinek <jakub@redhat.com>
2446 * decl2.c (note_vague_linkage_var): Removed.
2447 (finish_static_data_member_decl): Add decl to pending_statics vector
2448 directly. Do it even for non-public decls.
2450 2006-07-15 Lee Millward <lee.millward@gmail.com>
2453 * decl2.c (acceptable_java_type): Robustify. Use
2454 proper Boolean return type instead of return 1.
2455 (check_java_method): Don't issue error about
2456 type not being an acceptable Java parameter if
2457 it's error_mark_node.
2460 * parser.c (cp_parser_elaborated_type_specifier):
2461 Return early if an invalid type was detected.
2463 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2466 * parser.c (cp_parser_check_decl_spec): New function.
2467 (cp_parser_decl_specifier_seq): Factor out check for repeated
2468 decl-specifiers into cp_parser_check_decl_spec. Use it.
2469 (cp_parser_type_specifier_seq): Use it.
2472 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
2476 * decl2.c (cplus_decl_attributes): Check for invalid decls.
2478 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2481 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
2482 * decl2.c (grokfield): Likewise.
2484 2006-07-12 Geoffrey Keating <geoffk@apple.com>
2486 * decl2.c (determine_visibility): Don't change visibility of
2487 function locals because of -fvisibility-inlines-hidden.
2489 2006-07-12 Jason Merrill <jason@redhat.com>
2492 * semantics.c (note_decl_for_pch): Don't premangle templates.
2494 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
2496 * typeck.c (string_conv_p): Remove spurious quotation mark in
2499 2006-07-07 Lee Millward <lee.millward@gmail.com>
2500 Andrew Pinski <pinskia@gmail.com>
2503 * decl.c (define_label): Return error_mark_node on error.
2504 * semantics.c (finish_label_stmt): Don't call
2505 add_stmt for invalid labels.
2507 2006-07-06 Jason Merrill <jason@redhat.com>
2510 * decl2.c (finish_static_data_member_decl): Don't assert
2513 2006-07-05 Jason Merrill <jason@redhat.com>
2517 * class.c (check_field_decls): Check TYPE_PACKED after
2518 stripping array types.
2519 (finish_struct_bits): Don't copy TYPE_SIZE here.
2522 * friend.c (is_friend): Fix DR 45 implementation.
2524 2006-07-05 Richard Guenther <rguenther@suse.de>
2525 Andrew Pinski <pinskia@gcc.gnu.org>
2528 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
2529 top level qualifiers for pointer type comparisons.
2531 2006-07-01 Jason Merrill <jason@redhat.com>
2534 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
2537 2006-06-30 Jason Merrill <jason@redhat.com>
2540 * call.c (build_new_method_call): Force evaluation of the
2541 instance pointer, not the object.
2543 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
2545 * decl2.c: Fix a comment typo.
2547 2006-06-30 Jason Merrill <jason@redhat.com>
2550 * decl2.c (grokfield): Only try to treat the decl as an access
2551 declaration if the scope is a class.
2553 2006-06-29 Jason Merrill <jason@redhat.com>
2560 * decl2.c (determine_visibility): Overhaul.
2561 (determine_visibility_from_class): Likewise.
2562 (min_vis_r, type_visibility, constrain_visibility): New fns.
2563 (constrain_visibility_for_template): Likewise.
2564 (constrain_class_visibility): Likewise.
2565 * decl.c (cp_finish_decl): Call determine_visibility for function
2567 * name-lookup.c (pushtag): Call determine_visibility.
2568 * decl.c (duplicate_decls): Don't copy visibility from template to
2570 * pt.c (check_explicit_specialization): Likewise.
2571 (lookup_template_class, tsubst_decl): Call determine_visibility.
2572 * class.c (finish_struct_1): Call constrain_class_visibility.
2577 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
2579 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
2580 (cp_parser_enum_specifier): Likewise.
2581 (cp_parser_elaborated_type_specifier): Apply attributes if this
2582 declares only the class.
2583 (cp_parser_class_specifier): Apply leading attributes immediately.
2584 * semantics.c (begin_class_definition): Add attributes parameter,
2585 apply them to the type.
2589 * tree.c (decl_anon_ns_mem_p): New function.
2590 * cp-tree.h: Declare it.
2591 * decl2.c (determine_visibility): Make anonymous namespace
2593 (min_vis_r, constrain_visibility): Likewise.
2594 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
2596 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
2598 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
2599 on anonymous namespaces.
2601 2006-06-28 Jason Merrill <jason@redhat.com>
2604 * pt.c (convert_template_argument): Pass all template arguments
2605 on to coerce_template_template_parms.
2607 2006-06-25 Lee Millward <lee.millward@gmail.com>
2608 Mark Mitchell <mark@codesuorcery.com>
2611 * decl2.c (grokbitfied): Remove check for grokdeclarator
2612 returning NULL_TREE, instead check for error_mark_node
2613 to indicate failure.
2614 * decl.c (grokdeclarator): Adjust block comment.
2616 2006-06-25 Lee Millward <lee.millward@gmail.com>
2619 * mangle.c (mangle_conv_op_name_for_type): Check for
2621 * name-lookup.c (push_class_level_binding): Robustify.
2622 (do_class_using_decl): Return early if name is error_mark_node.
2624 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2627 * name-lookup.c (pushtag): Return if we have error_mark_node.
2629 2006-06-23 Steve Ellcey <sje@cup.hp.com>
2632 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
2634 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2637 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
2638 arguments. Fix comment.
2641 * init.c (build_new_1): Handle error_mark_nodes returned by
2642 build_java_class_ref.
2643 (build_java_class_ref): Do not abort compilation, but return
2644 error_mark_node. Improve error message. Fix indentation.
2646 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
2649 * decl.c (start_decl): Check that dllimports are not initialized.
2651 2006-06-22 Lee Millward <lee.millward@gmail.com>
2654 * typeck2.c (build_m_component_ref): Use error_operand_p.
2657 * decl.c (grokdeclarator): Return error_mark_node on
2658 invalid uses of the scope resolution operator.
2660 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2663 * pt.c (determine_specialization): Check for invalid decls.
2666 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
2670 * rtti.c (get_tinfo_decl_dynamic): Robustify.
2672 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2675 * init.c (push_base_cleanups): Skip members with invalid types.
2676 * typeck.c (build_class_member_access_expr): Robustify.
2678 2006-06-19 Mark Mitchell <mark@codesourcery.com>
2680 * pt.c (instantiate_template): Fix typo in comment.
2682 2006-06-19 Richard Guenther <rguenther@suse.de>
2684 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
2685 power-of-two token vector size.
2687 2006-06-16 Mark Mitchell <mark@codesourcery.com>
2690 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
2694 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
2698 * decl.c (have_extern_spec): Remove.
2699 (start_decl): Do not check have_extern_spec.
2700 (start_function): Likewise.
2701 * cp-tree.h (have_extern_spec): Remove.
2702 * parser.c (cp_parser_linkage_specification): Don't set
2704 (cp_parser_init_declarator): Likewise.
2705 (cp_parser_parameter_declaration): Do not treat parameters as
2706 within the scope of an unbraced linkage specification.
2708 2006-06-15 Mark Mitchell <mark@codesourcery.com>
2711 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
2713 * pt.c (unify): Use it.
2716 * call.c (build_conditional_expr): Robustify.
2719 * pt.c (instantiate_template): Set processing_template_decl to
2720 zero while performing substitutions.
2722 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2725 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
2726 identify destructors.
2727 (cp_parser_nested_name_specifier_opt): Remove invalid
2729 (cp_parser_template_id): Refine heuristic for determining whether
2730 we are entering a scope.
2733 * parser.c (cp_parser_declarator): Robustify.
2736 * pt.c (tsubst_expr): Use finish_omp_atomic.
2737 (value_dependent_expression_p): All CALL_EXPRs are dependent.
2738 * semantics.c (finish_omp_atomic): Rework to use standard
2739 paradigms for handling non-dependent expressions.
2741 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2743 * typeck.c (build_modify_expr): Tidy diagnostic message.
2745 2006-06-14 Mark Mitchell <mark@codesourcery.com>
2748 * typeck.c (build_modify_expr): Disallow array assignment.
2750 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2752 * cp-tree.def: Fix typo.
2754 2006-06-13 Mark Mitchell <mark@codesourcery.com>
2757 * decl.c (decls_match): Allow an extern "C" variable declarations
2758 from different namespaces to match.
2759 (duplicate_decls): Disallow redeclaring a variable with a
2760 different linkage specification.
2762 2006-06-13 Jakub Jelinek <jakub@redhat.com>
2765 * cp-tree.h (cxx_int_tree_map): New struct.
2766 (struct language_function): Add extern_decl_map field.
2767 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
2768 to cp_function_chain->extern_decl_map hash table instead of
2769 copying over DECL_UID.
2770 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
2772 (cp_genericize_r): Remap DECL_EXTERN local decls using
2773 cp_function_chain->extern_decl_map hash table.
2774 * decl.c (finish_function): Clear extern_decl_map.
2776 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2779 * semantics.c (finish_offsetof): Handle pseudo-destructors.
2782 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
2786 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
2789 2006-06-12 Roger Sayle <roger@eyesopen.com>
2792 * typeck2.c (build_functional_cast): Use cp_convert to construct
2793 non-aggregate initializers instead of the user-level build_c_cast.
2795 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2798 * cp-tree.h (finish_offsetof): Add prototype.
2799 * semantics.c (finish_offsetof): New function.
2800 * parser.c (cp_parser_builtin_offsetof): Call it instead of
2802 * pt.c (tsubst_copy_and_build): Likewise.
2804 2006-06-06 Mark Mitchell <mark@codesourcery.com>
2807 * call.c (standard_conversion): Require that the derived type be
2808 complete when performing a derived-to-base conversion.
2810 2006-06-04 Mark Mitchell <mark@codesourcery.com>
2813 * decl.c (cp_finish_decl): Process initializers for static data
2814 members with non-dependent initializers, even in templates.
2817 * decl.c (maybe_deduce_size_from_array_init): If the declaration
2818 is erroneous, give it an erroneous type.
2819 (layout_var_decl): If the type is erroneous, give up.
2820 (check_initializer): Likewise.
2823 * cp-tree.h (TYPE_OBJ_P): New macro.
2824 (TYPE_PTROB_P): Use it.
2825 (TYPE_REF_OBJ_P): Likewise.
2826 * semantics.c (finish_compound_literal): Do not permit compound
2827 literals of non-object types.
2830 * typeck.c (original_type): Robustify.
2832 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2835 * init.c (constant_value_1): Return decl instead of error_mark_node
2836 for invalid initializers.
2838 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2841 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
2842 on operand of the COND_EXPR for the null pointer check.
2844 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
2847 * typeck.c (build_unary_op): Mark the function as being used.
2849 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
2852 * parser.c (cp_parser_initial_pragma): Read one more token for
2853 caller after reading PCH file in.
2855 2006-05-31 Mark Mitchell <mark@codesourcery.com>
2858 * call.c (perform_implicit_conversion): Do not actually perform
2859 conversions in templates.
2862 * call.c (resolve_args): Check for invalid uses of bound
2863 non-static member functions.
2864 * init.c (build_offset_ref): Return error_mark_node for errors.
2867 * decl.c (reshape_init): Robustify.
2868 (reshape_init_array_1): Likewise.
2870 2006-05-30 Mark Mitchell <mark@codesourcery.com>
2873 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
2874 "friend" specifiers that do not appear in class scopes.
2877 * class.c (check_bitfield_decl): Ensure that all bitfields have
2880 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
2882 * pt.c (convert_nontype_argument): Fix a typo in an error
2885 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2887 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
2888 spelling conventions.
2890 2006-05-24 Mark Mitchell <mark@codesourcery.com>
2893 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
2894 error_mark_node to indicate an initialization is OK.
2895 (start_decl): Likewise. Adjust call to start_decl_1.
2896 (start_decl_1): Add initialized parameter. Simplify.
2897 * except.c (initialize_handler_parm): Adjust call to
2899 (expand_start_catch_block): Let cp_finish_decl initialize catch
2901 * cp-tree.h (start_decl_1): Adjust prototype.
2902 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
2903 (instantiate_decl): Let cp_finish_decl handle initialization.
2904 * semantics.c (finish_compound_literal): Create a temporary
2905 variable for the literal.
2906 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
2908 * decl2.c (finish_static_data_member_decl): Don't set
2910 (grokfield): Do not try to initialize functions.
2912 2006-05-23 Mark Mitchell <mark@codesourcery.com>
2915 * pt.c (determine_specialization): Disallow partial
2916 specializations of templates.
2918 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2921 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
2923 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
2925 2006-05-21 Mark Mitchell <mark@codesourcery.com>
2928 * cp-tree.h (cp_save_expr): New function.
2929 * init.c (build_new): Correct logic for zero-element array
2930 warning. Use cp_save_expr.
2931 * tree.c (cp_save_expr): New function.
2933 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2936 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
2939 2006-05-19 Mike Stump <mrs@apple.com>
2941 * typeck.c (default_conversion): Remove static.
2943 2006-05-19 Mark Mitchell <mark@codesourcery.com>
2946 * cp-tree.h (begin_function_try_block): Change prototype.
2947 (finish_function_handler_sequence): Likewise.
2948 * parser.c (cp_parser_function_try_block): Adjust calls.
2949 * pt.c (tsubst_expr): Adjust calls.
2950 * semantics.c (begin_function_try_block): Create an artificial
2952 (finish_function_handler_sequence): Close it.
2954 2006-05-18 Mark Mitchell <mark@codesourcery.com>
2958 * typeck.c (decay_conversion): Convert bitfields to their declared
2959 types here. Improve documentation. Avoid use of cp_convert.
2960 (default_conversion): Make it static. Perform integral promotions
2961 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
2963 * init.c (build_init): Remove.
2964 (expand_default_init): Do not call rvalue.
2965 * call.c (null_ptr_cst_p): Robustify.
2966 (build_conditional_expr): Tidy.
2967 * except.c (build_throw): Do not perform lvalue-to-rvalue
2968 conversion on operand before initializing temporary.
2969 * tree.c (convert.h): Include it.
2970 (convert_bitfield_to_declared_type): Use convert_to_integer, not
2972 (rvalue): Don't convert bitfields to their declared type here.
2973 * cp-tree.h (build_init): Remove.
2974 (default_conversion): Likewise.
2975 * typeck2.c (build_m_component_ref): Do not perform
2976 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
2977 conversions here. Correct error message.
2979 2006-05-17 Mark Mitchell <mark@codesourcery.com>
2982 * decl2.c (check_member_template): Remove checks for virtual
2984 * parser.c (cp_parser_function_specifier_opt): Complain about
2986 (cp_parser_pure_specifier): Likewise.
2989 * parser.c (cp_parser_set_storage_class): Check for
2990 invalid uses of storage classes on unbraced linkage
2992 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
2993 to cp_parser_set_storage_class.
2995 2006-05-17 Jakub Jelinek <jakub@redhat.com>
2998 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
3002 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
3003 on combined parallel workshare constructs.
3004 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
3006 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3009 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
3011 2006-05-15 Mark Mitchell <mark@codesourcery.com>
3014 * cp-tree.h (perform_access_checks): New function.
3015 * semantics.c (perform_access_checks): New function.
3016 (perform_deferred_access_checks): Use it.
3017 * parser.c (cp_parser_simple_declaration): Adjust call to
3018 cp_parser_init_declarator.
3019 (cp_parser_type_parameter): Do not defer checks in default
3021 (cp_parser_explicit_specialization): Adjust call to
3022 cp_parser_single_declaration.
3023 (cp_parser_init_declarator): Perform template-parameter access
3025 (cp_parser_parameter_declaration): Do not defer checks for
3026 template parameter default arguments.
3027 (cp_parser_template_declaration_after_export): Gather access
3028 checks for template parameters, and pass them to
3029 cp_parser_single_declaration.
3030 (cp_parser_template_parameter_access_checks): New function.
3031 (cp_parser_single_declaration): Add checks parameter.
3034 * call.c (convert_like_real): Convert bitfields to their declared
3035 types when forming an rvalue.
3036 * tree.c (convert_bitfield_to_declared_type): New function.
3038 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
3040 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3043 * pt.c (any_dependent_template_arguments_p): Return early on invalid
3047 * search.c (adjust_result_of_qualified_name_lookup): Skip on
3048 invalid context_class.
3051 * pt.c (do_decl_instantiation): Return early on invalid decl.
3054 * pt.c (push_template_decl_real): Return error_mark_node instead
3058 * pt.c (tsubst_friend_class): Return early on invalid friend
3061 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3063 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
3064 (cp/decl2.o): Likewise.
3065 (cp/typeck.o): Likewise.
3066 (cp/cvt.o): Likewise.
3067 (cp/parser.o): Likewise.
3068 (cp/call.o): Replace target.h with $(TARGET_H).
3070 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
3072 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
3073 COMPONENT_REF alone.
3075 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3078 * decl.c (copy_fn_p): Return early on non-member functions.
3080 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3083 * decl2.c (build_memfn_type): Skip invalid functions and class types.
3085 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3088 * pt.c (convert_nontype_argument): Return early on invalid arguments.
3090 * pt.c (process_template_parm): Remove superfluous temporary.
3093 * pt.c (process_template_parm): Handle erroneous non-type parameters.
3096 * typeck.c (convert_for_initialization): Skip erroneous types.
3099 * typeck.c (convert_arguments): Return early on args with
3102 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
3105 * typeck.c (build_static_cast_1): Save casted types in used types
3107 (build_reinterpret_cast_1): Same.
3108 * rtti.c (build_dynamic_cast_1): Same.
3110 2006-05-04 Jakub Jelinek <jakub@redhat.com>
3113 * parser.c (cp_parser_omp_for_loop): Only call
3114 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
3117 2006-05-02 Mark Mitchell <mark@codesourcery.com>
3120 * decl.c (grokdeclarator): Robustify checks for defining members
3121 of incomplete types.
3124 * class.c (add_method): Call grok_special_member_properties.
3125 * decl.c (grokdeclarator): Don't call it here.
3126 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
3127 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
3129 (start_method): Don't call grok_special_member_properties.
3130 * method.c (implicitly_declare_fn): Likewise.
3131 * pt.c (instantiate_class_template): Likewise.
3132 * decl2.c (grokfield): Likewise.
3134 2006-05-02 Jakub Jelinek <jakub@redhat.com>
3137 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
3138 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
3139 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
3141 2006-04-30 Mark Mitchell <mark@codesourcery.com>
3144 * pt.c (tsubst_default_argument): Increment function_depth around
3145 call to tsubst_expr.
3146 * parser.c (cp_parser_parameter_declaration): Likewise.
3147 * decl2.c (mark_used): Tidy.
3149 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3152 * decl.c (grok_op_properties): Skip operators with invalid args
3153 when checking for class-type or enum-type args.
3155 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3158 * decl.c (copy_fn_p): Skip functions with invalid first arg.
3160 2006-04-27 Mark Mitchell <mark@codesourcery.com>
3163 * tree.c (rvalue): Convert bitfields to their declared types.
3166 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
3169 2006-04-24 Mark Mitchell <mark@codesourcery.com>
3172 * typeck.c (decay_conversion): Don't adjust bitfield types.
3173 (perform_integral_promotions): Treat bitfield enums as enums, not
3174 as short integer types.
3175 * tree.c (rvalue): Convert bitfields to their correct types.
3177 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3180 * class.c (layout_class_type): Skip fields with invalid types.
3182 2006-04-23 Mark Mitchell <mark@codesourcery.com>
3185 * cp-tree.h (build_this_parm): Declare.
3186 (grok_method_quals): Remove.
3187 (build_memfn_type): Declare.
3188 (build_artificial_parm): Declare.
3189 (do_friend): Remove quals parameter.
3190 * decl.c (build_this_parm): New function.
3191 (grokfndecl): Use it. Do not pass quals to grokclassfn.
3192 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
3193 unnecessary TYPE_DECLs. Correct qualification of member function
3195 * method.c (implicitly_declare_fn): Use build_this_parm.
3196 * friend.c (do_friend): Remove quals parameter.
3197 * decl2.c (grok_method_quals): Remove.
3198 (build_memfn_type): New function.
3199 (build_artificial_parm): Give it external linkage.
3200 (grokclassfn): Remove quals parameter. Do not build "this"
3204 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
3205 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
3206 (decay_conversion): Convert bitfield expressions to the correct
3208 (build_modify_expr): Remove spurious conversions.
3209 * class.c (layout_class_type): Modify the type of bitfields to
3210 indicate a limited range.
3211 * call.c (standard_conversion): Adjust the type of bitfield
3212 expressions used in an rvalue context.
3213 (build_conditional_expr): Likewise.
3215 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
3217 * decl.c: Fix comment typos.
3219 2006-04-21 Eric Christopher <echristo@apple.com>
3221 * decl.c: Fix typo in function name.
3223 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3226 * parser.c (cp_parser_class_name): Check for invalid typenames.
3230 * pt.c (tsubst_friend_function): Return early if
3231 pushdecl_namespace_level fails.
3234 * typeck.c (convert_arguments): Return error_mark_node instead of
3236 * cp-tree.h (error_mark_list): Remove declaration.
3237 * decl.c (error_mark_list): Remove definition.
3238 (cxx_init_decl_processing): Do not initialize error_mark_list.
3241 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
3242 before calling convert_to_reference.
3243 * cvt.c (convert_to_reference): Assert that reftype is a
3246 2006-04-19 Mark Mitchell <mark@codesourcery.com>
3249 * class.c (currently_open_class): Tidy.
3250 * decl.c (grokdeclarator): If we encounter an erroneous
3251 declarator, assume that we have already issued an error message
3252 and return. Return error_mark_node instead of NULL_TREE in more
3253 places. Issue errors about function definitions that do not have
3254 a function declarator. Check for complete types for all function
3256 * cp-tree.h (cp_error_declarator): Remove.
3257 (currently_open_class): Change return type.
3258 * parser.c (cp_parser_id_expression): Add optional_p parameter.
3259 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
3260 (cp_parser_id_expression): Likewise.
3261 (cp_parser_unqualified_id): If the name is optional, return
3263 (cp_parser_postfix_dot_deref_expression): Adjust calls.
3264 (cp_parser_type_parameter): Likewise.
3265 (cp_parser_unqualified_id): Likewise.
3266 (cp_parser_direct_declarator): Likewise.
3267 (cp_parser_declarator_id): Add optional_p parameter.
3268 (cp_parser_function_definition_from_specifiers_and_declarator):
3269 Assume that start_function indicates failure only if it has issued
3271 (cp_parser_omp_var_list_no_open): Adjust calls.
3273 2006-04-17 Janis Johnson <janis187@us.ibm.com>
3275 PR c++/26114, c++/26115
3276 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
3277 * class.c (check_field_decls): Ditto.
3279 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3281 * init.c (build_offset_ref): Remove superfluous temporary.
3283 2006-04-16 Mark Mitchell <mark@codesourcery.com>
3286 * typeck.c (finish_class_member_access_expr): Robustify
3288 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
3290 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
3291 * pt.c: Include vecprim.h.
3292 (inline_parm_levels): Change the type to VEC(int,heap) *.
3293 (inline_parm_levels_used): Remove.
3294 (maybe_begin_member_template_processing,
3295 maybe_end_member_template_processing): Use VEC instead of
3298 * cp/call.c: Fix comment typos.
3300 2006-04-12 Mark Mitchell <mark@codesourcery.com>
3302 * parser.c (cp_parser_init_declarator): Initialize local variables
3305 2006-04-12 Roger Sayle <roger@eyesopen.com>
3307 * parser.c (cp_parser_init_declarator): Initialise
3308 is_parenthesized_init to false to avoid compiler warning.
3310 2006-04-11 Mark Mitchell <mark@codesourcery.com>
3312 * cp-tree.h (build_operator_new_call): Adjust prototype.
3313 (build_new_method_call): Likewise.
3314 (build_op_delete_call): Likewise.
3315 * init.c (build_raw_new_expr): New function.
3316 (build_new_1): Pass information as parameters, rather than
3317 bundling it into a NEW_EXPR.
3318 (build_new): Adjust accordingly.
3319 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
3320 (build_delete): Likewise.
3321 * decl.c (finish_destructor_body): Likewise.
3322 * call.c (build_operator_new_call): Return the allocation function
3324 (build_op_delete_call): Take allocation function as parameter.
3325 (build_special_member_call): Adjust call to build_new_method_call.
3326 (build_new_method_call): Return function called.
3327 * pt.c (tsubst_copy_and_build): Adjust call to
3328 build_new_method_call.
3329 * semantics.c (finish_call_expr): Likewise.
3330 * parser.c (cp_parser_postfix_expression): Likewise.
3331 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
3332 "incomplete", not "undefined", types.
3335 * decl.c (grokdeclarator): Remove namespace-handling code for
3336 pointers-to-members.
3337 * parser.c (cp_parser_ptr_operator): Check for qualified names
3341 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
3342 whether or not to look for a pure-specifier.
3343 (cp_parser_member_declaration): Likewise.
3345 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3347 * decl2.c, pt.c, semantics.c: Fix comment typos.
3349 2006-04-06 Roger Sayle <roger@eyesopen.com>
3351 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
3353 2006-04-05 Jason Merrill <jason@redhat.com>
3355 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
3356 default hidden visibility for anonymous namespace.
3358 2006-03-29 Roger Sayle <roger@eyesopen.com>
3361 * init.c (build_vec_delete_1): Convert BASE pointer's type to
3362 the base pointer type to avoid a type mismatch in the EQ_EXPR.
3364 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
3366 * search.c (maybe_suppress_debug_info): If
3367 flag_emit_class_debug_always then don't suppress.
3369 2006-03-22 Jason Merrill <jason@redhat.com>
3371 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
3372 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
3374 2006-03-21 Jakub Jelinek <jakub@redhat.com>
3377 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
3379 2006-03-21 Jason Merrill <jason@redhat.com>
3382 * parser.c (cp_parser_declaration): Support attributes on
3383 anonymous namespaces.
3384 * name-lookup.c (push_namespace_with_attribs): Anonymous
3385 namespaces default to hidden visibility.
3387 2006-03-20 Jason Merrill <jason@redhat.com>
3389 PR c++/21764, c++/19238
3390 * decl.c (cp_finish_decl): Call determine_visibility later.
3391 (start_preparsed_function): Likewise.
3392 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
3393 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
3394 * name-lookup.h (struct cp_binding_level): Add has_visibility
3396 * name-lookup.c: Include c-pragma.h.
3397 (push_namespace_with_attribs): Split out from push_namespace.
3398 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
3399 (leave_scope): Pop visibility if appropriate.
3400 * decl2.c (determine_visibility_from_class): Split out from...
3401 (determine_visibility): ...here. Handle function scope and
3403 (import_export_decl): Move visibility handling to
3404 determine_visibility_from_class.
3405 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
3406 attributes on namespace declarations.
3408 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3411 * decl.c (grokdeclarator): Do not accept long long double.
3412 Reorganize checks for invalid (combinations of) type modifiers.
3413 Quote modifiers in messages.
3415 2006-03-09 Jason Merrill <jason@redhat.com>
3417 PR c++/16387, c++/16389
3418 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
3419 (cxx_sizeof_or_alignof_expr): Split out from here.
3421 2006-03-09 Diego Novillo <dnovillo@redhat.com>
3423 Merge from gomp-20050608-branch
3425 2006-02-02 Diego Novillo <dnovillo@redhat.com>
3427 * decl.c (pop_labels_1): Use appropriate pointer casting.
3428 (poplevel_named_label_1): Likewise.
3429 (named_label_entry_hash): Likewise.
3430 (named_label_entry_eq): Likewise.
3431 (check_goto): Likewise.
3432 (define_label): Likewise.
3434 2006-01-26 Diego Novillo <dnovillo@redhat.com>
3436 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
3438 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
3439 instead of TREE_CODE/TREE_OPERAND.
3440 * semantics.c: Likewise.
3441 * parser.c: Likewise.
3443 2005-11-10 Diego Novillo <dnovillo@redhat.com>
3445 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
3446 target does not support TLS.
3448 2005-11-09 Jakub Jelinek <jakub@redhat.com>
3450 * decl.c (redeclaration_error_message): Don't error about
3451 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
3454 2005-11-08 Jakub Jelinek <jakub@redhat.com>
3457 * semantics.c (finish_omp_barrier, finish_omp_flush): New
3459 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
3460 (cp_parser_omp_flush): Call finish_omp_flush.
3461 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
3465 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
3467 2005-11-03 Jakub Jelinek <jakub@redhat.com>
3469 * semantics.c (finish_omp_threadprivate): Error on class-scope
3472 2005-11-02 Jakub Jelinek <jakub@redhat.com>
3474 * parser.c (cp_parser_omp_all_clauses): If some clause
3475 type is not allowed, don't remove just one of the
3476 clauses, but all clauses added in that loop round.
3478 * semantics.c (finish_omp_clauses): Fix function
3479 comment. Don't handle non-const or mutable specially,
3480 as const and not mutable is predetermined shared and
3481 that leads to double error. Don't ICE if copyin var is
3485 * parser.c (cp_parser_pragma): Diagnose
3486 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
3489 * semantics.c (finish_omp_threadprivate): Error if V
3490 is automatic variable or has incomplete type.
3492 2005-11-01 Diego Novillo <dnovillo@redhat.com>
3494 * parser.c (cp_parser_omp_all_clauses): Use
3495 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
3497 2005-11-01 Diego Novillo <dnovillo@redhat.com>
3499 * parser.c (cp_parser_omp_all_clauses): When emitting an
3500 error message, remove the invalid clause from the list.
3502 2005-10-31 Diego Novillo <dnovillo@redhat.com>
3504 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
3505 combined parallel+workshare directives.
3507 2005-10-31 Richard Henderson <rth@redhat.com>
3509 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
3510 Use cxx_omp_clause_dtor.
3511 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
3512 (cxx_omp_clause_dtor): New.
3513 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
3514 (cxx_omp_clause_default_ctor): Use it.
3515 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
3517 (cxx_omp_clause_dtor): New.
3518 * semantics.c (finish_omp_clauses): Rewrite cdtor
3519 checking to fill in CP_OMP_CLAUSE_INFO. Don't
3520 specialcase LASTPRIVATE for removal.
3521 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
3522 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
3524 2005-10-28 Jakub Jelinek <jakub@redhat.com>
3526 * semantics.c (finish_omp_threadprivate): If
3527 DECL_RTL_SET_P, call make_decl_rtl again so that
3528 encode_section_info can update SYMBOL_REF's flags.
3530 2005-10-26 Jakub Jelinek <jakub@redhat.com>
3532 * semantics.c (finish_omp_for): Don't segfault if COND
3533 or INCR is NULL. If not calling c_finish_omp_for
3534 right away and one of COND and INCR is NULL, issue
3535 error and don't expand anything.
3538 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
3539 * semantics.c (finish_omp_for): Likewise. Set
3540 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
3541 into the current statement list if not processing
3542 template decl or pass it to c_finish_omp_for.
3544 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
3545 into PRE_BODY statement list. Pass it to finish_omp_for.
3546 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
3547 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
3548 finish_omp_for. Put all the statements into sk_omp
3551 2005-10-25 Jakub Jelinek <jakub@redhat.com>
3554 * parser.c (struct cp_parser): Rename in_iteration_statement
3555 field to in_statement.
3556 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
3557 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
3558 (cp_parser_new, cp_parser_begin_omp_structured_block,
3559 cp_parser_end_omp_structured_block,
3560 cp_parser_omp_for_loop): Adjust for
3561 in_iteration_statement renaming.
3562 (cp_parser_selection_statement): Save
3563 parser->in_iteration, or it temporarily with
3564 IN_SWITCH_STMT for the
3565 cp_parser_implicitly_scoped_statement call.
3566 (cp_parser_iteration_statement): Adjust for
3567 in_iteration_statement renaming. Use
3568 IN_ITERATION_STMT rather than true.
3569 (cp_parser_jump_statement): Adjust for
3570 in_iteration_statement renaming and new values. Don't
3571 error on break in a switch statement within OMP_FOR or
3572 OpenMP structured block.
3575 * parser.c (cp_parser_cache_group): Don't stop if next
3576 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
3577 well. If current token is CPP_PRAGMA, consume
3578 everything until CPP_PRAGMA_EOL inclusive.
3580 2005-10-24 Jakub Jelinek <jakub@redhat.com>
3583 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
3584 addition to MODIFY_EXPR.
3586 2005-10-23 Richard Henderson <rth@redhat.com>
3588 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
3590 (begin_bc_block, finish_bc_block): Use it.
3591 (push_context, pop_context): Remove.
3592 (cp_genericize): Don't use them. Assert bc_label is null.
3593 * semantics.c (finish_omp_clauses): Create a fake data
3594 element of TYPE for probing ctors.
3596 2005-10-23 Richard Henderson <rth@redhat.com>
3598 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
3599 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
3600 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
3601 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
3602 * semantics.c (finish_omp_clauses): Look through
3603 arrays when looking up special member calls. Also
3604 remove FIRSTPRIVATE when LASTPRIVATE fails.
3605 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
3606 (cxx_omp_clause_assign_op): New.
3607 * cp-tree.h: Declare them.
3609 2005-10-21 Richard Henderson <rth@redhat.com>
3611 * decl.c (check_previous_goto_1): Return false if error.
3612 (check_switch_goto): Likewise.
3613 (finish_case_label): Don't emit the case label on error.
3614 * parser.c (struct cp_parser): Revert
3615 in_switch_statement_p changes.
3616 (cp_parser_labeled_statement,
3617 cp_parser_selection_statement): Likewise.
3618 (cp_parser_begin_omp_structured_block): Don't save...
3619 (cp_parser_end_omp_structured_block): or restore
3620 in_switch_statement_p.
3622 2005-10-21 Richard Henderson <rth@redhat.com>
3624 * semantics.c (finish_omp_threadprivate): Set
3625 decl_flags.u2sel when necessary.
3627 2005-10-21 Richard Henderson <rth@redhat.com>
3629 * decl.c (poplevel_named_label_1): Restore creation of the
3631 (decl_jump_unsafe): Check for error_mark_node types.
3632 (check_goto): Don't check cdtor_label. Don't use identify_goto.
3633 * semantics.c (finish_return_stmt): Do check_omp_return before
3634 converting to cdtor_label goto.
3636 2005-10-21 Richard Henderson <rth@redhat.com>
3639 * decl.c (check_omp_return): Return false on error.
3640 * cp-tree.h (check_omp_return): Update decl.
3641 * semantics.c (finish_return_stmt): Avoid adding
3644 2005-10-21 Richard Henderson <rth@redhat.com>
3646 * cp-tree.h (struct language_function): Remove
3648 Change x_named_labels to a hashtable.
3649 (check_omp_return): Declare.
3650 * decl.c (struct named_label_use_entry): Rename from
3651 named_label_use_list. Remove label_decl.
3652 (struct named_label_entry): Rename from
3653 named_label_list. Remove old_value and next. Change
3654 in_try_scope and in_catch_scope to bool. Add
3656 (pop_labels_1): New.
3657 (pop_labels): Use it.
3658 (pop_local_label, poplevel_named_label_1): New.
3659 (poplevel): Use them.
3660 (named_label_entry_hash, named_label_entry_eq): New.
3661 (make_label_decl): Create named_labels. Move label
3662 creation bits from lookup_label.
3663 (declare_local_label): Tidy.
3664 (identify_goto): Split out from ...
3665 (check_previous_goto_1): Add exited_omp argument.
3668 (use_label): Merge into...
3669 (check_goto): ... here. Handle omp scopes.
3670 (check_omp_return): New.
3671 (check_previous_gotos): Merge into...
3672 (define_label): ... here.
3673 (save_function_data): Remove x_named_label_uses reference.
3674 (finish_function): Likewise.
3675 * name-lookup.h (sk_omp): New.
3676 * name-lookup.c (begin_scope): Handle it.
3677 * parser.c (cp_parser_omp_for): Don't create extra
3680 (cp_parser_omp_sections): Likewise.
3681 * semantics.c (finish_return_stmt): Call check_omp_return.
3682 (begin_omp_structured_block): Use sk_omp.
3683 (finish_omp_structured_block): Use do_poplevel. Don't build a
3684 MUST_NOT_THROW expression here.
3685 (begin_omp_parallel, finish_omp_parallel): Don't create extra
3686 compound statements.
3688 2005-10-21 Diego Novillo <dnovillo@redhat.com>
3691 * cp/cp-tree.h (struct lang_decl_flags): Add field
3693 (CP_DECL_IS_THREADPRIVATE): Define.
3694 * cp/semantics.c (finish_omp_threadprivate): Set. Do
3695 not error out if CP_DECL_IS_THREADPRIVATE is set
3697 * cp/decl.c (duplicate_decls): Merge
3698 CP_DECL_THREADPRIVATE_P.
3700 2005-10-20 Richard Henderson <rth@redhat.com>
3702 * cp-gimplify.c (cp_gimplify_omp_for): New.
3703 (cp_gimplify_expr): Call it.
3704 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
3705 * parser.c (struct cp_parser): Rename
3706 in_iteration_statement_p to in_iteration_statement and
3707 change to unsigned char. Similarly with
3708 in_switch_statement. Update all users.
3709 (IN_OMP_BLOCK, IN_OMP_FOR): New.
3710 (cp_parser_labeled_statement): Diagnose case labels
3711 binding closer to an openmp block nested than the
3713 (cp_parser_jump_statement): Diagnose break and
3714 continue labels binding closer to an openmp block than
3715 an iteration or switch.
3716 (cp_parser_omp_for_loop): Mark in_iteration_statement
3718 (cp_parser_begin_omp_structured_block): New.
3719 (cp_parser_end_omp_structured_block): New.
3720 (cp_parser_omp_structured_block): Use them.
3721 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
3722 (cp_parser_omp_parallel): Likewise.
3724 2005-10-20 Richard Henderson <rth@redhat.com>
3726 * semantics.c (begin_omp_structured_block): New.
3727 (finish_omp_structured_block): New.
3728 (begin_omp_parallel, finish_omp_parallel): Use them.
3729 * parser.c (cp_parser_omp_structured_block): Likewise.
3730 (cp_parser_omp_for): Likewise.
3731 (cp_parser_omp_sections_scope): Likewise.
3732 * cp-tree.h: Declare them.
3734 2005-10-20 Richard Henderson <rth@redhat.com>
3736 * parser.c (cp_parser_omp_master): Return the statement.
3737 (cp_parser_omp_ordered): Likewise.
3738 (cp_parser_omp_construct): Set the locus for them.
3740 2005-10-19 Richard Henderson <rth@redhat.com>
3742 * semantics.c (finish_omp_atomic): Revert to
3743 uses_template_parms.
3745 2005-10-19 Richard Henderson <rth@redhat.com>
3747 * semantics.c (finish_omp_clauses): Avoid
3748 DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some
3749 stub asserts guaranteed to fail.
3751 2005-10-19 Richard Henderson <rth@redhat.com>
3753 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
3754 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
3755 * parser.c (cp_parser_omp_clause_copyin): Remove.
3756 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
3757 Call finish_omp_clauses.
3758 (cp_parser_omp_clause_if): Don't do error checking here.
3759 (cp_parser_omp_clause_num_threads): Likewise.
3760 (cp_parser_omp_clause_schedule): Likewise.
3761 (cp_parser_omp_atomic): Use finish_omp_atomic.
3762 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
3763 Don't decompose assignment statment here. Use
3766 * pt.c (tsubst_omp_clauses): New.
3767 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
3768 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
3769 * semantics.c (finish_omp_clauses): New.
3770 (begin_omp_parallel, finish_omp_parallel): Know Less about the
3771 internals of the stmt_list stack.
3772 (finish_omp_for, finish_omp_atomic): New.
3774 2005-10-18 Jakub Jelinek <jakub@redhat.com>
3776 * semantics.c (cxx_omp_predetermined_sharing): New function.
3777 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
3779 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
3781 2005-10-18 Richard Henderson <rth@redhat.com>
3783 * parser.c (cp_parser_omp_single): Use make_node and accessors
3786 2005-10-17 Richard Henderson <rth@redhat.com>
3788 * parser.c (cp_parser_omp_for_loop): Handle declarations.
3790 2005-10-12 Richard Henderson <rth@redhat.com>
3792 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
3793 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
3794 (finish_omp_threadprivate): Declare.
3795 * parser.c (struct cp_lexer): Add in_pragma.
3796 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
3798 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
3799 (cp_parser_skip_to_end_of_statement): Likewise.
3800 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
3801 (cp_parser_skip_to_closing_brace): Likewise.
3802 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
3803 (cp_parser_require_pragma_eol): New.
3804 (cp_parser_statement): Add in_compound argument;
3806 Restart if a non-statement pragma seen outside a
3808 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
3809 (cp_parser_declaration_seq_opt): Likewise.
3810 (cp_parser_member_specification_opt): Likewise.
3811 (cp_parser_function_definition_after_decl): Likewise.
3812 (cp_parser_skip_until_found): Likewise.
3813 (cp_parser_cache_group): Likewise.
3814 (enum pragma_omp_clause, cp_parser_omp_clause_name,
3815 check_no_duplicate_clause,
3816 cp_parser_omp_var_list_no_open,
3817 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
3818 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
3819 cp_parser_omp_clause_nowait,
3820 cp_parser_omp_clause_num_threads,
3821 cp_parser_omp_clause_ordered,
3822 cp_parser_omp_clause_reduction,
3823 cp_parser_omp_clause_schedule,
3824 cp_parser_omp_all_clauses,
3825 cp_parser_omp_structured_block, cp_parser_omp_atomic,
3826 cp_parser_omp_barrier, cp_parser_omp_critical,
3827 cp_parser_omp_flush, cp_parser_omp_for_loop,
3828 cp_parser_omp_for, cp_parser_omp_master,
3829 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
3830 cp_parser_omp_sections, cp_parser_omp_parallel,
3831 cp_parser_omp_single, cp_parser_omp_threadprivate,
3832 cp_parser_omp_construct): New.
3833 (cp_parser_pragma): Handle OpenMP pragmas.
3834 * semantics.c (finish_omp_threadprivate): New.
3835 (begin_omp_parallel, finish_omp_parallel): New.
3837 2005-10-11 Richard Henderson <rth@redhat.com>
3839 * parser.c (struct cp_token): Add pragma_kind.
3840 (eof_token): Initialize it.
3841 (cp_lexer_handle_pragma): Remove.
3842 (cp_parser_initial_pragma): New.
3843 (cp_lexer_new_main): Use it.
3844 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
3845 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
3846 (cp_parser_skip_to_pragma_eol): New.
3847 (cp_parser_error): Use it.
3850 2005-10-09 Richard Henderson <rth@redhat.com>
3852 * lex.c (parse_strconst_pragma): Update for c_lex name change.
3853 (handle_pragma_java_exceptions): Likewise.
3854 * parser.c (cp_lexer_new_main): Likewise.
3856 2005-10-06 Richard Henderson <rth@redhat.com>
3858 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
3859 (cp_lexer_handle_pragma): Comment out
3860 cpp_handle_deferred_pragma.
3862 2005-10-01 Richard Henderson <rth@redhat.com>
3864 * name-lookup.c (lookup_name): Remove prefer_type argument.
3865 (lookup_name_prefer_type): New function.
3866 * name-lookup.h (lookup_name_prefer_type): Declare it.
3867 * decl.c (lookup_and_check_tag): Use it.
3868 * pt.c (tsubst_friend_class): Likewise. Update for
3870 (lookup_template_class, tsubst_copy_and_build): Likewise.
3872 2006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3875 * tree.c (bot_manip): Don't call mark_used.
3877 2006-03-02 Mike Stump <mrs@apple.com>
3879 * decl2.c (import_export_decl): Remove redundant call to
3880 targetm.cxx.key_method_may_be_inline ().
3882 2006-03-02 Richard Sandiford <richard@codesourcery.com>
3884 * decl.c (start_decl): Use have_global_bss_p when deciding
3885 whether to make the decl common.
3887 2006-03-01 Mike Stump <mrs@apple.com>
3890 * decl2.c (import_export_decl): Fix ABI breakage on darwin.
3892 2006-02-24 Geoffrey Keating <geoffk@apple.com>
3894 * except.c (expand_start_catch_block): Handle
3895 flag_use_cxa_get_exception_ptr.
3897 2006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3900 * decl.c (grok_op_properties): Check for ellipsis in arguments of
3903 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3905 * Make-lang.in (C++): Remove.
3906 (.PHONY): Remove C++.
3908 2006-02-18 Mark Mitchell <mark@codesourcery.com>
3911 * cp-tree.h (cp_finish_decl): Adjust declaration.
3912 (grokbitfield): Likewise.
3913 (finish_static_data_member_decl): Likewise.
3914 * init.c (constant_value_1): Ensure processing_template_decl when
3915 folding non-dependent initializers for static data members of
3916 dependent types. Return error_mark_node for erroneous
3918 * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
3919 * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
3920 (cp_finish_decl): Add init_const_expr_p parameter. Set
3921 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
3922 (finish_decl): Adjust call to cp_finish_decl.
3923 (compute_array_index_type): Robustify.
3924 (start_method): Use finish_decl, not cp_finish_decl.
3925 * rtti.c (emit_tinfo_decl): Likewise.
3926 * except.c (initialize_handler_parm): Adjust call to
3928 (expand_start_catch_block): Likewise.
3929 * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
3930 * pt.c (instantiate_class_template): Adjust call to
3931 finish_static_data_member_decl.
3932 (tsubst_expr): Use finish_decl, not cp_finish_decl.
3933 (instantiate_decl): Adjust call to cp_finish_decl.
3934 * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
3936 * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
3938 (grokfield): Likewise.
3939 * parser.c (cp_parser_condition): Check for constant initializers.
3940 (cp_parser_init_declarator): Adjust calls to grokfield and
3941 cp_finish_decl. Don't set
3942 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
3943 (cp_parser_member_declaration): Likewise.
3944 (cp_parser_objc_class_ivars): Likewise.
3946 2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3948 * call.c (standard_conversion): Return NULL instead of 0.
3949 (build_user_type_conversion_1): Likewise.
3950 (tourney): Likewise.
3951 * decl.c (redeclaration_error_message): Likewise.
3952 * error.c (language_to_string): Likewise.
3954 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3956 * cp-tree.h (warn_hidden): Remove prototype.
3957 * class.c (warn_hidden): Make static.
3959 * cp-tree.h (build_type_conversion): Remove prototype.
3960 * cvt.c (build_type_conversion): Add prototype, make static.
3962 * cp-tree.h (push_tinst_level): Remove prototype.
3963 (pop_tinst_level): Likewise.
3964 * pt.c (push_tinst_level): Add prototype, make static.
3965 (pop_tinst_level): Likewise.
3967 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3969 * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
3970 * typeck.c (unary_complex_lvalue): Likewise.
3972 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3974 * lex.c (parse_strconst_pragma): Return error_mark_node instead of
3975 "(tree)-1" to indicate failure. Simplify.
3976 (handle_pragma_interface): Test for error_mark_node instead of
3978 (handle_pragma_implementation): Likewise.
3980 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3983 * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
3984 decl-specifiers. Remove extra check for duplicate 'friend'.
3985 * decl.c (grokdeclarator): Remove check for duplicate
3986 decl-specifiers. Set longlong together with long_p.
3988 2006-02-12 Jason Merrill <jason@redhat.com>
3991 * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
3992 TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
3994 2006-02-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3996 * class.c (debug_class): Remove extern.
3997 (debug_thunks): Likewise.
3999 2006-02-09 Gabriel Dos Reis <gdr@integrable-solutions.net>