Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1135

Re: SubC ported to Freebsd/armv6 (Raspi)

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!.POSTED!nerds-end
From alexfrunews@gmail.com
Newsgroups comp.compilers
Subject Re: SubC ported to Freebsd/armv6 (Raspi)
Date Thu, 6 Mar 2014 23:12:32 -0800 (PST)
Organization Compilers Central
Lines 32
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <14-03-013@comp.compilers> (permalink)
References <14-02-015@comp.compilers>
NNTP-Posting-Host news.iecc.com
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace miucha.iecc.com 1394197741 43875 64.57.183.58 (7 Mar 2014 13:09:01 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Fri, 7 Mar 2014 13:09:01 +0000 (UTC)
Keywords code
Posted-Date 07 Mar 2014 08:09:01 EST
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:1135

Show key headers only | View raw


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

Back to comp.compilers | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

SubC ported to Freebsd/armv6 (Raspi) "Nils M Holm" <nmh@t3x.org> - 2014-02-16 12:51 +0100
  Re: SubC ported to Freebsd/armv6 (Raspi) Kaz Kylheku <kaz@kylheku.com> - 2014-02-17 00:45 +0000
  Re: SubC ported to Freebsd/armv6 (Raspi) alexfrunews@gmail.com - 2014-03-06 23:12 -0800

csiph-web