mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 01:40:39 +08:00
C++ : Adjust warning for misplaced attributes.
This removes the reference to Objective-C++ for the warning that attributes may not be placed before linkage specifications. It also adds a note that they may be placed after that. gcc/cp/ChangeLog: * parser.c (cp_parser_declaration): Add a not about where attributes may be placed.
This commit is contained in:
parent
3940daff12
commit
31f76c9065
@ -13567,9 +13567,12 @@ cp_parser_declaration (cp_parser* parser, tree prefix_attrs)
|
||||
/* We might have already been here. */
|
||||
if (!c_dialect_objc ())
|
||||
{
|
||||
location_t where = get_finish (t2->location);
|
||||
warning_at (token1->location, OPT_Wattributes, "attributes are"
|
||||
" only permitted in this position for Objective-C++,"
|
||||
" ignored");
|
||||
" not permitted in this position");
|
||||
where = linemap_position_for_loc_and_offset (line_table,
|
||||
where, 1);
|
||||
inform (where, "attributes may be inserted here");
|
||||
attributes = NULL_TREE;
|
||||
}
|
||||
token1 = t1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user