On 6/20/06, Russell Bateman <[EMAIL PROTECTED]> wrote:
Formally speaking, C99 (ISO/IEC 9899:1999) still refers to "ANSI C" which does not tolerate the C++ style comment operator.
In the draft standard c99 (*1), 6.4.9.2, page 66, // is defined as a comment. Is this something that was changed/removed from the final standard ? Yakov (*1) http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf
Yakov Lerner wrote: > Some C sources that I have are c99, other are c89. > > The c99 sources can use //-style comments. > The c89 sources can use only /**/-style comments. > > I'd like to have my "commentify" macro to > use // in c99 sources, and /**/ in c89 sources. > > But how to tell those two types apart ? Any ideas ? > I'm thinking about searching the file for pre-existing //. > That's crude but I can't think of anything else. > What would be good method to detect c99 vs c89 ? > > Yakov > >
