Does anyone use these cryptic things? I understand the reason for them but in my opinion they cause readability to suffer.
Printable View
Does anyone use these cryptic things? I understand the reason for them but in my opinion they cause readability to suffer.
I would think - placing same definitions before the function in some way similar to C# attributes - and replacing at least partially the function comment - would be better and easier for other compilers to ignore them.
Currently - I do not see this thing to be useful for somebody writing portable code... Or he will have to have a global include with conditional defines for all this additional garbage.
Microsoft never thoughts about compatibility... Or maybe I'm wrong and they always think about new ways to break it.
SAL is the successor to PREfast. Both of these technologies primarily exist in order for Microsoft to validate the correctness of their own code (Windows, mostly). PREfast, as well as the OACR monitor, were originally only available as part of the DDK/WDK. I do not know for sure, but I suspect that MS decided to make these technologies more public in the hope that somebody other than themselves could benefit from it.
I didn't even know of the existence of MS static analysis until I started working on codebases that actually get checked in as part of Windows. Microsoft has some very stringent requirements on the code that gets built as part of Windows. I had to go through the process of understanding, then fixing, hundreds of different PREfast issues before our code could successfully merge into the Windows codebase.