public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53725] New: Prototype does not match error if the definition of the ctor is separated from its declaration.
@ 2012-06-19 23:47 tr3w at freemail dot hu
2012-06-20 1:43 ` [Bug c++/53725] Prototype does not match error if the definition of the ctor is separated from its declaration and attributes redi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: tr3w at freemail dot hu @ 2012-06-19 23:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53725
Bug #: 53725
Summary: Prototype does not match error if the definition of
the ctor is separated from its declaration.
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tr3w@freemail.hu
Created attachment 27657
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27657
Minimal example
In certain conditions if the definition of the ctor separated from its
declaration it generates an compiler error.
I created a minimal example. The original code is from Boost.Move.
Error:
testfull.cpp:16:1: error: prototype for ‘movable::movable(rv<movable>&)’ does
not match any in class ‘movable’
testfull.cpp:5:7: error: candidates are: movable::movable(const movable&)
testfull.cpp:13:5: error: movable::movable(rv<movable>&)
If the ctor definition is inside the class the code compiles.
The same can happen with the assignment operator as visible here:
http://lists.boost.org/Archives/boost/2011/07/184263.php
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53725] Prototype does not match error if the definition of the ctor is separated from its declaration and attributes
2012-06-19 23:47 [Bug c++/53725] New: Prototype does not match error if the definition of the ctor is separated from its declaration tr3w at freemail dot hu
@ 2012-06-20 1:43 ` redi at gcc dot gnu.org
2014-06-11 18:06 ` paolo.carlini at oracle dot com
2021-07-23 1:20 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2012-06-20 1:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53725
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-06-20
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-20 01:43:15 UTC ---
Confirmed.
The candidate list also includes the implicitly-declared copy ctor (and in
c++11 mode the move ctor) which is also wrong because no definition can be
provided for an implicitly-declared special member function.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53725] Prototype does not match error if the definition of the ctor is separated from its declaration and attributes
2012-06-19 23:47 [Bug c++/53725] New: Prototype does not match error if the definition of the ctor is separated from its declaration tr3w at freemail dot hu
2012-06-20 1:43 ` [Bug c++/53725] Prototype does not match error if the definition of the ctor is separated from its declaration and attributes redi at gcc dot gnu.org
@ 2014-06-11 18:06 ` paolo.carlini at oracle dot com
2021-07-23 1:20 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-06-11 18:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53725
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Related to PR49377
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53725] Prototype does not match error if the definition of the ctor is separated from its declaration and attributes
2012-06-19 23:47 [Bug c++/53725] New: Prototype does not match error if the definition of the ctor is separated from its declaration tr3w at freemail dot hu
2012-06-20 1:43 ` [Bug c++/53725] Prototype does not match error if the definition of the ctor is separated from its declaration and attributes redi at gcc dot gnu.org
2014-06-11 18:06 ` paolo.carlini at oracle dot com
@ 2021-07-23 1:20 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-23 1:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53725
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |6.0
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=49377
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 6.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-23 1:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-19 23:47 [Bug c++/53725] New: Prototype does not match error if the definition of the ctor is separated from its declaration tr3w at freemail dot hu
2012-06-20 1:43 ` [Bug c++/53725] Prototype does not match error if the definition of the ctor is separated from its declaration and attributes redi at gcc dot gnu.org
2014-06-11 18:06 ` paolo.carlini at oracle dot com
2021-07-23 1:20 ` 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).