[Freeciv-Dev] Re: Say Yes to C++ style comments
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Nov 30, 2001 at 12:13:03PM +0100, Daniel Sjölie wrote:
> On 2001-11-30 02:36:28, Raahul Kumar wrote:
> >
> > --- Jules Bean <jules@xxxxxxxxxxxxxxx> wrote:
> >
> > >
> > > <pedant comment="sorry">
> > >
> > > Yes it is. The current C standard is "ISO/IEC 9899:1999 (E), as
> > > amended by ISO/IEC 9899:1999/Cor.1:2001 (E)", commonly known as 'C99'.
> > >
> > > C99 includes // comments.
> > >
> > > Sadly (nay, ridiculously!) the standards group don't *seem* to put the
> > > standard online. However, the GCC features table makes it clear
> > > enough what's in it..
> > >
> > > 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.
--
Reinier
- [Freeciv-Dev] Re: Tech cost patch v4, (continued)
- [Freeciv-Dev] Re: Tech cost patch v4, Juha Litola, 2001/11/28
- [Freeciv-Dev] Re: Tech cost patch v3, Raimar Falke, 2001/11/28
- [Freeciv-Dev] Why not C++ style comments?, Raahul Kumar, 2001/11/29
- [Freeciv-Dev] Re: Why not C++ style comments?, Raimar Falke, 2001/11/29
- [Freeciv-Dev] C/C++ Compilers used with Freeciv, Raahul Kumar, 2001/11/29
- [Freeciv-Dev] Re: Why not C++ style comments?, Reinier Post, 2001/11/29
- [Freeciv-Dev] Re: Why not C++ style comments?, Reinier Post, 2001/11/29
- [Freeciv-Dev] Re: Why not C++ style comments?, Jules Bean, 2001/11/29
- [Freeciv-Dev] Say Yes to C++ style comments, Raahul Kumar, 2001/11/30
- [Freeciv-Dev] Re: Say Yes to C++ style comments, Daniel Sjölie, 2001/11/30
- [Freeciv-Dev] Re: Say Yes to C++ style comments,
Reinier Post <=
[Freeciv-Dev] Re: Tech cost patch, Gregory Berkolaiko, 2001/11/28
|
|