public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "schaub-johannes at web dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/42655] New: Don't qualify rvalues of non-class types Date: Fri, 08 Jan 2010 03:17:00 -0000 [thread overview] Message-ID: <bug-42655-16474@http.gcc.gnu.org/bugzilla/> (raw) GCC applies cv-qualifiers to rvalues of non-class types. The following code is all right, but GCC doesn't like it: template<typename T> void unused(T const &) { } int main() { volatile bool x = false; unused(!x); // type of "!x" is bool } -- Summary: Don't qualify rvalues of non-class types Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: schaub-johannes at web dot de GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42655
next reply other threads:[~2010-01-08 3:17 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-01-08 3:17 schaub-johannes at web dot de [this message] 2010-01-08 3:23 ` [Bug c++/42655] ! causes the qualified types for rvalue pinskia at gcc dot gnu dot org 2010-01-08 3:24 ` [Bug c++/42655] [4.3/4.4/4.5 Regression] " pinskia at gcc dot gnu dot org 2010-01-08 3:35 ` schaub-johannes at web dot de 2010-01-08 3:41 ` schaub-johannes at web dot de 2010-01-08 3:42 ` pinskia at gcc dot gnu dot org 2010-01-08 3:43 ` wkf at alum dot mit dot edu 2010-01-08 3:43 ` pinskia at gcc dot gnu dot org 2010-01-09 12:45 ` jason at gcc dot gnu dot org 2010-01-14 16:37 ` rguenth at gcc dot gnu dot org 2010-01-14 20:22 ` jason at gcc dot gnu dot org 2010-01-14 20:42 ` jason at gcc dot gnu dot org 2010-01-14 20:46 ` jason 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-42655-16474@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).