Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: nicoles@axp3.physik.fu-berlin.de (Ivonne Nicolescu)
Subject: Possible PROBLEM with the cc compiler
Date: Thu, 22 Dec 1994 12:54:50 GMT	[thread overview]
Message-ID: <JELVB8DN@math.fu-berlin.de> (raw)

I have a problem with the variable argument list
which don't work properly with cc but does it with gcc.
Example:
...
pr("s", "Test !");
...
void pr(char *fmt, ...)
{
    va_list val;
    char *ch;
 
    va_start(val, fmt);
    if (*fmt == 's')
    {
        ch = va_arg(val, char *);
        printf("\n %s ", ch);
    }
    va_end(val);
}

The string "Test !" is never printed and the pointer I get from
va_arg(val, char *) is NULL !
Any suggestion is welcome. Merry Christmas,
please answer to: toerring@omega.physik.fu-berlin.de    


                 reply	other threads:[~1994-12-22 12:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox