Objective-C++ : Allow prefix attrs on linkage specs.
For Objective-C++, this combines prefix attributes from before and
after top level linkage specs. The "reference implementation" for
Objective-C++ allows this, and system headers depend on it.
e.g.
__attribute__((__deprecated__))
extern "C" __attribute__((__visibility__("default")))
@interface MyClass
...
@end
Would consider the list of prefix attributes to the interface for
MyClass to include both the visibility and deprecated ones.
When we are compiling regular C++, this emits a warning and discards
any prefix attributes before a linkage spec.
gcc/cp/ChangeLog:
* parser.c (cp_parser_declaration): Unless we are compiling for
Ojective-C++, warn about and discard any attributes that prefix
a linkage specification.