Date: Tue, 4 Aug 1998 18:59:38 +0000 From: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr> To: FreeBSD Hackers <freebsd-hackers@FreeBSD.ORG> Subject: C and static initialization with unions Message-ID: <19980804185938.36803@breizh.prism.uvsq.fr>
next in thread | raw e-mail | index | archive | help
Hi there, A question about C and static initialization of unions: suppose, union foo_t { int i; char c; void *p; }; static union foo_t bar = { (void *)&anyvar }; The compiler says "warning, making integer from pointer without a cast"... Which is true and could lead to bad asm code. Is there a way to do this properly? Should I forgive unions or what else? -- Nicolas.Souchu@prism.uvsq.fr FreeBSD - Turning PCs into workstations - http://www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980804185938.36803>