repo.or.cz
/
official-gcc
/
constexpr.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add support for C++0x nullptr.
[official-gcc/constexpr.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
nullptr20.C
blob
b7457ca124a911ead02bf4b340c4794c8a4e64f6
1
// { dg-do run }
2
// { dg-options "-std=c++0x" }
3
4
// Test passing to ellipisis
5
6
#include <cstdio>
7
#include <cstring>
8
9
int main()
10
{
11
char buf1[64];
12
char buf2[64];
13
14
std::snprintf(buf1, sizeof(buf1), "%p", (void*)0);
15
std::snprintf(buf2, sizeof(buf2), "%p", nullptr);
16
return std::strcmp(buf1, buf2) != 0;
17
}