MSVS 2012 SAL annotations

This is a discussion on MSVS 2012 SAL annotations within the General Discussions forums, part of the Community Boards category; Does anyone use these cryptic things? I understand the reason for them but in my opinion they cause readability to ...

  1. #1
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598

    MSVS 2012 SAL annotations

    Does anyone use these cryptic things? I understand the reason for them but in my opinion they cause readability to suffer.

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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.
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,274
    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.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-08-2013, 10:40 AM
  2. Germany: 2012
    By dennis.cpp in forum General Discussions
    Replies: 3
    Last Post: 01-05-2012, 12:04 PM
  3. Time2Game 2012 - Submit a Game and Win!
    By waterburn in forum Contests Board
    Replies: 4
    Last Post: 01-01-2012, 12:51 PM
  4. C++ Annotations
    By manasij7479 in forum Programming Book and Product Reviews
    Replies: 8
    Last Post: 11-30-2011, 12:12 PM
  5. 2012
    By Sebastiani in forum A Brief History of Cprogramming.com
    Replies: 57
    Last Post: 05-14-2009, 12:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21