[petsc-dev] Coding style and its violations...
Karl Rupp
rupp at mcs.anl.gov
Thu Jan 17 17:34:31 CST 2013
Hi,
> Yes - looks like I need to send the whole thing through some filter
> stripping out comments first. Looks like GCC can do that with
> >gt; gcc -fpreprocessed -dD -E file.c
>
>
> Uh, are you sure these are the options you want? -fpreprocessed assumes
> the input has already been preprocessed and -E stops after preprocessing.
Yes, for just stripping out comments without starting preprocessor magic
this seems to be a viable way:
http://stackoverflow.com/questions/2394017/remove-comments-from-c-c-code
Since stripping C comments from sources is far from trivial in the
general case, I pretty much like the approach of simply using gcc for that.
Best regards,
Karli
More information about the petsc-dev
mailing list