From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124891 invoked by alias); 14 Oct 2015 14:26:38 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 124526 invoked by uid 48); 14 Oct 2015 14:26:34 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67961] Incorrect type of meber of struct in error message Date: Wed, 14 Oct 2015 14:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg01097.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67961 --- Comment #2 from Jonathan Wakely --- (In reply to other+gcc from comment #0) > where type of that rvalue variable is uint32_t not std::size_t. There is no rvalue of type uint32_t. The type of the **lvalue** is uint32_t. The rvalue is the temporary that gets created implicitly, which is of type size_t. FWIW clang doesn't mention rvalues, it just says there is no matching function for the call because ... prog.cc:4:6: note: candidate function not viable: no known conversion from 'std::uint32_t' (aka 'unsigned int') to 'std::size_t &' (aka 'unsigned long &') for 1st argument