-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.
Milestone
Description
The documentation specifies that using @call( .{ .modifier = .never_inline}, ...) on an inline fn should fail at compile time. In the code example below, inline fn fiveXwithType(comptime T: type) does not fail to compile when called with .modifier = .never_inline.
Compiler Explorer shows that this call is actually inlined.
Uncommenting the second @call yields the expected compile failure.
Tested with trunk and v0.6.0.
extern var X: *volatile i32;
inline fn fiveXwithType(comptime T: type) void {
X.* = 5;
}
inline fn fiveXwithArg(v: i32) void {
X.* = 5;
}
export fn externalFun() void {
@call(.{ .modifier = .never_inline}, fiveXwithType, .{i32});
//@call(.{ .modifier = .never_inline}, zeroXwithArg, .{1});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.