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


Groups > comp.compilers > #1136

Re: SubC ported to Freebsd/armv6 (Raspi)

From "Nils M Holm" <nmh@t3x.org>
Newsgroups comp.compilers
Subject Re: SubC ported to Freebsd/armv6 (Raspi)
Date 2014-03-07 15:30 +0100
Organization Compilers Central
Message-ID <14-03-014@comp.compilers> (permalink)

Show all headers | View raw


On Fri, 07 Mar 2014 08:12:32, alexfrunews@gmail.com wrote:
> 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.

I do not think it is an lvalue bug, because above function is part of
the SubC library, which is written in SubC and not in C99.

It does not even make sense to compile the SubC library with anything
but SubC, because SubC uses left-to-right calling conventions, so
_va_arg() would deliver variable arguments in the wrong order in C.
(Note that it uses `--' to advance to the next argument.)

--
Nils M Holm  < n m h @ t 3 x . o r g >  www.t3x.org
[Please send further discussion to the original author, and send
us a summary if the resolution is interesting. -John]

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


Thread

Re: SubC ported to Freebsd/armv6 (Raspi) "Nils M Holm" <nmh@t3x.org> - 2014-03-07 15:30 +0100

csiph-web