[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim
Subject:    Re: [bug report] C syntax broken with anonymous arrays
From:       Bram Moolenaar <Bram () moolenaar ! net>
Date:       2007-06-05 19:46:11
Message-ID: 200706051946.l55JkBST069270 () moolenaar ! net
[Download RAW message or body]


Marc Chantreux wrote:

> After reading
> http://www.run.montefiore.ulg.ac.be/~martin/resources/kung-f00.html
> I now use anonymous arrays in C. This is an exemple of use:
> 
>      result = ldap_search_s( ld
>              , "dc=u-strasbg,dc=fr"
>              , LDAP_SCOPE_ONELEVEL
>              , NULL
>              , (char *[]){ "objectClass","dc", NULL }
>              , 0
>              , &msg
>      );
> 
> Unfortunatly, the { of the array and all the following { and } are 
> marked as cErrInParen and i'm not skilled enougth to fix the problem. So 
> i'm sorry to just report it.

The normal C syntax uses highlighting of { and } inside () to indicate a
missing ).  There is no other way to show this common mistake.

If you really use { and } inside () you can disable the highlighting
with this line in your vimrc file:

	let c_no_curly_error = 1

-- 
hundred-and-one symptoms of being an internet addict:
142. You dream about creating the world's greatest web site.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic