https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83011
--- Comment #4 from Julien ÉLIE ---
Martin, the following thing still puzzles me.
len = 52 * timer_count + 27 + (prefix == NULL ? 0 : strlen(prefix)) + 1;
=> gives a warning, as explained below
len = 1 + 52 * timer_count + 27 + (prefix == NULL
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83011
--- Comment #3 from Martin Sebor ---
(In reply to Julien ÉLIE from comment #2)
Thanks. I can reproduce the warning with -Wstringop-truncation=2 and a small
test case:
$ cat d.c && gcc -g -O2 -S -Wall -Wformat-truncation=2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83011
--- Comment #2 from Julien ÉLIE ---
Created attachment 42644
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42644=edit
Preprocessed translation unit of timer.c
Thanks Martin for your response.
I attached the result of the following
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83011
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic