do_set from option.c contains the following code 
(http://code.google.com/p/vim/source/browse/src/option.c?r=575e8caa46a23a700ef41276995a348bd502d3c2#4543)

                            value = strtol((char *)arg, NULL, 0);
                            if (arg[i] == '0' && TOLOWER_ASC(arg[i + 1]) == 'x')
                                i += 2;

. As you see here it looks like 0x-prefixed hexadecimal numbers are allowed. 
But below there is

                            while (VIM_ISDIGIT(arg[i]))
                                ++i;
                            if (arg[i] != NUL && !vim_iswhite(arg[i]))
                            {
                                errmsg = e_invarg;
                                goto skip;
                            }

which obviously means that hexadecimal numbers are allowed only as long as they 
contain only decimal digits. Also when there is no strtol() atol() is used 
which does not allow them, and also does not treat 0-prefixed numbers as octal. 
Thus the question: what’s the point in this code? I think it should be fixed in 
one of the following fashions:

1. strtol() should have 10 as its third argument and the next `if` should be 
removed (or it may actually be better to simply use `getdigits` or `atol()` 
with that cycle (basically what getdigits does)).
2. atol() should be replaced with `vim_str2nr` (and I think that so should be 
`strtol()` and VIM_ISDIGIT cycle because vim_str2nr can return number length).

In the first case help should be fixed. If not fixing help there is obvious 
bug: help says that if strtol is available then numbers may be hexadecimal, but 
they may not be something like 0xFF.

Patch to use vim_str2nr:

diff -crN vim-upstream.9dff716fb9aa/runtime/doc/options.txt 
vim-upstream/runtime/doc/options.txt
*** vim-upstream.9dff716fb9aa/runtime/doc/options.txt   2014-11-06 
19:31:51.341611063 +0300
--- vim-upstream/runtime/doc/options.txt        2014-11-06 19:31:51.351611063 
+0300
***************
*** 1,4 ****
! *options.txt* For Vim version 7.4.  Last change: 2014 Nov 05
  
  
                  VIM REFERENCE MANUAL    by Bram Moolenaar
--- 1,6 ----
! *options.txt* For Vim version 6.4.  Last change: 2014 Nov 05RG_SO_FILES, 
! ARGS_SO,
! 
  
  
                  VIM REFERENCE MANUAL    by Bram Moolenaar
***************
*** 59,67 ****
  :se[t] {option}:{value}
                        Set string or number option to {value}.
                        For numeric options the value can be given in decimal,
!                       hex (preceded with 0x) or octal (preceded with '0')
!                       (hex and octal are only available for machines which
!                       have the strtol() function).
                        The old value can be inserted by typing 'wildchar' (by
                        default this is a <Tab> or CTRL-E if 'compatible' is
                        set).  See |cmdline-completion|.
--- 61,67 ----
  :se[t] {option}:{value}
                        Set string or number option to {value}.
                        For numeric options the value can be given in decimal,
!                       hex (preceded with 0x) or octal (preceded with '0').
                        The old value can be inserted by typing 'wildchar' (by
                        default this is a <Tab> or CTRL-E if 'compatible' is
                        set).  See |cmdline-completion|.
diff -crN vim-upstream.9dff716fb9aa/src/option.c vim-upstream/src/option.c
*** vim-upstream.9dff716fb9aa/src/option.c      2014-11-06 19:31:51.351611063 
+0300
--- vim-upstream/src/option.c   2014-11-06 19:31:51.351611063 +0300
***************
*** 4543,4560 ****
                                /* allow negative numbers (for 'undolevels') */
                        else if (*arg == '-' || VIM_ISDIGIT(*arg))
                        {
!                           i = 0;
!                           if (*arg == '-')
!                               i = 1;
! #ifdef HAVE_STRTOL
!                           value = strtol((char *)arg, NULL, 0);
!                           if (arg[i] == '0' && TOLOWER_ASC(arg[i + 1]) == 'x')
!                               i += 2;
! #else
!                           value = atol((char *)arg);
! #endif
!                           while (VIM_ISDIGIT(arg[i]))
!                               ++i;
                            if (arg[i] != NUL && !vim_iswhite(arg[i]))
                            {
                                errmsg = e_invarg;
--- 4543,4549 ----
                                /* allow negative numbers (for 'undolevels') */
                        else if (*arg == '-' || VIM_ISDIGIT(*arg))
                        {
!                           vim_str2nr(arg, NULL, &i, TRUE, TRUE, &value, NULL);
                            if (arg[i] != NUL && !vim_iswhite(arg[i]))
                            {
                                errmsg = e_invarg;

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui