刚遇到这个让我震惊的家伙:
gcc -E -dM - </dev/null
这部分令我感到困惑:
- </dev/null
答案 0 :(得分:14)
这给出了gcc中所有预定义宏的列表。 -E表示运行预处理器。 -dM表示从预处理器转储预定义的宏。 - 用于从标准输入读取,而/ dev / null只用于输入空源文件。
答案 1 :(得分:3)
“&lt; / dev / null”位在shell级别,而不是特定于gcc
< defines input file
> defines ouput file for std out,
>> defines a output for std out that will be appended to,
| sends std out output to another process on it's std in
我忘记了语法但你也可以指定std err以及&amp; 2&gt;
括号后面的名称是文件名,其中/ dev / null是空文件
暂时无法访问gcc,假设从其他评论开始 - 正在从std中读取,然后是equivelant语句
gcc -E -dM /dev/null