title: GCC - Truncation due to type conversion warning
body: <p>Why is the compiler not throwing a value truncation due to the conversion from a uint32 to a uint8 variable type? Precisely the line <code>result = reg_value;</code></p>
  <pre><code>void read_byte_register(uint32_t u32_address_rd_byte_reg,
          uint8_t *pu8_Data_rd_byte_reg)
  {
      uint8_t result;
      uint32_t reg_value;
      uint32_t *reg_ptr;
  
      reg_ptr = (uint32_t *) u32_address_rd_byte_reg;
  
      reg_value = *(reg_ptr);
  
      result = reg_value;
  
      *(pu8_Data_rd_byte_reg) = result;
  }
  </code></pre>
  <p>The build command. You can see it is building for an ARM Cortex M3:</p>
  <pre><code>arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -pedantic -Wall -Wextra  -g3 -T &quot;linker_script.ld&quot; -Xlinker --gc-sections -Wl,-Map,&quot;output_map.map&quot; --specs=nano.specs -o &quot;output.elf&quot;
  </code></pre>