Changeset 599 for trunk/testcase/570c.c


Ignore:
Timestamp:
Aug 15, 2003, 11:49:10 PM (22 years ago)
Author:
bird
Message:

'Completed' the testcase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testcase/570c.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r598 r599  
    66 */
    77/* No underscore, No mangling. */
    8 void    _System             Void(void);
    9 void *  _System             PVoid(void);
    10 int     _System             Int(void);
    11 PTYPE   _System             PType(void);
     8void    _System             Void(int a, int b, int c, int d);
     9void *  _System             PVoid(int a, int b, int c, int d);
     10int     _System             Int(int a, int b, int c, int d);
     11PTYPE   _System             PType(int a, int b, int c, int d);
    1212
    1313/*
     
    1515 * Checks that there is not warnings on these.
    1616 */
    17 typedef void    _System     Typedef1Void(void);
    18 typedef void *  _System     Typedef1PVoid(void);
    19 typedef int     _System     Typedef1Int(void);
    20 typedef PTYPE   _System     Typedef1PType(void);
     17typedef void    _System     Typedef1Void(int a, int b, int c, int d);
     18typedef void *  _System     Typedef1PVoid(int a, int b, int c, int d);
     19typedef int     _System     Typedef1Int(int a, int b, int c, int d);
     20typedef PTYPE   _System     Typedef1PType(int a, int b, int c, int d);
    2121
    22 typedef void    (_System    Typedef2Void)(void);
    23 typedef void *  (_System    Typedef2PVoid)(void);
    24 typedef int     (_System    Typedef2Int)(void);
    25 typedef PTYPE   (_System    Typedef2PType)(void);
     22typedef void    (_System    Typedef2Void)(int a, int b, int c, int d);
     23typedef void *  (_System    Typedef2PVoid)(int a, int b, int c, int d);
     24typedef int     (_System    Typedef2Int)(int a, int b, int c, int d);
     25typedef PTYPE   (_System    Typedef2PType)(int a, int b, int c, int d);
    2626
    27 typedef void    (* _System  PTypedef1Void)(void);
    28 typedef void *  (* _System  PTypedef1PVoid)(void);
    29 typedef int     (* _System  PTypedef1Int)(void);
    30 typedef PTYPE   (* _System  PTypedef1PType)(void);
     27typedef void    (* _System  PTypedef1Void)(int a, int b, int c, int d);
     28typedef void *  (* _System  PTypedef1PVoid)(int a, int b, int c, int d);
     29typedef int     (* _System  PTypedef1Int)(int a, int b, int c, int d);
     30typedef PTYPE   (* _System  PTypedef1PType)(int a, int b, int c, int d);
    3131
    3232/* Alternate writing which should have the same effect I think... */
    33 typedef void    (_System *  PTypedef2Void)(void);
    34 typedef void *  (_System *  PTypedef2PVoid)(void);
    35 typedef int     (_System *  PTypedef2Int)(void);
    36 typedef PTYPE   (_System *  PTypedef2PType)(void);
     33typedef void    (_System *  PTypedef2Void)(int a, int b, int c, int d);
     34typedef void *  (_System *  PTypedef2PVoid)(int a, int b, int c, int d);
     35typedef int     (_System *  PTypedef2Int)(int a, int b, int c, int d);
     36typedef PTYPE   (_System *  PTypedef2PType)(int a, int b, int c, int d);
    3737
    3838
     
    4242typedef struct VFT
    4343{
    44     void    (_System *  PStructMemberVoid)(void* pvThis);
    45     void *  (_System *  PStructMemberPVoid)(void* pvThis);
    46     int     (_System *  PStructMemberInt)(void* pvThis);
    47     PTYPE   (_System *  PStructMemberPType)(void* pvThis);
     44    void    (_System *  PStructMemberVoid)(int a, int b, int c, int d);
     45    void *  (_System *  PStructMemberPVoid)(int a, int b, int c, int d);
     46    int     (_System *  PStructMemberInt)(int a, int b, int c, int d);
     47    PTYPE   (_System *  PStructMemberPType)(int a, int b, int c, int d);
    4848
    4949    /* Alternate writing which should have the same effect I think... */
    50     void    ( _System * PStructMember2Void)(void* pvThis);
    51     void *  ( _System * PStructMember2PVoid)(void* pvThis);
    52     int     ( _System * PStructMember2Int)(void* pvThis);
    53     PTYPE   ( _System * PStructMember2PType)(void* pvThis);
     50    void    ( _System * PStructMember2Void)(int a, int b, int c, int d);
     51    void *  ( _System * PStructMember2PVoid)(int a, int b, int c, int d);
     52    int     ( _System * PStructMember2Int)(int a, int b, int c, int d);
     53    PTYPE   ( _System * PStructMember2PType)(int a, int b, int c, int d);
    5454
    5555} VFT, *PVFT;
    5656
    5757
    58 int DoC(void)
     58int DoC(int a, int b, int c, int d)
    5959{
    60     VFT vft = {0,0,0,0};
     60    VFT vft = {Void, PVoid, Int, PType,
     61               Void, PVoid, Int, PType};
    6162
    62     Void();
    63     PVoid();
    64     Int();
    65     PType();
     63    Typedef1Void       * pfnTypedef1Void   = Void;
     64    Typedef1PVoid      * pfnTypedef1PVoid  = PVoid;
     65    Typedef1Int        * pfnTypedef1Int    = Int;
     66    Typedef1PType      * pfnTypedef1PType  = PType;
    6667
    67     if (vft.PStructMemberVoid)
    68         vft.PStructMemberVoid(&vft);
    69     if (vft.PStructMemberPVoid)
    70         vft.PStructMemberPVoid(&vft);
    71     if (vft.PStructMemberInt)
    72         vft.PStructMemberInt(&vft);
    73     if (vft.PStructMemberPType)
    74         vft.PStructMemberPType(&vft);
     68    Typedef2Void       * pfnTypedef2Void   = Void;
     69    Typedef2PVoid      * pfnTypedef2PVoid  = PVoid;
     70    Typedef2Int        * pfnTypedef2Int    = Int;
     71    Typedef2PType      * pfnTypedef2PType  = PType;
     72
     73    PTypedef1Void        pfnPTypedef1Void  = Void;
     74    PTypedef1PVoid       pfnPTypedef1PVoid = PVoid;
     75    PTypedef1Int         pfnPTypedef1Int   = Int;
     76    PTypedef1PType       pfnPTypedef1PType = PType;
     77
     78    PTypedef2Void        pfnPTypedef2Void  = Void;
     79    PTypedef2PVoid       pfnPTypedef2PVoid = PVoid;
     80    PTypedef2Int         pfnPTypedef2Int   = Int;
     81    PTypedef2PType       pfnPTypedef2PType = PType;
     82
     83
     84    /* extern functions */
     85    Void(1,2,3,4);
     86    PVoid(1,2,3,4);
     87    Int(1,2,3,4);
     88    PType(1,2,3,4);
     89
     90    /* typedefs */
     91    pfnTypedef1Void(1,2,3,4);
     92    pfnTypedef1PVoid(1,2,3,4);
     93    pfnTypedef1Int(1,2,3,4);
     94    pfnTypedef1PType(1,2,3,4);
     95
     96    pfnTypedef2Void(1,2,3,4);
     97    pfnTypedef2PVoid(1,2,3,4);
     98    pfnTypedef2Int(1,2,3,4);
     99    pfnTypedef2PType(1,2,3,4);
     100
     101    pfnPTypedef1Void(1,2,3,4);
     102    pfnPTypedef1PVoid(1,2,3,4);
     103    pfnPTypedef1Int(1,2,3,4);
     104    pfnPTypedef1PType(1,2,3,4);
     105
     106    pfnPTypedef2Void(1,2,3,4);
     107    pfnPTypedef2PVoid(1,2,3,4);
     108    pfnPTypedef2Int(1,2,3,4);
     109    pfnPTypedef2PType(1,2,3,4);
     110
     111
     112    /* structs */
     113    vft.PStructMemberVoid(1,2,3,4);
     114    vft.PStructMemberPVoid(1,2,3,4);
     115    vft.PStructMemberInt(1,2,3,4);
     116    vft.PStructMemberPType(1,2,3,4);
     117
     118    vft.PStructMember2Void(1,2,3,4);
     119    vft.PStructMember2PVoid(1,2,3,4);
     120    vft.PStructMember2Int(1,2,3,4);
     121    vft.PStructMember2PType(1,2,3,4);
    75122
    76123    return 0;
Note: See TracChangeset for help on using the changeset viewer.