3 ms·
What I do is I turn on my compilers warnings for C++ comments in C code, then use C++ comments with all my TODO comments. That way I know if there are any outs
by burgerbrain 15y ago
What I do is I turn on my compilers warnings for C++ comments in C code, then use C++ comments with all my TODO comments. That way I know if there are any outstanding TODOs when I go to build.
- mahmud 15y agoIt's not a warning in GCC. The -ansi flag, and older standards, err on C++ comments, but they're still valid input for C99 mode(s).
- burgerbrain 15y agoWith -pedantic you can get: warning: C++ style comments are not allowed in ISO C90 [enabled by default] Might be worth noting at this point since I'll already halfway though the GCC manpage again, that -Wcomments seems to be exactly for the sort of situation the author of the article found himself in.