[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC 4.9.1 suggests -std=c99

From: Eli Zaretskii
Subject: Re: GCC 4.9.1 suggests -std=c99
Date: Tue, 09 Sep 2014 18:50:22 +0300

> Date: Tue, 09 Sep 2014 08:21:54 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden, address@hidden
> Eli Zaretskii wrote:
> > do we actually want to use such initializations inside a for loop?
> It's a better style, as it scopes the control variable better.  And we 
> are assuming C99 in the trunk nowadays.
> It will be a portability problem only if we run into a pre-C99 compiler 
> that supports C99-style statements-before-declarations (which we're 
> already using in the trunk) but does not support a C99-style declaration 
> as the first clause of a for-loop.  I'd be a bit surprised if such a 
> compiler were in current use (but then I've been surprised before ...).

I think we should have discussed whether to use these C99 features
before actually starting using them.  Emacs definitely has certain
coding style, which doesn't include these.

I understand the rationale for using C99 features for which there's no
reasonably practical alternatives, or rely on C99 semantics where
earlier versions left things undefined.  But the above don't belong to
either class.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]