|
From: Steven Lumos <steven@...>
Subject: Re: Fwd: Error on Solaris Newsgroups: gmane.comp.lang.ruby.mongrel.general Date: 2006-08-16 01:09:25 GMT (2 years, 46 weeks, 1 day, 2 hours and 34 minutes ago) Zed Shaw writes: > On Thu, 2006-08-10 at 17:53 +1000, Carl Woodward wrote: >> Sorry guys, I'm an idiot. Its in C. > > Also, try installing the pre-release as I've (hopefully) fixed things > that cause the Sun C compiler to blow up (because they couldn't read a > spec if it was filled with porn). > > > gem install mongrel --source=http://mongrel.rubyforge.org/releases/ Sun C does not blow up, it emits some warnings. The warnings aren't errors, they are warnings. That's what the word "warning" at the beginning of those lines means. Empty declarations really are illegal in C99. They really are syntax errors. I wonder where you differ from Sun on the spec. I'd like to see your derivation of ';' from the grammar in Annex A.2.2. If anyone is inordinately bothered by the warnings, they can get rid of them by adding -xc99=%none to their compiler flags. Then an empty decl will be converted to 'int;' like C89 and GCC do. Better to fix the bug (as has already been done) however. Granted, using the word "error" in the body of a warning is confusing to people who miss the word "warning" immediately preceding it. That's why I used phrases like "Mostly just FYI", and "I get some warnings" in my bug report. The single remaining warning is also a warning. GCC will also emit this warning, but they hide this feature behind -Wunreachable-code. Try it (3.4.3 here) and you will learn why they hide it. It flags over 100 lines. I removed the crazy #line directives (1,106,24,110,26,114?) from the generated C file (0.3.13.3) and compiled to find that the warning is on line 297. That line really is unreachable. The warning really should be there. Having unreachable lines isn't exactly a crime for a parser generator. If anyone is inordinately bothered by the warning they can add -erroff=E_STATEMENT_NOT_REACHED to their compiler flags. Mongrel runs great when compiled with Sun C! So does Ruby. Maybe I should have noted in my bug report that I was using it with great success, would love to buy you a beverage, etc. GCC is periodically broken in horrible ways on SPARC. They even managed to break printf("%.2lf", x). I haven't caught up on whether they ever succeeded in correctly implementing the standard calling convention. Steve |
|
|