Re: pointer conversion
- From: richard@xxxxxxxxxxxxxxx (Richard Tobin)
- Date: 31 Aug 2007 20:48:42 GMT
In article <K6mdnV5WebJ360XbnZ2dneKdnZydnZ2d@xxxxxx>,
Malcolm McLean <regniztar@xxxxxxxxxxxxxx> wrote:
Yes, to be a successful pedant you've got to be absolutely, precisely
accurate.
Clearly if the pointer is misaligned, adding sizeof(*ptr) will preserve the
(mis) alignment.
No. If you're a real pedant, you will observe that the undefined
behaviour of creating the misaligned pointer could be that the addition
produces an aligned one.
But the example wasn't a misaligned pointer - it was that the addition
produced a pointer outside of the object.
-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
.
- References:
- pointer conversion
- From: junky_fellow@xxxxxxxxxxx
- Re: pointer conversion
- From: Eric Sosman
- Re: pointer conversion
- From: Richard Tobin
- Re: pointer conversion
- From: Malcolm McLean
- pointer conversion
- Prev by Date: Re: How to force fscanf to find only data on a single input line?
- Next by Date: Re: pointer conversion
- Previous by thread: Re: pointer conversion
- Next by thread: Re: pointer conversion
- Index(es):
Relevant Pages
|