public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "frankhb1989 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57183] New: [C++11]auto and -Wunused-variable Date: Mon, 06 May 2013 06:41:00 -0000 [thread overview] Message-ID: <bug-57183-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57183 Bug #: 57183 Summary: [C++11]auto and -Wunused-variable Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: frankhb1989@gmail.com Case: constexpr float PI_0 = 3.1415926F; constexpr auto PI_1 = 3.1415926F; const float PI_2 = 3.1415926F; const auto PI_3 = 3.1415926F; int main(){} Using gcc version 4.8.0 (rev2, Built by MinGW-builds project). g++ a.cc -std=c++11 -Wall a.cc:2:16: warning: 'PI_1' defined but not used [-Wunused-variable] constexpr auto PI_1 = 3.1415926F; ^ a.cc:4:12: warning: 'PI_3' defined but not used [-Wunused-variable] const auto PI_3 = 3.1415926F; ^ The difference between auto and non-auto declarations seems to be not intended.
next reply other threads:[~2013-05-06 6:41 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-05-06 6:41 frankhb1989 at gmail dot com [this message] 2013-05-06 8:37 ` [Bug c++/57183] [C++11] auto " paolo.carlini at oracle dot com 2013-05-06 8:47 ` paolo.carlini at oracle dot com 2013-05-06 17:03 ` paolo.carlini at oracle dot com 2013-06-06 22:59 ` paolo.carlini at oracle 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=bug-57183-4@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).