Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Bernard Fouche
Tue, 29 Sep 1992 11:21
Trouble using GCC 1.40 and stdarg.h
Author: Bernard Fouche
Date: Tue, 29 Sep 1992 11:21
Date: Tue, 29 Sep 1992 11:21
85 lines
2438 bytes
2438 bytes
Hi.
I have a file named try.c :
#include <stdarg.h>
void func(char *fmt,...)
{
va_list pa;
va_start(pa,fmt);
va_end(pa);
}
if I do :
/tmp(!)$ gcc -ansi try.c -c
I have :
try.c: In function func:
try.c:6: parse error before `...'
Everything is okay if I use "cc -Xc" instead of gcc. I'm running Dell
Unix (System V, Release 4.0). Uname -a gives :
cpio1 cpio1 4.0 3.0 EISA i386
Here is /usr/include/stdarg.h provided with my system :
/* Copyright (c) 1990 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _STDARG_H
#define _STDARG_H
#ident "@(#)head:stdarg.h 1.8"
#if defined(__STDC__)
#ifndef _VA_LIST
#define _VA_LIST
typedef void *va_list;
#endif
#if __STDC__ != 0 /* -Xc compilation */
#define va_start(list, name) (void) (list = \
(void *)((char *)&name + ((sizeof(name)+(sizeof(int)-1)) & ~(sizeof(int)-1))))
#else
#define va_start(list, name) (void) (list = (void *)((char *)&...))
#endif /* != 0 */
#if u370
#define va_arg(list, mode) ((mode *)(list = \
(char *) ((int)list + 2*sizeof(mode) - 1 & -sizeof(mode))))[-1]
#else
#define va_arg(list, mode) ((mode *)(list = (char *)list + sizeof(mode)))[-1]
#endif /* u370 */
extern void va_end(va_list);
#define va_end(list) (void)0
#else /* not __STDC__ */
#include <varargs.h>
#endif /* __STDC__ */
#endif /* _STDARG_H */
Any idea ? Hope it helps you !
Thank you!
--------------------------------------------------------------------------
Bernard Fouche VOX : +(33) (1) 48.04.56.30 FAX : (33) (1) 48.04.98.95
Email : bernard@cpio1.fr.mugnet.org
Postal Mail : CPIO S.A., 13-15 Rue de la Verrerie, 75004 Paris, France
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads