gpt4 book ai didi

C99, "Despite the name, a non-directive is a preprocessing directive."

转载 作者:太空狗 更新时间:2023-10-29 17:19:24 29 4
gpt4 key购买 nike

标题中引用的脚注是什么意思?这是 6.10.3p11 的脚注

If there are sequences of preprocessing tokens within the list of arguments that would otherwise act as preprocessing directives,147) the behavior is undefined.

我查了一下发现

A preprocessing directive consists of a sequence of preprocessing tokens that begins with a # preprocessing token that ...

而且我没有找到与该语法匹配的非终结符 non-directive。它可以但不必以 # 预处理标记开头。那么我们不是必须说以下吗?

"Despite the name, a preprocessing directive is a non-directive."

此外,该脚注的目的是什么?

最佳答案

参见 http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_250.htm是为了说明

#define nothing(x) // Nothing    /* Case 1 */
nothing (
#nonstandard
)

是 UB。

关于C99, "Despite the name, a non-directive is a preprocessing directive.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5679202/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com