GNOME Bugzilla – Bug 349575
fix build with gcc 2.95
Last modified: 2006-08-09 06:50:32 UTC
The following patch gets rid of C99isms all across the map to allow compilation with gcc 2.95 and other C89 compilers.
Created attachment 70042 [details] [review] C89 fixes
Created attachment 70043 [details] [review] additional patch Looks like I still missed a few engines...
Thanks For This. You really cleared up a question I had been asking myself recently. I hadn't realized that I was using C99'isms (most of those are my fault). I will try and remember this from now on. I have applied everything but the crux bit, since the crux engine is still in the midst of a rewrite by thomas, and it may be up to him to take care of that part of the patch. Also since this patch was made the industrial cairo rewrite by Ben was done, so you might find some other new problems as well.
I'll take a look at the next release to sort out what's left.
Created attachment 70495 [details] [review] patch for 2.7.7 Here's a patch against 2.7.7 that fixes the rest of the bunch.
Thanks, commited, and closing bug. Feel free to reopen later on if something crops back up. It might be a good idea if possible and I can figure out how, too try and ensure that C89 is used even on C99 compilers, so that these things are bugs across the board.
gcc has -std=c89, but I'm not sure if that catches these issues.
Looks like -Wall -Werror -ansi -pedantic will catch these. but pedantic and werror show a problem in gtk (2.10?) headers.. so not persay usable since it will always fail to compile at all.
-Werror isn't a good idea anyway since you can't control what's installed on other machines and there might be lots of other warnings (completely unrelated even, if there's something afoot in system headers)