Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]
Дата
Msg-id 29561.1424555878@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
After some more hacking, the only remaining uses of foo[1] in struct
declarations are:

1. A couple of places where the array is actually the only struct member;
for some unexplainable reason gcc won't let you use flexible array syntax
in that case.

2. struct sqlda_struct in ecpg's sqlda-native.h.  We have a problem with
using [FLEXIBLE_ARRAY_MEMBER] there because (1) pg_config.h isn't (and I
think shouldn't be) #included by this file, and (2) there is very possibly
application code depending on sizeof() this struct; the risk of breaking
such code seems to outweigh any likely benefit.  Also, despite that
I tried changing [1] to [] and fixing the places I could find that
depended on sizeof(struct sqlda_struct), but I apparently can't find them
all because the ecpg regression tests fell over :-(.

Anyway, barring excitement in the buildfarm I think this project is
complete.
        regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: deparsing utility commands
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Abbreviated keys for Numeric