Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b24f9b4

Browse files
committedMar 16, 2025
Make GCC backend explicitly fail on tail call attempts
1 parent 801365c commit b24f9b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎compiler/rustc_codegen_gcc/src/builder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1687,8 +1687,8 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
16871687
}
16881688

16891689
fn set_tail_call(&mut self, _call_inst: RValue<'gcc>) {
1690-
// TODO: Implement proper tail call optimization for GCC backend
1691-
// For now, this is a no-op to make compilation work
1690+
// Explicitly fail when this method is called
1691+
bug!("Guaranteed tail calls with the 'become' keyword are not implemented in the GCC backend");
16921692
}
16931693

16941694
fn set_span(&mut self, _span: Span) {}

0 commit comments

Comments
 (0)
Failed to load comments.