| От | Tom Lane |
|---|---|
| Тема | Re: ExceptionalCondition() return type |
| Дата | |
| Msg-id | 11903.1335466902@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | ExceptionalCondition() return type (Peter Eisentraut <peter_e@gmx.net>) |
| Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes:
> I came across this comment:
> /*
> * ExceptionalCondition - Handles the failure of an Assert()
> *
> * Note: this can't actually return, but we declare it as returning int
> * because the TrapMacro() macro might get wonky otherwise.
> */
> But it seems to me that this can easily be fixed like shown below, which
> compiles without warnings. Is there any problem with that?
Um ... you did not fix the comment.
> I noticed that the comment at TrapMacro suggests this usage pattern
> #define foo(x) (AssertMacro(x != 0) && bar(x))
> but all actual uses of AssertMacro() chain it using the comma operator.
Should probably adjust that comment to suggest commas, too.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера