Your message dated Sat, 20 Aug 2022 10:46:11 -0400
with message-id <20220820144611.3vs47zgzgptqif2h@localhost>
and subject line Re: Bug#953241: vim-runtime: CUDA erroneous syntax error
highlighted when {} is embedded within () or []
has caused the Debian Bug report #953241,
regarding vim-runtime: CUDA erroneous syntax error highlighted when {} is
embedded within () or []
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.)
--
953241: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953241
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: vim-runtime
Version: 2:8.1.2269-1
Severity: normal
Dear Maintainer,
While using vim for editing .cu (CUDA) files I have noticed multiple
false syntax errors highlighted. I have checked that those were indeed
misreported by succesfully compiling the file!
This occurs when curly brackets are embedded withing round brackets,
which has a number of uses in modern c++(), like emplacing an element into
container using initialization lists, or calling <algorithm> functions
with lambdas! Following would be a minimal example producing the false
highlight:
foo( {} );
This issue extends to {} within [] too, although this specific scenario
is much less likely to occur, I still can think of ways a developer
would encounter it, like constructing an rvalue for custom operator[]
with initialization list.
Such syntaxis is highlighted properly for C++ source files, however for
some reason it fails for CUDA, even though CUDA is specified to support
most of the C++ syntax features, and it is implemented as a superset of
C++ highlighting in file /usr/share/vim/vim81/syntax/cuda.vim;
Kind regards,
Artem Bondarenko
-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.4.0-4-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
vim-runtime depends on no packages.
Versions of packages vim-runtime recommends:
ii vim 2:8.1.2269-1+b2
ii vim-tiny 2:8.1.2269-1+b2
vim-runtime suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Fri, Mar 06, 2020 at 11:17:53AM +0000, Artem Bondarenko wrote:
> While using vim for editing .cu (CUDA) files I have noticed multiple
> false syntax errors highlighted. I have checked that those were indeed
> misreported by succesfully compiling the file!
>
> This occurs when curly brackets are embedded withing round brackets,
> which has a number of uses in modern c++(), like emplacing an element into
> container using initialization lists, or calling <algorithm> functions
> with lambdas! Following would be a minimal example producing the false
> highlight:
>
> foo( {} );
Vim's syntax highlighting is regex based, so it's not perfect. Some of
these constructs are difficult to express with regular expressions.
You'll want to look at “:help ft-cpp-syntax” and “:help ft-c-syntax” to
see how the highlighting can be customized. In particular, using
“:let c_no_curly_error=1” should address the false-positive error
highlighting you're referring to.
Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
--- End Message ---