Re: Significant oversight in that #include-removal script

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Significant oversight in that #include-removal script
Дата
Msg-id 6793.1231368552@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Significant oversight in that #include-removal script  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Significant oversight in that #include-removal script  (Bruce Momjian <bruce@momjian.us>)
Re: Significant oversight in that #include-removal script  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Bruce Momjian wrote:
>> The script certainly has no way to know it is missing an extern, and I
>> am not sure how I would even teach it that trick.

> It would be easy if the compiler were to have an option to throw a
> warning when it finds a non-static variable that doesn't have a
> corresponding extern declaration.

Yeah, I think this is hopeless (or at least not worth the cost) without
compiler support --- I was just idly wondering if newer gcc's might have
such an option.

The case at hand is actually somewhat improbable, because it requires
having a header file that exports a variable but not any of the file's
functions.  So maybe it's not worth worrying about anyway.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Do we still need constraint_exclusion?
Следующее
От: "D'Arcy J.M. Cain"
Дата:
Сообщение: Re: Proposal: new border setting in psql