Closed joskuijpers closed 10 years ago
Great idea. I tried to use this in LearnOS but gave up when the compiler complained. This time, I found out I could use __builtin_unreachable()
to hint to the compiler that my inline-assembly prevents returns.
Hey!
I see you start having a lot of methods/functions that shall never return. There is an attribute for that: attribute((noreturn)). What it does is optimise, and also show warnings/errors when you have code after a call to a non returning function. But mostly the optimisation is cool.
Cheers