diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-09-23 22:21:39 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-09-23 22:21:39 +0000 |
commit | 19dc6d015261862f1335587ab362f79a89dfc0c9 (patch) | |
tree | 680cb9863c1843acf4a5ee0d2815beb43af9ab54 /gcc/testsuite/obj-c++.dg/too-many-args.mm | |
parent | 452648a89bd6f147245b795ac2880f34075685fa (diff) | |
download | gcc-19dc6d015261862f1335587ab362f79a89dfc0c9.zip gcc-19dc6d015261862f1335587ab362f79a89dfc0c9.tar.gz gcc-19dc6d015261862f1335587ab362f79a89dfc0c9.tar.bz2 |
In gcc/:
* c-typeck.c (convert_arguments): Use warning 'too many arguments
to method [methodname]' for an Objective-C method instead of the
less satisfactory 'too many arguments to function' (with no method
name).
In gcc/cp/:
* typeck.c (warn_args_num): Use warning 'too many arguments to
method [methodname]' for an Objective-C method instead of the less
satisfactory 'too many arguments to function' (with no method
name).
In gcc/testsuite/:
* obj-c++.dg/too-many-args.mm: New file.
Merge from 'apple/trunk' branch on FSF servers.
2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 4491608
* objc.dg/too-many-args.m: New
From-SVN: r164573
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/too-many-args.mm')
-rw-r--r-- | gcc/testsuite/obj-c++.dg/too-many-args.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/too-many-args.mm b/gcc/testsuite/obj-c++.dg/too-many-args.mm new file mode 100644 index 0000000..6fee1b3 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/too-many-args.mm @@ -0,0 +1,10 @@ +/* { dg-do compile } */ + +@interface SomeClass ++ method:(int)foo; +@end + +int main(void) { + [SomeClass method:3, 4]; /* { dg-error "too many arguments to method \\'method:\\'" } */ + return 0; +} |