This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Undefined behavior in genautomata.c?
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <gdr at integrable-solutions dot net>
- Cc: "'Richard Henderson'" <rth at redhat dot com>,"'Sebastian Pop'" <sebastian dot pop at cri dot ensmp dot fr>,<gcc at gcc dot gnu dot org>,"'Vladimir Makarov'" <vmakarov at redhat dot com>
- Date: Mon, 19 Sep 2005 15:10:18 +0100
- Subject: RE: Undefined behavior in genautomata.c?
----Original Message----
>From: gdr@integrable-solutions.net
>Sent: 19 September 2005 14:01
> "Dave Korn" <dave.korn@artimi.com> writes:
>
> [...]
>
>> I've seen this trick used again and again and again, and *I* haven't
>> _ever_ seen anyone use anything except an array size of [1] in this
>> place.
>
> [...]
>
>> Have you?
>
> Yes. It wasn't attempt at pedantism.
>
> -- Gaby
Nono, I didn't assume so, I just wanted to be sure we weren't talking at
cross purposes. And yes, now you mention it, your example of using a char
array sized by sizeof() the objects that are going to be written of it is
something I've seen before. In fact, I think I've even done it myself!
cheers,
DaveK
--
Can't think of a witty .sigline today....