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


Groups > comp.compilers > #1136 > unrolled thread

Re: SubC ported to Freebsd/armv6 (Raspi)

Started by"Nils M Holm" <nmh@t3x.org>
First post2014-03-07 15:30 +0100
Last post2014-03-07 15:30 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.compilers


Contents

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

#1136 — Re: SubC ported to Freebsd/armv6 (Raspi)

From"Nils M Holm" <nmh@t3x.org>
Date2014-03-07 15:30 +0100
SubjectRe: 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]

[toc] | [standalone]


Back to top | Article view | comp.compilers


csiph-web