Re: Typedef inconsistency for gsize and gssize



> size_t and ssize_t are supposed to be usable to hold pointer values
> without loss

Eh?

>From C99, Section "6.3.2.3  Pointers":

       [#6]  Any  pointer type may be converted to an integer type.
       Except   as   previously   specified,    the    result    is
       implementation-defined.  If the result cannot be represented
       in the integer type, the behavior is undefined.  The  result
       need not be in the range of values of any integer type.

(The "previously" seems to refer to null pointers.)

But, yes, glib uses non-standard C in lots of ways, this just being
one of them.

M.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]