Re: [PATCH] util: Add portable casting preprocessor macros.

Denis Kenzior <[email protected]> Thu, 28 Mar 2024 17:31:52 -0500
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
Hi Grant,

On 3/28/24 12:25, Grant Erickson wrote:
> ELL itself is a pure C source-based project and is compiled as such.
> However, if ELL headers and interfaces end up getting integrated with
> and compiled in a C++ environment, certain assignments within ELL inline
> header functions may be flagged by the C++ compiler as errors or
> warnings.
> 
> The added casting preprocessor macros are generally useful across any
> source based that might want to leverage them from ELL. However, within
> ELL, they should be used in inline header functions where such functions
> may be consumed in either a C or C++ environment with a  towards
> L_PERMISSIVE_CAST where possible. Since L_PERMISSIVE_CAST is not a cast
> at all in C, it will not mask otherwise-legitimate warnings in that
> environment.
> ---
>   ell/util.h | 33 ++++++++++++++++++++++++++++-----
>   1 file changed, 28 insertions(+), 5 deletions(-)
> 

Applied, thanks.

Regards,
-Denis