All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmenon@informix.com (Ram Menon)
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] gcc issue ?
Date: Tue, 12 Jun 2001 23:39:48 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005722@msgid-missing> (raw)

Hi,

Following program fails compilation on linux ia64 os, but works on 
other os's.

#include <stdarg.h>

main()
{

f(1, 'c', 10);
}

f(char a, ...)
{

int cval;
va_list     args;
va_start(args, a);

cval = va_arg(args, char);

}


[root@timba /root]# cc main.c -o main
main.c:10: warning: type mismatch with previous implicit declaration
main.c:6: warning: previous implicit declaration of `f'
main.c: In function `f':
main.c:16: `char' is promoted to `int' when passed through `...'
main.c:16: (so you should pass `int' not `char' to `va_arg')


Is va_arg(args, int) same as va_arg(args, char) for char arg ?.

thanks


             reply	other threads:[~2001-06-12 23:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-12 23:39 Ram Menon [this message]
2001-06-13  0:14 ` [Linux-ia64] gcc issue ? Jim Wilson

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=marc-linux-ia64-105590693005722@msgid-missing \
    --to=rmenon@informix.com \
    --cc=linux-ia64@vger.kernel.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.