Package: splint Version: 3.1.2.dfsg1-2 Severity: normal Dear Maintainer,
using any printing macro of inttypes.h breaks parsing and therefore splint. Steps to reproduce: run splint on the attached file. Expected behavior: output some warnings or maybe even say "there are no warnings" Actual behavior: """ demo.c:7:28: Parse Error. (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. """ Note that apparently, the parser starts at the '%' in the string and doesn't notice that the string ends. This means that parsing is *also* broken for a different, but recoverable scenario if the "main specifier" is outside the macro, e.g.: """ #define MY_WIDTH "8" printf("I am %0" MYWIDTH "d years old", -1); """ Regards, Ben Wiederhake -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing'), (500, 'oldstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages splint depends on: ii libc6 2.22-5 ii splint-data 3.1.2.dfsg1-2 splint recommends no packages. Versions of packages splint suggests: pn splint-doc-html <none> -- no debconf information
#include <inttypes.h> #include <stdio.h> int main(void) { printf("I am %" PRIdMAX " years old.\n", 1337L); return 0; }