Subject: Re: gcc optimizer bug in netbsd-1-6 on alpha (gcc 2.95.3 20010315 (release) (NetBSD nb3))
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Ian Lance Taylor <ian@airs.com>
List: tech-toolchain
Date: 08/15/2003 22:05:20
Ian Lance Taylor <ian@airs.com> writes:
> If you can restrict yourself to gcc, this works too:
>
> union int_in_addr { int32 i; struct in_addr a; };
>
> printf("parse_address(): inet addr given: [%s]\n",
> inet_ntoa(((union int_in_addr) { 0 }).i));
>
> which is horribly ugly but can be hidden by a macro. That 0 doesn't
> have to be a constant, it just has to be assignment compatible with
> int32.
Gah, of course I meant .a in the last code line, not .i.
Ian