diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2005-11-23 20:38:59 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2005-11-23 20:38:59 +0000 |
commit | bdf2273a7b1402d809927a70ce5fa275033f8c59 (patch) | |
tree | d68e07ee685a39aff0427e05b63a2bb7ac9c5e1f /regress | |
parent | 782fa67eecd6c17731b4d57f238227767c34c8e8 (diff) |
Test "inline" keyword
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/xlint/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-3.c | 26 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-3.c.exp | 2 |
3 files changed, 30 insertions, 2 deletions
diff --git a/regress/usr.bin/xlint/Makefile b/regress/usr.bin/xlint/Makefile index 7447964ce10..3673135807d 100644 --- a/regress/usr.bin/xlint/Makefile +++ b/regress/usr.bin/xlint/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.2 2005/11/23 00:13:56 cloder Exp $ +# $OpenBSD: Makefile,v 1.3 2005/11/23 20:38:57 cloder Exp $ -TEST_MODULES= 1 2 +TEST_MODULES= 1 2 3 LINT= lint LINTFLAGS?= -chapbx diff --git a/regress/usr.bin/xlint/test-3.c b/regress/usr.bin/xlint/test-3.c new file mode 100644 index 00000000000..a9d63e2e474 --- /dev/null +++ b/regress/usr.bin/xlint/test-3.c @@ -0,0 +1,26 @@ +/* $OpenBSD: test-3.c,v 1.1 2005/11/23 20:38:58 cloder Exp $ */ + +/* + * Placed in the public domain by Chad Loder <cloder@openbsd.org>. + * + * Test parsing of "inline" keyword. + */ + +static inline int +foo(void); + +static inline int +foo(void) +{ + return 0; +} + +/* ARGSUSED */ +int +main(int argc, char* argv[]) +{ + int i; + i = foo(); + i++; + return 0; +} diff --git a/regress/usr.bin/xlint/test-3.c.exp b/regress/usr.bin/xlint/test-3.c.exp new file mode 100644 index 00000000000..97b36a8aee1 --- /dev/null +++ b/regress/usr.bin/xlint/test-3.c.exp @@ -0,0 +1,2 @@ +lint: cannot find llib-lc.ln +Lint pass2: |