Hello all,
Attached is patch for files tcctok.h and tccpp.c which implements '#pragma
comment(lib,...)'.
Example: #pragma comment(lib,foo) will link the library 'foo' as if
specified by -lfoo
Note that -fms-extensions must be included on the command line, or the
#pragma will be ignored.
I
Good luck for nested function implementers that (as is Lisp :o) will want to
make this code working!
typedef int (*fp) (uint32_t i);
int
callback(fp fn, uint32_t i)
fn(i);{
}
uint32_t
isEven(uint32_t i) {
uint32_t odd(uint32_t i) {
if (i == 0) return 0;
Oops, forgot the patch.
pragma_lib.patch
Description: Binary data
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Hi! There is patch partialy related with the previous one. It adds the ability
to compile a
multiple source files with the -c switch like
tcc -c ex2.c ex5.c -xc ex7.cgi -xn ex8.c ex9.cgi
PS: I used it to test the previous patch
Both patches work nicely, but there is wrinkle with multiple
Hi! As sugested Tomas Preud'homme:
Turn on a fill tabs with spaces option in your editor.
Be also careful that some files are indented with 2 spaces (when they
have large indentation) while most are indented with 4 spaces
There are a tabs in your patch :-( Otherwise it looks nice. I will try
Recursion is a more nasty thing than a nested function. But with a few
levels of the recursion a stack unwinding in the nested function (to
search a parent BP) can be acceptable (I think)
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
Is this method can be accepted for C?
I going to understand why trampolines are used in gcc: this strub
gives a stack pointer of the parent to the real nested function
(hardcoded as constant) and calls this nested function. Address of the
nested function is the address of the stub for the outer
Hi! Is a nested function needs to unwind a stack or there must be a
last parm (hidden) which points to the parent stack?
About nested functions in FreePascal:
http://www.freepascal.org/docs-html/prog/progse23.html
Is this method can be accepted for C?
No need to search for a parent BP if you don't support recursive functions
and function pointer return as with my example.
In this case you 'only' have to implement currying on your local functions.
It's a big change for the compiler.
C.
-Original Message-
From:
Le samedi 11 avril 2015, 17:43:05 Sergey Korshunoff a écrit :
Hi, Thomas!
What do you mean by is not a good one? Is the code totally invalid C? It
all boils down to whether we want tcc to be able to compile such code. If
yes, then it doesn't matter if the code is ugly or what.
This
Hi! There is a rigth patch attached. This one must work like in gcc.
PS: it is strange that tcc can not compile multiple files like
gcc -c ex1.c ex3.c
020-x-option.patch
Description: Binary data
___
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
Except that later there is name = buf; with name staying live out of this if
scope. So this change is not correct. It would be better to move it out up a
bit.
Best regards,
Thomas
Yes, you are right, the patch is wrong.
What about removing char buf[32] and replacing
Hi Michael,
Le mercredi 11 mars 2015, 23:10:45 Thomas Preud'homme a écrit :
Le dimanche 22 février 2015, 06:13:21 Michael Matz a écrit :
And I pulled my hair out again when tracing the different paths the
linker can go through in different modes, and how the relocs and symbol
values
Le dimanche 12 avril 2015, 15:10:14 oldfaber a écrit :
Except that later there is name = buf; with name staying live out of
this if scope. So this change is not correct. It would be better to move
it out up a bit.
Best regards,
Thomas
Yes, you are right, the patch is wrong.
Hi! There is patch partialy related with the previous one. It adds the
ability to compile a multiple source files with the -c switch like
tcc -c ex2.c ex5.c -xc ex7.cgi -xn ex8.c ex9.cgi
PS: I used it to test the previous patch
021-multiple-o-files.patch
Description: Binary data
On April 12, 2015 7:02:22 PM GMT+08:00, Sergey Korshunoff sey...@gmail.com
wrote:
Hi, Tomas!
the name resolution put the program last in the global order rather
than first.
Is this hard to change?
It should be ok for me because I'm already familiar with the code. I will fix
it this week.
Hi!
Oh my, get_tok_str returns a pointer to a local variable. So the proper fix
would be to make get_tok_str take a CString as parameter and have the caller
allocate the buffer associated with the CString. And then it's just a matter
of
allocating buf to STRING_MAX_SIZE.
But there is a
Hi! There is patch partialy related with the previous one. It adds the ability
to compile a multiple source files with the -c switch like
tcc -c ex2.c ex5.c -xc ex7.cgi -xn ex8.c ex9.cgi
PS: I used it to test the previous patch
Both patches work nicely, but there is wrinkle with multiple
Date: Sat, 11 Apr 2015 17:31:30 +0300
From: Sergey Korshunoff sey...@gmail.com
To: tinycc-devel@nongnu.org
Subject: Re: [Tinycc-devel] Dollar Sign in Identifiers Extension
Message-ID:
CAKG6wnZ9Re=wyyzukplozzod5nvjm5gq7d95q3fbxix7nkh...@mail.gmail.com
Content-Type: text/plain;
19 matches
Mail list logo