Re: Something's been bugging me - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Something's been bugging me
Date
Msg-id 87fy0vu70x.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Something's been bugging me  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Something's been bugging me
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Apparently gcc's thought process is "the pointer is declared as struct
> varlena *, therefore must be at least 4-aligned, therefore the data at
> offset 2 is at least 2-aligned". The intermediate cast to "varattrib_1b_e *"
> did not prevent this; I had to assign the datum pointer into a separate
> local variable of that type to suppress the "optimization".

Fascinating.

Why do you cast arguments to memcmp to char* ?

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Something's been bugging me
Next
From: Tom Lane
Date:
Subject: Latest ecpg patch broke MSVC build