相关疑难解决方法(0)

宏名称的有效字符是什么?

C风格的宏名称是否与标识符具有相同的命名规则?在编译器升级之后,它现在为遗留应用程序发出此警告:

warning #3649-D: white space is required between the macro name "CHAR_" and its replacement text
  #define         CHAR_&        38
Run Code Online (Sandbox Code Playgroud)

这行代码定义了&符号的ASCII值常量.

#define   DOL_SN        36
#define   PERCENT       37
#define   CHAR_&        38
#define   RT_SING       39
#define   LF_PAR        40
Run Code Online (Sandbox Code Playgroud)

我假设这个定义(实际上没有被任何代码引用,据我所知)是错误的,应该改为像"CHAR_AMPERSAND"这样的东西?

c compiler-warnings c-preprocessor

40
推荐指数
3
解决办法
5万
查看次数

标签 统计

c ×1

c-preprocessor ×1

compiler-warnings ×1