This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Can `cpp' strip off comments in C source code?
- From: "PRC" <panruochen at gmail dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 24 Dec 2007 11:25:54 +0800
- Subject: Can `cpp' strip off comments in C source code?
Hi,
I want to use an AWK script to process a C source code. The comments may mislead the script. To make things easy, I'd like to strip off comments from the source code before having the script to process it. Since `cpp' is a c-preprecessor utility, I'd like to know weather it can be used to strip off comments from the source code. I check the manual, but have no idea which options to use. If it can't, is there any other tools which can do this?