adding unsigned int to unsigned int* : <p>My development environment consists of the g++ cross compiler for ARM OMAP Sitata. I discovered an unusual nuance of simple pointer arithmetic, when adding an unsigned int to an unsigned int*, as follows:</p>

<pre><code>unsigned int* dst_base_addr;
unsigned int* dst_addr; 
unsigned int dst_offset;
</code></pre>

<p>Simply attempting to add an (unsigned int) to an (unsigned int*)</p>

<pre><code>dst_addr = dst_base_addr + dst_offset;
</code></pre>

<p>The above is not interpreted as one might naively think but actually produces the following equivalent result   </p>

<pre><code>dst_addr = (unsigned int*)((unsigned int)dst_base_addr + (dst_offset &lt;&lt; 2));
</code></pre>

<p>The remedy is of course to do proper type conversion as follows</p>

<pre><code>dst_addr = (unsigned int*)((unsigned int)dst_base_addr + dst_offset);
</code></pre>

<p>Question: Why is proper type conversion even necessary in this situation?</p>
