Re: SubC ported to Freebsd/armv6 (Raspi)

alexfrunews@gmail.com
Thu, 6 Mar 2014 23:12:32 -0800 (PST)

          From comp.compilers

Related articles
SubC ported to Freebsd/armv6 (Raspi) nmh@t3x.org (Nils M Holm) (2014-02-16)
Re: SubC ported to Freebsd/armv6 (Raspi) kaz@kylheku.com (Kaz Kylheku) (2014-02-17)
Re: SubC ported to Freebsd/armv6 (Raspi) alexfrunews@gmail.com (2014-03-06)
Re: SubC ported to Freebsd/armv6 (Raspi) nmh@t3x.org (Nils M Holm) (2014-03-07)
| List of all articles for this month |

From: alexfrunews@gmail.com
Newsgroups: comp.compilers
Date: Thu, 6 Mar 2014 23:12:32 -0800 (PST)
Organization: Compilers Central
References: 14-02-015
Keywords: code
Posted-Date: 07 Mar 2014 08:09:01 EST

On Sunday, February 16, 2014 3:51:02 AM UTC-8, Nils M Holm wrote:
> SubC is a fast and simple compiler for a clean subset of the
> C programming language. Its code is in the public domain. It
> can compile itself and passes gcc -Wall -pedantic.
>
> SubC generates small, statically linked executables (Hello World
> using printf() is less than 10 KB in size on a 386-based machine).
>
> I have recently retargeted the compiler to the armv6 processor
> and added runtime support for FreeBSD/arm, so if you are looking
> for a small and fast C subset compiler for the Raspi, feel free
> to give it a try! :-)
>
> If you intend to port the crt0 module to Linux, feel free to
> ask for assistance!


Good job. You may be interested in my Smaller C:
https://github.com/alexfru/SmallerC


Btw, it looks like you've got an lvalue bug here:


void *_va_arg(void **ap) {
return * ((void **) *ap)--;
}


The result of a cast is an rvalue and not an lvalue. -- requires an lvalue.


http://ideone.com/EGih2s (gcc C99 "strict" mode)


It may be worth upping the warning level.


Alex


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.