[Freeciv-Dev] Re: Say Yes to C++ style comments
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Reinier Post <rp@xxxxxxxxxx> wrote:
> > >
> > > > http://gcc.gnu.org/c99status.html
> > > >
> > > > </pedant>
> > >
> > > I'd like a vote from the current developers and maintainers. Make using
> //
> > > comments legal.
> >
> > Does anyone have an example where freeciv is compiled with a compiler
> > that cannot handle "//"??
> >
> > If not I think we should allow it... Even if it might pose a problem for
> > someone somewhere sometime in the future...
>
> /tmp % cat << ZZ > comment.c
> ? int main(int argc, char argv[]) {} // and a comment
> ? ZZ
> /tmp % make comment
> cc comment.c -o comment
> "comment.c", line 1: syntax error before or at: /
> "comment.c", line 1: undefined or not a type: and
> "comment.c", line 1: cannot recover from previous errors
> cc: acomp failed for comment.c
> make: *** [comment] Error 2
> /tmp % make CC=gcc comment
> gcc comment.c -o comment
> /tmp % rm comment
> /tmp % make CFLAGS=-xCC comment
> cc -xCC comment.c -o comment
>
> cc is Sun's commercial compiler. I suppose it would be good enough to add
> adding a test for this compiler (e.g. use this:
>
> /tmp % cc -V
> cc: WorkShop Compilers 5.0 98/12/15 C 5.0
>
> ) and add the -xCC flag if the test succeeds.
Damn it. Ok, I retract my suggestion. When will sun fix this rather crappy
compiler? By the way, are people on sun machines mostly using cc or gcc? On
the solaris boxes at my university we have both.
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
- [Freeciv-Dev] Re: Say Yes to C++ style comments,
Raahul Kumar <=
|
|