Your message dated Mon, 19 Sep 2022 20:09:59 -0400
with message-id <20220920000959.73vxmghsvubd5gra@localhost>
and subject line Re: Bug#783280: c.vim highlights c99 structure literals as
errors
has caused the Debian Bug report #783280,
regarding c.vim highlights c99 structure literals as errors
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
783280: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783280
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: vim-runtime
Version: 2:7.4.488-7
Severity: normal
File: c.vim
Given the following (artificial) example:
struct point {
int x;
int y;
};
int get_y(struct point p)
{
return p.y;
}
int main(void)
{
return get_y((struct point){ .x = 5, .y = 10 });
}
vim highlights the '{' in the structure literal in main as an error.
-- System Information:
Debian Release: 8.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.0.0-rc7 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
vim-runtime depends on no packages.
Versions of packages vim-runtime recommends:
ii vim 2:7.4.488-7
vim-runtime suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Fri, Apr 24, 2015 at 07:01:14PM -0700, Josh Triplett wrote:
> Given the following (artificial) example:
>
> struct point {
> int x;
> int y;
> };
>
> int get_y(struct point p)
> {
> return p.y;
> }
>
> int main(void)
> {
> return get_y((struct point){ .x = 5, .y = 10 });
> }
>
> vim highlights the '{' in the structure literal in main as an error.
“:help ft-c-syntax” has the knobs to control this. The main two are
c_no_curly_error and c_no_bracket_error.
Given Vim's syntax highlighting is regex based, rather than actually
understanding the code and how it's being built, this is the available
workaround.
Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
--- End Message ---