X-Received: by 10.58.160.202 with SMTP id xm10mr7215502veb.16.1394382902281; Sun, 09 Mar 2014 09:35:02 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!w5no2823289qac.0!news-out.google.com!bw18ni7632qab.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: "Nils M Holm" Newsgroups: comp.compilers Subject: Re: SubC ported to Freebsd/armv6 (Raspi) Date: Fri, 7 Mar 2014 15:30:16 +0100 Organization: Compilers Central Lines: 21 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-03-014@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 X-Trace: miucha.iecc.com 1394382895 76742 64.57.183.58 (9 Mar 2014 16:34:55 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sun, 9 Mar 2014 16:34:55 +0000 (UTC) Keywords: tools, comment Posted-Date: 09 Mar 2014 12:34:55 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Content-Type: text/plain; charset=us-ascii Xref: csiph.com comp.compilers:1136 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]