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, IIIMessage
Re: [lpc2000] Strange Compiler Behaviour -
2005-02-23 by Robert Adsett
Attachments
- No local attachments were found for this message.