tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Simple failed test on MacOS


From: Milutin Jovanović
Subject: Re: [Tinycc-devel] Simple failed test on MacOS
Date: Wed, 14 Nov 2012 18:13:10 -0500


The way I worked around this problem in the past is by defining _ANSI_SOURCE. The tcc tests pass this way, and they use stdio and stdlib.

The logic was that you indicate that you want only ANSI API and none of the platform specific stuff. Now, this might not be what you are looking for, but barring that you want to develop for OSX specifically, I think this should be fine.

Miki.



On 13 November 2012 10:03, Pedro A ARANDA <address@hidden> wrote:
Hi folks,

any code including <stdlib.h> will fail in tcc in MacOS

Example code fail.c:

#include <stdio.h>
#include <stdlib.h>

int main(int argc,char **argv)
{
    printf("Hello world!\n");
}

Output on the CLI:
paag:bin paag$ tcc -run fail.c
In file included from fail.c:2:
In file included from /usr/include/stdlib.h:65:
In file included from /usr/include/sys/wait.h:193:
In file included from /usr/include/machine/endian.h:35:
In file included from /usr/include/i386/endian.h:99:
In file included from /usr/include/sys/_endian.h:124:
/usr/include/libkern/_OSByteOrder.h:99: error: ';' expected (got "_OSSwapInt16")

fail.c will run if you remove the <stdlib.h> inclusion

Best,
/PA

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]