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