Re: [Tinycc-devel] Misleading warning message - both gcc and clang refuse to compile and error out

2023-11-26 Thread Rob
On Sun, 26 Nov 2023 at 07:22, Eric Raible wrote: > > The following program has an obvious bug, and both gcc and clang refuse > to compile it with an on-point error. tcc produces an incorrect warning and > creates code that has no chance of working: > >> typedef struct symbol symbol; >> extern voi

Re: [Tinycc-devel] An interesting bug with clock() in debug mode

2022-11-23 Thread Rob
Your code has undefined behaviour due to the buffer overflow of dst. Try this: clang -x c -std=c11 -DDEBUG demo.tinyc -fsanitize=address -o dt && ./dt On Wed, 23 Nov 2022 at 20:50, Stefanos via Tinycc-devel wrote: > > Greetings everyone, > > I hope I find you well. > > I was playing with C and

Re: [Tinycc-devel] Fedora 30 and atexit results in error

2019-06-18 Thread Rob
st - https://lists.nongnu.org/archive/html/tinycc-devel/2018-07/msg0.html Personally, I made the symbol weak too - https://github.com/bobrippling/ucc-c-compiler/blob/master/src/rt/dsohandle.c hth, Rob On Sun, 16 Jun 2019 at 16:18, C.J. Wagenius wrote: > > Hi > > Trying to compile a pr

Re: [Tinycc-devel] tcg as a tcc backend (proposal by Rob Landley)

2015-04-28 Thread Rob Landley
On 04/10/2015 01:15 AM, Rob Landley wrote: > On Thu, Apr 9, 2015 at 1:44 PM, Sergey Korshunoff wrote: >> Hi! >> Only now I found an interesting proposal by Rob Landley: >> http://elinux.org/CELF_Project_Proposal/Combine_tcg_with_tcc >> >> Is there any work

Re: [Tinycc-devel] code block expression

2014-02-25 Thread Rob
On 25/02/14, Sylvain BERTRAND wrote: On Mon, Feb 24, 2014 at 09:06:20PM +, Rob wrote: On 24/02/14, Sylvain BERTRAND wrote: Hi, Is there on-going effort to add the support of code block expression? a = ({int b; b = 10; b +=1; b;}); Seems fine to me? It's a GNU extension btw [1]

Re: [Tinycc-devel] code block expression

2014-02-24 Thread Rob
main() { int a = ({int b; b = 10; b +=1; b;}); return a; } $ tcc -run expr-stmt.c $ echo $? 11 Seems fine to me? It's a GNU extension btw [1] Rob 1: http://gcc.gnu.org/onlinedocs/gcc/Statement-

Re: [Tinycc-devel] RE :Re: inline functions

2013-12-15 Thread Rob
On Wed, 11 Dec 2013, Jared Maddox wrote: Date: Wed, 11 Dec 2013 23:27:37 + (GMT) From: Rob Odd, msvc isn't a C99 compiler, didn't expect it to conform. As I best recall, MSVC has always (well, always since C99 was announced, anyways) had whatever C99 features that it's m

Re: [Tinycc-devel] RE :Re: inline functions

2013-12-15 Thread Rob
Sorry about the wait in my reply. Good to see it works for you, today I'm looking at getting tcc to do 'the right thing' with inline functions, I'll let you know if I have anything worth pushing to mob. Rob On Thu, 12 Dec 2013, Pierre wrote: I have tested the changes in

Re: [Tinycc-devel] RE :Re: inline functions

2013-12-11 Thread Rob
off to bed shortly. I do think tcc should remain standard-compliant though, and not imply static or extern from just 'inline'. Perhaps we need another flag? Rob On Wed, 11 Dec 2013, Pierre wrote: yes I think you are right, it is same with msvc v6. I don't know well the tcc code,

Re: [Tinycc-devel] RE :Re: inline functions

2013-12-11 Thread Rob
th 'gcc -std=c99 -O1', as f isn't referenced (since it's inlined by an optimiser). Also, I checked - gcc defaults to -std=gnu89, which means gnu89 inline semantics, so when testing, make sure you give it '-std=c99'. Clang exhibits the same behaviour w.r.t. inline, s

Re: [Tinycc-devel] RE :Re: inline functions

2013-12-11 Thread Rob
On Wed, 11 Dec 2013, Thomas Preud'homme wrote: Le mercredi 11 décembre 2013, 09:28:07 Christian JULLIEN a écrit : I knew about the fact that it is a hint and I knew even when inlined, the function still needs to be output in case its address is used. However I forgot about the other details. I st

Re: [Tinycc-devel] __fp_unordered_compare defined twice on Windows

2013-12-07 Thread Rob
ich a translator may use to implement any call to the function in the same translation unit. It is unspecified whether a call to the function uses the inline definition or the external definition." - C99, 6.7.4 Rob On Sat, 7 Dec 2013, Christian Jullien wrote: Sorry if doubled-posted b

Re: [Tinycc-devel] __fp_unordered_compare defined twice on Windows

2013-12-07 Thread Rob
On Sat, 7 Dec 2013, Christian Jullien wrote: Hi x86/x64 Windows maintainers,   This morning, I chekouted the latest TCC version from mod to update tcc on Windows (both x86/x64). It used to work flawlessly (my latest successful build was made on October).   Using gcc, I now get an error because _

Re: [Tinycc-devel] inline assembly and optimization passes

2013-09-26 Thread Rob
On Wed, Sep 25, 2013 at 09:23:58PM -0500, Jared Maddox wrote: > > Yes, as you got below I meant removing functions such as > > > > if (0) > >some_function(); > > > > The "problem" is that many applications use this construct instead of > > adding #ifdefs everywhere. > > So I've heard. Just use

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-05-01 Thread Rob Landley
d asked him to name his price. He said he wasn't interested. The "PS" I didn't reproduce in that blog entry was (rummages in email...) Message-ID: <4fb0ccef.1040...@bellard.org> Date: Mon, 14 May 2012 11:14:23 +0200 From: Fabrice Bellard To: Rob Landley

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-04-30 Thread Rob Landley
tatically linked. Be that as it may, static linking could be taken care of with a license exception. Android has an official "No GPL in Userspace" policy (which includes LGPL). A vendor who adds GPL software to their install image cannot use the Android trademark to describe

Re: [Tinycc-devel] Do we want a BSD license for tinycc?

2013-04-30 Thread Rob Landley
t even know, who have zero ongoing relationship with the project. What makes you think you _can_ relicense your version? Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] Recent changes segfault on Linux ARM

2013-04-28 Thread Rob Landley
;s done since then. *shrug*) Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] ABI compatibility

2013-04-22 Thread Rob
le will check it out. I'm interested in what changes you've made anyways. Also hello! Cheers, Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] Tcc and environment

2013-04-07 Thread Rob
bles? > I'm trying to use this to build a faster cgi on my web host - so > without environment variables, I'm toast. It's pretty hacky, but does something like this work? If not it may be a problem with pts-tcc/statically linking with uclibc. Rob #include #include char *ge

Re: [Tinycc-devel] global variables in tcc

2013-04-04 Thread Rob
On 2 April 2013 16:17, Lluís Batlle i Rossell wrote: > On Tue, Apr 02, 2013 at 03:29:29PM +0200, grischka wrote: >> Rob wrote: >> >Anyways, perhaps there should be a -fcommon flag on tcc, just like >> >gcc/clang. >> >> -f[no]-common already exists in tcc.

Re: [Tinycc-devel] global variables in tcc

2013-04-02 Thread Rob
On 2 April 2013 13:10, Lluís Batlle i Rossell wrote: > On Mon, Apr 01, 2013 at 10:41:44PM +0100, Rob wrote: > > On Mon, Apr 01, 2013 at 09:27:22PM +0200, Lluís Batlle i Rossell wrote: > > > On Mon, Apr 01, 2013 at 08:58:06PM +0200, Daniel Glöckner wrote: > > > > On M

Re: [Tinycc-devel] global variables in tcc

2013-04-01 Thread Rob
ifier, is a tentative * definition" */ Outputs nothing. Anyway, this is more to do with a single translation unit, your issue is with the same definition in multiple object files (I say definition from the multiple declarations being collapsed into one definition). Easy enough to change in tcc but I'm interested what the C Standard says on this. Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] global variables in tcc

2013-04-01 Thread Rob
file2.c: #include "header.h" GCC and Clang allow these to be merged together at link-time, which means users who make mistakes such as missing `extern' in header files still get the multiple definitions merged. tcc is stricter and perhaps more conformant in disallowing thi

Re: [Tinycc-devel] C_INCLUDE_PATH support

2013-02-19 Thread Rob
I'm sure this is non standard / gcc specific. What you want: cd project/include export MY_INCLUDE_PATH=`pwd` cd ../examples tcc -I"$MY_INCLUDE_PATH" example.c On 18 February 2013 21:46, Андрей Аладьев wrote: > cd project/include > export C_INCLUDE_PATH=`pwd` > cd ../examples > tcc example.c

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

2012-11-14 Thread Rob
This is because OSSwapInt16 uses both uint16_t and __uint16_t, neither of which are declared (via typedefs) beforehand. Perhaps there's some missing macro to trigger this in the Darwin system headers. Adding this to the start of your file seems to fix things, anyway: typedef unsigned short __uint

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-06 Thread Rob
Cool, thanks. I'll keep an eye on it On 5 November 2012 22:21, Hitoshi Mitake wrote: > On Tue, Nov 6, 2012 at 5:28 AM, Rob wrote: >> On Mon, Nov 05, 2012 at 11:19:00PM +0900, Hitoshi Mitake wrote: >>> On Mon, Nov 5, 2012 at 11:04 PM, Thomas Preud'homme >>

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Rob
don't think we should not follow C99 on this. > > > > OK, I understand the direction of TCC. > I'll implement == for field by field comparison only for my toy if I'll do :) > > Thanks, Regardless, I'd be interested in seeing your branch of tcc if you have it hosted anywhere? Thanks, Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] error parsing function-pointer type to va_arg

2012-06-29 Thread Rob
On Fri, Jun 29, 2012 at 10:16:28PM +0200, Stephan Beal wrote: > On Fri, Jun 29, 2012 at 10:12 PM, Rob wrote: > > > However this seems fine by the man page: > > > > > The argument type is a type name specified so that the type of a > > > pointer to an objec

Re: [Tinycc-devel] error parsing function-pointer type to va_arg

2012-06-29 Thread Rob
something like this will work: void *tmp = va_arg(ap, void *); pMkr->xFactory = tmp; Although the C-standard says that it's implementation defined for converting between function pointers and non-function pointers. Cheers, Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] Extension to C language

2012-06-01 Thread Rob
ommands (in case of e.g. tcc-boot)? Seems like an interesting idea, but would tcc make then tag on a call to tcc -run? I don't see how this can offer advantages over the standard make. > 2) How about preprocessor extensions? I've thought about two types of > loop

Re: [Tinycc-devel] Regarding My first compiler

2012-02-17 Thread Rob
mprove your knowledge and estimated. Exactly this. Writing a compiler has taught me so much more about the lesser known bits of C, and things like type annotation along expressioon trees and so on.. Interesting stuff Rob ___ Tinycc-devel mailing list Tiny

Re: [Tinycc-devel] Regarding My first compiler

2012-02-11 Thread Rob
> On Sat, Feb 11, 2012 at 7:43 PM, Rob wrote: > > I'm currently writing one of my own. The code it produces is very very > > suboptimal because I haven't written an optimiser for it yet, but I hope > > the actual parsing and syntax-tree code is straightforward. &g

Re: [Tinycc-devel] Regarding My first compiler

2012-02-11 Thread Rob
I have a type parsing branch, and my local working copy is almost ready to merge, then I'll have function pointer support. Next on the list is structs, enums and floats, then it may be able to compile itself. Thanks, Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] asm generation

2011-10-29 Thread Rob
On 29 October 2011 22:59, Lee wrote: > Is there any way to force tcc to compile to asm (gcc -S parameter)? I > imagine one would need > to compile tcc from sources - I admit, I haven't studied them. In short, no. tcc outputs straight to object-code, you could run objdump -D path/to/file.o though.

Re: [Tinycc-devel] Allow configuration of tcc libraries search path

2011-10-01 Thread Rob Landley
On 09/30/2011 05:50 PM, grischka wrote: > Rob Landley wrote: >> There were a functions named g() and o() which were IMPOSSIBLE to >> grep for... > > Because you don't know how to use grep. Because I don't want to drop out of my text editor and grep from the comman

Re: [Tinycc-devel] Allow configuration of tcc libraries search path

2011-09-30 Thread Rob Landley
rsion. I wouldn't mind so much if you didn't REFUSE TO TAKE >> OBVIOUS THINGS that you're now finding a need for all these years later. >> >> Sigh. I'm going to go back to ignoring this list now. I should go >> catch up on the pcc and llvm lists... >&

Re: [Tinycc-devel] tcc shared libraries with gcc programs

2011-09-02 Thread Rob Heatherly
On Thu, Sep 1, 2011 at 5:41 PM, grischka wrote: > Rob Heatherly wrote: >> >> tcc -Wall -Wunsupported -bench -shared -soname libyLOG.so.1 -o >> libyLOG.so.1.0  -lrt  yLOG.c >> >> It performs as expected when my main program is compiled with tcc, but >> when

[Tinycc-devel] tcc shared libraries with gcc programs

2011-08-31 Thread Rob Heatherly
First post, starting small, be kind ;)  If I should redirect the question elsewhere, just say the word. I have compiled a series of personal shared libraries using the latest mob/git version of tcc on x86_64 gentoo and it handled them very well (thanks).  I then call them from both tcc and gcc exe

Re: [Tinycc-devel] Allow configuration of tcc libraries search path

2011-07-11 Thread Rob Landley
On 07/09/2011 02:28 PM, grischka wrote: > Rob Landley wrote: >> On 07/07/2011 01:22 PM, grischka wrote: >>> Anyway. As to the general issue with search paths, it would be good >>> to find something clearer and more flexible. >> >> A quick check finds:

Re: [Tinycc-devel] Allow configuration of tcc libraries search path

2011-07-08 Thread Rob Landley
iler BOF in 2008, which there's video of, but that's a lot to wade through. (The rant about how a compiler isn't fundamentally different than a docbook->PDF converter.) Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] Options issues

2011-04-19 Thread Rob
> Adding some option > ->tcc - hello.c > -> ^Z > <- file a.exe (executable) > or > ->tcc - -c > -> ^Z > <- file a.out (object) There's no problem here, in the first one, main() is presumably in hello.c, and this is linked with the empty file from stdin,

Re: [Tinycc-devel] infinit loop when preprocessing

2010-05-16 Thread Rob
> It is about heavy macro expansion, however would like to know if there > are some known issues with C99 features, that would cause the macro > expansions to fail... tcc doesn't do nested macro expansion properly yet, as far as I'm aware. ___ Tinycc-de

Re: [Tinycc-devel] Several patchs from Debian packaging

2010-04-18 Thread Rob
>        if (libprefix && (!strncmp(ext, ".so", 2))) { >            size_t len = ext - filename - 3; >            strncpy(libname, filename + 3, len); >            *(libname + len) = '\0'; >            return 1; >        } > > I also wonder wether is strncmp is a good idea here as it could match .s

Re: [Tinycc-devel] Is the CVS repository dead yet?

2009-03-20 Thread Rob Landley
On Friday 20 March 2009 13:32:29 grischka wrote: > - Original Message - > From: "Rob Landley" > To: "Joshua Phillips" > Cc: > Sent: Friday, March 20, 2009 5:44 PM > Subject: Re: [Tinycc-devel] Is the CVS repository dead yet? > > > On Thursd

Re: [Tinycc-devel] Is the CVS repository dead yet?

2009-03-20 Thread Rob Landley
On Friday 20 March 2009 11:48:02 Rob Landley wrote: > On Friday 20 March 2009 10:46:47 grischka wrote: > > > > Grischka as well takes care of mirroring cvs on > > > > http://repo.or.cz/w/tinycc.git > > > > > > Ah, a mirror. So CVS is the offic

Re: [Tinycc-devel] Is the CVS repository dead yet?

2009-03-20 Thread Rob Landley
27;m using GIT for TinyCC ever since pre 0.9.24. There's no mention of it on tinycc.org. (There _is_ still a link to the CVS repository.) Where is it, by the way? > It is just that I run a script from time to time that updates the CVS at > Savannah from the master branch and al

Re: [Tinycc-devel] Is the CVS repository dead yet?

2009-03-20 Thread Rob Landley
On Thursday 19 March 2009 10:30:53 Joshua Phillips wrote: > Rob, > > I feel your pain :( > > I have had a look at the tcc git repository and it has many duplicated > commits (rebased?) and is a complete and utter mess. > > Unfortunately, in my opinion, CVS (and SVN, too,

Re: [Tinycc-devel] Is the CVS repository dead yet?

2009-03-19 Thread Rob Landley
On Wednesday 18 March 2009 15:10:32 Daniel Glöckner wrote: > On Fri, Mar 13, 2009 at 05:05:09PM -0500, Rob Landley wrote: > > On Thursday 12 March 2009 16:20:28 Marc Andre Tanner wrote: > > > grischka and Daniel you are the ones who actually committed code during > > > t

Re: [Tinycc-devel] Re: Tinycc-devel Digest, Vol 71, Issue 4

2009-03-17 Thread Rob Landley
On Sunday 15 March 2009 10:01:25 Joshua Phillips wrote: > Rob said he's waiting for the CVS repository to be dead. Tcc isn't entirely > dead. Merely pining for the fijords. The project is so healthy that my question about the status of the repository a _week_ ago has y

Re: [Tinycc-devel] Is the CVS repository dead yet?

2009-03-13 Thread Rob Landley
On Thursday 12 March 2009 16:20:28 Marc Andre Tanner wrote: > Hi, > > On Wed, Mar 11, 2009 at 06:07:51PM -0500, Rob Landley wrote: > > It's been 6 months, I thought I'd ask. > > > > People still occasionally email me links to a tcc git mirror (not sure > &

[Tinycc-devel] Is the CVS repository dead yet?

2009-03-11 Thread Rob Landley
s" page that's moved. Not exactly heavy on the announcements. A quick glance at the archives wasn't enlightening... So I'm asking. Rob (It's like groundhog's day: I pop my head out, see CVS, and go away for 6 months...)

Re: [Tinycc-devel] Re: TinyCC CVS, Rob's fork, the future (was: [PATCH 5/5] Fix gv for long longs)

2008-09-11 Thread Rob Landley
/archive/html/tinycc-devel/2006-09/msg00024.html Almost immediately, he explicitly dismissed a change of source control type as being important: http://lists.gnu.org/archive/html/tinycc-devel/2006-09/msg00058.html I stopped particularly expecting a move off CVS to ever happen back in February

Re: [Tinycc-devel] [PATCH 5/5] Fix gv for long longs

2008-09-07 Thread Rob Landley
Anyone care to continue > that? So that's one data point. It says we need muscle. > > No muscle, no results. Need'um reliable muscle first, else > everything is stuck. Even the scenario where you (Rob) kindly send > patches over under LGPLv2 requires muscle plus a distributed

Re: [Tinycc-devel] [PATCH 5/5] Fix gv for long longs

2008-09-06 Thread Rob Landley
ng at a brisk clip. My fork got up a good head of steam three times (and I was taking other people's patches), and then the cvs started up again and I walked away. Now there's been a _release_ from the cvs, and I've walked a lot farther away. *shrug* If you're happy with that, by all means... Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] [PATCH 5/5] Fix gv for long longs

2008-09-05 Thread Rob Landley
move off of CVS, let me know. But it's 2008, CVS is dead, and I've run out of the patience necromancy requires. > Daniel Rob ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel

RE: [Tinycc-devel] Using several instances of TCC?

2008-08-03 Thread rob rescorla
d be better off generating an Intermediate code from the GA, and then running that through register assignment. -- Rob > Date: Sun, 3 Aug 2008 14:47:45 +0200 > From: [EMAIL PROTECTED] > To: tinycc-devel@nongnu.org > Subject: Re: [Tinycc-devel] Usi

Re: [Tinycc-devel] Using TinyCC with GPL

2008-06-20 Thread Rob Landley
ved work standpoint. > Please correct me if I am wrong. I'm not sure you are, but I'm not interested in pursuing the thread. (I haven't been paying close attention to this list, just saw my name mentioned. Wouldn't have replied otherwise.) I'll wande

Re: [Tinycc-devel] Using TinyCC with GPL

2008-06-15 Thread Rob Landley
On Friday 06 June 2008 15:34:41 Ivo wrote: > If you use Rob Landley's fork, your application must be GPL as Rob switched > to the GPL for all of tinycc. Thanks for the FUD, but if you'd bothered to read the README: > License: > --- > > Tinycc is distributed unde

Re: [Tinycc-devel] TCC as portable module compiler

2008-03-18 Thread Rob Landley
t a 2.4 kernel (not 2.6), building only a subset of the full kernel sources, and it was a modified subset to work around constructs that tcc didn't understand. (I plan to revive tccboot with tinycc, but first I'd like to get tinycc to build a User Mode Linux kernel that works.) But, all

Re: [Tinycc-devel] Release Candidate - please test

2008-03-11 Thread Rob Landley
w that qemu can run actual MacosX I need to give it another try. (This is assuming I don't break down and get an iPhone. :) Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson. ___ Tinycc-d

Re: [Tinycc-devel] tcc-0.9.24 release soon

2008-03-07 Thread Rob Landley
e_ about Win32 again. (It comes right after arm on my todo list, which came after i386. I may start caring about c67 if anybody ever tells me what it _is_, but fourth on my list is adding an x86-64 output target. And then fifth would be either PPC or mips. Yes, adding more 32 bit targets wou

Re: [Tinycc-devel] TCC built using NOSTDLIB crashes on linux

2008-02-01 Thread Rob Landley
tain bad built-in assumptions that don't apply to windows, where executable is basically statically linked as far as system libraries go, although you need about 5 .a libraries in order to perform the static linking.) If he'd treated me like you treated that guy, I probably woul

Re: [Tinycc-devel] TCC built using NOSTDLIB crashes on linux

2008-02-01 Thread Rob Landley
east have a fair bit of self-sufficiency. > > Perhaps you can help us by diagnosing the problem (you can build > it, so would you like to try some debugging?) and give us a useful > lead so that one of the active developers on this list can issue a > patch with the minimum of fuss. Y

Re: [Tinycc-devel] Re: Attempt to create a host on ShareSource failed

2007-11-24 Thread Rob Landley
fter that is adding an x86-64 target (that's what my laptop's running now), and then I'll get back to seeing about getting the sucker to build an unmodified Linux kernel and uClibc and such. I check here from time to time to see if anybody's found any interesting new bugs, bu

Re: [Tinycc-devel] Re: patches for libtcc

2007-10-04 Thread Rob Landley
On Thursday 04 October 2007 8:51:20 pm Rob Landley wrote: > I had this window open to reply to, but I was uninvited from the project > and have stopped working on it now. If you want to talk to somebody about > it, there's always the mailing list... > > Rob Sorry, didn'

[Tinycc-devel] Re: patches for libtcc

2007-10-04 Thread Rob Landley
I had this window open to reply to, but I was uninvited from the project and have stopped working on it now. If you want to talk to somebody about it, there's always the mailing list... Rob On Tuesday 11 September 2007 2:17:01 pm Gabriel Corneanu wrote: > My comments inserted: >

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-04 Thread Rob Landley
On Thursday 04 October 2007 3:08:49 pm Simon 'corecode' Schubert wrote: > Actually I > think you should send your grumpy comments to yourself and leave this > list (alone). *shrug* Ok. Bye. Rob -- "One of my most productive days was throwing away 1000 lines of

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-04 Thread Rob Landley
On Thursday 04 October 2007 1:05:25 am Antti-Juhani Kaijanaho wrote: > On Wed, Oct 03, 2007 at 10:49:44PM -0500, Rob Landley wrote: > > The draft standard I have is 1.5 megabytes of ascii text (ok, html) that > > reads like it was written by lawyers. I use it to break

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-03 Thread Rob Landley
On Wednesday 03 October 2007 10:30:12 pm Antti-Juhani Kaijanaho wrote: > On Wed, Oct 03, 2007 at 05:17:23PM -0500, Rob Landley wrote: > > If you jump inside its scope you must initialize it (call alloca). > > I'm a little worried about the "use alloca" thing you hav

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-03 Thread Rob Landley
On Wednesday 03 October 2007 2:28:17 am Antti-Juhani Kaijanaho wrote: > On Wed, Oct 03, 2007 at 02:12:27AM -0500, Rob Landley wrote: > > P.S. I'm still boggling you can do "int a[42], b(char *c);" But > > apparently, yes you can. > > Sure you can. Of course,

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-03 Thread Rob Landley
On Wednesday 03 October 2007 7:49:53 am Daniel Glöckner wrote: > On Wed, Oct 03, 2007 at 01:59:47AM -0500, Rob Landley wrote: > > It boils down to a funky call to alloca()... > > One thing to note is that memory for VLAs is freed when the block ends. > GCC does this by saving

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-03 Thread Rob Landley
On Wednesday 03 October 2007 2:24:23 am Antti-Juhani Kaijanaho wrote: > On Wed, Oct 03, 2007 at 01:59:47AM -0500, Rob Landley wrote: > > > int a[*] (the asterisk is literal) is allowed in parameter declarations > > > in function prototypes but not in function definitions. The

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-03 Thread Rob Landley
On Wednesday 03 October 2007 12:10:17 am Antti-Juhani Kaijanaho wrote: > On Tue, Oct 02, 2007 at 06:26:58PM -0500, Rob Landley wrote: > > Confirmed that gcc makes sizeof() a runtime function in this case: > > > > #include > > > > int main(int argc, char *argv[]) &

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-03 Thread Rob Landley
On Wednesday 03 October 2007 12:07:21 am Antti-Juhani Kaijanaho wrote: > On Tue, Oct 02, 2007 at 12:19:18PM -0500, Rob Landley wrote: > > Any opinions on how to tackle this one? > > No. But I'll summarise (NOT quote) the C99 rules, in case it's helpful. > Feel free to

Re: [Tinycc-devel] tcc_free is still used in tccpe.c and tcccoff.c

2007-10-02 Thread Rob Landley
On Tuesday 02 October 2007 8:57:36 pm Hanzac Chen wrote: > Hi, > > I found that tcc_free is removed but still used in these two files ... > > Bye ... Ah, sorry. Just committed a fix. I'm trying to implement dynamic arrays before cutting a release. It's making my brain

Re: [Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-02 Thread Rob Landley
On Tuesday 02 October 2007 12:19:18 pm Rob Landley wrote: > Any opinions on how to tackle this one? Confirmed that gcc makes sizeof() a runtime function in this case: #include int main(int argc, char *argv[]) { int walrus[atoi(argv[1])]; printf("%d\n", sizeof(walrus)

[Tinycc-devel] Buiding binutils 2.17 (needs dynamic arrays).

2007-10-02 Thread Rob Landley
omponent *__hidden_comps_ptr = \ alloca(sizeof(struct demangle_component)*di.num_comps); #define comps (*__hidden_comps_ptr); Except that sizeof(comps) will return sizeof(struct demangle_component *) instead of the size passed to alloca(). Any opinions on how to tackle this one? Rob -- "O

Re: [Tinycc-devel] Segmentation fault compiling jslong.c

2007-10-02 Thread Rob Landley
src > make -f Makefile.ref CC=tcc Ok, I think I've fixed the last of this now. This package compiled to the end for me with tcc. I don't know if the result works, but the test suite checks out... Rob -- "One of my most productive days

Re: [Tinycc-devel] Re: Please comment this patch, if you have the time.

2007-09-30 Thread Rob Landley
On Sunday 30 September 2007 2:13:37 pm Jakob Eriksson wrote: > > Anybody else understand what this is doing? > > By the way, this is (almost) the patch Rob was referring to. > > regards, > Jakob And here's what I told him at the time: On Tuesday 25 September 2007 3:54:

[Tinycc-devel] Re: Please comment this patch, if you have the time.

2007-09-29 Thread Rob Landley
is "SBB Gb, Eb" and I have no _IDEA_ what that means, but google probably will... http://en.wikipedia.org/wiki/X86_assembly_language says "subtraction with borrow". Ok... Anybody else understand what this is doing? Rob -- "One

Re: [Tinycc-devel] __GNUC__ and GLIBC header mess

2007-09-29 Thread Rob Landley
On Saturday 29 September 2007 6:14:59 am Antti-Juhani Kaijanaho wrote: > On Fri, Sep 28, 2007 at 02:59:29PM -0500, Rob Landley wrote: > > Does the c99 spec say that undefined is < 2? (Probably, I'm a bit rushed > > just now, and likely to be out of touch this weekend. Vi

Re: [Tinycc-devel] [PATCH] Parentheses handling within struct/union initialization

2007-09-28 Thread Rob Landley
is the result of using the gnu _("ugh") internationalization macros... I've bookmarked this but probably won't have time to look at it before monday... Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson. _

Re: [Tinycc-devel] __GNUC__ and GLIBC header mess

2007-09-28 Thread Rob Landley
t; defined at all. Does the c99 spec say that undefined is < 2? (Probably, I'm a bit rushed just now, and likely to be out of touch this weekend. Visiting grandparents.) I'm guessing this is a glibc bug, but I don't know. Rob -- "One of my most productive days was th

Re: [Tinycc-devel] [PATCH] GNU __attribute__ extension handling with parenthesis

2007-09-28 Thread Rob Landley
> What do you all think? Should we start doing that, it could get really > noisy though. I think I can live with the noise of patches posted to a development mailing list. :) Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.

Re: [Tinycc-devel] Segmentation fault compiling jslong.c

2007-09-27 Thread Rob Landley
On Thursday 27 September 2007 7:01:29 pm Rob Landley wrote: > Anyway, bug #1 should be fixed, bug #3 I'm working on, and afterwards I can > tackle bug #2 and _then_ you should be able to compile jslong.c. :) I _think_ I just got bug #3 fixed. My brain is kind of fried right now tho

Re: [Tinycc-devel] [PATCH] GNU __attribute__ extension handling with parenthesis

2007-09-27 Thread Rob Landley
o more known bugs" isn't likely to happen any time soon, and I have so many pending patches to look through at this point I'm fairly certain I'm going to forget some when I go back to apply them. (The tiny amount of time I've stolen to work on this has focused on trackin

Re: [Tinycc-devel] Segmentation fault compiling jslong.c

2007-09-27 Thread Rob Landley
nyway, bug #1 should be fixed, bug #3 I'm working on, and afterwards I can tackle bug #2 and _then_ you should be able to compile jslong.c. :) (At least as far as the next bug...) Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson. __

Re: [Tinycc-devel] [PATCH] Preprocessor: ignore everything after #error or #warning

2007-09-26 Thread Rob Landley
On Wednesday 26 September 2007 2:52:27 am Dave Dodge wrote: > On Wed, Sep 26, 2007 at 01:23:32AM -0500, Rob Landley wrote: > > Hmmm... What about #warning as last line of the file with no newline at > > the end of the line? > > FWIW, the grammar for most preprocessing

Re: [Tinycc-devel] Segmentation fault compiling jslong.c

2007-09-26 Thread Rob Landley
On Wednesday 26 September 2007 2:44:25 am Dave Dodge wrote: > On Wed, Sep 26, 2007 at 12:11:58AM -0500, Rob Landley wrote: > > I realize that they want to restrict their relevance as much as > > possible, and thus have no _official_ version freely available on > > the web. &g

Re: [Tinycc-devel] [BUG] Nested array/struct/union initialization problem

2007-09-26 Thread Rob Landley
or it to do so. Then all the nocode_wanted tests can go away. Might waste a little ram at runtime, but it does that anyway, and something like that gives us the possibility of doing dead code elimination for if(0) intelligently yet revert to outputting code after the fact if there's a ju

Re: [Tinycc-devel] [PATCH] GNU __attribute__ extension handling with parenthesis

2007-09-26 Thread Rob Landley
void warn ( const char * format , ... ) >__attribute__ ( ( format ( printf , ( 1 ) , ( 2 ) ) ) ) ; > EOF I did a smaller version of this patch. Close enough? Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson. ___

Re: [Tinycc-devel] [PATCH] Preprocessor: ignore everything after #error or #warning

2007-09-25 Thread Rob Landley
lt; EOF > #if 0 > #warning This doesn't work > #endif > EOF > > tcc -c bug.c > bug3.c:4: missing terminating ' character > > gcc -c bug.c > > Marc Ah, good catch. Hmmm... What about #warning as last line of the file with no newline at the en

Re: [Tinycc-devel] Segmentation fault compiling jslong.c

2007-09-25 Thread Rob Landley
is has nothing to do with people who fail to get it that spectacularly. > -Dave Dodge Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] New fun bug! #include

2007-09-22 Thread Rob Landley
ile the code as C90 with GNU extensions. No > wonder it barfs about "restrict", as it is a C99 thing! > > Try with -std=c99. *shrug* Either way I applied a patch to ignore it which fixed the problem I actually saw. Rob --

Re: [Tinycc-devel] Segmentation fault compiling jslong.c

2007-09-22 Thread Rob Landley
On Friday 21 September 2007 6:36:57 pm Dave Dodge wrote: > On Fri, Sep 21, 2007 at 06:04:01PM -0500, Rob Landley wrote: > > I have a draft of the spec itself, in html format. > > BTW (this has probably been mentioned before) n1124 is a newer > freely-available draft, which is

Re: [Tinycc-devel] New fun bug! #include

2007-09-21 Thread Rob Landley
On Friday 21 September 2007 3:02:19 am Marc Andre Tanner wrote: > Rob Landley wrote: > > On Thursday 20 September 2007 4:00:33 pm Marc Andre Tanner wrote: > >> And since recent tcc sets __STDC_VERSION__ to 199901L __restrict_arr is > >> defined as restrict which cau

Re: [Tinycc-devel] Segmentation fault compiling jslong.c

2007-09-21 Thread Rob Landley
On Friday 21 September 2007 8:41:58 am Gregg Reynolds wrote: > > Seriously. It is a reference book on C written to complement K&R and > > has been used as such since the first edition in the eighties (predating > > the standard). > > Rob, you'd probably

Re: [Tinycc-devel] Segmentation fault compiling jslong.c

2007-09-21 Thread Rob Landley
On Friday 21 September 2007 4:23:11 am Dave Dodge wrote: > On Thu, Sep 20, 2007 at 11:38:11PM -0500, Rob Landley wrote: > > On Thursday 20 September 2007 9:35:05 pm Gregg Reynolds wrote: > > > On 9/20/07, Rob Landley <[EMAIL PROTECTED]> wrote: > > > > means is

Re: [Tinycc-devel] New fun bug! #include

2007-09-21 Thread Rob Landley
On Friday 21 September 2007 4:58:37 am Antti-Juhani Kaijanaho wrote: > On Fri, Sep 21, 2007 at 10:02:19AM +0200, Marc Andre Tanner wrote: > > Rob Landley wrote: > >> tcc knows how to handle restrict when it's applied in other contexts, > >> but in this context it s

  1   2   3   4   >