public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "stormbyte at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/44677] Warn for variables incremented but not used Date: Mon, 19 Sep 2022 10:03:22 +0000 [thread overview] Message-ID: <bug-44677-4-1aYxZphJEm@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-44677-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44677 David Manuelda <stormbyte at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stormbyte at gmail dot com --- Comment #14 from David Manuelda <stormbyte at gmail dot com> --- It is worth to notice that this bug propagates to C++ whenever an object uses an int that increments but is never used, like the following example: class Test{ public: Test() { i = 0; i++; } private: int i; }; int main(int, char**) { Test unused; return 0; }
next prev parent reply other threads:[~2022-09-19 10:03 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-44677-4@http.gcc.gnu.org/bugzilla/> 2020-05-19 17:23 ` msebor at gcc dot gnu.org 2021-04-21 17:41 ` jsm28 at gcc dot gnu.org 2021-10-24 6:09 ` pinskia at gcc dot gnu.org 2022-04-09 0:48 ` eggert at cs dot ucla.edu 2022-09-19 10:03 ` stormbyte at gmail dot com [this message] 2022-12-17 17:58 ` pinskia at gcc dot gnu.org 2022-12-17 18:04 ` [Bug c/44677] Warn for variables incremented but not used (+=, ++) pinskia at gcc dot gnu.org 2023-07-18 22:59 ` vincent-gcc at vinc17 dot net 2010-06-26 0:53 [Bug c/44677] New: Warn for variables incremented but not used jsm28 at gcc dot gnu dot org 2010-06-28 0:35 ` [Bug c/44677] " pinskia at gcc dot gnu dot 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-44677-4-1aYxZphJEm@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: linkBe 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).