Peter Eisentraut <peter.eisentr...@2ndquadrant.com> writes:
> GCC reports various instances of
>      warning: cast to pointer from integer of different size 
> [-Wint-to-pointer-cast]
>      warning: cast from pointer to integer of different size 
> [-Wpointer-to-int-cast]
> in ECPG test files.  This is because void* and long are cast back and
> forth, but on 64-bit Windows, these have different sizes.  Fix by
> using intptr_t instead.

Hm.  Silencing the warnings is a laudable goal, but I'm very dubious
of allowing these test files to depend on pg_config.h.  That doesn't
correspond to real-world ECPG usage, so it seems likely that it could
come back to bite us some day.

According to C99 and POSIX, intptr_t should be provided by <stdint.h> ...
now that we're requiring C99, can we get away with just #include'ing
that directly in these test files?

                        regards, tom lane


Reply via email to