Thread View: linux.debian.bugs.dist
1 messages
1 total messages
Started by Alejandro Colomar
Sat, 07 Nov 2026 18:00
Bug#1153357: cppcheck: syntaxError: -!!x
Author: Alejandro Colomar
Date: Sat, 07 Nov 2026 18:00
Date: Sat, 07 Nov 2026 18:00
67 lines
3204 bytes
3204 bytes
Package: cppcheck
Version: 2.22.0-1
Severity: normal
Tags: upstream
X-Debbugs-Cc: alx@kernel.org
Dear Maintainer,
cppcheck(1) seems to report a syntaxError in the following line of code:
return -!!status;
which is perfectly valid C (and AFAIK, also C++).
Here's an example of a function in which that happens:
inline int
a2sll_nc(long long *restrict n, char *restrict s,
char **restrict endp, int base,
long long min, long long max)
{
int status;
*n = a2i_strtoi(s, endp, base, min, max, &status);
if (status != 0)
errno = status;
return -!!status;
}
This seems to be a regression, since I hadn't seen that error before.
However, I don't know when it started appearing, since it's been more
than a year since I last analyzed that code.
Have a lovely night!
Alex
-- System Information:
Debian Release: forky/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 7.2.12+deb14-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages cppcheck depends on:
ii libc6 2.43-7
ii libgcc-s1 16.2.0-3
ii libstdc++6 16.2.0-3
ii libtinyxml2-11 11.0.0+dfsg-1+b3
ii python3 3.14.8-1
ii python3-pygments 2.20.0+dfsg-2
cppcheck recommends no packages.
Versions of packages cppcheck suggests:
ii clang 1:21.1.8-74
ii clang-tidy 1:21.1.8-74
pn cppcheck-gui <none>
-- no debconf information
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads