public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* varargs problem in egcs 1.03 on sparc Solaris 2.5
@ 1998-08-18  2:23 Piotr Nestorow
  1998-08-18 18:14 ` Jeffrey A Law
  0 siblings, 1 reply; 4+ messages in thread
From: Piotr Nestorow @ 1998-08-18  2:23 UTC (permalink / raw)
  To: egcs-bugs

Hi,

I have a varargs problem with egcs 1.03 on sparc Solaris 2.5.
Is this known?
Is there a solution?

Please answer also directly to Piotr.Nestorow@telelogic.se. I don't read
egcs-bugs@cygnus.com.

Regards
Piotr Nestorow


gcc -v -Wall -I. -I/view/ba_pong/vobs/tools/cocktail/solaris/include -I/view/ba_pong/vobs/sdt/alfa/canalyser/access  -c semerr.c -o semerr.o
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/cpp -lang-c -v -I. -I/view/ba_pong/vobs/tools/cocktail/solaris/include -I/view/ba_pong/vobs/sdt/alfa/canalyser/access -undef -D__GNUC__=2 -D__GNUC_MINOR__=90 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -Wall -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) semerr.c /var/tmp/cca003ZW.i
GNU CPP version egcs-2.90.29 980515 (egcs-1.0.3 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 .
 /view/ba_pong/vobs/tools/cocktail/solaris/include
 /view/ba_pong/vobs/sdt/alfa/canalyser/access
 /usr/local/include
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/cc1 /var/tmp/cca003ZW.i -quiet -dumpbase semerr.c -Wall -version -o /var/tmp/cca003ZW.s
GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release) (sparc-sun-solaris2.5.1) compiled by GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release).
semerr.c: In function `schk_InternalError':
semerr.c:441: `__builtin_va_alist' undeclared (first use this function)
semerr.c:441: (Each undeclared identifier is reported only once
semerr.c:441: for each function it appears in.)
semerr.c: In function `schk_PrintMsg':
semerr.c:510: `__builtin_va_alist' undeclared (first use this function)
semerr.c: In function `schk_Error':
semerr.c:568: `__builtin_va_alist' undeclared (first use this function)
semerr.c:572: warning: implicit declaration of function `__builtin_va_arg_incr'


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: varargs problem in egcs 1.03 on sparc Solaris 2.5
  1998-08-18  2:23 varargs problem in egcs 1.03 on sparc Solaris 2.5 Piotr Nestorow
@ 1998-08-18 18:14 ` Jeffrey A Law
  1998-08-19  4:40   ` Piotr Nestorow
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey A Law @ 1998-08-18 18:14 UTC (permalink / raw)
  To: Piotr Nestorow; +Cc: egcs-bugs

  In message < m0z8hyS-000051C@blue.telelogic.se >you write:
  > Hi,
  > 
  > I have a varargs problem with egcs 1.03 on sparc Solaris 2.5.
  > Is this known?
  > Is there a solution?
  > 
  > Please answer also directly to Piotr.Nestorow@telelogic.se. I don't read
  > egcs-bugs@cygnus.com.
  > 
  > Regards
  > Piotr Nestorow
  > 
  > 
  > gcc -v -Wall -I. -I/view/ba_pong/vobs/tools/cocktail/solaris/include -I/vie
  > w/ba_pong/vobs/sdt/alfa/canalyser/access  -c semerr.c -o semerr.o
  > Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.
  > 29/specs
  > gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
  >  /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/cpp -lang-c -v 
  > -I. -I/view/ba_pong/vobs/tools/cocktail/solaris/include -I/view/ba_pong/vob
  > s/sdt/alfa/canalyser/access -undef -D__GNUC__=2 -D__GNUC_MINOR__=90 -Dsparc
  >  -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4
  > __ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -Wall 
  > -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) semerr.c /var/tmp/cca00
  > 3ZW.i
  > GNU CPP version egcs-2.90.29 980515 (egcs-1.0.3 release) (sparc)
  > #include "..." search starts here:
  > #include <...> search starts here:
  >  .
  >  /view/ba_pong/vobs/tools/cocktail/solaris/include
  >  /view/ba_pong/vobs/sdt/alfa/canalyser/access
  >  /usr/local/include
Make sure there is not file called stdarg.h or varargs.h in any of those
four directories.

