The compiler allows to use #pragma naked on functions main() and entry() - this is clearly an oversight, as those functions are required to have stack cleanup code due to the way they're used.
Minimal complete verifiable example (MCVE):
// Function main() is called from the VM. It's not meant to be naked, so defining it as one
// would cause an "invalid instruction" runtime error as soon as the script is loaded.
#pragma naked
main(){}
// Similarly to the above example, defining function entry() as naked will cause
// a runtime error when the state of "auto1" is changed to "ST1".
#pragma naked
entry() <auto1:ST1>{}
Workspace Information:
Compiler version: 3.10.10
Command line arguments provided (or sampctl version):
Issue description:
The compiler allows to use
#pragma naked
on functionsmain()
andentry()
- this is clearly an oversight, as those functions are required to have stack cleanup code due to the way they're used.Minimal complete verifiable example (MCVE):
Workspace Information: