Re: Add -Wold-style-definition to CFLAGS?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add -Wold-style-definition to CFLAGS?
Дата
Msg-id 2192993.1591682589@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add -Wold-style-definition to CFLAGS?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Add -Wold-style-definition to CFLAGS?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> Unfortunately it turns out that our CFLAG configure tests don't reliably
> work with -Wold-style-definition. The problem is that the generated
> program contains 'int main() {...}', which obviously is an old-style
> definition. Which then causes a warning, which in turn causes the cflag
> tests to fail because we run them with ac_c_werror_flag=yes.

Ugh.  I suspect main() might not be the only problem, either.

> Upstream autoconf has fixed this in 2014 (1717921a), but since they've
> not bothered to release since then...

I wonder if there's any way to light a fire under them.

> The easiest way that I can see to deal with that is to simply redefine
> the relevant autoconf macro. For me that solves the vast majority of
> these bleats in config.log.  That's not particularly pretty, but we have
> precedent for it... Since it's just 16 lines, I think we can live with
> that?

I don't really think that -Wold-style-definition is worth that.

            regards, tom lane



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

Предыдущее
От: Vianello Fabio
Дата:
Сообщение: RE: BUG #16481: Stored Procedure Triggered by Logical Replication isUnable to use Notification Events
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Atomic operations within spinlocks