RE: Proposal: Add more compile-time asserts to exposeinconsistencies.
Вложения
В списке pgsql-hackers по дате отправления:
| От | Smith, Peter |
|---|---|
| Тема | RE: Proposal: Add more compile-time asserts to exposeinconsistencies. |
| Дата | |
| Msg-id | 201DD0641B056142AC8C6645EC1B5F62014B9FB055@SYD1217 обсуждение исходный текст |
| Ответ на | Re: Proposal: Add more compile-time asserts to exposeinconsistencies. (Michael Paquier <michael@paquier.xyz>) |
| Ответы |
Re: Proposal: Add more compile-time asserts to exposeinconsistencies.
|
| Список | pgsql-hackers |
Hello Michael, > In short, attached is an updated version of your patch which attempts to solve that. I have tested this with some cplusplusstuff, and GCC for both versions (static_assert is available in GCC >= 6, but a manual change of c.h does the trick). > I have edited the patch a bit while on it, your assertions did not use project-style grammar, the use of parenthesis wasinconsistent (see relpath.c for example), and pgindent has complained a bit. Thanks for your updates. ~~ Hello Andres, >> +StaticAssertDecl(lengthof(LockTagTypeNames) == (LOCKTAG_ADVISORY + 1), >> + "LockTagTypeNames array inconsistency"); >> + > These error messages strike me as somewhat unhelpful. I'd probably just reword them as "array length mismatch" or somethinglike that. I updated the most recent patch (_5 from Michael) so it now has your suggested error message rewording. PSA patch _6 Kind Regards ---- Peter Smith Fujitsu Australia
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера