This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Undefined behavior in genautomata.c?
- From: "Giovanni Bajo" <rasky at develer dot com>
- To: "Dave Korn" <dave dot korn at artimi dot com>
- Cc: "Gabriel Dos Reis" <gdr at integrable-solutions dot net>,"Richard Henderson" <rth at redhat dot com>,<gcc at gcc dot gnu dot org>,<vmakarov at redhat dot com>
- Date: Mon, 19 Sep 2005 12:40:23 +0200
- Subject: Re: Undefined behavior in genautomata.c?
- References: <20050919102612.GA2233@redhat.com> <SERRANO9Tpcy8Sx605n00000089@SERRANO.CAM.ARTIMI.COM>
Dave Korn <dave.korn@artimi.com> wrote:
> Do you suppose the idiom is common enough that VRP could special-case
> "arrays of size 1 at the end of a struct" ? And still obtain the benefits
> of the optimisation in 99.99% of all non-variable-length-tail-array cases?
It makes sense to me. We could special case "arrays of size 1 at the end of
the struct", and treat it as C99 flexible array members. Any other case
could simply be considered broken.
--
Giovanni Bajo