Is something undefined behavior by omission?

后端 未结 3 561
-上瘾入骨i
-上瘾入骨i 2021-01-18 07:22

The standard says:

1.3.24                                                          [defns.undefined]
undefined behavior         


        
3条回答
  •  渐次进展
    2021-01-18 07:35

    The last sentence of the note you quoted explains the may in its first sentence:

    Many erroneous program constructs do not engender undefined behavior; they are required to be diagnosed.

    Thus, may is quite correct.

    Anything not defined is undefined, though there are many ways it can be defined (even if it is only slightly constrained).

    Also, as notes are not normative, they cannot define behavior.

提交回复
热议问题