tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Extension to C language


From: Paulo Henrique Torrens
Subject: Re: [Tinycc-devel] Extension to C language
Date: Tue, 29 May 2012 03:30:12 +0000

Yes, I made some changes for it to produce native binary files on Mac. And the C11 updates are pretty much to be approved and used.
I made this changes because I don't want my compiler project to have any dependencies, so I want to encourage the use of TCC as bootstrapper compiler when needed. GCC is too big. Also... because I think it's fun to play with compilers.

The changes for tracked variables are not that complex, and I added them to TCC before my compiler was even working in order to test them... I think I am just asking the main contributors: do you want a patch for this feature? If there is no interest in this, at least was a good practice for me, then I'll remove it from my working directory and make a patch for the remaining changes. :)




Thank you for your answer.





Date: Mon, 28 May 2012 23:20:09 -0400
From: address@hidden
To: address@hidden
Subject: Re: [Tinycc-devel] Extension to C language


Hi Paulo,

FYI, I am not one of the main contributors, but you raised my interest when you mentioned Mac. In short I would like to know more about what you are doing, as your changes seem extensive.

tcc already works on Mac, but only to interactively run apps. Did you make any progress for tcc to produce native binaries?

I would also vote for inclusion of your C11 additions. Anything that improves ISO compliance is a good thing in my view.

As for the tracked variables, I would deffer to the opinion of the regular contributors. However, I am little worried about increasing of tcc complexity with code that will see very limited use. tcc is already complex on the inside. I think that git should make it very easy to keep a branch/fork with this added functionality.

Thanks for your interest. Any work on tcc is welcome (to me at least :-) ).

Miki.



On 28 May 2012 22:52, Paulo Henrique Torrens <address@hidden> wrote:
Hi,

I'm working on a compiler suite project (black.nongnu.org), and made several updates to TCC in order to incentive it's use as bootstrapper compiler and for "publicity", including port to Mac OS X and the Open/Free/Net BSDs (and planning on fixing for Android), the C11 _Atomic, _Alignas and _Generic keywords, and some other stuff. I plan to send a patch soon.

I've made a small extension to my compiler, making "tracked variables" in C. They are just reference counted structs which can call free() automatically.


void test() {
  int ^strong = malloc(sizeof(int));
  printf("strong has %d references", countof(strong));
  int *weak_reference = strong;
  // countage for strong becomes 0 and free(strong) is called automatically
};



Should I update this patch too? I mean, would this extension (enabled with -ftracked-variables) be used into the main branch?
Anyway, I will update all the other patches soon. :)



Greetings.

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



_______________________________________________ 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]