GCC 3.4 optimisation of if (&ptr == NULL)

Richard Henderson rth@redhat.com
Thu Dec 4 02:36:00 GMT 2003


On Thu, Dec 04, 2003 at 09:30:01AM +0800, John Neil wrote:
> extern void* g_ptr; 

If you want &g_ptr to be 0, then g_ptr must be declared weak.

> however in the embedded environment this technique is used to pass
> information from the linker file to the C application..

Ug.  There are much better ways to accomplish this.


r~



More information about the Gcc mailing list