public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60437] [C++11] Bogus "error: no matching function for call to 'X::X(<brace-enclosed initializer list>)'" Date: Tue, 18 Nov 2014 13:23:00 -0000 [thread overview] Message-ID: <bug-60437-4-udlUeOO5BM@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-60437-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60437 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #1) > Could we also print something better than <brace-enclosed initializer list>? Like what? Clang's approach seems to be to issue the same diagnostic for ill-formed initializations X(1) and X{1}, just saying "no matching constructor for initialization of 'X'" which dodges the issue. > Is it really trying to convert to 'std::initializer_list<Y>' from 'int' or > from 'std::initializer_list<int>'? From int. {1} is not a std::initializer_list<int> (but can be converted to it) A brace-enclosed initializer list is not the same as a std::initializer_list. >From gcc-bugs-return-467196-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 18 13:34:45 2014 Return-Path: <gcc-bugs-return-467196-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 22751 invoked by alias); 18 Nov 2014 13:34:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 22707 invoked by uid 55); 18 Nov 2014 13:34:41 -0000 From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58102] rejects valid initialization of constexpr object with mutable member Date: Tue, 18 Nov 2014 13:34: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: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-58102-4-GYo9nrpA2M@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-58102-4@http.gcc.gnu.org/bugzilla/> References: <bug-58102-4@http.gcc.gnu.org/bugzilla/> 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: 2014-11/txt/msg01668.txt.bz2 Content-length: 614 https://gcc.gnu.org/bugzilla/show_bug.cgi?idX102 --- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Tue Nov 18 13:34:08 2014 New Revision: 217713 URL: https://gcc.gnu.org/viewcvs?rev!7713&root=gcc&view=rev Log: PR c++/58102 * typeck2.c (store_init_value): Set it. * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New. * constexpr.c (cxx_eval_outermost_constant_expr): Check it. Added: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-mutable2.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/constexpr.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/typeck2.c
next prev parent reply other threads:[~2014-11-18 13:23 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-07 20:40 [Bug c++/60437] New: " daniel.kruegler at googlemail dot com 2014-11-18 11:35 ` [Bug c++/60437] " paolo.carlini at oracle dot com 2014-11-18 12:32 ` manu at gcc dot gnu.org 2014-11-18 13:23 ` redi at gcc dot gnu.org [this message] 2015-03-31 9:47 ` paolo.carlini at oracle dot com 2021-12-11 9:08 ` pinskia at gcc dot gnu.org 2021-12-22 13:17 ` ppalka at gcc dot gnu.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-60437-4-udlUeOO5BM@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).