Nikolay Pavlov wrote:

> 2018-04-19 0:01 GMT+03:00 Bram Moolenaar <[email protected]>:
> >
> > Patch 8.0.1735 (after 8.0.1723 and 8.0.1730)
> > Problem:    Flexible array member feature not supported by HP-UX. (John
> >             Marriott)
> > Solution:   Do not use the flexible array member feature of C99.
> > Files:      src/configure.ac, src/auto/configure, src/structs.h,
> >             src/getchar.c, runtime/doc/develop.txt

[...]

> > --- 511,517 ----
> >   struct buffblock
> >   {
> >       buffblock_T       *b_next;        /* pointer to next buffblock */
> > !     char_u    b_str[1];       /* contents (actually longer) */
> 
> Why not just stuff a macros here which will expand to 1 or nothing,
> depending on configure check for flexible array members support?
> _FORTIFY_SOURCE point still stands and macros name is a nice
> replacement for “actually longer” comment.

Well, that means maintaining two versions of the code.  And since many
compilers do support flexible array members, the version still using [1]
would get little testing, and it might break for some rare compilers in
mysterious ways.  I rather have one solution, even when it's not all
that nice.  In other words: Adding a nicer solution doesn't help getting
rid of the not-so-nice solution.


-- 
If evolution theories are correct, humans will soon grow a third
hand for operating the mouse.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui