tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Using TCC as a backbone for our compiler


From: Jerome St-Louis
Subject: Re: [Tinycc-devel] Using TCC as a backbone for our compiler
Date: Mon, 15 Jun 2009 13:00:47 -0500

We do want to get arround fiixing the warnings, but in order to
address some of them it would make some issues such as the declaration
reordering even worst.

Of course we'll do what it takes for TCC to gob it, I was mainly
worried about show stoppers such as that missing compound statement
which I now know exists. We'll see how far we go with that.

We do care about the performance of generated code, the main idea here
was to have a small standalone system which would be great with
libtcc.

The eC compiler/Ecere runtime library/Ecere IDE are all written in eC.

Regards,

Jerome

On Mon, Jun 15, 2009 at 12:06 PM, Basile
STARYNKEVITCH<address@hidden> wrote:
> Jerome St-Louis wrote:
>>
>> On Mon, Jun 15, 2009 at 9:57 AM, grischka<address@hidden> wrote:
>>
>>
>>>
>>> TCC supports statement expressions, such as:
>>>
>>>   return ({ int a=4, b=3; a+b; });
>>>
>>>
>>
>> Maybe this is all we need... I will then give TCC a try at compiling
>> our .c files.
>>
>>
>>>>
>>>> Another problem is that there are some issues with C code generation,
>>>> such as required prototyping and reordering of declarations which
>>>> causes us many headaches ...
>>>>
>>>
>>> I see.  Actually TCC treats function and struct ptr mismatch as
>>> errors,  however it could be made warnings as needed.
>>>
>>>
>>
>> Sorry I'm not sure I follow this ? Which mismatches are you talking
>> about? (Did you look at produced eC intermediate C files which gives
>> out tons of GCC warnings hehe?)
>
> My feeling is that generated code should not have any warnings in it. You
> should have an easy way to correct the generator the make the generated code
> without warnings.  I really see no reason why generated code should trigger
> gcc warnings, even in -Wall mode! (It could mean that the generated C is not
> fully standard compliant C, nor GCC compilant C code).
>
> And actually, that could help the generated code compiler (GCC or TCC in
> your case).
>
> However, if you don't care about the performance of generated code:
>
> first, don't invoke gcc with -O2, but just -O0 (or perhaps -O1).
>
> consider some of the other alternatives (calling LLVM, libjit or GNU
> lightning; generating for tcc or nwcc or gcc -O0). There is also the
> possibility to generate for some bytecode interpreter (perhaps your own, or
> Parrot, or JVM, or OcamlVM, or CLI, or NekoVM)
>
>
> BTW, did you consider coding the eC compiler in itself, or in some high
> level language like Ocaml?
>
> Regards.
>
>
> --
> Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
> email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> *** opinions {are only mines, sont seulement les miennes} ***
>
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/tinycc-devel
>




reply via email to

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