"multiple types in one declaration");
else if (declspecs->redefined_builtin_type)
{
- if (!in_system_header_at (input_location))
- permerror (declspecs->locations[ds_redefined_builtin_type_spec],
- "redeclaration of C++ built-in type %qT",
+ location_t loc = declspecs->locations[ds_redefined_builtin_type_spec];
+ if (!in_system_header_at (loc))
+ permerror (loc, "redeclaration of C++ built-in type %qT",
declspecs->redefined_builtin_type);
return NULL_TREE;
}
--end example] */
if (saw_typedef)
{
- error ("missing type-name in typedef-declaration");
+ error_at (declspecs->locations[ds_typedef],
+ "missing type-name in typedef-declaration");
return NULL_TREE;
}
/* Anonymous unions are objects, so they can have specifiers. */;
}
/* 17.6.3.3.5 */
if (suffix[0] != '_'
- && !in_system_header_at (location)
&& !current_function_decl && !(friendp && !funcdef_flag))
warning_at (location, OPT_Wliteral_suffix,
"literal operator suffixes not preceded by %<_%>"
indicated by the state of complain), so that
another substitution can be found. */
return error_mark_node;
- else if (in_system_header_at (input_location))
- /* Allow them in system headers because glibc uses them. */;
else if (name)
pedwarn (loc, OPT_Wpedantic,
"ISO C++ forbids zero-size array %qD", name);
if (type_was_error_mark_node)
/* We've already issued an error, don't complain more. */;
- else if (in_system_header_at (input_location) || flag_ms_extensions)
+ else if (in_system_header_at (id_loc) || flag_ms_extensions)
/* Allow it, sigh. */;
else if (! is_main)
permerror (id_loc, "ISO C++ forbids declaration of %qs with no type",
}
/* Don't pedwarn if the alternate "__intN__" form has been used instead
of "__intN". */
- else if (!int_n_alt && pedantic && ! in_system_header_at (input_location))
+ else if (!int_n_alt && pedantic)
pedwarn (declspecs->locations[ds_type_spec], OPT_Wpedantic,
"ISO C++ does not support %<__int%d%> for %qs",
int_n_data[declspecs->int_n_idx].bitsize, name);
else
{
/* Array is a flexible member. */
- if (in_system_header_at (input_location))
- /* Do not warn on flexible array members in system
- headers because glibc uses them. */;
- else if (name)
+ if (name)
pedwarn (id_loc, OPT_Wpedantic,
"ISO C++ forbids flexible array member %qs", name);
else