tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] How do I disable all runtime error checks


From: Ben Hutchinson
Subject: Re: [Tinycc-devel] How do I disable all runtime error checks
Date: Thu, 16 May 2019 16:09:51 -0700


__chkstk is not for error checking. __chkstk is needed on Windows when
the stack frame of a function exceeds 4 kB, because Windows allows the
stack to grow only one page at a time. So __chkstk just touches all
stack pages needed by the function in the correct order.

If you are confident that you don't need __chkstk, you can provide your
own dummy implementation.

Best regards

  Daniel

Here's the problem with that. Even if I use my own dummy versions of that function, it inserts code into my main program's code in order to call that function. That means bloating my own program's code. And that in turn means I'd like a way to remove that stack check. If it were possible, could you add a command line parameter to TinyCC, which (when used) causes TinyCC to never use __chkstk (and thus never inserts any additional code in my program that is not needed for actually performing the actions that I've programmed into my program)? If you could do that it would be great. I think that GCC has just such a command line switch, something like -fno-chk-stack (though I don't remember exactly). The only reason I don't use GCC is that overall it is worse at generating bloated code, and also is itself an EXTREMELY bloated piece of software (which is what prompted me to switch to using TinyCC in the first place). However, the addition of a new command line switch, which disable's TinyCC's use of __chkstk, is something that I don't think would get in the way of keeping TinyCC small. So please, implement that.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]