Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Orange C version 4.1.18 | CC386 3.92 | 2011-March-01 (Announce)

posted by Japheth Homepage, Germany (South), 02.03.2011, 14:33
(edited by Japheth on 03.03.2011, 11:09)

> > You can pass a NULL pointer to _splitpath for any component you don't
> need
>
> :-|

I made a few more tests in the meantime. The _splitpath/_makepath issue is rather minor, because those functions aren't "standard" (the Unix C compilers lack them completely ), and hence there's code already to emulate them.

More severe is OrangeC's handling of 64-bit integers - it seems the upper 32-bits of such integers get lost "sometimes".

EDIT:

It most likely has nothing to do with 64-bit integers, but with struct/union declarations. Test case:


#include <stdio.h>

typedef          __int64 int_64;
typedef unsigned __int64 uint_64;

typedef struct expr_list {
    union {
        struct {
            union {
                uint_64     llvalue;
                int_64      value64;
            };
            uint_64         hlvalue;
        };
    };
} expr_list;

int main(int argc, char **argv)
{
        expr_list x;

        x.llvalue = 9;
        printf( "x = %I64X\n", x.llvalue );
        x.hlvalue = 0;
        printf( "x = %I64X\n", x.llvalue );
        return 0;
}


should print:

x = 9
x = 9


but orange C 4.1.18 prints:

x = 9
x = 0

---
MS-DOS forever!

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 105 users online (0 registered, 105 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum