source: trunk/testcase/572c.c@ 763

Last change on this file since 763 was 639, checked in by bird, 22 years ago

Extended testcase with variable declaration.

  • Property cvs2svn:cvs-rev set to 1.3
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.6 KB
RevLine 
[601]1/* $Id: 572c.c 639 2003-08-19 00:11:21Z bird $ */
2/** @file
3 *
4 * _Optlink declaration and definition testcases.
5 *
6 * InnoTek Systemberatung GmbH confidential
7 *
8 * Copyright (c) 2003 InnoTek Systemberatung GmbH
9 * Author: knut st. osmundsen <[email protected]>
10 *
11 * All Rights Reserved
12 *
13 */
[600]14typedef struct some_struct_pointer * PTYPE;
15
16/*
17 * Function and method declarations.
18 * Checks mangling.
19 */
20/* No underscore, No mangling. */
21void _Optlink CVoid(int a, int b, int c, int d);
22void * _Optlink CPVoid(int a, int b, int c, int d);
23int _Optlink CInt(int a, int b, int c, int d);
24PTYPE _Optlink CPType(int a, int b, int c, int d);
25
26/*
27 * Typedefs.
28 * Checks that there is not warnings on these.
29 */
30typedef void _Optlink Typedef1Void(int a, int b, int c, int d);
31typedef void * _Optlink Typedef1PVoid(int a, int b, int c, int d);
32typedef int _Optlink Typedef1Int(int a, int b, int c, int d);
33typedef PTYPE _Optlink Typedef1PType(int a, int b, int c, int d);
34
35typedef void (_Optlink Typedef2Void)(int a, int b, int c, int d);
36typedef void * (_Optlink Typedef2PVoid)(int a, int b, int c, int d);
37typedef int (_Optlink Typedef2Int)(int a, int b, int c, int d);
38typedef PTYPE (_Optlink Typedef2PType)(int a, int b, int c, int d);
39
40typedef void (* _Optlink PTypedef1Void)(int a, int b, int c, int d);
41typedef void * (* _Optlink PTypedef1PVoid)(int a, int b, int c, int d);
42typedef int (* _Optlink PTypedef1Int)(int a, int b, int c, int d);
43typedef PTYPE (* _Optlink PTypedef1PType)(int a, int b, int c, int d);
44
45/* Alternate writing which should have the same effect I think... */
46typedef void (_Optlink * PTypedef2Void)(int a, int b, int c, int d);
47typedef void * (_Optlink * PTypedef2PVoid)(int a, int b, int c, int d);
48typedef int (_Optlink * PTypedef2Int)(int a, int b, int c, int d);
49typedef PTYPE (_Optlink * PTypedef2PType)(int a, int b, int c, int d);
50
51
52/*
53 * Structures.
54 */
55typedef struct VFT
56{
57 void (_Optlink * PStructMemberVoid)(int a, int b, int c, int d);
58 void * (_Optlink * PStructMemberPVoid)(int a, int b, int c, int d);
59 int (_Optlink * PStructMemberInt)(int a, int b, int c, int d);
60 PTYPE (_Optlink * PStructMemberPType)(int a, int b, int c, int d);
61
62 /* Alternate writing which should have the same effect I think... */
63 void (_Optlink * PStructMember2Void)(int a, int b, int c, int d);
64 void * (_Optlink * PStructMember2PVoid)(int a, int b, int c, int d);
65 int (_Optlink * PStructMember2Int)(int a, int b, int c, int d);
66 PTYPE (_Optlink * PStructMember2PType)(int a, int b, int c, int d);
67
68} VFT, *PVFT;
69
70
[639]71/*
72 * Variables
73 */
74void (* _Optlink PVar1Void)(int a, int b, int c, int d);
75void * (* _Optlink PVar1PVoid)(int a, int b, int c, int d);
76int (* _Optlink PVar1Int)(int a, int b, int c, int d);
77PTYPE (* _Optlink PVar1PType)(int a, int b, int c, int d);
78
79/* Alternate writing which should have the same effect I think... */
80void (_Optlink * PVar2Void)(int a, int b, int c, int d);