Re: Compiler warnings with stringRelOpts (was WIP: Fast GiST index build)

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: Compiler warnings with stringRelOpts (was WIP: Fast GiST index build)
Дата
Msg-id CAPpHfdtdUfJYJSeihVTWA_rPLeH_RYsA5AhL3U-iPzaFOxU57A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Compiler warnings with stringRelOpts (was WIP: Fast GiST index build)  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Compiler warnings with stringRelOpts (was WIP: Fast GiST index build)  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Mon, Aug 8, 2011 at 7:43 PM, Alvaro Herrera <alvherre@commandprompt.com> wrote:
Maybe this needs to use the new FLEXIBLE_ARRAY_MEMBER stuff.  Can you try that please?

typedef struct relopt_string
{
relopt_gen gen;
int default_len;
bool default_isnull;
validate_string_relopt validate_cb;
char default_val[1]; /* variable length, zero-terminated */
} relopt_string;

static relopt_string stringRelOpts[] =
...

I doubt variable-length data structure is possible in this case, because we don't have array of pointers to relopt_string, but just array of relopt_string. May be just
char *default_val;
is possible?
 
------
With best regards,
Alexander Korotkov. 

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Compiler warnings with stringRelOpts (was WIP: Fast GiST index build)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs