public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/62310] New: fails to consider default initializers (NSDMIs) when checking inheriting constructors
@ 2014-08-29 21:51 richard-gccbugzilla at metafoo dot co.uk
2014-08-30 0:35 ` [Bug c++/62310] " ppluzhnikov at google dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2014-08-29 21:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62310
Bug ID: 62310
Summary: fails to consider default initializers (NSDMIs) when
checking inheriting constructors
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
Consider:
struct A { A(int); A() = delete; };
struct B { B(int); B() = delete; };
struct C : B { using B::B; A a = 0; } c(0);
GCC rejects this valid code:
<stdin>:1:114: error: use of deleted function ‘C::C(int)’
<stdin>:1:97: note: ‘C::C(int)’ is implicitly deleted because the default
definition would be ill-formed:
<stdin>:1:97: error: use of deleted function ‘A::A()’
<stdin>:1:20: note: declared here
However, if you remove the '= delete' from A, GCC does in fact call A::A(int),
so this seems to be limited to determining if the inheriting constructor should
be deleted.
>From gcc-bugs-return-459537-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Aug 29 21:54:31 2014
Return-Path: <gcc-bugs-return-459537-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11268 invoked by alias); 29 Aug 2014 21:54:31 -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 11242 invoked by uid 48); 29 Aug 2014 21:54:28 -0000
From: "ettl.martin at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/62311] New: Found a potential copy and paste issue on in gcc/config/cr16.c
Date: Fri, 29 Aug 2014 21:54:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ettl.martin at gmx dot de
X-Bugzilla-Status: UNCONFIRMED
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-62311-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-08/txt/msg02034.txt.bz2
Content-length: 907
https://gcc.gnu.org/bugzilla/show_bug.cgi?idb311
Bug ID: 62311
Summary: Found a potential copy and paste issue on in
gcc/config/cr16.c
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: ettl.martin at gmx dot de
Please take a look at following suspicious code, where the same statement
appears twice in a logical or-operation:
/*file gcc/config/cr16.c, line 2027*/
static bool
cr16_frame_pointer_required (void)
{
return (cfun->calls_alloca || crtl->calls_eh_return
|| cfun->has_nonlocal_label || crtl->calls_eh_return);
}
As you can see, the statement crtl->calls_eh_return appears twice, which looks
like a copy&paste issue.
Best regards and many thanks
Martin Ettl
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/62310] fails to consider default initializers (NSDMIs) when checking inheriting constructors
2014-08-29 21:51 [Bug c++/62310] New: fails to consider default initializers (NSDMIs) when checking inheriting constructors richard-gccbugzilla at metafoo dot co.uk
@ 2014-08-30 0:35 ` ppluzhnikov at google dot com
2014-12-13 23:50 ` ville.voutilainen at gmail dot com
2021-08-04 20:46 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ppluzhnikov at google dot com @ 2014-08-30 0:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62310
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at google dot com
--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
Google ref: b/17333074
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/62310] fails to consider default initializers (NSDMIs) when checking inheriting constructors
2014-08-29 21:51 [Bug c++/62310] New: fails to consider default initializers (NSDMIs) when checking inheriting constructors richard-gccbugzilla at metafoo dot co.uk
2014-08-30 0:35 ` [Bug c++/62310] " ppluzhnikov at google dot com
@ 2014-12-13 23:50 ` ville.voutilainen at gmail dot com
2021-08-04 20:46 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-13 23:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62310
Ville Voutilainen <ville.voutilainen at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-12-13
CC| |ville.voutilainen at gmail dot com
Ever confirmed|0 |1
Known to fail| |4.8.2, 4.9.1, 5.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/62310] fails to consider default initializers (NSDMIs) when checking inheriting constructors
2014-08-29 21:51 [Bug c++/62310] New: fails to consider default initializers (NSDMIs) when checking inheriting constructors richard-gccbugzilla at metafoo dot co.uk
2014-08-30 0:35 ` [Bug c++/62310] " ppluzhnikov at google dot com
2014-12-13 23:50 ` ville.voutilainen at gmail dot com
@ 2021-08-04 20:46 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-04 20:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62310
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|--- |7.2
Resolution|--- |FIXED
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 7.2.0 and 8+.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-04 20:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-29 21:51 [Bug c++/62310] New: fails to consider default initializers (NSDMIs) when checking inheriting constructors richard-gccbugzilla at metafoo dot co.uk
2014-08-30 0:35 ` [Bug c++/62310] " ppluzhnikov at google dot com
2014-12-13 23:50 ` ville.voutilainen at gmail dot com
2021-08-04 20:46 ` pinskia at gcc dot gnu.org
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).