public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41518] copy initialization of volatile objects
[not found] <bug-41518-4@http.gcc.gnu.org/bugzilla/>
@ 2011-12-08 19:00 ` gseanmcg at gmail dot com
2011-12-09 9:10 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: gseanmcg at gmail dot com @ 2011-12-08 19:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41518
Sean McGovern <gseanmcg at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gseanmcg at gmail dot com
--- Comment #1 from Sean McGovern <gseanmcg at gmail dot com> 2011-12-08 18:59:04 UTC ---
GCC 4.3 has been unsupported for some time.
Go ahead and close this bug.
If this issue can be reproduced with a supported version of GCC, please re-open
it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41518] copy initialization of volatile objects
[not found] <bug-41518-4@http.gcc.gnu.org/bugzilla/>
2011-12-08 19:00 ` [Bug c++/41518] copy initialization of volatile objects gseanmcg at gmail dot com
@ 2011-12-09 9:10 ` rguenth at gcc dot gnu.org
2012-02-15 15:08 ` lucdanton at free dot fr
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-09 9:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41518
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-12-09
Ever Confirmed|0 |1
Known to fail| |4.7.0
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-09 09:08:05 UTC ---
EDG also accepts this, 4.7.0 still fails to accept it.
Confirmed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41518] copy initialization of volatile objects
[not found] <bug-41518-4@http.gcc.gnu.org/bugzilla/>
2011-12-08 19:00 ` [Bug c++/41518] copy initialization of volatile objects gseanmcg at gmail dot com
2011-12-09 9:10 ` rguenth at gcc dot gnu.org
@ 2012-02-15 15:08 ` lucdanton at free dot fr
2012-02-15 16:06 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: lucdanton at free dot fr @ 2012-02-15 15:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41518
lucdanton at free dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lucdanton at free dot fr
--- Comment #3 from lucdanton at free dot fr 2012-02-15 15:08:11 UTC ---
Reproducible with const:
$ cat main.cpp
struct copyable {
copyable() {}
copyable(copyable&) {}
};
struct wrapper {
copyable c;
wrapper(int) {}
};
int
main()
{
wrapper const w = 0;
}
$ g++-snapshot -Wall -Wextra -pedantic main.cpp
main.cpp: In function 'int main()':
main.cpp:15:23: error: no matching function for call to 'wrapper::wrapper(const
wrapper)'
main.cpp:15:23: note: candidates are:
main.cpp:9:5: note: wrapper::wrapper(int)
main.cpp:9:5: note: no known conversion for argument 1 from 'const wrapper'
to 'int'
main.cpp:6:8: note: wrapper::wrapper(wrapper&)
main.cpp:6:8: note: no known conversion for argument 1 from 'const wrapper'
to 'wrapper&'
$ g++-snapshot -Wall -Wextra -pedantic -std=c++11 main.cpp
main.cpp: In function 'int main()':
main.cpp:15:23: error: no matching function for call to 'wrapper::wrapper(const
wrapper)'
main.cpp:15:23: note: candidates are:
main.cpp:9:5: note: wrapper::wrapper(int)
main.cpp:9:5: note: no known conversion for argument 1 from 'const wrapper'
to 'int'
main.cpp:6:8: note: wrapper::wrapper(wrapper&)
main.cpp:6:8: note: no known conversion for argument 1 from 'const wrapper'
to 'wrapper&'
$ g++-snapshot -v
...
gcc version 4.7.0 20120128 (experimental) [trunk revision 183664] (Debian
20120128-1)
I noticed a similar problem when using copy-initialization on a const object of
a class that is movable (with move constructor accepting T&&, not T const&&)
but not copyable. I noticed that in C++11 8.5 Initializers [dcl.init] takes
great care to specify:
> [...] if the function is a constructor, the call initializes a temporary of the cv-unqualified version of the destination type.
on paragraph 16 (I'm using n3290). I'm not as familiar with C++03 but
apparently the text only mentions creation of a temporary, without exactly
specifying of which type.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41518] copy initialization of volatile objects
[not found] <bug-41518-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2012-02-15 15:08 ` lucdanton at free dot fr
@ 2012-02-15 16:06 ` paolo.carlini at oracle dot com
2012-02-15 19:57 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-02-15 16:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41518
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|gcc-bugs at gcc dot gnu.org |jason at gcc dot gnu.org
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-02-15 16:04:41 UTC ---
Let's ask Jason to double check the triage.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41518] copy initialization of volatile objects
[not found] <bug-41518-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2012-02-15 16:06 ` paolo.carlini at oracle dot com
@ 2012-02-15 19:57 ` jason at gcc dot gnu.org
2021-07-24 2:02 ` pinskia at gcc dot gnu.org
2023-07-16 16:50 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2012-02-15 19:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41518
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2012-02-15 19:49:29 UTC ---
I agree with the analysis.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41518] copy initialization of volatile objects
[not found] <bug-41518-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2012-02-15 19:57 ` jason at gcc dot gnu.org
@ 2021-07-24 2:02 ` pinskia at gcc dot gnu.org
2023-07-16 16:50 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-24 2:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41518
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |4.9.1
Status|NEW |RESOLVED
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 4.9.1.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41518] copy initialization of volatile objects
[not found] <bug-41518-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2021-07-24 2:02 ` pinskia at gcc dot gnu.org
@ 2023-07-16 16:50 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-16 16:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41518
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irip at qq dot com
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 110685 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-07-16 16:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-41518-4@http.gcc.gnu.org/bugzilla/>
2011-12-08 19:00 ` [Bug c++/41518] copy initialization of volatile objects gseanmcg at gmail dot com
2011-12-09 9:10 ` rguenth at gcc dot gnu.org
2012-02-15 15:08 ` lucdanton at free dot fr
2012-02-15 16:06 ` paolo.carlini at oracle dot com
2012-02-15 19:57 ` jason at gcc dot gnu.org
2021-07-24 2:02 ` pinskia at gcc dot gnu.org
2023-07-16 16:50 ` 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).