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
This commit is contained in:
Jason Merrill 2012-04-15 13:07:39 -04:00 committed by Jason Merrill
parent 04b391c164
commit a3ddb73883
5 changed files with 20 additions and 0 deletions

View file

@ -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=

View file

@ -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.

View file

@ -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:

View file

@ -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.

View file

@ -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