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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [obj-c++.dg/] [encode-8.mm] - Blame information for rev 816

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

Line No. Rev Author Line
1 308 jeremybenn
/* Test if the Objective-C @encode machinery distinguishes between
2
   'BOOL *' (which should be encoded as '^c') and 'char *' (which
3
   should be encoded as '*').  */
4
/* Contributed by Ziemowit Laski .  */
5
/* { dg-do run { target *-*-darwin* } } */
6
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
7
 
8
#include 
9
#include 
10
#include 
11
 
12
int main(void) {
13
  const char *BOOL_ptr = @encode(BOOL *);
14
  const char *char_ptr = @encode(char *);
15
 
16
  if(strcmp(BOOL_ptr, "^c"))
17
    abort();
18
 
19
  if(strcmp(char_ptr, "*"))
20
    abort();
21
 
22
  return 0;
23
}

powered by: WebSVN 2.1.0

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