Changeset 290 for trunk/testcase


Ignore:
Timestamp:
Jun 4, 2003, 4:29:41 AM (22 years ago)
Author:
bird
Message:

Added fake types for checking .stab output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testcase/456/complex.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r289 r290  
    44 */
    55
    6 #include <stdio.h>
     6//#include <stdio.h>
    77/* do we have complex.h? let's skip that for now and do the #define ourself. */
    88#define complex _Complex
     9
     10typedef struct { int real,imag; }           FakeComplexInt;
     11typedef struct { float real,imag; }         FakeComplexFloat;
     12typedef struct { double real,imag; }        FakeComplexDouble;
     13typedef struct { long double real,imag; }   FakeComplexLongDouble;
    914
    1015void main(void)
     
    1924    printf("sizeof(complex double     ) = %2dbytes %3dbits\n", sizeof(ComplexDouble    ), sizeof(ComplexDouble    )*8);
    2025    printf("sizeof(complex long double) = %2dbytes %3dbits\n", sizeof(ComplexLongDouble), sizeof(ComplexLongDouble)*8);
     26    printf("\nFake types:\n");
     27    printf("sizeof(FakeComplexInt       ) = %2dbytes %3dbits\n", sizeof(FakeComplexInt       ), sizeof(FakeComplexInt       )*8);
     28    printf("sizeof(FakeComplexFloat     ) = %2dbytes %3dbits\n", sizeof(FakeComplexFloat     ), sizeof(FakeComplexFloat     )*8);
     29    printf("sizeof(FakeComplexDouble    ) = %2dbytes %3dbits\n", sizeof(FakeComplexDouble    ), sizeof(FakeComplexDouble    )*8);
     30    printf("sizeof(FakeComplexLongDouble) = %2dbytes %3dbits\n", sizeof(FakeComplexLongDouble), sizeof(FakeComplexLongDouble)*8);
    2131}
Note: See TracChangeset for help on using the changeset viewer.