René's URL Explorer Experiment


Title: 未定义行为 - cppreference.com

Generator: MediaWiki 1.43.8

direct link

Domain: zh.cppreference.com

format-detectiontelephone=no

Links:

cppreference.comhttps://zh.cppreference.com/
创建账号https://zh.cppreference.com/index.php?title=Special:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7&returnto=cpp%2Flanguage%2Fub
登录https://zh.cppreference.com/index.php?title=Special:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95&returnto=cpp%2Flanguage%2Fub
页面https://zh.cppreference.com/cpp/language/ub
讨论https://zh.cppreference.com/index.php?title=Talk:cpp/language/ub&action=edit&redlink=1
https://zh.cppreference.com/cpp/language/ub
不转换https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh
简体https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh-hans
繁體https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh-hant
大陆简体https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh-cn
香港繁體https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh-hk
澳門繁體https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh-mo
大马简体https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh-my
新加坡简体https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh-sg
臺灣正體https://zh.cppreference.com/index.php?title=cpp/language/ub&variant=zh-tw
阅读https://zh.cppreference.com/cpp/language/ub
查看源代码https://zh.cppreference.com/index.php?title=cpp/language/ub&action=edit
查看历史https://zh.cppreference.com/index.php?title=cpp/language/ub&action=history
https://zh.cppreference.com/cpp/language/ub
cpphttps://zh.cppreference.com/cpp
languagehttps://zh.cppreference.com/cpp/language
C++https://zh.cppreference.com/cpp
编译器支持https://zh.cppreference.com/cpp/compiler_support
自立实现与有宿主实现https://zh.cppreference.com/cpp/freestanding
语言https://zh.cppreference.com/cpp/language
标准库https://zh.cppreference.com/cpp/standard_library
标准库标头https://zh.cppreference.com/cpp/header
具名要求https://zh.cppreference.com/cpp/named_req
功能特性测试宏https://zh.cppreference.com/cpp/feature_test
语言支持库https://zh.cppreference.com/cpp/utility#语言支持
概念库https://zh.cppreference.com/cpp/concepts
诊断库https://zh.cppreference.com/cpp/error
内存管理库https://zh.cppreference.com/cpp/memory
元编程库https://zh.cppreference.com/cpp/meta
通用工具库https://zh.cppreference.com/cpp/utility
容器库https://zh.cppreference.com/cpp/container
迭代器库https://zh.cppreference.com/cpp/iterator
范围库https://zh.cppreference.com/cpp/ranges
算法库https://zh.cppreference.com/cpp/algorithm
字符串库https://zh.cppreference.com/cpp/string
文本处理库https://zh.cppreference.com/cpp/text
数值库https://zh.cppreference.com/cpp/numeric
日期和时间库https://zh.cppreference.com/cpp/chrono
输入/输出库https://zh.cppreference.com/cpp/io
文件系统库https://zh.cppreference.com/cpp/filesystem
并发支持库https://zh.cppreference.com/cpp/thread
执行控制库https://zh.cppreference.com/cpp/execution
技术规范https://zh.cppreference.com/cpp/experimental
符号索引https://zh.cppreference.com/cpp/symbol_index
外部库https://zh.cppreference.com/cpp/links/libs
[编辑]https://zh.cppreference.com/index.php?title=Template:cpp/navbar_content&action=edit
C++ 语言https://zh.cppreference.com/cpp/language
预处理器https://zh.cppreference.com/cpp/preprocessor
注释https://zh.cppreference.com/cpp/comment
关键词https://zh.cppreference.com/cpp/keyword
转义序列https://zh.cppreference.com/cpp/language/escape
流程控制https://zh.cppreference.com/cpp/language/statements
ifhttps://zh.cppreference.com/cpp/language/if
switchhttps://zh.cppreference.com/cpp/language/switch
forhttps://zh.cppreference.com/cpp/language/for
范围 forhttps://zh.cppreference.com/cpp/language/range-for
whilehttps://zh.cppreference.com/cpp/language/while
do-whilehttps://zh.cppreference.com/cpp/language/do
continuehttps://zh.cppreference.com/cpp/language/continue
breakhttps://zh.cppreference.com/cpp/language/break
gotohttps://zh.cppreference.com/cpp/language/goto
returnhttps://zh.cppreference.com/cpp/language/return
函数https://zh.cppreference.com/cpp/language/functions
函数声明https://zh.cppreference.com/cpp/language/function
lambda 函数表达式https://zh.cppreference.com/cpp/language/lambda
inline 说明符https://zh.cppreference.com/cpp/language/inline
动态异常说明https://zh.cppreference.com/cpp/language/except_spec
noexcept 说明符https://zh.cppreference.com/cpp/language/noexcept_spec
throw 表达式https://zh.cppreference.com/cpp/language/throw
try 块https://zh.cppreference.com/cpp/language/try
catch 处理块https://zh.cppreference.com/cpp/language/catch
命名空间声明https://zh.cppreference.com/cpp/language/namespace
命名空间别名https://zh.cppreference.com/cpp/language/namespace_alias
基础类型https://zh.cppreference.com/cpp/language/types
枚举类型https://zh.cppreference.com/cpp/language/enum
函数类型https://zh.cppreference.com/cpp/language/function
类/结构体类型https://zh.cppreference.com/cpp/language/class
联合体类型https://zh.cppreference.com/cpp/language/union
const/volatilehttps://zh.cppreference.com/cpp/language/cv
decltypehttps://zh.cppreference.com/cpp/language/decltype
autohttps://zh.cppreference.com/cpp/language/auto
constexprhttps://zh.cppreference.com/cpp/language/constexpr
constevalhttps://zh.cppreference.com/cpp/language/consteval
constinithttps://zh.cppreference.com/cpp/language/constinit
存储期说明符https://zh.cppreference.com/cpp/language/storage_duration
初始化https://zh.cppreference.com/cpp/language/initialization
默认初始化https://zh.cppreference.com/cpp/language/default_initialization
值初始化https://zh.cppreference.com/cpp/language/value_initialization
零初始化https://zh.cppreference.com/cpp/language/zero_initialization
复制初始化https://zh.cppreference.com/cpp/language/copy_initialization
直接初始化https://zh.cppreference.com/cpp/language/direct_initialization
聚合初始化https://zh.cppreference.com/cpp/language/aggregate_initialization
列表初始化https://zh.cppreference.com/cpp/language/list_initialization
常量初始化https://zh.cppreference.com/cpp/language/constant_initialization
引用初始化https://zh.cppreference.com/cpp/language/reference_initialization
表达式https://zh.cppreference.com/cpp/language/expressions
值类别https://zh.cppreference.com/cpp/language/value_category
求值顺序https://zh.cppreference.com/cpp/language/eval_order
运算符https://zh.cppreference.com/cpp/language/operators
运算符优先级https://zh.cppreference.com/cpp/language/operator_precedence
替代表示https://zh.cppreference.com/cpp/language/operator_alternative
字面量https://zh.cppreference.com/cpp/language/expressions#字面量
布尔https://zh.cppreference.com/cpp/language/bool_literal
整数https://zh.cppreference.com/cpp/language/integer_literal
浮点https://zh.cppreference.com/cpp/language/floating_literal
字符https://zh.cppreference.com/cpp/language/character_literal
字符串https://zh.cppreference.com/cpp/language/string_literal
nullptrhttps://zh.cppreference.com/cpp/language/nullptr
用户定义https://zh.cppreference.com/cpp/language/user_literal
属性https://zh.cppreference.com/cpp/language/attributes
typedef 声明https://zh.cppreference.com/cpp/language/typedef
类型别名声明https://zh.cppreference.com/cpp/language/type_alias
隐式转换https://zh.cppreference.com/cpp/language/implicit_conversion
static_casthttps://zh.cppreference.com/cpp/language/static_cast
const_casthttps://zh.cppreference.com/cpp/language/const_cast
显式转换https://zh.cppreference.com/cpp/language/explicit_cast
dynamic_casthttps://zh.cppreference.com/cpp/language/dynamic_cast
reinterpret_casthttps://zh.cppreference.com/cpp/language/reinterpret_cast
new 表达式https://zh.cppreference.com/cpp/language/new
delete 表达式https://zh.cppreference.com/cpp/language/delete
https://zh.cppreference.com/cpp/language/classes
类声明https://zh.cppreference.com/cpp/language/class
构造函数https://zh.cppreference.com/cpp/language/constructor
this 指针https://zh.cppreference.com/cpp/language/this
访问说明符https://zh.cppreference.com/cpp/language/access
friend 说明符https://zh.cppreference.com/cpp/language/friend
虚函数https://zh.cppreference.com/cpp/language/virtual
override 说明符https://zh.cppreference.com/cpp/language/override
final 说明符https://zh.cppreference.com/cpp/language/final
explicithttps://zh.cppreference.com/cpp/language/explicit
statichttps://zh.cppreference.com/cpp/language/static
默认构造函数https://zh.cppreference.com/cpp/language/default_constructor
复制构造函数https://zh.cppreference.com/cpp/language/copy_constructor
移动构造函数https://zh.cppreference.com/cpp/language/move_constructor
复制赋值https://zh.cppreference.com/cpp/language/copy_assignment
移动赋值https://zh.cppreference.com/cpp/language/move_assignment
析构函数https://zh.cppreference.com/cpp/language/destructor
模板https://zh.cppreference.com/cpp/language/templates
类模板https://zh.cppreference.com/cpp/language/class_template
函数模板https://zh.cppreference.com/cpp/language/function_template
模板特化https://zh.cppreference.com/cpp/language/template_specialization
形参包https://zh.cppreference.com/cpp/language/pack
内联汇编https://zh.cppreference.com/cpp/language/asm
C++ 的历史https://zh.cppreference.com/cpp/language/history
[编辑]https://zh.cppreference.com/index.php?title=Template:cpp/language/navbar_content&action=edit
基本概念https://zh.cppreference.com/cpp/language/basic_concepts
注释https://zh.cppreference.com/cpp/comment
ASCIIhttps://zh.cppreference.com/cpp/language/ascii
标点https://zh.cppreference.com/cpp/language/punctuators
名字和标识符https://zh.cppreference.com/cpp/language/identifiers
类型https://zh.cppreference.com/cpp/language/type
基础类型https://zh.cppreference.com/cpp/language/types
对象https://zh.cppreference.com/cpp/language/object
作用域https://zh.cppreference.com/cpp/language/scope
对象生存期https://zh.cppreference.com/cpp/language/lifetime
存储期与链接https://zh.cppreference.com/cpp/language/storage_duration
定义和单一定义规则(ODR)https://zh.cppreference.com/cpp/language/definition
名字查找https://zh.cppreference.com/cpp/language/lookup
有限定名字查找https://zh.cppreference.com/cpp/language/qualified_lookup
无限定名字查找https://zh.cppreference.com/cpp/language/unqualified_lookup
“如同”规则https://zh.cppreference.com/cpp/language/as_if
内存模型https://zh.cppreference.com/cpp/language/memory_model
多线程执行与数据竞争https://zh.cppreference.com/cpp/language/multithread
字符集与编码https://zh.cppreference.com/cpp/language/charset
翻译阶段https://zh.cppreference.com/cpp/language/translation_phases
main() 函数https://zh.cppreference.com/cpp/language/main_function
模块https://zh.cppreference.com/cpp/language/modules
约定https://zh.cppreference.com/cpp/language/contracts
[编辑]https://zh.cppreference.com/index.php?title=Template:cpp/language/basics/navbar_content&action=edit
1 解释https://zh.cppreference.com/cpp/language/ub#解释
2 未定义行为与优化https://zh.cppreference.com/cpp/language/ub#未定义行为与优化
2.1 有符号溢出https://zh.cppreference.com/cpp/language/ub#有符号溢出
2.2 访问越界https://zh.cppreference.com/cpp/language/ub#访问越界
2.3 未初始化的标量https://zh.cppreference.com/cpp/language/ub#未初始化的标量
2.4 非法标量https://zh.cppreference.com/cpp/language/ub#非法标量
2.5 空指针解引用https://zh.cppreference.com/cpp/language/ub#空指针解引用
2.6 访问已传递给 std::realloc 的指针https://zh.cppreference.com/cpp/language/ub#访问已传递给_std::realloc_的指针
2.7 无副作用的非平凡(C++26 起)无限循环https://zh.cppreference.com/cpp/language/ub#无副作用的非平凡(C++26_起)无限循环
3 带诊断消息的非良构https://zh.cppreference.com/cpp/language/ub#带诊断消息的非良构
4 引用https://zh.cppreference.com/cpp/language/ub#引用
5 缺陷报告https://zh.cppreference.com/cpp/language/ub#缺陷报告
6 参阅https://zh.cppreference.com/cpp/language/ub#参阅
7 外部链接https://zh.cppreference.com/cpp/language/ub#外部链接
可观察行为https://zh.cppreference.com/cpp/language/as_if
不要求诊断https://zh.cppreference.com/cpp/language/ndr
ODRhttps://zh.cppreference.com/cpp/language/definition
本地环境https://zh.cppreference.com/cpp/locale
求值顺序https://zh.cppreference.com/cpp/language/eval_order
字符串字面量https://zh.cppreference.com/cpp/language/string_literal
多于一次https://zh.cppreference.com/cpp/language/eval_order
类型错误的指针https://zh.cppreference.com/cpp/language/reinterpret_cast#类型别名化
核心常量表达式https://zh.cppreference.com/cpp/language/constant_expression#核心常量表达式
演示https://godbolt.org/z/re39h7P1K
演示https://godbolt.org/z/vMbsdo5az
演示https://godbolt.org/z/1sraffdM8
演示https://godbolt.org/z/4vKxhcea4
演示https://godbolt.org/z/edxr5W5T7
向前进展保证https://zh.cppreference.com/cpp/language/multithread#进展保证
平凡的无限循环https://zh.cppreference.com/cpp/language/multithread#平凡的无限循环
可观察行为https://zh.cppreference.com/cpp/language/as_if
而只给出一条警告https://coliru.stacked-crooked.com/a/3cc6bdd9576df9a5
在 C++ 标准中https://eel.is/c++draft/dcl.init.list#example-6
GCC Bugzilla #55783https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55783
P2809R3https://wg21.link/P2809R3
assumehttps://zh.cppreference.com/cpp/language/attributes/assume
[编辑]https://zh.cppreference.com/index.php?title=Template:cpp/language/attributes/dsc_assume&action=edit
indeterminatehttps://zh.cppreference.com/cpp/language/attributes/indeterminate
[编辑]https://zh.cppreference.com/index.php?title=Template:cpp/language/attributes/dsc_indeterminate&action=edit
unreachablehttps://zh.cppreference.com/cpp/utility/unreachable
[编辑]https://zh.cppreference.com/index.php?title=Template:cpp/utility/dsc_unreachable&action=edit
C 文档https://zh.cppreference.com/c/language/behavior
The LLVM Project Blog: 每个 C 程序员都应该知道的关于未定义行为的事 #1/3https://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
The LLVM Project Blog: 每个 C 程序员都应该知道的关于未定义行为的事 #2/3https://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html
The LLVM Project Blog: 每个 C 程序员都应该知道的关于未定义行为的事 #3/3https://blog.llvm.org/2011/05/what-every-c-programmer-should-know_21.html
未定义行为能导致时间旅行(在所有事项中,时间旅行可是最惊人的)https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=633
了解 C/C++ 中的整数溢出https://www.cs.utah.edu/~regehr/papers/overflow12.pdf
空指针的趣事,第一部分https://lwn.net/Articles/342330/
未定义行为与费马大定理https://web.archive.org/web/20201108094235/https://kukuruku.co/post/undefined-behavior-and-fermats-last-theorem/
C++ 程序员的未定义行为指南https://pvs-studio.com/en/blog/posts/cpp/1129/
分类https://zh.cppreference.com/Special:%E9%A1%B5%E9%9D%A2%E5%88%86%E7%B1%BB
使用已弃用source标签的页面https://zh.cppreference.com/index.php?title=Category:%E4%BD%BF%E7%94%A8%E5%B7%B2%E5%BC%83%E7%94%A8source%E6%A0%87%E7%AD%BE%E7%9A%84%E9%A1%B5%E9%9D%A2&action=edit&redlink=1
首页https://zh.cppreference.com/%E9%A6%96%E9%A1%B5
最近更改https://zh.cppreference.com/Special:%E6%9C%80%E8%BF%91%E6%9B%B4%E6%94%B9
随机页面https://zh.cppreference.com/Special:%E9%9A%8F%E6%9C%BA%E9%A1%B5%E9%9D%A2
MediaWiki帮助https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents
https://zh.cppreference.com/cpp/language/ub
链入页面https://zh.cppreference.com/Special:%E9%93%BE%E5%85%A5%E9%A1%B5%E9%9D%A2/cpp/language/ub
相关更改https://zh.cppreference.com/Special:%E9%93%BE%E5%87%BA%E6%9B%B4%E6%94%B9/cpp/language/ub
上传文件http://upload.cppreference.com/w/Special:Upload
特殊页面https://zh.cppreference.com/Special:%E7%89%B9%E6%AE%8A%E9%A1%B5%E9%9D%A2
可打印版javascript:print();
固定链接https://zh.cppreference.com/index.php?title=cpp/language/ub&oldid=103100
页面信息https://zh.cppreference.com/index.php?title=cpp/language/ub&action=info
Englishhttp://en.cppreference.com/cpp/language/ub
Españolhttp://es.cppreference.com/cpp/language/ub
日本語http://ja.cppreference.com/cpp/language/ub
Русскийhttp://ru.cppreference.com/cpp/language/ub

Viewport: width=1120

Robots: max-image-preview:standard


URLs of crawlers that visited me.