Subject: Re: Question regarding the array of size 0.
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 03/31/2001 19:14:04
In article <20010331005549.8CEF790@proven.weird.com>,
Greg A. Woods <tech-kern@netbsd.org, freebsd-hackers@FreeBSD.ORG> wrote:
>
>Like it or not the "char data[0]" trick has always been just that, a
>(bad) trick.

So to go back to the initial discussion point how do you propose to solve
the following?

christos

#define	syscallarg(x)								\
		union {								\
			register_t pad;						\
			struct { x datum; } le;					\
			struct {						\
				int8_t pad[ (sizeof (register_t) < sizeof (x))	\
					? 0					\
					: sizeof (register_t) - sizeof (x)];	\
				x datum;					\
			} be;							\
		}