Re: warning: dereferencing type-punned pointer - Mailing list pgsql-hackers

From Tom Lane
Subject Re: warning: dereferencing type-punned pointer
Date
Msg-id 1256529.1721845901@sss.pgh.pa.us
Whole thread Raw
In response to Re: warning: dereferencing type-punned pointer  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> If you change the member to a pointer

> -   ErrorSaveContext escontext;
> +   ErrorSaveContext *escontext;
>   } JsonExprState;

> and make the required adjustments elsewhere in the code, the warning 
> goes away.

> This arrangement would also appear to be more consistent with other 
> executor nodes (e.g., ExprState, ExprEvalStep), so it might be worth it 
> for consistency in any case.

+1, makes sense to me.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: warning: dereferencing type-punned pointer
Next
From: Nathan Bossart
Date:
Subject: Re: improve performance of pg_dump with many sequences