ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] Bug causing ethereal to crash

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 7 Jun 2004 23:33:35 -0700
On Mon, Jun 07, 2004 at 10:51:10PM -0700, Guy Harris wrote:
> Are those rules C89'isms or C99'isms?  If they're C99-isms, is there
> anything in C99 to tell the compiler that the two pointers really *do*
> point to the same object?  (E.g., a keyword - from some stuff I found,
> it looks as if "restrict" is *not* what we want, as it allows *more*
> optimizations - or use of a union.)

According to this note:

	http://mail-index.NetBSD.org/tech-kern/2003/08/11/0001.html

the use of unions to force the compiler to acknowledge that two pointers
to objects of different type can point to the same object is a GCCism
not guaranteed to work with other compilers.