Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Possible PROBLEM with the cc compiler
@ 1994-12-22 12:54 Ivonne Nicolescu
  0 siblings, 0 replies; only message in thread
From: Ivonne Nicolescu @ 1994-12-22 12:54 UTC (permalink / 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    


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1994-12-22 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-12-22 12:54 Possible PROBLEM with the cc compiler Ivonne Nicolescu

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