Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Table of "safe" methods to suppress "unused parameter" warnings?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="David Brown, post: 5151635"] Even if typeof is accepted by the compiler, the usage here is /really/ bad - it forces a volatile write to the function's parameter which will undoubtedly generate extra code, and may force a number of additional effects such as blocked optimisations, copying of register parameters into a stack frame (which may in itself force the use of a stack frame that could otherwise be omitted), etc. It also means that if you have more sophisticated optimisation at play, such as inlining, function cloning, etc., then you will make a mess with such extra volatile accesses. The simple "(void) x" should work on all compilers and produce no effect on the code. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Table of "safe" methods to suppress "unused parameter" warnings?
Top