Re: Something's been bugging me

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL-development Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Something's been bugging me
Date: 2007-09-30 22:23:42
Message-ID: 87fy0vu70x.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-09-30 22:46:58 Latest ecpg patch broke MSVC build
Previous Message Tom Lane 2007-09-30 20:05:17 Re: Something's been bugging me