change file

This commit is contained in:
logic 2022-03-07 09:39:40 +08:00
parent f042f55067
commit 5f097a1720

View File

@ -40,7 +40,7 @@ Minimal程序使用了SEC宏展开后结果分析如下
#### \_Pragma {#pragma}
其中有三句为_Pragma,这是一个C99新引入的运算符作为运算符的优势在于其可以用于宏中如该源文件中的SEC宏。该运算符在处理运算符内的表达式后即相当于#pragma指令。处理过程非常简单将'\\\\'替换为'\\',将\\"替换为"。这样_Pragma在预处理后即成为~ #pragma GCC diagnostic ignored "-Wignored-attributes" ~。pragma则是针对编译器给出的控制编译的指令因此相关信息需要查阅gcc的说明。在该网站可以看到 **[gcc支持的pragma](https://gcc.gnu.org/onlinedocs/gcc/Pragmas.html)** 。其中该处使用的pragma为 **[Diagnostic Pragmas](https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas)** ,这里要注意的是这个编译指令会覆盖编译器的命令行参数push即改变状态忽视Wignored-attributes参数pop则恢复原状。
其中有三句为_Pragma,这是一个C99新引入的运算符作为运算符的优势在于其可以用于宏中如该源文件中的SEC宏。该运算符在处理运算符内的表达式后即相当于#pragma指令。处理过程非常简单将'\\\\'替换为'\\',将\\"替换为"。这样_Pragma在预处理后即成为 `#pragma GCC diagnostic ignored "-Wignored-attributes"` 。pragma则是针对编译器给出的控制编译的指令因此相关信息需要查阅gcc的说明。在该网站可以看到 **[<span class="underline">gcc支持的pragma</span>](https://gcc.gnu.org/onlinedocs/gcc/Pragmas.html)** 。其中该处使用的pragma为 **<span class="underline">[Diagnostic Pragmas\_](https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas)</span>** ,这里要注意的是这个编译指令会覆盖编译器的命令行参数push即改变状态忽视Wignored-attributes参数pop则恢复原状。
#### __attribute\_\_ {#attribute}