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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [nullptr19.C] - Rev 774

Go to most recent revision | Compare with Previous | Blame | View Log

// { dg-do compile }
// { dg-options "-std=c++0x" }

// Test overload of pointer versus nullptr_t when applied on a literal 0/__null

typedef decltype(nullptr) nullptr_t;

char* k( char* );       /* { dg-message "note" } { dg-message "note" } */
nullptr_t k( nullptr_t ); /* { dg-message "note" } { dg-message "note" } */

void test_k()
{
  k(0); /* { dg-error "is ambiguous" } */
  // { dg-message "candidate" "candidate note" { target *-*-* } 13 }
  k(__null); /* { dg-error "is ambiguous" } */
  // { dg-message "candidate" "candidate note" { target *-*-* } 15 }
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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