C 预处理器库

标签 c c-preprocessor

我的任务是为C 程序开发源代码分析工具,我需要在分析之前对代码进行预处理。我想知道什么是最好的图书馆。我需要轻巧便携的东西。

最佳答案

与其自己推出,不如使用 gcc 套件中的 cpp:http://gcc.gnu.org/onlinedocs/gcc-4.6.1/cpp/

CPP(1)                                GNU                               CPP(1)

NAME
       cpp - The C Preprocessor

SYNOPSIS
       cpp [-Dmacro[=defn]...] [-Umacro]
           [-Idir...] [-iquotedir...]
           [-Wwarn...]
           [-M|-MM] [-MG] [-MF filename]
           [-MP] [-MQ target...]
           [-MT target...]
           [-P] [-fno-working-directory]
           [-x language] [-std=standard]
           infile outfile

       Only the most useful options are listed here; see below for the
       remainder.

DESCRIPTION
       The C preprocessor, often known as cpp, is a macro processor that is
       used automatically by the C compiler to transform your program before
       compilation.  It is called a macro processor because it allows you to
       define macros, which are brief abbreviations for longer constructs.

关于C 预处理器库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6835699/

相关文章:

c - 在 C 语言的编译时评估的预处理器函数

c - 寻找表生成宏惯用语的良好解释

c - 我正确加载我的字符数组吗?

c - 根据进程组限制对文件的访问

c++ - 什么是计算宏和语法宏

c++ - GCC 内部编译器错误 : Segmentation fault

c++命令行宏预处理器无法替换单词

c - 本地指针, `static` 指针和 `malloc` 指针

c++ - libcurl 如何更改编码 url 行为

c - 直接将字节写入 OpenSSL Connection,无需 TCP