On 01/13/2017 05:02 AM, [email protected] wrote:
> snl.c is autogenerated using the lemon parser and lemon was updated
> between 2.2.3 and 2.2.4
>
> Looking at the code failing it is:
>
> }else{
> assert( yyact == YY_ERROR_ACTION );
> yyminorunion.yy0 = yyminor;
> #ifdef YYERRORSYMBOL
> int yymx;
> #endif
>
> I think Visual Studio 2010 doesn’t like the declaration of yymx
> occurring after an assignment, this wasn’t allowed prior to the C99
> standard I believe.
IIRC the vxWorks 5.5.x compiler will also object to the above source
code; K&R and ANSI C89-rules required all variable declarations to
appear before any other statement within a block, which the above code
violates when YYERRORSYMBOL is defined. GCC has allowed it for a long
time though, so some programmers might never have come across the rule.
Note that the rule applied within any {code block;}, it didn't require
all variable declarations to appear at the beginning of a subroutine
definition. A lot of older EPICS code was written that way, but I don't
know if that was due to misunderstanding the rule or just preferring
that particular coding style. I usually move variable declarations into
the inner-most scope possible when I work on such code nowadays.
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- References:
- Problems with seq 2.2.4 on Windows Mark Rivers
- RE: Problems with seq 2.2.4 on Windows Mark Rivers
- RE: Problems with seq 2.2.4 on Windows freddie.akeroyd
- Navigate by Date:
- Prev:
Problem with parallel make with seq 2.2.4 on Linux Mark Rivers
- Next:
Re: Problem with parallel make with seq 2.2.4 on Linux Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: Problems with seq 2.2.4 on Windows Mark Rivers
- Next:
EPICS Device Support for cRIO and FlexRIO FPGA based devices is now available Enrique Bernal
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|