From: Kevin Hendricks <khendricks@ivey.uwo.ca>
To: Michael Schmitz <schmitz@opal.biophys.uni-duesseldorf.de>,
ian reinhart geiser <geiseri@msoe.edu>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Problems Compileing PVM
Date: Sun, 7 May 2000 14:28:09 -0400 [thread overview]
Message-ID: <00050714365900.05361@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.10.10005071634240.5834-100000@opal.biophys.uni-duesseldorf.de>
Hi,
On Sun, 07 May 2000, Michael Schmitz wrote:
> > __va_arg_type_violation
Franz once explained this error to me. It seems according to the ANSI C
standard va_arg can only be done with primary (promoted) types like integer,
double, etc. For any other type, a cast must be done to create proper ansi c.
gcc is going to barf on this on all platforms in the future, but right now it
does so only under optimization on ppc.
The solution is just to edit and code and make the correction(s).
Here are some code snippets to illustrate:
va_arg(args,boolean) becomes (boolean)va_arg(args, int)
va_arg(args,byte) becomes (byte)va_arg(args, int)
va_arg(args,char) becomes (char)va_arg(args, int)
va_arg(ags,short) becomes (short)va_arg(args, int)
va_arg(args,int) is okay since it is a primary (promoted) type
va_arg(args, long long) is okay since long long is a primary (promoted) type
va_arg(args,float) becomes (float)va_arg(args, double)
va_arg(args,double) is okay since it is a primary (promoted) type
I hope this helps.
Kevin
On Sun, 07 May 2000, Michael Schmitz wrote:
> > __va_arg_type_violation
> >
> > It looks like a linker error...
>
> No, it rather is a varargs usage error (illegal types used in va_arg()
> calls). Sloppy programming is the cause of this, most likely.
--
Kevin B. Hendricks
Associate Professor of Operations and Information Technology
Richard Ivey School of Business, University of Western Ontario
London, Ontario N6A-3K7 CANADA
khendricks@ivey.uwo.ca, (519) 661-3874, fax: 519-661-3959
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-05-07 18:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-06 22:14 Problems Compileing PVM ian reinhart geiser
2000-05-07 9:05 ` Andreas Tobler
2000-05-07 14:37 ` Michael Schmitz
2000-05-07 18:28 ` Kevin Hendricks [this message]
2000-05-08 9:35 ` Michael Schmitz
2000-05-08 12:56 ` Hendricks, Kevin
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=00050714365900.05361@localhost.localdomain \
--to=khendricks@ivey.uwo.ca \
--cc=geiseri@msoe.edu \
--cc=linuxppc-dev@lists.linuxppc.org \
--cc=schmitz@opal.biophys.uni-duesseldorf.de \
/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).