public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mbuilov at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/46045] incorrect code generated if redecalring local variable in do-while(0) Date: Sun, 17 Oct 2010 15:51:00 -0000 [thread overview] Message-ID: <20101017155100.TBXK25RPv3R-mtrrXz_ZfTqfAIJqyIUGklAsTmt7mZA@z> (raw) In-Reply-To: <bug-46045-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46045 --- Comment #3 from Michael Builov <mbuilov at gmail dot com> 2010-10-17 15:51:16 UTC --- Just a warning with -Wextra, but no warnings with -Wall -pedantic. I found a bug with this code: struct A { #definer dump(_a_) \ do { \ Struct A *a = _a_; \ printf("%d, %d\n", a->k, a->m); \ } while (0) Struct *b, a; dump(b); /* fine */ dump(a); /* crash */
next prev parent reply other threads:[~2010-10-17 15:51 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-10-16 13:26 [Bug c/46045] New: " mbuilov at gmail dot com 2010-10-16 13:32 ` [Bug c/46045] " zsojka at seznam dot cz 2010-10-16 18:44 ` rguenth at gcc dot gnu.org 2010-10-17 15:51 ` mbuilov at gmail dot com [this message] 2010-10-17 16:19 ` mbuilov at gmail dot com
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=20101017155100.TBXK25RPv3R-mtrrXz_ZfTqfAIJqyIUGklAsTmt7mZA@z \ --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).