This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tuples][patch] C90 language conformance improvements and build options fixes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]