Oracle® Solaris Studio 12.4: C User's Guide

Exit Print View

Updated: March 2015
 
 

5.3 Checking With lint

The lint program recognizes the same levels of type-based alias-disambiguation as the compiler’s -xalias_level command. The lint program also recognizes the pragmas related to type-based alias-disambiguation documented in this chapter. For a detailed explanation of the lint -Xalias_level command, see -Xalias_level[=l].

Four situations that lint detects and generates warnings are:

  • Casting a scalar pointer to a struct pointer

  • Casting a void pointer to a struct pointer

  • Casting a structure field to a scalar pointer

  • Casting a struct pointer to a struct pointer at the level of -Xalias_level=strict without explicit aliasing