source: EcnlProtoTool/trunk/tcc-0.9.27/tests/tests2/81_types.c@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc
File size: 869 bytes
RevLine 
[331]1/* The following are all valid decls, even though some subtypes
2 are incomplete. */
3enum E *e;
4const enum E *e1;
5enum E const *e2;
6struct S *s;
7const struct S *s1;
8struct S const *s2;
9
10/* Various strangely looking declarators, which are all valid
11 and have to map to the same numbered typedefs. */
12typedef int (*fptr1)();
13int f1 (int (), int);
14typedef int (*fptr2)(int x);
15int f2 (int (int x), int);
16typedef int (*fptr3)(int);
17int f3 (int (int), int);
18typedef int (*fptr4[4])(int);
19int f4 (int (*[4])(int), int);
20typedef int (*fptr5)(fptr1);
21int f5 (int (int()), fptr1);
22int f1 (fptr1 fp, int i)
23{
24 return (*fp)(i);
25}
26int f2 (fptr2 fp, int i)
27{
28 return (*fp)(i);
29}
30int f3 (fptr3 fp, int i)
31{
32 return (*fp)(i);
33}
34int f4 (fptr4 fp, int i)
35{
36 return (*fp[i])(i);
37}
38int f5 (fptr5 fp, fptr1 i)
39{
40 return fp(i);
41}
42int f8 (int ([4]), int);
43int main () { return 0; }
Note: See TracBrowser for help on using the repository browser.