This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples][patch] C90 language conformance improvements and build options fixes
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Bill Maddox <maddox at google dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>
- Date: Thu, 28 Feb 2008 07:28:28 -0500
- Subject: Re: [tuples][patch] C90 language conformance improvements and build options fixes
- References: <8a0e66f0802261203h65eb05bfxa8c986eda98a9784@mail.gmail.com> <m37igpclyq.fsf@anquetil.quesejoda.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Feb 28, 2008 at 08:19:25AM -0400, Aldy Hernandez wrote:
>
> > + tree result;
> > +
> > phi = gsi_stmt (gsi);
> > - tree result = gimple_phi_result (phi);
> > + result = gimple_phi_result (phi);
>
> I thought that, accordingly to the coding guidelines, we were allowed
> to initialize variables, at declaration time, with the result from a
> function. I do this sort of thing all the time.
Of course. But only C99 allows mixed declaration and code. In C90
{
tree result = gimple_phi_result (gsi_stmt (gsi));
...
would be ok, but
{
phi = gsi_stmt (gsi);
tree result = gimple_phi_result (phi);
...
is not ok.
Jakub