aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r--gcc/cp/typeck.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index f955efe2948..df126e83359 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -512,7 +512,7 @@ composite_pointer_type (tree t1, tree t2, tree arg1, tree arg2,
tree result_type;
if (TYPE_PTRFN_P (t2) && (complain & tf_error))
- pedwarn (OPT_pedantic, "ISO C++ forbids %s "
+ pedwarn (input_location, OPT_pedantic, "ISO C++ forbids %s "
"between pointer of type %<void *%> and pointer-to-function",
location);
result_type
@@ -1280,7 +1280,7 @@ cxx_sizeof_or_alignof_type (tree type, enum tree_code op, bool complain)
if (TREE_CODE (type) == METHOD_TYPE)
{
if (complain)
- pedwarn (pedantic ? OPT_pedantic : OPT_Wpointer_arith,
+ pedwarn (input_location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
"invalid application of %qs to a member function",
operator_name_info[(int) op].name);
value = size_one_node;
@@ -2587,7 +2587,7 @@ build_array_ref (tree array, tree idx)
}
if (!lvalue_p (array))
- pedwarn (OPT_pedantic, "ISO C++ forbids subscripting non-lvalue array");
+ pedwarn (input_location, OPT_pedantic, "ISO C++ forbids subscripting non-lvalue array");
/* Note in C++ it is valid to subscript a `register' array, since
it is valid to take the address of something with that
@@ -2813,7 +2813,7 @@ cp_build_function_call (tree function, tree params, tsubst_flags_t complain)
/* Convert anything with function type to a pointer-to-function. */
if (DECL_MAIN_P (function) && (complain & tf_error))
- pedwarn (OPT_pedantic,
+ pedwarn (input_location, OPT_pedantic,
"ISO C++ forbids calling %<::main%> from within program");
function = build_addr_func (function);
@@ -5260,7 +5260,7 @@ convert_member_func_to_ptr (tree type, tree expr)
|| TREE_CODE (intype) == METHOD_TYPE);
if (pedantic || warn_pmf2ptr)
- pedwarn (pedantic ? OPT_pedantic : OPT_Wpmf_conversions,
+ pedwarn (input_location, pedantic ? OPT_pedantic : OPT_Wpmf_conversions,
"converting from %qT to %qT", intype, type);
if (TREE_CODE (intype) == METHOD_TYPE)
@@ -7164,7 +7164,7 @@ cp_apply_type_quals_to_decl (int type_quals, tree decl)
if (pedantic)
{
tree bad_type = build_qualified_type (type, type_quals);
- pedwarn (OPT_pedantic,
+ pedwarn (input_location, OPT_pedantic,
"ignoring %qV qualifiers added to function type %qT",
bad_type, type);
}