public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sworddragon2 at aol dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/55892] Bogus compiler warning
Date: Mon, 07 Jan 2013 08:01:00 -0000 [thread overview]
Message-ID: <bug-55892-4-FJ9NNLwjJy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55892-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55892
sworddragon2 at aol dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
--- Comment #2 from sworddragon2 at aol dot com 2013-01-07 08:01:36 UTC ---
> Take a line which is 16 characters long.
> The first time at beginning of the loop, limit: 8; readlimit: 8.
>
> The next time, limit:0 readlimit: 0.
> The next time limit: (unsigned long)(-8) readlimit: INT32_MAX
> Warn because readlimit > 1024.
You are right, limit -= read_limit; makes anyway no sense there so I removed it
(and the compiler wanring is gone too).
But there is still something strange on the old example: Why does line 33
trigger the warning but line 34 not? The only difference between them is that
line 33 uses a stack variable and line 34 a heap variable. Both have the same
size so shouldn't this warning trigger on both lines?
next prev parent reply other threads:[~2013-01-07 8:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 6:50 [Bug c/55892] New: " sworddragon2 at aol dot com
2013-01-07 7:35 ` [Bug c/55892] " pinskia at gcc dot gnu.org
2013-01-07 8:01 ` sworddragon2 at aol dot com [this message]
2015-08-12 10:59 ` mpolacek at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-55892-4-FJ9NNLwjJy@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).