Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()

Поиск
Список
Период
Сортировка
От Christian Kruse
Тема Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()
Дата
Msg-id 20140130073220.GB3557@defunct.ch
обсуждение исходный текст
Ответ на Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Hi Tom,

On 29/01/14 20:06, Tom Lane wrote:
> Christian Kruse <christian@2ndquadrant.com> writes:
> > Your reasoning sounds quite logical to me. Thus I did a
> > grep -RA 3 "ereport" src/* | less
> > and looked for ereport calls with errno in it. I found quite a few,
> > attached you will find a patch addressing that issue.
>
> Committed.

Great! Thanks!

> I found a couple of errors in your patch, but I think everything is
> addressed in the patch as committed.

While I understand most modifications I'm a little bit confused by
some parts. Have a look at for example this one:

+       *errstr = psprintf(_("failed to look up effective user id %ld: %s"),
+                          (long) user_id,
+                        errno ? strerror(errno) : _("user does not exist"));

Why is it safe here to use errno? It is possible that the _() function
changes errno, isn't it?

Best regards,

-- Christian Kruse               http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Christian Kruse
Дата:
Сообщение: Re: [PATCH] Use MAP_HUGETLB where supported (v3)
Следующее
От: Craig Ringer
Дата:
Сообщение: Prohibit row-security + inheritance in 9.4?