lua-users home
lua-l archive

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


On Fri, Mar 29, 2013 at 04:27:34PM +0000, Gavin Wraith wrote:
> In message <20130329153937.GE18728@pepperfish.net> you wrote:
> > 
> > With Norcroft:
> > *cc -strict -c99 -fah -Wh -Otime SSEx4nim.c
> > Norcroft RISC OS ARM C vsn 5.69 [20 Oct 2010]
> > "c.SSEx4nim", line 7: Warning: extern 'test' not declared in header
> > "c.SSEx4nim", line 8: Error: assignment to 'const' object 'follow'
> > c.SSEx4nim: 1 warning, 1 error, 0 serious errors
> > 
> > With GCC, clang, and lcc, there is no error.  I think this is a bug in
> > Norcroft.
> 
> Thanks for this. I have now got it sorted, and version 5.60 of RiscLua
> uses Lua 5.2.2 and Lpeg 0.11. I am afraid that my cleaving to Norcroft 
> is like Augustine of Hippo's "Lord grant me chastity and continence but 
> not yet".
> I tried building a version with shared libraries and the SOManager but
> got no success yet. I will probably switch when I do.

I had somebody else take a look at this, and they have the opposing view
that the compiler is right and the code makes use of undefined behavior.
I don't have the standard to hand (I'm away from home) so it's hard to
tell.

Any other language lawyers want to chime in?  It might be worth
refactoring this code to avoid the situation all together: there are
still quite a few embedded compilers out there based on the Norcroft
frontend.

B.