Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch
Дата
Msg-id 10902.1243526259@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch  (Michael Meskes <meskes@postgresql.org>)
Ответы Re: Compiler warning cleanup - unitilized const variables, pointer type mismatch  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список pgsql-hackers
Michael Meskes <meskes@postgresql.org> writes:
> I have to admit that those version look strikingly unsimilar to me. There is no
> reference to Rhs[N] in our macro at all. But then I have no idea whether this
> is needed.

The default version of the macro is intended to track both the starting
and ending locations of every construct.  Our simplified version only
tracks the starting locations.  The inputs are RHS[k], the location
values for the constituent elements of the current production, and
the output is the location value for the construct being formed.
In the default version, you naturally want to copy the start of
RHS[1] and the end of RHS[N], where N is the number of production
elements.  In ours, we just copy the location of RHS[1].  However,
both macros need a special case for empty productions (with N = 0).

AFAICS, Sun's compiler is just too stupid and shouldn't be emitting
this warning.  Perhaps the right response is to file a bug report
against the compiler.
        regards, tom lane


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: User-facing aspects of serializable transactions
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: User-facing aspects of serializable transactions