===================================================================
@@ -21561,6 +21561,7 @@ cp_parser_objc_method_tail_params_opt (cp_parser*
{
cp_lexer_consume_token (parser->lexer); /* Eat '...'. */
*ellipsisp = true;
+ token = cp_lexer_peek_token (parser->lexer);
break;
}
===================================================================
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+
+#include "../../objc-obj-c++-shared/Object1.h"
+
+@interface obj : Object {
+@public
+ int var;
+}
+- (int) vargsn: (int) count, ... __attribute__((deprecated)); /* { dg-warning " method attributes are not available in this version of the compiler" } */
+@end
+
+@implementation obj
+- (int) vargsn: (int) count, ...
+{
+ return 0;
+}
+@end
+
+int foo (void)
+{
+ obj *p = [obj new];
+
+ return [p vargsn:0];
+}
===================================================================
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+
+#include "../../objc-obj-c++-shared/Object1.h"
+
+@interface obj : Object {
+@public
+ int var;
+}
+- (int) vargsn: (int) count, ... __attribute__((deprecated)); /* { dg-warning " method attributes are not available in this version of the compiler" } */
+@end
+
+@implementation obj
+- (int) vargsn: (int) count, ...
+{
+ return 0;
+}
+@end
+
+int foo (void)
+{
+ obj *p = [obj new];
+
+ return [p vargsn:0];
+}