jeff


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: varargs problem in egcs 1.03 on sparc Solaris 2.5
  1998-08-18 18:14 ` Jeffrey A Law
@ 1998-08-19  4:40   ` Piotr Nestorow
  1998-08-30 22:35     ` Jeffrey A Law
  0 siblings, 1 reply; 4+ messages in thread
From: Piotr Nestorow @ 1998-08-19  4:40 UTC (permalink / raw)
  To: law; +Cc: Piotr.Nestorow, egcs-bugs

Hi Jeff,
  >  .
  >  /view/ba_pong/vobs/tools/cocktail/solaris/include
  >  /view/ba_pong/vobs/sdt/alfa/canalyser/access
  >  /usr/local/include
> Make sure there is not file called stdarg.h or varargs.h in any of those
> four directories.
> 
> jeff

There are none.

Here is the file after cpp. There is 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdarg.h
which is a copy of /usr/include/stdarg.h with some small fixes done
with fixincludes while installing.

egcc -v -Wall -I. -I/view/ba_pong/vobs/tools/cocktail/solaris/include -I/view/ba_pong/vobs/sdt/alfa/canalyser/access  -c semerr.c -E|egrep -v '^[ 	]*$'
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/cpp -lang-c -v -I. -I/view/ba_pong/vobs/tools/cocktail/solaris/include -I/view/ba_pong/vobs/sdt/alfa/canalyser/access -undef -D__GNUC__=2 -D__GNUC_MINOR__=90 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -Wall -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) semerr.c
GNU CPP version egcs-2.90.29 980515 (egcs-1.0.3 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
 .
 /view/ba_pong/vobs/tools/cocktail/solaris/include
 /view/ba_pong/vobs/sdt/alfa/canalyser/access
 /usr/local/include
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include
 /usr/include
End of search list.
# 1 "semerr.c"
# 1 "semerr.h" 1
# 1 "/view/ba_pong/vobs/sdt/alfa/canalyser/access/ExtPosition.h" 1
# 1 "/view/ba_pong/vobs/sdt/alfa/canalyser/access/StringSet.h" 1
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 1 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdarg.h" 1 3
#pragma ident	"@(#)stdarg.h	1.11	94/01/05 SMI"	
typedef void *va_list;
# 57 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdarg.h" 3
extern void va_end(va_list);
# 2 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 2 3
#pragma ident	"@(#)stdio.h	1.37	95/08/29 SMI"	
# 1 "/usr/include/sys/feature_tests.h" 1 3
#pragma ident	"@(#)feature_tests.h	1.7	94/12/06 SMI"
# 19 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 2 3
typedef unsigned int	size_t;
typedef long	fpos_t;
		
typedef struct	 
{
	int		_cnt;	 
	unsigned char	*_ptr;	 
	unsigned char	*_base;	 
	unsigned char	_flag;	 
	unsigned char	_file;	 
} FILE;
extern FILE		__iob[20 ];
extern FILE		*_lastbuf;
extern unsigned char	*_bufendtab[];
extern unsigned char	 _sibuf[], _sobuf[];
extern int	remove(const char *);
extern int	rename(const char *, const char *);
extern FILE	*tmpfile(void);
extern char	*tmpnam(char *);
extern int	fclose(FILE *);
extern int	fflush(FILE *);
extern FILE	*fopen(const char *, const char *);
extern FILE	*freopen(const char *, const char *, FILE *);
extern void	setbuf(FILE *, char *);
extern int	setvbuf(FILE *, char *, int, size_t);
extern int	fprintf(FILE *, const char *, ...);
extern int	fscanf(FILE *, const char *, ...);
extern int	printf(const char *, ...);
extern int	scanf(const char *, ...);
extern int	sprintf(char *, const char *, ...);
extern int	sscanf(const char *, const char *, ...);
extern int	vfprintf(FILE *, const char *, void *);
extern int	vprintf(const char *, void *);
extern int	vsprintf(char *, const char *, void *);
extern int	fgetc(FILE *);
extern char	*fgets(char *, int, FILE *);
extern int	fputc(int, FILE *);
extern int	fputs(const char *, FILE *);
extern int	getc(FILE *);
extern int	getchar(void);
extern char	*gets(char *);
extern int	putc(int, FILE *);
extern int	putchar(int);
extern int	puts(const char *);
extern int	ungetc(int, FILE *);
extern size_t	fread(void *, size_t, size_t, FILE *);
extern size_t	fwrite(const void *, size_t, size_t, FILE *);
extern int	fgetpos(FILE *, fpos_t *);
extern int	fseek(FILE *, long, int);
extern int	fsetpos(FILE *, const fpos_t *);
extern long	ftell(FILE *);
extern void	rewind(FILE *);
extern void	clearerr(FILE *);
extern int	feof(FILE *);
extern int	ferror(FILE *);
extern void	perror(const char *);
extern int	__filbuf(FILE *);
extern int	__flsbuf(int, FILE *);
# 235 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 3
# 255 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 3
# 339 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 3
# 393 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 3
# 38 "/view/ba_pong/vobs/sdt/alfa/canalyser/access/StringSet.h" 2
typedef struct tStrintSetEntry
{
  char             *str;
  int               map;
}
tStringSetEntry, *tpStringSetEntry;
typedef struct tStringSet
{
  tpStringSetEntry  table;
  short             size;
  short             alloc;
}
tStringSet, *tpStringSet;
extern void StringSetInitialize (void);
extern void StringSetFinalize (void);
extern void  InitStringSet (tpStringSet set);
extern void  FreeStringSet (tpStringSet set);
extern void  ResetStringSet (tpStringSet set);
extern char *SelectFromStringSet (tpStringSet set, int id);
extern int   GetStringSetMapping (tpStringSet set, int id);
extern int   AddToStringSet (tpStringSet set, char *str);
extern void  WriteStringSet (tpStringSet set, FILE *file);
extern void  ReadStringSet  (tpStringSet set, FILE *file);
extern void  PutStringSet   (tpStringSet set, FILE *file);
extern void  GetStringSet   (tpStringSet set, FILE *file);
# 39 "/view/ba_pong/vobs/sdt/alfa/canalyser/access/ExtPosition.h" 2
# 1 "/view/ba_pong/vobs/tools/cocktail/solaris/include/StringM.h" 1
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 1 3
# 401 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 3
# 65 "/view/ba_pong/vobs/tools/cocktail/solaris/include/StringM.h" 2
# 1 "/view/ba_pong/vobs/tools/cocktail/solaris/include/ratc.h" 1
typedef char * tString;
# 66 "/view/ba_pong/vobs/tools/cocktail/solaris/include/StringM.h" 2
typedef unsigned short * tStringRef;
extern	tStringRef PutString	 (register char * yys,
				       register unsigned long yylength)  ;
			 
			 
extern	void	StGetString	 (register tStringRef yyr,
				       register char * yys)  ;
			 
			 
			 
			 
			 
			 
extern	char 	IsEqualSt	 (tStringRef yyr, register char * yys)  ;
			 
			 
			 
			 
			 
extern	void	WriteString	 (FILE * yyf, tStringRef yyr)  ;
			 
			 
extern	void	WriteStringMemory  (void)  ;
			 
			 
extern	void	InitStringMemory  (void)  ;
			 
extern	void	CloseStringMemory  (void)  ;
			 
# 40 "/view/ba_pong/vobs/sdt/alfa/canalyser/access/ExtPosition.h" 2
typedef short tExtPosName;
typedef struct tShortPosition
{
  unsigned int      Line;
  unsigned int      Column;
}
tShortPosition, *tpShortPosition;
typedef struct tObjCoord
{
  int               x;
  int               y;
}
tObjCoord, *tpObjCoord;
typedef enum
{
  SDT_GRRef,
  SDT_textRef,
  SDT_MSCRef,
  SDT_maxRef
}
tSDTRefType;
typedef struct tSDTRef
{
  unsigned int      hasPage     : 1;
  unsigned int      hasObjId    : 1;
  unsigned int      hasObjCoord : 1;
  unsigned int      hasSymPos   : 1;
  unsigned int      type        : 4;
  tExtPosName       file;
  tExtPosName       page;
  unsigned int      objId;
  tObjCoord         objCoord;
  tShortPosition    symPos;
}
tSDTRef, *tpSDTRef;
typedef struct tSpecComment
{
  tExtPosName       name;
  unsigned int      hasBody;
  tString           body;
}
tSpecComment, *tpSpecComment;
typedef struct tSpecCommSet
{
  int               size;
  tpSpecComment     vec;
}
tSpecCommSet, *tpSpecCommSet;
typedef struct tExtPosition
{
  unsigned int      hasSDTRef   : 1;
  unsigned int      hasComment  : 1;
  unsigned int      hasSpecComm : 1;
  tShortPosition    pos;
  tExtPosName       file;
  tSDTRef           SDTRef;
  tString           comment;
  tpSpecCommSet     specComm;
}
tExtPosition, *tpExtPosition;
extern tExtPosition NoExtPosition; 
extern void ExtPosInitialize (void);
extern void ExtPosFinalize (void);
extern void ExtPosReset (void);
extern void FreeExtPosition (tpExtPosition pos);
extern void WriteExtPosition (FILE *file, tpExtPosition pos);
extern void ReadExtPosition (FILE *file, tpExtPosition pos);
extern void PutExtPosition (FILE *file, tpExtPosition pos);
extern void GetExtPosition (FILE *file, tpExtPosition pos);
extern tExtPosName MakeExtPosFileName (tString fileName);
extern tExtPosName MakeExtPosPageName (char *pageName);
extern tExtPosName MakeExtPosSpecName (char *specName);
extern tString GetExtPosFileName (tExtPosName fileId);
extern tString GetExtPosPageName (tExtPosName pageId);
extern tString GetExtPosSpecName (tExtPosName specId);
extern void WriteExtPosTables (FILE *file);
extern void ReadExtPosTables (FILE *file);
extern void PutExtPosTables (FILE *file);
extern void GetExtPosTables (FILE *file);
# 18 "semerr.h" 2
enum {
  ERR_optGraphScope,
  ERR_terminatorGraphScope,
  ERR_joinStmtLabelUnit,
  ERR_nextStmtStateUnit,
  ERR_targetLabelNotFound,
  ERR_targetTypeNotMatch,
  ERR_targetNotMatch,
  ERR_nonMatchingTypeScope,
  ERR_missingStateInGraphScope,
  ERR_extraStateInGraphScope,
  ERR_duplicateStateInGraphScope,
  ERR_missingStateFromTypeScope,
  ERR_typeState,
  ERR_missingLabelInGraphScope,
  ERR_extraLabelInGraphScope,
  ERR_duplicateLabelInGraphScope,
  ERR_differentLabelTrans,
  ERR_invalidLabelUnitKind,
  ERR_missingStartInGraphScope,
  ERR_extraStartInGraphScope,
  ERR_duplicateStartInGraphScope,
  ERR_differentStartVirtuality,
  ERR_differentStartTransition,
  ERR_missingStartFromTypeScope,
  ERR_missingStartInTypeScope,
  ERR_nonMatchingTypeStart,
  ERR_missingStimulusInGraphScope,
  ERR_extraStimulusInGraphScope,
  ERR_duplicateStimulusInGraphScope,
  ERR_stimulusUnitContinuous,
  ERR_differentStimulusVirtuality,
  ERR_missingStimulusInTypeScope,
  ERR_missingStimulusFromTypeScope,
  ERR_missingSignalInTypeScope,
  ERR_missingSignalFromTypeScope,
  ERR_missingSignalInGraphScope, 
  ERR_extraSignalInGraphScope,
  ERR_duplicateSignalInGraphScope,
  ERR_stimulusUnitKind,
  ERR_stimulusDefChoice,
  ERR_labelScopeDef,
  ERR_noDefNode,
  ERR_noScopeNode,
  ERR_defNodeEquality,
  ERR_defNameEquality,
  ERR_defEntityEquality,
  ERR_scopeNodeEquality,
  ERR_referenceScopeNode,
  ERR_remoteDefEquality,
  ERR_invalidOperatorName,
  ERR_differentRangeOperator,
  ERR_noSelfInScope,
  ERR_differentScopeSelf,
  ERR_scopeDefListBackRef,
  ERR_scopeSelfNameEquality,
  ERR_scopeSelfEntityEquality,
  ERR_scopeSelfTypeEquality,
  ERR_scopeNextEquality,
  ERR_invalidNodeInDef,
  ERR_defNodeBackRef,
  ERR_defScopeSelf,
  ERR_missingDefInScope,
  ERR_defTypeEquality,
  ERR_invalidUseItem,
  ERR_duplicateUseItem,
  ERR_invalidFlowUnitRefersDef,
  ERR_missingDefInFlowUnitList,
  ERR_missingFlowItemInScope,
  ERR_duplicateFlowUnitItem,
  ERR_maxError
};
extern char *schk_errFile;
extern int   schk_errLine;
extern int   schk_printErrFileName;
extern FILE *schk_outFile;
extern int  schk_Error (int code, tpExtPosition pos, ...);
extern int  schk_DisableError (char *idx);
extern void schk_InternalError (char *fmt, ...);
extern void schk_err_Initialize (void);
extern void schk_err_Finalize (void);
# 15 "semerr.c" 2
# 1 "/view/ba_pong/vobs/tools/cocktail/solaris/include/Errors.h" 1
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 1 3
# 401 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 3
# 52 "/view/ba_pong/vobs/tools/cocktail/solaris/include/Errors.h" 2
# 1 "/view/ba_pong/vobs/tools/cocktail/solaris/include/Position.h" 1
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 1 3
# 401 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdio.h" 3
# 35 "/view/ba_pong/vobs/tools/cocktail/solaris/include/Position.h" 2
   typedef struct { unsigned long	Line;
   		    unsigned short	Column; } tPosition;
extern tPosition NoPosition;
			 
extern int	Compare		 (tPosition yyPosition1, tPosition yyPosition2)  ;
			 
			 
			 
extern void	WritePosition	 (FILE * yyFile, tPosition yyPosition)  ;
			 
extern void	ReadPosition	 (FILE * yyFile, tPosition * yyPosition)  ;
			 
extern char *	FormatPosition	 (char * yyString, tPosition yyPosition)  ;
		 
		 
		 
# 54 "/view/ba_pong/vobs/tools/cocktail/solaris/include/Errors.h" 2
extern void (* Errors_Exit)  (void)  ;
			 
			 
			 
extern void BeginErrors	   (void)  ;
			 
extern void StoreMessages  (char  yyStore)  ;
			 
			 
			 
			 
extern void ErrorMessage   (long yyErrorCode, int yyErrorClass,
				tPosition yyPosition)  ;
			 
			 
extern void ErrorMessageI  (long yyErrorCode, int yyErrorClass,
				tPosition yyPosition, int yyInfoClass,
				char * yyInfo)  ;
			 
			 
			 
extern void Message	   (char * yyErrorText, int yyErrorClass,
				tPosition yyPosition)  ;
			 
			 
extern void MessageI	   (char * yyErrorText, int yyErrorClass,
				tPosition yyPosition, int yyInfoClass,
				char * yyInfo)  ;
			 
			 
			 
extern void WriteMessages  (FILE * yyFile)  ;
			 
			 
extern int  GetCount	   (int yyErrorClass)  ;
   			 
			 
# 17 "semerr.c" 2
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdlib.h" 1 3
#pragma ident	"@(#)stdlib.h	1.27	95/08/28 SMI"	
typedef	struct {
	int	quot;
	int	rem;
} div_t;
typedef struct {
	long	quot;
	long	rem;
} ldiv_t;
# 50 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdlib.h" 3
typedef long	uid_t;
typedef long int wchar_t;
extern unsigned char	__ctype[];
extern double atof(const char *);
extern int atoi(const char *);
extern long int atol(const char *);
extern double strtod(const char *, char **);
extern long int strtol(const char *, char **, int);
extern unsigned long int strtoul(const char *, char **, int);
extern int rand(void);
extern void srand(unsigned int);
extern void *calloc(size_t, size_t);
extern void free(void *);
extern void *malloc(size_t);
extern void *realloc(void *, size_t);
extern void abort(void);
extern int atexit(void (*)(void));
extern void exit(int);
extern char *getenv(const char *);
extern int system(const char *);
extern void *bsearch(const void *, const void *, size_t, size_t,
	int (*)(const void *, const void *));
extern void qsort(void *, size_t, size_t,
	int (*)(const void *, const void *));
extern int abs(int);
extern div_t div(int, int);
extern long int labs(long);
extern ldiv_t ldiv(long, long);
extern int mbtowc(wchar_t *, const char *, size_t);
extern int mblen(const char *, size_t);
extern int wctomb(char *, wchar_t);
extern size_t mbstowcs(wchar_t *, const char *, size_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
# 140 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdlib.h" 3
# 189 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdlib.h" 3
# 288 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdlib.h" 3
# 20 "semerr.c" 2
typedef enum
{
  EC_error,
  EC_warning,
  EC_info,
  EC_maxClass
}
teErrorClass;
typedef struct tErrorInfo
{
  int           index;
  teErrorClass  class;
  char         *number;
  char         *text;
  char         *infoText;
  int           isDisabled;
}
tErrorInfo, *tpErrorInfo;
char *schk_errFile;
int schk_errLine;
int schk_printErrFileName = 1;
FILE *schk_outFile = (&__iob[2]) ;
static int schk_err_initCount = 0;
static char *className[EC_maxClass] =
{
  "Error",
  "Warning",
  "Information"
};
static tErrorInfo errTable[] =
{
  { ERR_optGraphScope,
    EC_error, "1.0.1.a",
    "Invalid NoGraph/NoGraphScope choice",
    0  },
  { ERR_terminatorGraphScope,
    EC_error, "1.0.2.a",
    "Invalid referenced statement graph scope",
    0  },
  { ERR_joinStmtLabelUnit,
    EC_error, "1.0.3.a",
    "Different names in join statement and in label unit",
    0  },
  { ERR_nextStmtStateUnit,
    EC_error, "1.0.4.a",
    "Different names in next state statement and in state unit",
    0  },
  { ERR_targetLabelNotFound,
    EC_error, "1.0.5.a",
    "Cannot find break/continue target in the tree",
    0  },
  { ERR_targetTypeNotMatch,
    EC_error, "1.0.5.b",
    "%s allocated instead of %s",
    0  },
  { ERR_targetNotMatch,
    EC_error, "1.0.5.c",
    "Invalid transition/statement in the Target node",
    "Transition/statement given in the Target node" },
  { ERR_nonMatchingTypeScope,
    EC_error,
    "1.1.b", "TypeScope of graph scope doesn't point to graph super-type",
    "TypeScope given in the graph scope" },
  { ERR_missingStateInGraphScope,
    EC_error, "1.2.a",
    "Missing state unit \'%s\' in graphscope",
    0  },
  { ERR_extraStateInGraphScope,
    EC_error, "1.2.b",
    "Extra state unit \'%s\' in graphscope",
    0  },
  { ERR_duplicateStateInGraphScope,
    EC_error, "1.2.c",
    "Duplicate state unit \'%s\' in graphscope",
    0  },
  { ERR_missingStateFromTypeScope,
    EC_error, "1.2.d",
    "State unit \'%s\' from type scope is missing",
    0  },
  { ERR_typeState,
    EC_error, "1.2.e",
    "Inherited state unit \'%s\' has invalid TypeState",
    0  },
  { ERR_missingLabelInGraphScope,
    EC_error, "1.3.a",
    "Missing label unit \'%s\' in %s",
    0  },
  { ERR_extraLabelInGraphScope,
    EC_error, "1.3.b",
    "Extra label unit \'%s\' in %s",
    "Transition given in LabelUnit" },
  { ERR_duplicateLabelInGraphScope,
    EC_error, "1.3.c",
    "Duplicate label unit \'%s\' in %s",
    "Transition given in LabelUnit" },
  { ERR_differentLabelTrans,
    EC_error, "1.3.d",
    "The transition of LabelUnit \'%s\' doesn't match source",
    "Transition given in LabelUnit" },
  { ERR_invalidLabelUnitKind,
    EC_error, "1.3.e",
    "\'%s\' was allocated for label \'%s\' instead of \'%s\'",
    0  },
  { ERR_missingStartInGraphScope, 
    EC_error, "1.4.a",
    "Missing start state unit in graphscope",
    0  },
  { ERR_extraStartInGraphScope,
    EC_error, "1.4.b",
    "Extra start state unit in graphscope",
    "Transition given in StartStateUnit" },
  { ERR_duplicateStartInGraphScope, 
    EC_error, "1.4.c",
    "Duplicate start state unit in graphscope",
    "Transition given in StartStateUnit" },
  { ERR_differentStartVirtuality,
    EC_error, "1.4.d",
    "Start state unit has virtuality \'%s\' instead of \'%s\'",
    0  },
  { ERR_differentStartTransition,
    EC_error, "1.4.e",
    "Different start state transition",
    "Transition given in StartStateUnit" },
  { ERR_missingStartFromTypeScope,
    EC_error, "1.4.f",
    "No inherited start state unit",
    0  },
  { ERR_missingStartInTypeScope,
    EC_error, "1.4.g",
    "No prototype for start state unit in TypeScope",
    0  },
  { ERR_nonMatchingTypeStart,
    EC_error, "1.4.h",
    "Start state unit transition cannot differ from that in TypeScope",
    "Start state unit transition given in TypeScope" },
  { ERR_missingStimulusInGraphScope,
    EC_error, "1.5.a",
    "Missing %s unit in state \'%s\'",
    0  },
  { ERR_extraStimulusInGraphScope,
    EC_error, "1.5.b",
    "Extra %s unit in state \'%s\'",
    "Stimulus given in the StimulusUnit" },
  { ERR_duplicateStimulusInGraphScope,
    EC_error, "1.5.c",
    "Duplcate %s unit in state \'%s\'",
    "Stimulus given in the StimulusUnit" },
  { ERR_stimulusUnitContinuous,
    EC_error, "1.5.d",
    "\'%s\' was allocated instead of \'%s\'",
    0  },
  { ERR_differentStimulusVirtuality,
    EC_error, "1.5.e",
    "Virtuality of %s unit is '%s' instead of '%s'",
    0  },
  { ERR_missingStimulusInTypeScope,
    EC_error, "1.5.f",
    "No prototype for %s unit in state \'%s\' in TypeScope",
    "Stimulus given in StimulusUnit" },
  { ERR_missingStimulusFromTypeScope,
    EC_error, "1.5.g",
    "No inherited %s unit in state \'%s\'",
    "Stimulus given in StimulusUnit" },
  { ERR_missingSignalInTypeScope,
    EC_error, "1.5.f",
    "TypeScope doesn't contain prototype of stimulus "
    "unit for signal \'%s%s\' in state \'%s\'",
    "Stimulus given in StimulusUnit" },
  { ERR_missingSignalFromTypeScope,
    EC_error, "1.5.g",
    "No inherited stimulus unit for signal \'%s%s\' in state \'%s\'",
    "Stimulus given in StimulusUnit" },
  { ERR_missingSignalInGraphScope,
    EC_error, "1.5.1.a",
    "Missing stimulus unit for signal \'%s%s\' in state \'%s\'",
    0  },
  { ERR_extraSignalInGraphScope,
    EC_error, "1.5.1.b",
    "Extra stimulus unit for signal \'%s%s\' in state \'%s\'",
    "Stimulus given in the StimulusUnit" },
  { ERR_duplicateSignalInGraphScope,
    EC_error, "1.5.1.c",
    "Duplcate stimulus unit for signal \'%s%s\' in state \'%s\'",
    "Stimulus given in the StimulusUnit" },
  { ERR_stimulusUnitKind,
    EC_error, "1.5.1.d",
    "\'%s\' was allocated instead of \'%s\'",
    0  },
  { ERR_stimulusDefChoice,
    EC_error, "1.5.1.e",
    "StimulusDef in StimulusUnit must%s be NoDef",
    0  },
  { ERR_labelScopeDef,
    EC_error, "1.6.a",
    "Def in %s differs from that in LabelScope",
    0  },
  { ERR_noDefNode,
    EC_warning, "2.0.1.a",
    "No Def node in %s \'%s\'",
    0  },
  { ERR_noScopeNode,
    EC_warning, "2.0.1.b",
    "No Scope node in %s \'%s\'",
    0  },
  { ERR_defNodeEquality,
    EC_error, "2.0.1.c",
    "DefNode of \'%s\' has DefNode '\%s\' not equal to \'%s\'",
    "DefNode location" },
  { ERR_defNameEquality,
    EC_error, "2.0.1.d",
    "%s \'%s\' has DefNode with "
    "name \'%s\' instead of \'%s\'",
    0  },
  { ERR_defEntityEquality,
    EC_error, "2.0.1.e",
    "%s \'%s\' has DefNode with "
    "entity kind \'%s\' instead of '\%s\'",
    0  },
  { ERR_scopeNodeEquality,
    EC_error, "2.0.1.f",
    "ScopeNode of %s \'%s\' doesn't match DefNode",
    0  },
  { ERR_referenceScopeNode,
    EC_error, "2.0.2.b",
    "ScopeNode of %s \'%s\' is \'%s\' and not equal to "
    "the closest scope unit \'%s\'",
    "The closest scope unit location" },
  { ERR_remoteDefEquality,
    EC_error, "2.0.3.a",
    "RemoteDef for exported %s \'%s\' is \'%s\' and "
    "don't match definition",
    0  },
  { ERR_invalidOperatorName,
    EC_error, "2.0.4.a",
    "Invalid operator name \'%s\' for %s",
    0  },
  { ERR_differentRangeOperator,
    EC_error, "2.0.4.b",
    "OpenRange has Operator \'%s\' not equal to Def \'%s\' of OpName",
    0  },
  { ERR_noSelfInScope,
    EC_warning, "2.1.a",
    "No Self in Scope node \'%s\'",
    0  },
  { ERR_differentScopeSelf,
    EC_error, "2.1.b",
    "Self in Scope node \'%s\' doesn't correspond to it",
    0  },
  { ERR_scopeDefListBackRef,
    EC_error, "2.1.c",
    "Element \'%s\' of the DefList refers to the Scope \'%s\' "
    "instead of \'%s\'",
    "The element of the DefList" },
  { ERR_scopeSelfNameEquality,
    EC_error, "2.1.d",
    "Scope node \'%s\' has Self with name \'%s\' instead of '\%s\'",
    0  },
  { ERR_scopeSelfEntityEquality,
    EC_error, "2.1.e",
    "Scope node \'%s\' has Self with entity kind \'%s\' instead of \'%s\'",
    0  },
  { ERR_scopeSelfTypeEquality,
    EC_error, "2.1.f",
    "Scope node \'%s\' has TypeScope not equal to that of Self",
    "TypeScope of Self location" },
  { ERR_scopeNextEquality,
    EC_error, "2.1.g",
    "The Next attribute of Scope \'%s\' don't point to "
    "the outer scope \'%s\'",
    "The outer scope location" },
  { ERR_invalidNodeInDef,
    EC_error, "2.2.a",
    "Invalid DefNode attribute in Def node \'%s\'",
    0  },
  { ERR_defNodeBackRef,
    EC_error, "2.2.b",
    "DefNode in Def node \'%s\' doesn't correspond to it",
    0  },
  { ERR_defScopeSelf,
    EC_error, "2.2.c",
    "Scope of Def node \'%s\' has Self \'%s\' not equal to \'%s\'",
    "Self location" },
  { ERR_missingDefInScope,
    EC_error, "2.2.d",
    "Def node \'%s\' is not mentioned in Scope node '\%s\'",
    0  },
  { ERR_defTypeEquality,
    EC_error, "2.2.e",
    "TypeDef of Def node of %s \'%s\' don't match syntax information",
    0  },
  { ERR_invalidUseItem,
    EC_error, "2.3.a",
    "The definition of \'%s\' has non-matching use item \'%s\'",
    "Use item location" },
  { ERR_duplicateUseItem,
    EC_error, "2.3.c",
    "The definition of \'%s\' has duplicate use item \'%s\'",
    "Use item location" },
  { ERR_invalidFlowUnitRefersDef,
    EC_error, "3.1.a",
    "Invalid FlowUnit refers the definition \'%s\'",
    0  },
  { ERR_missingDefInFlowUnitList,
    EC_error, "3.1.2.a",
    "Definition \'%s\' doesn't belong to FlowUnitList of \'%s\'",
    "Definition location" },
  { ERR_missingFlowItemInScope,
    EC_error, "3.1.2.b",
    "FlowUnitItem '\%s\' is not defined in the Scope \'%s\'",
    "FlowUnitItem location" },
  { ERR_duplicateFlowUnitItem,
    EC_error, "3.1.2.c",
    "Duplicate FlowUnitItem \'%s\'",
    0  },
  { -1 }
};
static void schk_PrintMsg (tpExtPosition pos, teErrorClass class,
			   char *number, char *fmt, ...);
static void schk_VPrintMsg (tpExtPosition pos, teErrorClass class,
			    char *number, char *fmt, va_list ap);
void
schk_InternalError (char *fmt, ...)
{
  va_list ap;
  (void) ( ap  = (va_list) &__builtin_va_alist) ;
  fprintf ((&__iob[2]) , "%s:%d: Internal Error: ", schk_errFile, schk_errLine);
  vfprintf ((&__iob[2]) , fmt, ap);
  fputc ('\n', (&__iob[2]) );
  (void)0 ;
  abort ();
}
static void
schk_VPrintMsg (tpExtPosition pos, teErrorClass class,
		char *number, char *fmt, va_list ap)
{
  if (pos == 0 )
    {
      fprintf (schk_outFile, "   ?,  ?:");
    }
  else
    {
      if (schk_printErrFileName)
	{
	  fprintf (schk_outFile, "%s:", GetExtPosFileName (pos->file));
	}
      fprintf (schk_outFile, "%4d,%3d:",
               pos->pos.Line, pos->pos.Column);
    }
  fprintf (schk_outFile, " %-12s", className[class]);
  if (number != 0 )
    {
      fprintf (schk_outFile, "(%s) ", number);
    }
  vfprintf (schk_outFile, fmt, ap);
  fputc ('\n', schk_outFile);
}
static void
schk_PrintMsg (tpExtPosition pos, teErrorClass class,
		char *number, char *fmt, ...)
{
  va_list ap;
  (void) ( ap  = (va_list) &__builtin_va_alist) ;
  schk_VPrintMsg (pos, class, number, fmt, ap);
  (void)0 ;
}
static tpErrorInfo
schk_FindErrorDesc (char *idx)
{
  tpErrorInfo desc;
  for (desc = errTable;
       desc->index >= 0 && strcmp (desc->number, idx);
       desc ++);
  if (desc->index < 0)
    {
      return 0 ;
    }
  else
    {
      return desc;
    }
  return desc;
}
int
schk_Error (int index, tpExtPosition extPos, ...)
{
  va_list ap;
  tpErrorInfo desc;
  tpExtPosition infoPos;
  desc = errTable + index;
  if (desc->isDisabled)
    {
      return 0;
    }
  (void) ( ap  = (va_list) &__builtin_va_alist) ;
  if (desc->infoText != 0 )
    {
      infoPos = ((  tpExtPosition  *)__builtin_va_arg_incr((  tpExtPosition  *) ap ))[0] ;
    }
  schk_VPrintMsg (extPos, desc->class, desc->number,
		  desc->text, ap);
  if (desc->infoText != 0  && infoPos != 0 )
    {
      schk_PrintMsg (infoPos, EC_info, 0 , "%s", desc->infoText);
    }  
  (void)0 ;
  return 1;
}
int
schk_DisableError (char *idx)
{
  tpErrorInfo desc;
  desc = schk_FindErrorDesc (idx);
  if (desc == 0 )
    {
      return 0;
    }
  else
    {
      desc->isDisabled = 1;
      return 1;
    }
}
void
schk_err_Initialize (void)
{
  int i;
  if (! schk_err_initCount)
    {
      for (i = 0; errTable[i].index >= 0; i ++)
	{
	  if (errTable[i].index != i)
	    {
	      fprintf ((&__iob[2]) , "Invalid error ordering at %s\n",
		       errTable[i].number);
	      exit (2);
	    }
	}
    }
  schk_err_initCount ++;
}
void
schk_err_Finalize (void)
{
  schk_err_initCount --;
}


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: varargs problem in egcs 1.03 on sparc Solaris 2.5
  1998-08-19  4:40   ` Piotr Nestorow
@ 1998-08-30 22:35     ` Jeffrey A Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1998-08-30 22:35 UTC (permalink / raw)
  To: Piotr Nestorow; +Cc: egcs-bugs

  In message < m0z94Cy-000051C@blue.telelogic.se >you write:
  > Hi Jeff,
  >   >  .
  >   >  /view/ba_pong/vobs/tools/cocktail/solaris/include
  >   >  /view/ba_pong/vobs/sdt/alfa/canalyser/access
  >   >  /usr/local/include
  > > Make sure there is not file called stdarg.h or varargs.h in any of those
  > > four directories.
  > > 
  > > jeff
  > 
  > There are none.
  > 
  > Here is the file after cpp. There is 
  > /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdarg.h
  > which is a copy of /usr/include/stdarg.h with some small fixes done
  > with fixincludes while installing.
You have a mis-installed gcc then.

gcc should not be using a solaris stdarg.h file -- gcc provides its
own to replace the ones that come with the system.

  > # 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/include/stdarg.h" 1 3
  > #pragma ident	"@(#)stdarg.h	1.11	94/01/05 SMI"	
Yup.  You've got a Sun supplied stdarg.h, and that's causing your problems.

jeff


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-08-30 22:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-18  2:23 varargs problem in egcs 1.03 on sparc Solaris 2.5 Piotr Nestorow
1998-08-18 18:14 ` Jeffrey A Law
1998-08-19  4:40   ` Piotr Nestorow
1998-08-30 22:35     ` Jeffrey A Law

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 read-only IMAP folder(s) and NNTP newsgroup(s).