+2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * typeck.c (build_indirect_ref, build_function_call,
+ build_function_call_vec, build_binary_op, build_unary_op,
+ build_compound_expr, build_c_cast, build_modify_expr): Remove
+ uses of ATTRIBUTE_UNUSED on the parameters.
+ * class.c (set_linkage_according_to_type, resort_type_method_vec,
+ dfs_find_final_overrider_post, empty_base_at_nonzero_offset_p):
+ Likewise.
+ * decl.c (local_variable_p_walkfn): Likewise.
+ * except.c (wrap_cleanups_r, check_noexcept_r): Likewise.
+ * error.c (find_typenames_r): Likewise.
+ * tree.c (verify_stmt_tree_r, bot_replace,
+ handle_java_interface_attribute, handle_com_interface_attribute,
+ handle_init_priority_attribute, c_register_addr_space): Likewise.
+ * cp-gimplify.c (cxx_omp_clause_default_ctor): Likewise.
+ * cp-lang.c (objcp_tsubst_copy_and_build): Likewise.
+ * pt.c (unify_success, unify_invalid, instantiation_dependent_r):
+ Likewise.
+ * semantics.c (dfs_calculate_bases_pre): Likewise.
+ * decl2.c (fix_temporary_vars_context_r, clear_decl_external):
+ Likewise.
+ * parser.c (cp_lexer_token_at, cp_parser_omp_clause_mergeable,
+ cp_parser_omp_clause_nowait, cp_parser_omp_clause_ordered,
+ cp_parser_omp_clause_untied): Likewise.
+ * mangle.c (write_unnamed_type_name,
+ discriminator_for_string_literal): Likewise.
+ * search.c (dfs_accessible_post, dfs_debug_mark): Likewise.
+ * lex.c (handle_pragma_vtable, handle_pragma_unit,
+ handle_pragma_interface, handle_pragma_implementation,
+ handle_pragma_java_exceptions): Likewise.
+
2012-09-13 Jason Merrill <jason@redhat.com>
PR c++/53839
the abstract. */
void
-set_linkage_according_to_type (tree type ATTRIBUTE_UNUSED, tree decl)
+set_linkage_according_to_type (tree /*type*/, tree decl)
{
TREE_PUBLIC (decl) = 1;
determine_visibility (decl);
void
resort_type_method_vec (void* obj,
- void* orig_obj ATTRIBUTE_UNUSED ,
+ void* /*orig_obj*/,
gt_pointer_operator new_value,
void* cookie)
{
}
static tree
-dfs_find_final_overrider_post (tree binfo ATTRIBUTE_UNUSED, void *data)
+dfs_find_final_overrider_post (tree /*binfo*/, void *data)
{
find_final_overrider_data *ffod = (find_final_overrider_data *) data;
VEC_pop (tree, ffod->path);
static int
empty_base_at_nonzero_offset_p (tree type,
tree offset,
- splay_tree offsets ATTRIBUTE_UNUSED)
+ splay_tree /*offsets*/)
{
return is_empty_class (type) && !integer_zerop (offset);
}
NULL if there's nothing to do. */
tree
-cxx_omp_clause_default_ctor (tree clause, tree decl,
- tree outer ATTRIBUTE_UNUSED)
+cxx_omp_clause_default_ctor (tree clause, tree decl, tree /*outer*/)
{
tree info = CP_OMP_CLAUSE_INFO (clause);
tree ret = NULL;
/* The following function does something real, but only in Objective-C++. */
tree
-objcp_tsubst_copy_and_build (tree t ATTRIBUTE_UNUSED,
- tree args ATTRIBUTE_UNUSED,
- tsubst_flags_t complain ATTRIBUTE_UNUSED,
- tree in_decl ATTRIBUTE_UNUSED,
- bool function_p ATTRIBUTE_UNUSED)
+objcp_tsubst_copy_and_build (tree /*t*/,
+ tree /*args*/,
+ tsubst_flags_t /*complain*/,
+ tree /*in_decl*/,
+ bool /*function_p*/)
{
return NULL_TREE;
}
static tree
local_variable_p_walkfn (tree *tp, int *walk_subtrees,
- void *data ATTRIBUTE_UNUSED)
+ void * /*data*/)
{
/* Check DECL_NAME to avoid including temporaries. We don't check
DECL_ARTIFICIAL because we do want to complain about 'this'. */
it's DECL_CONTECT() properly set. */
static tree
fix_temporary_vars_context_r (tree *node,
- int *unused ATTRIBUTE_UNUSED,
- void *unused1 ATTRIBUTE_UNUSED)
+ int * /*unused*/,
+ void * /*unused1*/)
{
gcc_assert (current_function_decl);
/* Clear DECL_EXTERNAL for NODE. */
static bool
-clear_decl_external (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
+clear_decl_external (struct cgraph_node *node, void * /*data*/)
{
DECL_EXTERNAL (node->symbol.decl) = 0;
return false;
};
static tree
-find_typenames_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data)
+find_typenames_r (tree *tp, int * /*walk_subtrees*/, void *data)
{
struct find_typenames_t *d = (struct find_typenames_t *)data;
tree mv = NULL_TREE;
Called from build_throw via walk_tree_without_duplicates. */
static tree
-wrap_cleanups_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
- void *data ATTRIBUTE_UNUSED)
+wrap_cleanups_r (tree *tp, int *walk_subtrees, void * /*data*/)
{
tree exp = *tp;
tree cleanup;
expression whose type is a polymorphic class type (10.3). */
static tree
-check_noexcept_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
- void *data ATTRIBUTE_UNUSED)
+check_noexcept_r (tree *tp, int * /*walk_subtrees*/, void * /*data*/)
{
tree t = *tp;
enum tree_code code = TREE_CODE (t);
}
static void
-handle_pragma_vtable (cpp_reader* dfile ATTRIBUTE_UNUSED )
+handle_pragma_vtable (cpp_reader* /*dfile*/)
{
parse_strconst_pragma ("vtable", 0);
sorry ("#pragma vtable no longer supported");
}
static void
-handle_pragma_unit (cpp_reader* dfile ATTRIBUTE_UNUSED )
+handle_pragma_unit (cpp_reader* /*dfile*/)
{
/* Validate syntax, but don't do anything. */
parse_strconst_pragma ("unit", 0);
}
static void
-handle_pragma_interface (cpp_reader* dfile ATTRIBUTE_UNUSED )
+handle_pragma_interface (cpp_reader* /*dfile*/)
{
tree fname = parse_strconst_pragma ("interface", 1);
struct c_fileinfo *finfo;
any effect. */
static void
-handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED )
+handle_pragma_implementation (cpp_reader* /*dfile*/)
{
tree fname = parse_strconst_pragma ("implementation", 1);
const char *filename;
/* Indicate that this file uses Java-personality exception handling. */
static void
-handle_pragma_java_exceptions (cpp_reader* dfile ATTRIBUTE_UNUSED)
+handle_pragma_java_exceptions (cpp_reader* /*dfile*/)
{
tree x;
if (pragma_lex (&x) != CPP_EOF)
/* <unnamed-type-name> ::= Ut [ <nonnegative number> ] _ */
static void
-write_unnamed_type_name (const tree type ATTRIBUTE_UNUSED)
+write_unnamed_type_name (const tree type)
{
int discriminator;
MANGLE_TRACE_TREE ("unnamed-type-name", type);
string literals used in FUNCTION. */
static int
-discriminator_for_string_literal (tree function ATTRIBUTE_UNUSED,
- tree string ATTRIBUTE_UNUSED)
+discriminator_for_string_literal (tree /*function*/,
+ tree /*string*/)
{
/* For now, we don't discriminate amongst string literals. */
return 0;
}
static inline cp_token *
-cp_lexer_token_at (cp_lexer *lexer ATTRIBUTE_UNUSED, cp_token_position pos)
+cp_lexer_token_at (cp_lexer * /*lexer*/, cp_token_position pos)
{
return pos;
}
mergeable */
static tree
-cp_parser_omp_clause_mergeable (cp_parser *parser ATTRIBUTE_UNUSED,
+cp_parser_omp_clause_mergeable (cp_parser * /*parser*/,
tree list, location_t location)
{
tree c;
nowait */
static tree
-cp_parser_omp_clause_nowait (cp_parser *parser ATTRIBUTE_UNUSED,
+cp_parser_omp_clause_nowait (cp_parser * /*parser*/,
tree list, location_t location)
{
tree c;
ordered */
static tree
-cp_parser_omp_clause_ordered (cp_parser *parser ATTRIBUTE_UNUSED,
+cp_parser_omp_clause_ordered (cp_parser * /*parser*/,
tree list, location_t location)
{
tree c;
untied */
static tree
-cp_parser_omp_clause_untied (cp_parser *parser ATTRIBUTE_UNUSED,
+cp_parser_omp_clause_untied (cp_parser * /*parser*/,
tree list, location_t location)
{
tree c;
call.c */
static int
-unify_success (bool explain_p ATTRIBUTE_UNUSED)
+unify_success (bool /*explain_p*/)
{
return 0;
}
}
static int
-unify_invalid (bool explain_p ATTRIBUTE_UNUSED)
+unify_invalid (bool /*explain_p*/)
{
return 1;
}
static tree
instantiation_dependent_r (tree *tp, int *walk_subtrees,
- void *data ATTRIBUTE_UNUSED)
+ void * /*data*/)
{
if (TYPE_P (*tp))
{
/* Called via dfs_walk_once_accessible from accessible_p */
static tree
-dfs_accessible_post (tree binfo, void *data ATTRIBUTE_UNUSED)
+dfs_accessible_post (tree binfo, void * /*data*/)
{
if (BINFO_ACCESS (binfo) != ak_none)
{
information anyway. */
static tree
-dfs_debug_mark (tree binfo, void *data ATTRIBUTE_UNUSED)
+dfs_debug_mark (tree binfo, void * /*data*/)
{
tree t = BINFO_TYPE (binfo);
/* Virtual base classes are handled separately in finish_bases */
static tree
-dfs_calculate_bases_pre (tree binfo, ATTRIBUTE_UNUSED void *data_)
+dfs_calculate_bases_pre (tree binfo, void * /*data_*/)
{
/* Don't walk bases of virtual bases */
return BINFO_VIRTUAL_P (binfo) ? dfs_skip_bases : NULL_TREE;
/* Called from verify_stmt_tree via walk_tree. */
static tree
-verify_stmt_tree_r (tree* tp,
- int* walk_subtrees ATTRIBUTE_UNUSED ,
- void* data)
+verify_stmt_tree_r (tree* tp, int * /*walk_subtrees*/, void* data)
{
tree t = *tp;
htab_t *statements = (htab_t *) data;
variables. */
static tree
-bot_replace (tree* t,
- int* walk_subtrees ATTRIBUTE_UNUSED ,
- void* data)
+bot_replace (tree* t, int* /*walk_subtrees*/, void* data)
{
splay_tree target_remap = ((splay_tree) data);
static tree
handle_java_interface_attribute (tree* node,
tree name,
- tree args ATTRIBUTE_UNUSED ,
+ tree /*args*/,
int flags,
bool* no_add_attrs)
{
static tree
handle_com_interface_attribute (tree* node,
tree name,
- tree args ATTRIBUTE_UNUSED ,
- int flags ATTRIBUTE_UNUSED ,
+ tree /*args*/,
+ int /*flags*/,
bool* no_add_attrs)
{
static int warned;
handle_init_priority_attribute (tree* node,
tree name,
tree args,
- int flags ATTRIBUTE_UNUSED ,
+ int /*flags*/,
bool* no_add_attrs)
{
tree initp_expr = TREE_VALUE (args);
should be a C target hook. But currently this is not possible,
because this function is called via REGISTER_TARGET_PRAGMAS. */
void
-c_register_addr_space (const char *word ATTRIBUTE_UNUSED,
- addr_space_t as ATTRIBUTE_UNUSED)
+c_register_addr_space (const char * /*word*/, addr_space_t /*as*/)
{
}
/* Helper function called from c-common. */
tree
-build_indirect_ref (location_t loc ATTRIBUTE_UNUSED,
+build_indirect_ref (location_t /*loc*/,
tree ptr, ref_operator errorstring)
{
return cp_build_indirect_ref (ptr, errorstring, tf_warning_or_error);
/* Used by the C-common bits. */
tree
-build_function_call (location_t loc ATTRIBUTE_UNUSED,
+build_function_call (location_t /*loc*/,
tree function, tree params)
{
return cp_build_function_call (function, params, tf_warning_or_error);
/* Used by the C-common bits. */
tree
-build_function_call_vec (location_t loc ATTRIBUTE_UNUSED,
+build_function_call_vec (location_t /*loc*/,
tree function, VEC(tree,gc) *params,
- VEC(tree,gc) *origtypes ATTRIBUTE_UNUSED)
+ VEC(tree,gc) * /*origtypes*/)
{
VEC(tree,gc) *orig_params = params;
tree ret = cp_build_function_call_vec (function, ¶ms,
/* For the c-common bits. */
tree
build_binary_op (location_t location, enum tree_code code, tree op0, tree op1,
- int convert_p ATTRIBUTE_UNUSED)
+ int /*convert_p*/)
{
return cp_build_binary_op (location, code, op0, op1, tf_warning_or_error);
}
/* Hook for the c-common bits that build a unary op. */
tree
-build_unary_op (location_t location ATTRIBUTE_UNUSED,
+build_unary_op (location_t /*location*/,
enum tree_code code, tree xarg, int noconvert)
{
return cp_build_unary_op (code, xarg, noconvert, tf_warning_or_error);
/* Like cp_build_compound_expr, but for the c-common bits. */
tree
-build_compound_expr (location_t loc ATTRIBUTE_UNUSED, tree lhs, tree rhs)
+build_compound_expr (location_t /*loc*/, tree lhs, tree rhs)
{
return cp_build_compound_expr (lhs, rhs, tf_warning_or_error);
}
/* Like cp_build_c_cast, but for the c-common bits. */
tree
-build_c_cast (location_t loc ATTRIBUTE_UNUSED, tree type, tree expr)
+build_c_cast (location_t /*loc*/, tree type, tree expr)
{
return cp_build_c_cast (type, expr, tf_warning_or_error);
}
\f
/* For use from the C common bits. */
tree
-build_modify_expr (location_t location ATTRIBUTE_UNUSED,
- tree lhs, tree lhs_origtype ATTRIBUTE_UNUSED,
+build_modify_expr (location_t /*location*/,
+ tree lhs, tree /*lhs_origtype*/,
enum tree_code modifycode,
- location_t rhs_location ATTRIBUTE_UNUSED, tree rhs,
- tree rhs_origtype ATTRIBUTE_UNUSED)
+ location_t /*rhs_location*/, tree rhs,
+ tree /*rhs_origtype*/)
{
return cp_build_modify_expr (lhs, modifycode, rhs, tf_warning_or_error);
}