diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/nullptr20.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/nullptr20.C | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr20.C b/gcc/testsuite/g++.dg/cpp0x/nullptr20.C index a959b00786f..3e58406770d 100644 --- a/gcc/testsuite/g++.dg/cpp0x/nullptr20.C +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr20.C @@ -10,8 +10,11 @@ int main() { char buf1[64]; char buf2[64]; + char buf3[64]; std::sprintf(buf1, "%p", (void*)0); std::sprintf(buf2, "%p", nullptr); - return std::strcmp(buf1, buf2) != 0; + decltype(nullptr) mynull = 0; + std::sprintf(buf3, "%p", nullptr); + return std::strcmp(buf1, buf2) != 0 || std::strcmp(buf1, buf3) != 0; } |