title: When should I just use "int" versus more sign-specific or size-specific types?
body: <p>I have a <a href="https://github.com/munificent/wren" rel="noreferrer">little VM for a programming language</a> implemented in C. It supports being compiled under both 32-bit and 64-bit architectures as well as both C and C++.</p>
  
  <p>I'm trying to make it compile cleanly with as many warnings enabled as possible. When I turn on <code>CLANG_WARN_IMPLICIT_SIGN_CONVERSION</code>, I get a cascade of new warnings.</p>
  
  <p>I'd like to have a good strategy for when to use <code>int</code> versus either explicitly unsigned types, and/or explicitly sized ones. So far, I'm having trouble deciding what that strategy should be.</p>
  
  <p>It's certainly true that mixing them—using mostly <code>int</code> for things like local variables and parameters and using narrower types for fields in structs—causes lots of implicit conversion problems.</p>
  
  <p>I do like using more specifically sized types for struct fields because I like the idea of explicitly controlling memory usage for objects in the heap. Also, for hash tables, I rely on unsigned overflow when hashing, so it's nice if the hash table's size is stored as <code>uint32_t</code>.</p>
  
  <p>But, if I try to use more specific types <em>everywhere</em>, I find myself in a maze of twisty casts everywhere.</p>
  
  <p>What do other C projects do?</p>