From: Jason Kim <jwk2@eecs.lehigh.edu>
To: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>,
"linuxppc-dev@lists.linuxppc.org"
<linuxppc-dev@lists.linuxppc.org>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: patch for problem with va-ppc.h included with egcs and gcc-2.95.2
Date: Wed, 01 Dec 1999 14:18:58 -0500 [thread overview]
Message-ID: <384574A2.A003F5F6@eecs.lehigh.edu> (raw)
In-Reply-To: 4.2.2.19991201162019.03c111b0@mail.lauterbach.com
Franz Sirl wrote:
>
> At 00:28 01.12.99 , Jason Kim wrote:
> >Also, in the ANSI C (9x) documentation (``n843''), taking the address of a
> >va_list is NOT listed as one of the things that will produce an undefined
> >result. Actually, on page 7.15 (pg246 as seen by acroread), footnote item 198
> >specifically states ``It is permitted to create a pointer to a va_list and
> >pass that pointer to another function,.. in which case the original list may
> >make further use of the original list after the other function returns.''
>
> Well, I see this is also in ISO C9x, but unless the standard restricts the
> possible types for va_list (I can't find anything about that), you have
> still to be aware that any callee gets a reference to the va_list if
> va_list is an array and so the usual array handling rules apply, or?
>
This is getting rather silly. So for a coder to use a set of macros
which were standardized for encapsulating portability issues, he has
to develop another set of macros to get past this
C-array-passed-as-pointer ``feature'' to even pretend to have portable
code?
What about double indirection? or triple, for that matter?
Not to mention implementing va_list this way explicitly breaks compatibility
between gcc on ppc and gcc on SPARC, x86, clipper, alpha... etc.. You name it.
Its broken.
Does this make any sense?
Having a fixed size array as a user accessible item (which is TYPEDEF'ed to
resemble a structure, no less) which could be passed around is just a BAD idea
in C/C++. I have yet to hear any concrete reasons (besides just plain
obstinacy) why va_list HAS to be implemented this way.
-jason.
> Franz.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~1999-12-01 19:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-30 6:00 patch for problem with va-ppc.h included with egcs and gcc-2.95.2 Jason Kim
1999-11-30 10:58 ` Franz Sirl
1999-11-30 18:05 ` Jason Kim
1999-11-30 23:28 ` Jason Kim
1999-12-01 15:33 ` Franz Sirl
1999-12-01 19:18 ` Jason Kim [this message]
1999-12-01 19:41 ` Kevin Hendricks
1999-12-02 5:20 ` Jason Kim
1999-12-02 7:15 ` Richard Henderson
1999-12-02 7:27 ` Kevin Buettner
1999-12-02 16:15 ` Jason Kim
1999-12-01 19:43 ` David A. Gatwood
1999-12-02 2:04 ` Jason Kim
-- strict thread matches above, loose matches on Subject: below --
1999-11-29 21:03 Jason Kim
1999-11-29 22:45 ` Franz Sirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=384574A2.A003F5F6@eecs.lehigh.edu \
--to=jwk2@eecs.lehigh.edu \
--cc=Franz.Sirl-kernel@lauterbach.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.