From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Nolan Cafferky <Nolan(dot)Cafferky(at)qualitysmith(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Coding style question |
Date: | 2006-11-03 17:05:47 |
Message-ID: | 454B76EB.7040009@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Nolan Cafferky wrote:
>
> This may not inform the current conversation at all, but a while back
> I went on a cross-compiler compatibility binge for all of my active
> projects, and I found that some compilers (*cough* Borland *cough) had
> some very strange compiler/run time errors unless all variables were
> declared at the top of the function, before any other code gets
> executed. For better or for worse, I started strictly declaring all
> variables in this manner, with initialization happening afterward, and
> the behavior has stuck with me. I don't know whether any compilers
> used for postgres builds still have this issue - it's been a few years.
We expect the compiler to be C89 compliant at a minimum. If it rejects
simple initialisation in the declarations or variables declared in an
inner scope then it's hopeless for our purposes, surely. We have lots of
such code.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2006-11-03 17:08:33 | Re: [HACKERS] Index greater than 8k |
Previous Message | Martijn van Oosterhout | 2006-11-03 16:34:16 | Re: [HACKERS] Bug in WAL backup documentation |