compiler: "illegal behavior", not "undefined behavior", in errors

This commit is contained in:
mlugg
2025-03-25 15:01:56 +00:00
committed by Andrew Kelley
parent ca1fc3827e
commit eee752ea5a
36 changed files with 6751 additions and 6803 deletions

View File

@@ -5,4 +5,4 @@ comptime {
// error
//
// :3:5: error: use of undefined value here causes undefined behavior
// :3:5: error: use of undefined value here causes illegal behavior

View File

@@ -5,7 +5,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :4:9: error: use of undefined value here causes undefined behavior
// :4:9: error: use of undefined value here causes illegal behavior

View File

@@ -4,7 +4,5 @@ export fn entry1() void {
}
// error
// backend=stage2
// target=native
//
// :2:41: error: use of undefined value here causes undefined behavior
// :2:41: error: use of undefined value here causes illegal behavior

View File

@@ -5,7 +5,5 @@ export fn entry() usize {
}
// error
// backend=stage2
// target=native
//
// :1:15: error: use of undefined value here causes undefined behavior
// :1:15: error: use of undefined value here causes illegal behavior

View File

@@ -4,7 +4,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :3:11: error: use of undefined value here causes undefined behavior
// :3:11: error: use of undefined value here causes illegal behavior

View File

@@ -8,5 +8,5 @@ export fn bar(x: u32) void {
// error
//
// :2:11: error: use of undefined value here causes undefined behavior
// :6:11: error: use of undefined value here causes undefined behavior
// :2:11: error: use of undefined value here causes illegal behavior
// :6:11: error: use of undefined value here causes illegal behavior

View File

@@ -36,12 +36,10 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :5:11: error: use of undefined value here causes undefined behavior
// :11:11: error: use of undefined value here causes undefined behavior
// :17:11: error: use of undefined value here causes undefined behavior
// :23:11: error: use of undefined value here causes undefined behavior
// :29:11: error: use of undefined value here causes undefined behavior
// :35:11: error: use of undefined value here causes undefined behavior
// :5:11: error: use of undefined value here causes illegal behavior
// :11:11: error: use of undefined value here causes illegal behavior
// :17:11: error: use of undefined value here causes illegal behavior
// :23:11: error: use of undefined value here causes illegal behavior
// :29:11: error: use of undefined value here causes illegal behavior
// :35:11: error: use of undefined value here causes illegal behavior

View File

@@ -6,7 +6,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :4:19: error: division by zero here causes undefined behavior
// :4:19: error: division by zero here causes illegal behavior

View File

@@ -6,7 +6,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :4:19: error: division by zero here causes undefined behavior
// :4:19: error: division by zero here causes illegal behavior

View File

@@ -8,8 +8,6 @@ export fn entry() usize {
}
// error
// backend=stage2
// target=native
//
// :3:16: error: division by zero here causes undefined behavior
// :3:16: error: division by zero here causes illegal behavior
// :1:14: note: called from here

View File

@@ -6,7 +6,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :3:32: error: use of undefined value here causes undefined behavior
// :3:32: error: use of undefined value here causes illegal behavior

View File

@@ -5,4 +5,4 @@ comptime {
// error
//
// :3:5: error: use of undefined value here causes undefined behavior
// :3:5: error: use of undefined value here causes illegal behavior

View File

@@ -17,9 +17,7 @@ export fn entry4() usize {
} // no error on purpose
// error
// backend=stage2
// target=native
//
// :1:23: error: division by zero here causes undefined behavior
// :2:27: error: division by zero here causes undefined behavior
// :3:29: error: division by zero here causes undefined behavior
// :1:23: error: division by zero here causes illegal behavior
// :2:27: error: division by zero here causes illegal behavior
// :3:29: error: division by zero here causes illegal behavior

View File

@@ -4,7 +4,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :3:10: error: use of undefined value here causes undefined behavior
// :3:10: error: use of undefined value here causes illegal behavior

View File

@@ -7,7 +7,5 @@ export fn foo() void {
}
// error
// backend=stage2
// target=native
//
// :4:28: error: use of undefined value here causes undefined behavior
// :4:28: error: use of undefined value here causes illegal behavior

View File

@@ -4,7 +4,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :3:5: error: use of undefined value here causes undefined behavior
// :3:5: error: use of undefined value here causes illegal behavior

View File

@@ -5,7 +5,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :3:9: error: use of undefined value here causes undefined behavior
// :3:9: error: use of undefined value here causes illegal behavior

View File

@@ -5,4 +5,4 @@ comptime {
// error
//
// :3:5: error: use of undefined value here causes undefined behavior
// :3:5: error: use of undefined value here causes illegal behavior

View File

@@ -4,7 +4,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :3:10: error: use of undefined value here causes undefined behavior
// :3:10: error: use of undefined value here causes illegal behavior

View File

@@ -5,7 +5,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :4:9: error: use of undefined value here causes undefined behavior
// :4:9: error: use of undefined value here causes illegal behavior

View File

@@ -4,7 +4,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :3:11: error: use of undefined value here causes undefined behavior
// :3:11: error: use of undefined value here causes illegal behavior

View File

@@ -13,7 +13,7 @@ export fn entry2() void {
// error
//
// :4:13: error: pointer computation here causes undefined behavior
// :4:13: error: pointer computation here causes illegal behavior
// :4:13: note: resulting pointer exceeds bounds of containing value which may trigger overflow
// :10:55: error: pointer computation here causes undefined behavior
// :10:55: error: pointer computation here causes illegal behavior
// :10:55: note: resulting pointer exceeds bounds of containing value which may trigger overflow

View File

@@ -5,7 +5,5 @@ export fn entry() void {
}
// error
// backend=stage2
// target=native
//
// :4:6: error: use of undefined value here causes undefined behavior
// :4:6: error: use of undefined value here causes illegal behavior

View File

@@ -11,7 +11,5 @@ export fn entry() void {
}
// error
// backend=stage2
// target=native
//
// :1:20: error: use of undefined value here causes undefined behavior
// :1:20: error: use of undefined value here causes illegal behavior

View File

@@ -6,7 +6,5 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :1:20: error: use of undefined value here causes undefined behavior
// :1:20: error: use of undefined value here causes illegal behavior

View File

@@ -25,9 +25,7 @@ comptime {
}
// error
// backend=stage2
// target=native
//
// :2:16: error: use of undefined value here causes undefined behavior
// :5:16: error: use of undefined value here causes undefined behavior
// :17:16: error: use of undefined value here causes undefined behavior
// :2:16: error: use of undefined value here causes illegal behavior
// :5:16: error: use of undefined value here causes illegal behavior
// :17:16: error: use of undefined value here causes illegal behavior

View File

@@ -4,7 +4,5 @@ export fn a() void {
}
// error
// backend=stage2
// target=native
//
// :3:18: error: use of undefined value here causes undefined behavior
// :3:18: error: use of undefined value here causes illegal behavior

View File

@@ -5,4 +5,4 @@ comptime {
// error
//
// :3:5: error: use of undefined value here causes undefined behavior
// :3:5: error: use of undefined value here causes illegal behavior

View File

@@ -6,7 +6,5 @@ export fn entry() void {
}
// error
// backend=stage2
// target=native
//
// :3:5: error: use of undefined value here causes undefined behavior
// :3:5: error: use of undefined value here causes illegal behavior

View File

@@ -5,4 +5,4 @@ comptime {
// error
//
// :3:18: error: use of undefined value here causes undefined behavior
// :3:18: error: use of undefined value here causes illegal behavior

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,5 @@ export fn entry1() void {
}
// error
// backend=stage2
// target=native
//
// :2:8: error: use of undefined value here causes undefined behavior
// :2:8: error: use of undefined value here causes illegal behavior

View File

@@ -3,7 +3,5 @@ pub export fn entry() void {
}
// error
// backend=stage2
// target=native
//
// :2:31: error: use of undefined value here causes undefined behavior
// :2:31: error: use of undefined value here causes illegal behavior

View File

@@ -10,7 +10,5 @@ export fn entry() void {
}
// error
// backend=stage2
// target=native
//
// :9:8: error: use of undefined value here causes undefined behavior
// :9:8: error: use of undefined value here causes illegal behavior