Re: SubC ported to Freebsd/armv6 (Raspi)

"Nils M Holm" <nmh@t3x.org>
Fri, 7 Mar 2014 15:30:16 +0100

          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: "Nils M Holm" <nmh@t3x.org>
Newsgroups: comp.compilers
Date: Fri, 7 Mar 2014 15:30:16 +0100
Organization: Compilers Central
Keywords: tools, comment
Posted-Date: 09 Mar 2014 12:34:55 EDT

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]


Post a followup to this message

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