Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"11-03-11 - BoolYouMustCheck"

5 Comments -

1 – 5 of 5
Blogger johnb said...

GCC has __attribute__((warn_unused_result))

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

MSVC code analysis has the MustCheck property

http://msdn.microsoft.com/en-us/library/ms182042.aspx

Of course, you have to be using those tools, and I think MSVC /analyze is only in VS Enterprise (?), and people will probably be stupid and ignore the warnings or turn them off because there are so many of them.

November 9, 2011 at 4:33 PM

Blogger cbloom said...

I hear good things about /analyze but it's a pretty big commitment.

November 9, 2011 at 4:43 PM

Comment deleted

This comment has been removed by the author.

November 14, 2011 at 7:13 AM

Blogger gpakosz said...

makes me think of Java checked exceptions and that's not good memory

November 14, 2011 at 7:14 AM

Blogger typopl said...

I used to work with mikesart.

You could use my typo.pl perl script (search CPAN) to statically check for unchecked function return values. There's a hurdle setting up the script, and you'd have to update the script when you add new functions that have MUST_CHECK return values.

November 22, 2011 at 9:51 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.