diff options
author | Jason Merrill <jason@redhat.com> | 2012-04-15 13:07:39 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-04-15 13:07:39 -0400 |
commit | a3ddb738837877aaec229583102e0d5e00610117 (patch) | |
tree | f838e4225ec796feae47974d545a65a2ad4c9926 /gcc | |
parent | 04b391c164bca9a8a332d5a5b8e3ee8cf86224b9 (diff) | |
download | gcc-a3ddb738837877aaec229583102e0d5e00610117.zip gcc-a3ddb738837877aaec229583102e0d5e00610117.tar.gz gcc-a3ddb738837877aaec229583102e0d5e00610117.tar.bz2 |
re PR c++/52706 ([C++11] Demangling of templates with std::nullptr_t as non-type parameter)
PR c++/52706
* mangle.c (write_type): nullptr_t is a builtin type.
From-SVN: r186469
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/common.opt | 2 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/mangle.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/nullptr27.C | 8 |
5 files changed, 20 insertions, 0 deletions
diff --git a/gcc/common.opt b/gcc/common.opt index 39f1679..ee0c66a 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -788,6 +788,8 @@ Driver Undocumented ; argument. ; First selectable in G++ 4.7. ; +; 7: The version of the ABI that treats nullptr_t as a builtin type. +; First selectable in G++ 4.8. ; Additional positive integers will be assigned as new versions of ; the ABI become the default version of the ABI. fabi-version= diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a00d781..69d5b1d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-04-15 Jason Merrill <jason@redhat.com> + + PR c++/52706 + * mangle.c (write_type): nullptr_t is a builtin type. + 2012-04-14 Jan Hubicka <jh@suse.cz> * tree.c: Update field referenced for new cgraph/varpool layout. diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 1536828..d00df1f 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2023,6 +2023,8 @@ write_type (tree type) case NULLPTR_TYPE: write_string ("Dn"); + if (abi_version_at_least (7)) + ++is_builtin_type; break; case TYPEOF_TYPE: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 83af065..f3f6895 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2012-04-15 Jason Merrill <jason@redhat.com> + PR c++/52706 + * g++.dg/cpp0x/nullptr27.C: New. + PR c++/52818 * g++.dg/warn/format8.C: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr27.C b/gcc/testsuite/g++.dg/cpp0x/nullptr27.C new file mode 100644 index 0000000..1b86868 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr27.C @@ -0,0 +1,8 @@ +// PR c++/52706 +// { dg-options "-std=c++11 -fabi-version=0" } +// { dg-final { scan-assembler "_Z1fIDnLDn0EEiT_" } } + +template<class T, decltype(nullptr) = nullptr> +int f(T); + +int i2 = f(nullptr); // 17 |