Add an anonymous struct test
This commit is contained in:
parent
d8e986fab6
commit
40c99df3a6
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.10 2015/07/29 18:26:15 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.11 2015/10/14 16:32:55 christos Exp $
|
||||
|
||||
NOMAN= # defined
|
||||
|
||||
|
@ -10,6 +10,7 @@ TESTS_SH= t_integration
|
|||
|
||||
FILESDIR= ${TESTSDIR}
|
||||
FILES+= d_alignof.c
|
||||
FILES+= d_c99_anon_struct.c
|
||||
FILES+= d_c99_complex_num.c
|
||||
FILES+= d_c99_complex_split.c
|
||||
FILES+= d_c99_compound_literal_comma.c
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/* Anonymous struct test */
|
||||
|
||||
typedef int type;
|
||||
|
||||
struct point {
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
struct bar {
|
||||
struct {
|
||||
struct point top_left;
|
||||
struct point bottom_right;
|
||||
};
|
||||
type z;
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
struct bar b;
|
||||
b.top_left.x = 1;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue