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 add packed tests.
details: https://anonhg.NetBSD.org/src/rev/ff089f8449c6
branches: trunk
changeset: 747879:ff089f8449c6
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 04 15:12:41 2009 +0000
description:
add packed tests.
diffstat:
regress/usr.bin/xlint/lint1/test26.c | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diffs (39 lines):
diff -r 7bf042d70376 -r ff089f8449c6 regress/usr.bin/xlint/lint1/test26.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/usr.bin/xlint/lint1/test26.c Sun Oct 04 15:12:41 2009 +0000
@@ -0,0 +1,35 @@
+/* packed tests */
+
+struct in_addr {
+ int x;
+};
+struct ip_timestamp {
+ char ipt_code;
+ char ipt_len;
+ char ipt_ptr;
+ unsigned int ipt_flg:4,
+ ipt_oflw:4;
+ union ipt_timestamp {
+ int ipt_time[1];
+ struct ipt_ta {
+ struct in_addr ipt_addr;
+ int ipt_time;
+ } ipt_ta[1] __packed;
+ } ipt_timestamp __packed;
+} __packed;
+
+typedef struct __packed {
+ int x;
+} t;
+
+struct x {
+ char c;
+ long l;
+} __packed;
+
+struct y {
+ char c;
+ long l;
+};
+
+int a[sizeof(struct y) - sizeof(struct x) - 1];
Home |
Main Index |
Thread Index |
Old Index