Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
e3fc446b
Commit
e3fc446b
authored
Dec 11, 2015
by
Ville Voutilainen
Committed by
Ville Voutilainen
Dec 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re PR libstdc++/68139 (rethrow_if_nested should tolerate overloaded unary operator&)
PR libstdc++/68139 From-SVN: r231562
parent
7d3015e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletions
+41
-1
libstdc++-v3/ChangeLog
+7
-0
libstdc++-v3/libsupc++/nested_exception.h
+3
-1
libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
+31
-0
No files found.
libstdc++-v3/ChangeLog
View file @
e3fc446b
2015-12-11 Ville Voutilainen <ville.voutilainen@gmail.com>
PR libstdc++/68139
* libsupc++/nested_exception.h (_S_rethrow): Use std::__addressof.
* testsuite/18_support/nested_exception/68139.cc: New.
2015-12-10 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/memory/shared_ptr/assign/assign.cc: Replace
...
...
libstdc++-v3/libsupc++/nested_exception.h
View file @
e3fc446b
...
...
@@ -37,6 +37,7 @@
#else
#include <bits/c++config.h>
#include <bits/move.h>
#if ATOMIC_INT_LOCK_FREE < 2
# error This platform does not support exception propagation.
...
...
@@ -142,7 +143,8 @@ namespace std
{
static
void
_S_rethrow
(
const
_Tp
&
__t
)
{
if
(
auto
__tp
=
dynamic_cast
<
const
nested_exception
*>
(
&
__t
))
if
(
auto
__tp
=
dynamic_cast
<
const
nested_exception
*>
(
std
::
__addressof
(
__t
)))
__tp
->
rethrow_nested
();
}
};
...
...
libstdc++-v3/testsuite/18_support/nested_exception/68139.cc
0 → 100644
View file @
e3fc446b
// { dg-do compile }
// { dg-options "-std=gnu++11" }
// { dg-require-atomic-builtins "" }
// Copyright (C) 2015 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <exception>
// libstdc++/68139
struct
C
{
virtual
~
C
(){}
void
operator
&
()
const
=
delete
;
};
int
main
()
{
std
::
rethrow_if_nested
(
C
());
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment