public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/77721] -Wformat-truncation not uses arg range for converted vars
       [not found] <bug-77721-4@http.gcc.gnu.org/bugzilla/>
@ 2021-05-04 12:31 ` rguenth at gcc dot gnu.org
  2021-11-27  9:55 ` dimhen at gmail dot com
  2022-03-17 20:19 ` msebor at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77721

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/77721] -Wformat-truncation not uses arg range for converted vars
       [not found] <bug-77721-4@http.gcc.gnu.org/bugzilla/>
  2021-05-04 12:31 ` [Bug middle-end/77721] -Wformat-truncation not uses arg range for converted vars rguenth at gcc dot gnu.org
@ 2021-11-27  9:55 ` dimhen at gmail dot com
  2022-03-17 20:19 ` msebor at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: dimhen at gmail dot com @ 2021-11-27  9:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77721

--- Comment #7 from Dmitry G. Dyachenko <dimhen at gmail dot com> ---
Sounds like gcc-8.0.1 PASS for me

r257061 FAIL
r258034 PASS
r12-5546 PASS

$ ~/arch-gcc/SVN/gcc_258034/bin/gcc --version
gcc (GCC) 8.0.1 20180227 (experimental) [trunk revision 258034]

$ ~/arch-gcc/SVN/gcc_258034/bin/gcc -O2 -S -Wall -Woverflow -Wconversion
-Wpedantic -Wformat-truncation=2 -xc x.c

$ cat x.c
int snprintf (char*, __SIZE_TYPE__, const char*, ...);

void foo(unsigned j, char *p)
{
    if(j > 999)
        return;
    snprintf(p, 4, "%3u", j);
}

void bar(int j, char *p)
{
    const unsigned k = (unsigned) j;
    if(k > 999)
        return;
    snprintf(p, 4, "%3u", k);
}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/77721] -Wformat-truncation not uses arg range for converted vars
       [not found] <bug-77721-4@http.gcc.gnu.org/bugzilla/>
  2021-05-04 12:31 ` [Bug middle-end/77721] -Wformat-truncation not uses arg range for converted vars rguenth at gcc dot gnu.org
  2021-11-27  9:55 ` dimhen at gmail dot com
@ 2022-03-17 20:19 ` msebor at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: msebor at gcc dot gnu.org @ 2022-03-17 20:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77721

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
             Blocks|                            |85741
         Resolution|---                         |FIXED

--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
This appears fixed in GCC 12 and 11 (and perhaps even earlier).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85741
[Bug 85741] [meta-bug] bogus/missing -Wformat-overflow

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-17 20:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-77721-4@http.gcc.gnu.org/bugzilla/>
2021-05-04 12:31 ` [Bug middle-end/77721] -Wformat-truncation not uses arg range for converted vars rguenth at gcc dot gnu.org
2021-11-27  9:55 ` dimhen at gmail dot com
2022-03-17 20:19 ` msebor at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).