2008/11/15 Bram Moolenaar <[EMAIL PROTECTED]>:

> Another solution is to use the trick what's done for "self" a few lines
> higher:
>
>        v = &fc.fixvar[fixvar_idx++].var;
>        name = v->di_key;
>        STRCPY(name, "self");
>
> So we can do the same for "000":
>
>    v = &fc.fixvar[fixvar_idx++].var;
>    name = v->di_key;
>    STRCPY(name, "000");
>
> Can you please verify this also fixes the crash?


No, the patch does not help.  But I see now I that gave the
wrong location for the crash! Sorry about that.  Crash
happens in the STRCPY(...) inside add_nr_var(...):

    static void
add_nr_var(dp, v, name, nr)
    dict_T      *dp;
    dictitem_T  *v;
    char        *name;
    varnumber_T nr;
{
    STRCPY(v->di_key, name); /* Crash when compiled with -O3 */


Your patch tried to fixed this line as well anyway, but
it does not work (same crash).

The solution I proposed does work, but as you say,  it requires
an ugly #ifdef __GNUC__

Maybe it's not worth trying to tweak the code, if it's a gcc
bug (not 100% sure yet).  I will post it in the gcc mailing list,
and link to this thread.

-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui