[ragel-users] Build failures with GCC 4.4

Adrian Thurston thurston at complang.org
Sat May 23 02:46:17 UTC 2009

Applied, thanks. I also committed a fix for the problem at main.cpp:339.


Diego E. “Flameeyes” Pettenò wrote:
> Seems like yesterday I tried with the “wrong” compiler (that is, the
> compiler that is actually used rather than the one I should test with).
> While GCC 4.3 compiles Ragel 6.5 fine, GCC 4.4 errors out, because the
> string functions are now declared in such a way that they return “const
> char *” when given “const char *” and “char *” when given “char *”.
> I'm attaching the half good part of the patch I've applied to the Gentoo
> ebuild, the other half is actually just a const_cast which is _nasty_;
> the problem is at main.c:339; the eq variable is a pointer to
> non-constant, and is indeed modified on line 342.
> The solution would be, I guess, to use strncmp instead of setting eq to
> \0. This way you never modify the string and you can use constant
> strings.
> HTH,
> ------------------------------------------------------------------------
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users

More information about the ragel-users mailing list