summaryrefslogtreecommitdiffstats
path: root/test cases/native/2 global arg/prog.c
blob: 2a71236b63139088b367353b7b12c401402c1d01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef MYTHING
  #error "Global argument not set"
#endif

#ifdef MYCPPTHING
  #error "Wrong global argument set"
#endif

#ifndef MYCANDCPPTHING
  #error "Global argument not set"
#endif

#if !defined(GLOBAL_HOST) && !defined(GLOBAL_BUILD)
  #error "Neither global_host nor glogal_build is set."
#endif

#if defined(GLOBAL_HOST) && defined(GLOBAL_BUILD)
  #error "Both global build and global host set."
#endif

#ifdef GLOBAL_BUILD
  #ifndef ARG_BUILD
    #error "Global is build but arg_build is not set."
  #endif

  #ifdef ARG_HOST
    #error "Global is build but arg host is set."
  #endif
#endif

#ifdef GLOBAL_HOST
  #ifndef ARG_HOST
    #error "Global is host but arg_host is not set."
  #endif

  #ifdef ARG_BUILD
    #error "Global is host but arg_build is set."
  #endif
#endif

int main(void) {
    return 0;
}