Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()
В списке pgsql-hackers по дате отправления:
| От | Alvaro Herrera |
|---|---|
| Тема | Re: Suspicion of a compiler bug in clang: using ternary operator in ereport() |
| Дата | |
| Msg-id | 20140130152959.GC10723@eldon.alvh.no-ip.org обсуждение исходный текст |
| Ответ на | Re: Suspicion of a compiler bug in clang: using ternary operator in ereport() (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
Tom Lane wrote:
> Christian Kruse <christian@2ndquadrant.com> writes:
> > Have a look at the psprintf() call: we first have a _("failed to look
> > up effective user id %ld: %s") as an argument, then we have a (long)
> > user_id and after that we have a ternary expression using errno. Isn't
> > it possible that the first _() changes errno?
>
> While I haven't actually read the gettext docs, I'm pretty sure that
> gettext() is defined to preserve errno. It's supposed to be something
> that you can drop into existing printf's without thinking, and if
> it mangled errno that would certainly not be the case.
It specifically says:
ERRORS errno is not modified.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера