gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] driver_skytraq.c on CentOS 6.6 i686 - "'for' loop initial


From: Gary E. Miller
Subject: Re: [gpsd-dev] driver_skytraq.c on CentOS 6.6 i686 - "'for' loop initial declarations are only allowed in C99 mode"
Date: Thu, 31 Mar 2016 11:39:12 -0700

Yo Jason!

On Thu, 31 Mar 2016 07:20:13 -0400
Jason Azze <address@hidden> wrote:

> 22:14:26 driver_skytraq.c:178: error: 'for' loop initial declarations
> are only allowed in C99 mode

Good catch!  My bad.  

I'm not sure why that is not valid, but it is now fixed and pushed.

My reading of C11 is that this is valid C11.  From the C1x proposal,
I don't have a copy of the actuall C11:

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1516.pdf

6.8.5.3 The for statement

    "If clause-1 is a declaration, the scope of any identifiers it
    declares is the remainder of the declaration and the entire loop,
    [...]

But nothing here worth bikesheding...

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

Attachment: pgpwCrnxVILM2.pgp
Description: OpenPGP digital signature


reply via email to

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