OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [nullptr20.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
// { dg-options "-std=c++0x" }
3
 
4
// Test passing to ellipisis
5
 
6
#include 
7
#include 
8
 
9
int main()
10
{
11
  char buf1[64];
12
  char buf2[64];
13
  char buf3[64];
14
 
15
  std::sprintf(buf1, "%p", (void*)0);
16
  std::sprintf(buf2, "%p", nullptr);
17
  decltype(nullptr) mynull = 0;
18
  std::sprintf(buf3, "%p", nullptr);
19
  return std::strcmp(buf1, buf2) != 0 || std::strcmp(buf1, buf3) != 0;
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.