tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] using pcc to build tcc


From: Sergey Korshunoff
Subject: Re: [Tinycc-devel] using pcc to build tcc
Date: Sun, 17 Apr 2016 11:52:12 +0300

>> * pcc is a nice compiler: small, classic design, some optimizations
>> and checks, some original
>> ideas.
> +1

u-tcc-uepj, Is there a git repository of the pcc?
Comparing pcc and pcc 1.2.0.DEVEL 20141206:

1) pcc don't have __linux macro defined
2) a test program (with strays)
#include <stdio.h>
int main()
{
    /* comment with stray handling *\
/
       /* this is a valid *\/ comment */
       /* this is a valid comment *\*/
    //  this is a valid\
comment
    printf("Hello, World!\n");
    return 0;
}

pcc -E -C test.c -o test.i && cat test.i
int main()
{
    /* comment with stray handling */

       /* this is a valid *\/ comment */
       /* this is a valid comment *\*/
    //  this is a validcomment

    printf("Hello, World!\n");
    return 0;
}

tcc -c test.c -o test.i | cat test.i
nt main()
{
/* comment with stray handling *\
/
       /* this is a valid *\/ comment */
/* this is a valid comment *\*/
//  this is a valid\
comment
    printf("Hello, World!\n");
    return 0;
}

tcc output is closer to the source text
pcc can not conpile produced test.i. and tcc can..



reply via email to

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