Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1136 > unrolled thread
| Started by | "Nils M Holm" <nmh@t3x.org> |
|---|---|
| First post | 2014-03-07 15:30 +0100 |
| Last post | 2014-03-07 15:30 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.compilers
Re: SubC ported to Freebsd/armv6 (Raspi) "Nils M Holm" <nmh@t3x.org> - 2014-03-07 15:30 +0100
| From | "Nils M Holm" <nmh@t3x.org> |
|---|---|
| Date | 2014-03-07 15:30 +0100 |
| Subject | Re: SubC ported to Freebsd/armv6 (Raspi) |
| Message-ID | <14-03-014@comp.compilers> |
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 top | Article view | comp.compilers
csiph-web