public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/56011] New: [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload
@ 2013-01-16 20:47 daniel.kruegler at googlemail dot com
2013-01-16 22:31 ` [Bug libstdc++/56011] " redi at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2013-01-16 20:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56011
Bug #: 56011
Summary: [C++11] std::atomic<bool> and std::atomic_bool miss
volatile assignment operator overload
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: daniel.kruegler@googlemail.com
Using gcc 4.8.0 trunk the following program - compiled with the flags
-pedantic-errors -std=c++11 -Wall
is rejected:
//----------------------------------
#include <atomic>
int main() {
volatile std::atomic<bool> ab1;
ab1 = true;
volatile std::atomic_bool ab2;
ab2 = true;
}
//----------------------------------
"main.cpp||In function 'int main()':|
main.cpp|5|error: ambiguous overload for 'operator=' (operand types are
'volatile std::atomic<bool>' and 'bool')|
main.cpp|5|note: candidates are:|
[..]gcc\include\c++\4.8.0\atomic|485|note: std::atomic<bool>&
std::atomic<bool>::operator=(const std::atomic<bool>&) volatile <deleted>|
[..]gcc\include\c++\4.8.0\atomic|64|note: std::atomic_bool&
std::atomic_bool::operator=(const std::atomic_bool&) volatile <deleted>|
main.cpp|7|error: use of deleted function 'std::atomic_bool&
std::atomic_bool::operator=(const std::atomic_bool&) volatile'|
[..]gcc\include\c++\4.8.0\atomic|64|error: declared here|
"
The problem is due to the missing overload (part of the specification):
bool operator=(bool __i) volatile noexcept;
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/56011] [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload
2013-01-16 20:47 [Bug libstdc++/56011] New: [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload daniel.kruegler at googlemail dot com
@ 2013-01-16 22:31 ` redi at gcc dot gnu.org
2013-02-26 23:46 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2013-01-16 22:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56011
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-16
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/56011] [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload
2013-01-16 20:47 [Bug libstdc++/56011] New: [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload daniel.kruegler at googlemail dot com
2013-01-16 22:31 ` [Bug libstdc++/56011] " redi at gcc dot gnu.org
@ 2013-02-26 23:46 ` redi at gcc dot gnu.org
2013-02-27 0:58 ` redi at gcc dot gnu.org
2013-02-27 0:59 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-26 23:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56011
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-26 23:46:31 UTC ---
Author: redi
Date: Tue Feb 26 23:46:21 2013
New Revision: 196296
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196296
Log:
PR libstdc++/56012
* include/bits/atomic_base.h (atomic_flag): Fix narrowing conversion.
* testsuite/29_atomics/atomic/operators/56012.cc: New.
PR libstdc++/56011
* include/std/atomic (atomic<bool>::operator=(bool) volatile): Add
missing overload.
* testsuite/29_atomics/atomic/operators/56011.cc: New.
Added:
trunk/libstdc++-v3/testsuite/29_atomics/atomic/operators/56011.cc
trunk/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/56012.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/atomic_base.h
trunk/libstdc++-v3/include/std/atomic
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/56011] [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload
2013-01-16 20:47 [Bug libstdc++/56011] New: [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload daniel.kruegler at googlemail dot com
2013-01-16 22:31 ` [Bug libstdc++/56011] " redi at gcc dot gnu.org
2013-02-26 23:46 ` redi at gcc dot gnu.org
@ 2013-02-27 0:58 ` redi at gcc dot gnu.org
2013-02-27 0:59 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-27 0:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56011
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-27 00:57:45 UTC ---
Author: redi
Date: Wed Feb 27 00:57:36 2013
New Revision: 196301
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196301
Log:
PR libstdc++/56012
* include/bits/atomic_base.h (atomic_flag): Fix narrowing conversion.
* testsuite/29_atomics/atomic/operators/56012.cc: New.
PR libstdc++/56011
* include/std/atomic (atomic<bool>::operator=(bool) volatile): Add
missing overload.
* testsuite/29_atomics/atomic/operators/56011.cc: New.
Added:
branches/gcc-4_7-branch/libstdc++-v3/testsuite/29_atomics/atomic/operators/56011.cc
branches/gcc-4_7-branch/libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/56012.cc
Modified:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/include/bits/atomic_base.h
branches/gcc-4_7-branch/libstdc++-v3/include/std/atomic
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/56011] [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload
2013-01-16 20:47 [Bug libstdc++/56011] New: [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload daniel.kruegler at googlemail dot com
` (2 preceding siblings ...)
2013-02-27 0:58 ` redi at gcc dot gnu.org
@ 2013-02-27 0:59 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-27 0:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56011
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.3
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-27 00:58:28 UTC ---
fixed
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-27 0:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-16 20:47 [Bug libstdc++/56011] New: [C++11] std::atomic<bool> and std::atomic_bool miss volatile assignment operator overload daniel.kruegler at googlemail dot com
2013-01-16 22:31 ` [Bug libstdc++/56011] " redi at gcc dot gnu.org
2013-02-26 23:46 ` redi at gcc dot gnu.org
2013-02-27 0:58 ` redi at gcc dot gnu.org
2013-02-27 0:59 ` redi 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).