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: "J. Scott Berg" <jsberg@xxxxxxx>
Date: Tue, 8 Jun 2004 10:13:11 -0400 (EDT)
Guy Harris wrote:

Are those rules C89'isms or C99'isms?

They are C89-isms.

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.

I don't think that is a GCCism.  The quotation from the standard (C99,
but the text is similar in C89) given in the link you reference
indicates otherwise.

However, I think in the end it is simpler to just require anything
that wants to use the slab allocator to have a next pointer.

--
J. Scott Berg                           Email: jsberg@xxxxxxx