From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pgbench is broken on strict-C89 compilers |
Date: | 2014-05-18 04:36:34 |
Message-ID: | 9354.1400387794@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-05-17 19:15:15 -0400, Tom Lane wrote:
>> ... It appears to me that
>> the compiler is within its rights to refuse a nonconstant expression
>> for an inner initializer according to C89, though I don't see any such
>> restriction in C99.
> Yea, I've complained about it in
> http://www.postgresql.org/message-id/20140403152834.GG17307@awork2.anarazel.de
Ah. I'd sort of ignored that patch because it didn't seem too relevant
to the issues we were discussing at the time.
> That piece code is also confused about using static vs. const. For a lot
> longer though...
Well, "static" is also a good thing here because it eliminates the need
for runtime initialization of a function-local array variable. But yeah,
the code is way under-const-ified as well.
> I'd just duplicated the ddl structs. Seemed to be the least ugly thing I
> could come up with. For from pretty tho.
It works, anyway. If I don't think of something better, I'll do a bit
more polishing and commit that tomorrow.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-05-18 05:35:04 | Re: Possible fix for occasional failures on castoroides etc |
Previous Message | Tom Lane | 2014-05-18 04:28:26 | Re: uuid-ossp (Re: [pgsql-packagers] Postgresapp 9.4 beta build ready) |