Mon Mar 6 21:02:47 2017 UTC ()
add builtin_offsetof


(christos)
diff -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/Makefile
diff -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/d_cast_typeof.c

cvs diff -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/Makefile (expand / switch to unified diff)

--- src/tests/usr.bin/xlint/lint1/Makefile 2017/03/06 12:00:27 1.14
+++ src/tests/usr.bin/xlint/lint1/Makefile 2017/03/06 21:02:47 1.15
@@ -1,25 +1,26 @@ @@ -1,25 +1,26 @@
1# $NetBSD: Makefile,v 1.14 2017/03/06 12:00:27 christos Exp $ 1# $NetBSD: Makefile,v 1.15 2017/03/06 21:02:47 christos Exp $
2 2
3NOMAN= # defined 3NOMAN= # defined
4 4
5.include <bsd.own.mk> 5.include <bsd.own.mk>
6 6
7TESTSDIR= ${TESTSBASE}/usr.bin/xlint/lint1 7TESTSDIR= ${TESTSBASE}/usr.bin/xlint/lint1
8 8
9TESTS_SH= t_integration 9TESTS_SH= t_integration
10 10
11FILESDIR= ${TESTSDIR} 11FILESDIR= ${TESTSDIR}
12FILES+= d_alignof.c 12FILES+= d_alignof.c
 13FILES+= d_bltinoffsetof.c
13FILES+= d_c99_anon_struct.c 14FILES+= d_c99_anon_struct.c
14FILES+= d_c99_anon_union.c 15FILES+= d_c99_anon_union.c
15FILES+= d_c99_complex_num.c 16FILES+= d_c99_complex_num.c
16FILES+= d_c99_complex_split.c 17FILES+= d_c99_complex_split.c
17FILES+= d_c99_compound_literal_comma.c 18FILES+= d_c99_compound_literal_comma.c
18FILES+= d_c99_decls_after_stmt.c 19FILES+= d_c99_decls_after_stmt.c
19FILES+= d_c99_decls_after_stmt2.c 20FILES+= d_c99_decls_after_stmt2.c
20FILES+= d_c99_decls_after_stmt3.c 21FILES+= d_c99_decls_after_stmt3.c
21FILES+= d_c99_flex_array_packed.c  22FILES+= d_c99_flex_array_packed.c
22FILES+= d_c99_for_loops.c 23FILES+= d_c99_for_loops.c
23FILES+= d_c99_func.c 24FILES+= d_c99_func.c
24FILES+= d_c99_recursive_init.c 25FILES+= d_c99_recursive_init.c
25FILES+= d_c99_struct_init.c 26FILES+= d_c99_struct_init.c

cvs diff -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/d_cast_typeof.c (expand / switch to unified diff)

--- src/tests/usr.bin/xlint/lint1/d_cast_typeof.c 2017/03/06 12:00:27 1.1
+++ src/tests/usr.bin/xlint/lint1/d_cast_typeof.c 2017/03/06 21:02:47 1.2
@@ -1,12 +1,14 @@ @@ -1,12 +1,14 @@
1 1
2struct foo { 2struct foo {
3 char list; 3 char list;
4}; 4};
5struct foo *hole; 5struct foo *hole;
6 6
7char * 7char *
8foo(void) 8foo(void)
9{ 9{
10 return ((char *)&((typeof(hole))0)->list); 10 return hole ?
 11 ((char *)&((typeof(hole))0)->list) :
 12 ((char *)&((typeof(*hole) *)0)->list);
11} 13}
12 14