undefined behavior指令检测指编译器编译时即插入某些指令来检测程序的怪异行为.





O - different kinds of overflows
E - negation overflow, division overflow, division by zero.
A - misaligned memory access.
I - load from/store to an object with insufficient space.
N - null argument declared with nonnull attribute,
    returned null from function which never returns null, null ptr dereference.
V - variable size array with non-positive length
B - out-of-bounds memory accesses.
S - shifting out-of-bounds.
L - load of invalid value (value out of range for the enum type, loading other then 0/1 to bool type)
F - call to function through pointer with incorrect function type(gcc还不支持)

要求gcc 4.9以上

系统消息 若觉得内容不错,请点击左上角的"赞"图标,以优化网站的内容呈现。 另外,请及时验证注册邮箱,否则收不到21QA发出的红包。 官方Q群:250203055

asked 31 Oct '14, 20:19

perr's gravatar image


Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link: [text](http://url.com/ "title")
  • image: ![alt](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 31 Oct '14, 20:19

question was seen: 851 times

last updated: 31 Oct '14, 20:19

powered by O*S*Q*A