Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/regress/usr.bin/xlint/lint1 more tests



details:   https://anonhg.NetBSD.org/src/rev/3d3daceb062b
branches:  trunk
changeset: 538590:3d3daceb062b
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 23 01:09:36 2002 +0000

description:
more tests

diffstat:

 regress/usr.bin/xlint/lint1/test10.c |  18 ++++++++++++++++++
 regress/usr.bin/xlint/lint1/test11.c |   7 +++++++
 2 files changed, 25 insertions(+), 0 deletions(-)

diffs (33 lines):

diff -r d01289fc5c54 -r 3d3daceb062b regress/usr.bin/xlint/lint1/test10.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/usr.bin/xlint/lint1/test10.c      Wed Oct 23 01:09:36 2002 +0000
@@ -0,0 +1,18 @@
+/* compound literals */
+
+struct p {
+       short a, b, c, d;
+} zz = {
+       1, 2, 3, 4
+};
+
+struct p *bar(int i)
+{
+       static struct p q[10];
+       return &q[i];
+}
+
+foo()
+{
+       *bar(1) = (struct p) { 1, 2, 3, 4 };
+}
diff -r d01289fc5c54 -r 3d3daceb062b regress/usr.bin/xlint/lint1/test11.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/usr.bin/xlint/lint1/test11.c      Wed Oct 23 01:09:36 2002 +0000
@@ -0,0 +1,7 @@
+/* GCC compound statements */
+
+foo(unsigned long z)
+{
+       z = ({ unsigned long tmp; tmp = 1; tmp; });
+       foo(z);
+}



Home | Main Index | Thread Index | Old Index