From: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Intermediate report for AIX 5L port |
Date: | 2001-12-11 00:53:40 |
Message-ID: | 3C155914.BD00207C@fourpalms.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
...
> Declaring the lock pointer "volatile" seems to prevent this misbehavior.
Great. That is what it is anyway, right?
> Personally I'd call this a compiler bug; isn't it supposed to consider
> semicolons as sequence points? I never heard that rearranging the order
> of stores into memory was considered a kosher optimization of C code.
Sure it is. Presumably "-O0" or equivalent would have kept this from
happening, but seemingly unrelated stores into non-overlapping memory
are always fair game at even modest levels of optimization. The "x = 0"
is cheaper than the other operations, though it may be reordered for
internal RISC-y reasons rather than "cheapest first" considerations.
- Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-12-11 01:06:31 | Re: Intermediate report for AIX 5L port |
Previous Message | Tom Lane | 2001-12-11 00:04:58 | Re: about heap_insert() function |