Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Strange Compiler Behaviour -

2005-02-23 by Robert Adsett

At 04:42 PM 2/23/05 +0000, Mark Butcher wrote:
>extern IDINFO que_ids[]; and extern IDINFO *que_ids; should be
>equivalent as far as I am aware and this is the first instance where
>I have found two compilers producing completely different code (one
>seemingly false).

They are not equivalent.  The first is the name of an array, the second is 
a pointer to an element.  The first gets replaced by the linker with a 
reference to the array location in memory, the second by a reference to a 
pointer to a location in memory.

What you are probably thinking of are the fact that array syntax and 
pointer syntax can be used interchangeably in many circumstances.  This is 
one of the exceptions.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.