freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] pointer arithmetic on a pointer to void
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] pointer arithmetic on a pointer to void
- Date: Sat, 12 Oct 2013 14:07:59 +0100
2013/10/11 Craig A. Berry <craigberry AT mac.com>:
>
> On Oct 10, 2013, at 7:57 PM, James K. Lowden <jklowden AT freetds.org> wrote:
>
>> Pointer arithmetic on void* is invalid for the perfectly good reason
>> that the void type has no size.
>
> Indeed.
>
>> The choice between redefining the pointer to char* or casting void* to
>> char* is one of convenience. If your one-liner makes the compiler
>> happy, I'd say that's most convenient.
>
> Seems to to the trick and causes no new test failures here.
>
>> Thanks for pointing it out. I'm surprised it hasn't cropped up
>> before.
>
> FWIW, clang and gcc can be made to complain about the same thing by adding
> -Werror-pointer-arith to CFLAGS.
>
Committed 2 patches, one to add the warning and the other to remove the
problem
Frediano
-
[freetds] pointer arithmetic on a pointer to void,
Craig A. Berry, 10/10/2013
-
Re: [freetds] pointer arithmetic on a pointer to void,
James K. Lowden, 10/10/2013
-
Re: [freetds] pointer arithmetic on a pointer to void,
Craig A. Berry, 10/11/2013
- Re: [freetds] pointer arithmetic on a pointer to void, Frediano Ziglio, 10/12/2013
-
Re: [freetds] pointer arithmetic on a pointer to void,
Craig A. Berry, 10/11/2013
-
Re: [freetds] pointer arithmetic on a pointer to void,
James K. Lowden, 10/10/2013
Archive powered by MHonArc 2.6.24.