linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hendricks <khendricks@ivey.uwo.ca>
To: Jason Kim <jwk2@eecs.lehigh.edu>,
	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, 1 Dec 1999 14:41:05 -0500	[thread overview]
Message-ID: <99120114490800.04790@localhost.localdomain> (raw)
In-Reply-To: <384574A2.A003F5F6@eecs.lehigh.edu>


Hi,

My 2 cents.

> 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.

va_lists are used heavily in the jdk and pointers to va_lists are passed in
routines.   I had to track down each and every time a pointer into a va_list was
passed as a parameter to another routine and fix each one.  So there needed to
be ppc specific code if def'd into the Sun source code  in mutliple places which
otherwise worked as is on every other platform including sparc, x86, m68k, etc.

This is over and above using va_copy or memcpy trickery as required for the
jdk.

And the worst part about debugging all of this is that the code which
worked for all other platforms simply failed quietly on ppc.  So when debugging
a large source code base which you did not write and seems to be portable
across a number of other platforms, silent failures are nasty (unless you
luckily got a seg-fault).

The problem would just get worse with multiple indirection.

If there is any way to change this without beaking backward compatibility with
pre-compiled shared libs and things, I would vote for it.

Comments?

Kevin


> 
> 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/

  reply	other threads:[~1999-12-01 19:41 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
1999-12-01 19:41         ` Kevin Hendricks [this message]
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=99120114490800.04790@localhost.localdomain \
    --to=khendricks@ivey.uwo.ca \
    --cc=Franz.Sirl-kernel@lauterbach.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwk2@eecs.lehigh.edu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).