Re: gcc 4.6 -Wunused-but-set-variable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: gcc 4.6 -Wunused-but-set-variable
Дата
Msg-id 9895.1308180533@sss.pgh.pa.us
обсуждение исходный текст
Ответ на gcc 4.6 -Wunused-but-set-variable  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: gcc 4.6 -Wunused-but-set-variable  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> I couldn't see a way good way of programming around this (perhaps in the
> second case, but it would get uselessly ugly), so perhaps just marking
> the variables as potentially unused would be appropriate?  See patch.

Of course this would break not only on non-gcc compilers, but old
versions of gcc.  I'd suggest a macro (cf PERL_UNUSED_DECL) and some
version checks at the site of the macro declaration (perhaps the ones
emitted by bison for its use of this construct will do).
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Strict Set Returning Functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: creating CHECK constraints as NOT VALID