bug-gnulib
[Top][All Lists]
Advanced

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

Re: Type-safe typecasts


From: Ben Pfaff
Subject: Re: Type-safe typecasts
Date: Tue, 6 Apr 2021 12:25:02 -0700

On Tue, Apr 6, 2021 at 12:18 AM Marc Nieper-Wißkirchen
<marc.nieper+gnu@gmail.com> wrote:
> I have been wondering whether it makes sense to add a small utility trying to 
> make typecasts in C as type-safe as possible.

I've found a few macros for casts useful over years. PSPP uses
CONST_CAST and UP_CAST from the file below quite a bit:
https://git.savannah.gnu.org/cgit/pspp.git/tree/src/libpspp/cast.h



reply via email to

[Prev in Thread] Current Thread [Next in Thread]