diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2008-07-18 17:19:03 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2008-07-18 17:19:03 +0000 |
commit | be93747e8b27f86a1df8b30b050daae5c63206d0 (patch) | |
tree | a60dba86fc4150038bcebaed919ee2dcb85e0195 /gcc/cp/init.c | |
parent | 5025f3793e879f9011890fc0641c51693165ffc2 (diff) | |
download | gcc-be93747e8b27f86a1df8b30b050daae5c63206d0.zip gcc-be93747e8b27f86a1df8b30b050daae5c63206d0.tar.gz gcc-be93747e8b27f86a1df8b30b050daae5c63206d0.tar.bz2 |
cvt.c (convert_to_void): Avoid C++ keywords.
* cvt.c (convert_to_void): Avoid C++ keywords.
* decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
Likewise.
* friend.c (is_friend): Likewise.
* init.c (perform_member_init): Likewise.
* mangle.c (write_template_prefix, write_template_template_param):
Likewise.
* name-lookup.c (do_namespace_alias, do_using_directive,
parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
* parser.c (cp_parser_template_id, cp_parser_namespace_definition,
cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
Likewise.
* pt.c (is_specialization_of_friend, lookup_template_class,
push_tinst_level, instantiate_class_template,
tsubst_copy_and_build): Likewise.
* tree.c (add_stmt_to_compound): Likewise.
* typeck.c (finish_class_member_access_expr): Likewise.
From-SVN: r137959
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 3e9e612..add7596 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -469,13 +469,13 @@ perform_member_init (tree member, tree init) { tree decl; tree type = TREE_TYPE (member); - bool explicit; + bool is_explicit; - explicit = (init != NULL_TREE); + is_explicit = (init != NULL_TREE); /* Effective C++ rule 12 requires that all data members be initialized. */ - if (warn_ecpp && !explicit && TREE_CODE (type) != ARRAY_TYPE) + if (warn_ecpp && !is_explicit && TREE_CODE (type) != ARRAY_TYPE) warning (OPT_Weffc__, "%J%qD should be initialized in the member initialization " "list", current_function_decl, member); @@ -503,7 +503,7 @@ perform_member_init (tree member, tree init) } else if (TYPE_NEEDS_CONSTRUCTING (type)) { - if (explicit + if (is_explicit && TREE_CODE (type) == ARRAY_TYPE && init != NULL_TREE && TREE_CHAIN (init) == NULL_TREE @@ -523,7 +523,7 @@ perform_member_init (tree member, tree init) { if (init == NULL_TREE) { - if (explicit) + if (is_explicit) { init = build_default_init (type, /*nelts=*/NULL_TREE); if (TREE_CODE (type) == REFERENCE_TYPE) |