title: Pointer type of smaller size than variable
body: <p>Working with embedded systems, in order to have more resolution in a incremental sequence, I have two variables, one always following the other.</p>
  
  <p>Specifically, I set a goal value using a 8 bits variable, but to go from one point (current value) to another I do it using 32 bits steps.</p>
  
  <p>For example (that is a stupid example, but it just to show how I want to use it, in my code there are some temporizations which require the 32 bits varaibles to allow a slow change):</p>
  
  <pre><code>/* The variables */
  char goal8bits;         // 8 bits
  long int current32bits; // 32 bits    
  char current8bits;      // 8 bits    
  long int step32bits;    // 32 bits
  
  /* The main function (in the real code that is done periodically with a specific period) */
  current32bits = CONVERT_8BITS_TO_32BITS(current8bits);  // E.g: 0xAB -&gt; 0xABABABAB
  if (goal8bits &lt; current8bits) {
     current32bits += step32bits;
  }
  current8bits = CONVERT_32BITS_TO_8BITS(current32bits);  // E.g: 0x01234567 -&gt; 0x01
  
  /* Other parts of the code */
  I use current8bits to know the current value in the middle of a transition.
  </code></pre>
  
  <p>My question is if I can use a char pointer and make it point to the 32 bits variable one, so I do not need to update it each time I change it.
  The previous example will look like this:</p>
  
  <pre><code>/* The variables */
  char goal8bits;         // 8 bits
  long int current32bits; // 32 bits
  char *current8bits = (char *)&amp;current32bits;      // Pointer to 8 bits
  long int step32bits;    // 32 bits
  
  /* The main function (in the real code that is done periodically with a specific period) */
  if (goal8bits &lt; *current8bits) {
     current32bits += step32bits;
  }
  
  /* Other parts of the code */
  I will use *current8bits to know the current value in the middle of a transition.
  </code></pre>
  
  <p>Do you see any problem in doing that? Can it lead to a problem wih endianism?</p>
  
  <p>Thank you!</p>