Subject: Re: '//' for comments in C code? (archivers/unace)
To: None <>
From: Christos Zoulas <>
List: tech-pkg
Date: 01/21/2004 20:29:05
In article <>,
Georg Schwarz <> wrote:
>archivers/unace uses '//' to indicate comments in the code. To my
>knowledge, this is not proper C, but rather C++ style.
>The IRIX cc consequently does not recognize these lines as comments and
>fails to compile.

It is C99. Depends on what flavor of C you care to be compatible with.

>When I convert it into /* */ things work perfectly.
>I think for the sake of portability // should probably not be used in C
>code. Pkgsrc should try to remedy that problem of the original sources.
>Of course I could simply send diffs, but wouldn't it be more elegant to
>automatically have these lines either truncated beginning with // or
>converted into /* */ just before compiling?
>What would be the best way to accompish that? 

1. Use gcc
2. tell the author not to use C99 features
3. add a pre-processing step that uses gnu cpp or awk to strip the
   // comments