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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [ext/] [fnname1.C] - Blame information for rev 307

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

Line No. Rev Author Line
1 301 jeremybenn
// Test whether __func__ works for namespace-scope C++ functions.
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Matt Austern , 3 Aug 2003
5
// { dg-do run }
6
 
7
namespace xyzzy
8
{
9
  const char* ab6(double, void*)
10
  {
11
    return __func__;
12
  }
13
}
14
 
15
int main()
16
{
17
  const char* s = xyzzy::ab6(2.3, (void*) 0);
18
  bool ok = true;
19
 
20
  ok = ok && s[0] == 'a';
21
  ok = ok && s[1] == 'b';
22
  ok = ok && s[2] == '6';
23
  ok = ok && s[3] == '\0';
24
 
25
  return ok ? 0 : 1;
26
}

powered by: WebSVN 2.1.0

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