Thread: Re: Duplicate variable declared?

Re: Duplicate variable declared?

From
mike g
Date:
<font color="#737373"><i>Joe Conway wrote: <pre>
mike g wrote:
In file postgresql-7.4.2/src/backend/utils/fmgrtab.c

This is an automatically generated file. The reason for duplicate 
array_push declarations is that one-and-the-same array_push function 
is used to implement two SQL functions, array_append and 
array_prepend. I don't imagine the duplicate declaration hurts anything.
</pre></i> <b><tt>My apologies for being too lazy to copy and paste the email address into a new email.  I forgot
hittingreply would add it to thread rather than starting a new one.<br /><br /> With the large number of variables
declaredin that block I was thinking that someone was entering it off a list in another file and accidently did it
twice.</tt></b><br/><i></i><br /><b>With it being legal C I will ignore any others that might have shown up in the
list.</b><br/><i><br /><pre>I believe it is explicitly legal C, in fact.
 

The C faq at </pre></i></font><a
href="http://www.faqs.org/faqs/C-faq/faq/"><u>http://www.faqs.org/faqs/C-faq/faq/</u></a><fontcolor="#737373"> states:
First,though there can be many "declarations" (and in many translation units) of a single "global" (strictly speaking,
"external")variable or function, there must be exactly one "definition". cheers andrew</font>