This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ bug effecting egcs-1.1 release



This is from attempts to build the RedHat 5.1 SRPMS.

g++ j.C -fno-for-scope
j.C: In method `void SSTRINGS::sort()':
j.C:326: no matching function for call to `ARRAY::sort (int ()(ARRAY_OBJ *, ARRAY_OBJ *))'
j.C:270: candidates are: ARRAY::sort(int (*)(const ARRAY_OBJ *, const ARRAY_OBJ *))

It is possible this is actually a bug in the linuxconf sources.  I
don't know C++ well enough to say one way or the other.  Regardless
we need to either declare the source invalid or fix the bug for
egcs-1.1.

Thanks,
Jeff


The source:

typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
typedef unsigned long long int __u_quad_t;
typedef long long int __quad_t;
typedef __quad_t *__qaddr_t;
typedef __u_quad_t __dev_t;		 
typedef __u_int __uid_t;		 
typedef __u_int __gid_t;		 
typedef __u_long __ino_t;		 
typedef __u_int __mode_t;		 
typedef __u_int __nlink_t; 		 
typedef long int __off_t;		 
typedef __quad_t __loff_t;		 
typedef int __pid_t;			 
typedef int __ssize_t;			 
typedef struct
  {
    int __val[2];
  } __fsid_t;				 
typedef int __daddr_t;			 
typedef char *__caddr_t;
typedef long int __time_t;
typedef long int __swblk_t;		 

typedef long int __clock_t;
typedef unsigned long int __fd_mask;
typedef struct
  {
    __fd_mask fds_bits[1024  / (8 * sizeof (__fd_mask)) ];
  } __fd_set;
typedef int __key_t;
typedef unsigned short int __ipc_pid_t;
typedef unsigned int size_t;
typedef unsigned int  wint_t;
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
typedef void *__gnuc_va_list;
struct _IO_jump_t;  struct _IO_FILE;
typedef void _IO_lock_t;
struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;
  int _pos;
};
struct _IO_FILE {
  int _flags;		 
  char* _IO_read_ptr;	 
  char* _IO_read_end;	 
  char* _IO_read_base;	 
  char* _IO_write_base;	 
  char* _IO_write_ptr;	 
  char* _IO_write_end;	 
  char* _IO_buf_base;	 
  char* _IO_buf_end;	 
  char *_IO_save_base;  
  char *_IO_backup_base;   
  char *_IO_save_end;  
  struct _IO_marker *_markers;
  struct _IO_FILE *_chain;
  int _fileno;
  int _blksize;
  __off_t   _offset;
  unsigned short _cur_column;
  char _unused;
  char _shortbuf[1];
  _IO_lock_t *_lock;
};
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_stdin_, _IO_stdout_, _IO_stderr_;
typedef struct
{
  __ssize_t   (*read)  (struct _IO_FILE *, void *, __ssize_t  )  ;
  __ssize_t   (*write)  (struct _IO_FILE *, const void *, __ssize_t  )  ;
  __off_t   (*seek)  (struct _IO_FILE *, __off_t  , int)  ;
  int (*close)  (struct _IO_FILE *)  ;
} _IO_cookie_io_functions_t;
struct _IO_cookie_file {
  struct _IO_FILE file;
  const void *vtable;
  void *cookie;
  _IO_cookie_io_functions_t io_functions;
};
extern "C" {
extern int __underflow  (_IO_FILE*)  ;
extern int __uflow  (_IO_FILE*)  ;
extern int __overflow  (_IO_FILE*, int)  ;
extern int _IO_getc  (_IO_FILE *__fp)  ;
extern int _IO_putc  (int __c, _IO_FILE *__fp)  ;
extern int _IO_feof  (_IO_FILE *__fp)  ;
extern int _IO_ferror  (_IO_FILE *__fp)  ;
extern int _IO_peekc_locked  (_IO_FILE *__fp)  ;
extern void _IO_flockfile  (_IO_FILE *)  ;
extern void _IO_funlockfile  (_IO_FILE *)  ;
extern int _IO_ftrylockfile  (_IO_FILE *)  ;
extern int _IO_vfscanf  (_IO_FILE*, const char*, __gnuc_va_list , int*)  ;
extern int _IO_vfprintf  (_IO_FILE*, const char*, __gnuc_va_list )  ;
extern __ssize_t   _IO_padn  (_IO_FILE *, int, __ssize_t  )  ;
extern size_t   _IO_sgetn  (_IO_FILE *, void*, size_t  )  ;
extern __off_t   _IO_seekoff  (_IO_FILE*, __off_t  , int, int)  ;
extern __off_t   _IO_seekpos  (_IO_FILE*, __off_t  , int)  ;
extern void _IO_free_backup_area  (_IO_FILE*)  ;
}
typedef struct _IO_FILE FILE;
typedef __off_t   fpos_t;
extern FILE *stdin, *stdout, *stderr;  
extern "C" {
extern void clearerr  (FILE*)  ;
extern int fclose  (FILE*)  ;
extern int feof  (FILE*)  ;
extern int ferror  (FILE*)  ;
extern int fflush  (FILE*)  ;
extern int fgetc  (FILE *)  ;
extern int fgetpos  (FILE* fp, fpos_t *pos)  ;
extern char* fgets  (char*, int, FILE*)  ;
extern FILE* fopen  (__const char*, __const char*)  ;
extern FILE* fopencookie  (void *cookie, __const char *mode,
			       _IO_cookie_io_functions_t io_functions)  ;
extern int fprintf  (FILE*, __const char* format, ...)  ;
extern int fputc  (int, FILE*)  ;
extern int fputs  (__const char *str, FILE *fp)  ;
extern size_t fread  (void*, size_t, size_t, FILE*)  ;
extern FILE* freopen  (__const char*, __const char*, FILE*)  ;
extern int fscanf  (FILE *fp, __const char* format, ...)  ;
extern int fseek  (FILE* fp, long int offset, int whence)  ;
extern int fsetpos  (FILE* fp, __const fpos_t *pos)  ;
extern long int ftell  (FILE* fp)  ;
extern size_t fwrite  (__const void*, size_t, size_t, FILE*)  ;
extern int getc  (FILE *)  ;
extern int getchar  (void)  ;
extern char* gets  (char*)  ;
extern void perror  (__const char *)  ;
extern int printf  (__const char* format, ...)  ;
extern int putc  (int, FILE *)  ;
extern int putchar  (int)  ;
extern int puts  (__const char *str)  ;
extern int remove  (__const char*)  ;
extern int rename  (__const char* _old, __const char* _new)  ;
extern void rewind  (FILE*)  ;
extern int scanf  (__const char* format, ...)  ;
extern void setbuf  (FILE*, char*)  ;
extern void setlinebuf  (FILE*)  ;
extern void setbuffer  (FILE*, char*, int)  ;
extern int setvbuf  (FILE*, char*, int mode, size_t size)  ;
extern int sprintf  (char*, __const char* format, ...)  ;
extern int sscanf  (__const char* string, __const char* format, ...)  ;
extern FILE* tmpfile  (void)  ;
extern char* tmpnam  (char*)  ;
extern char* tmpnam_r  (char*)  ;
extern char *tempnam  (__const char *__dir, __const char *__pfx)  ;
extern char *__stdio_gen_tempname  (char *__buf, size_t bufsize,
					__const char *dir, __const char *pfx,
					int dir_search, size_t *lenptr,
					FILE **streamptr)  ;
extern int ungetc  (int c, FILE* fp)  ;
extern int vfprintf  (FILE *fp, char __const *fmt0, __gnuc_va_list )  ;
extern int vprintf  (char __const *fmt, __gnuc_va_list )  ;
extern int vsprintf  (char* string, __const char* format, __gnuc_va_list )  ;
extern void __libc_fatal  (__const char *__message)  
     __attribute__ ((__noreturn__));
extern int dprintf  (int, __const char *, ...)  ;
extern int vdprintf  (int, __const char *, __gnuc_va_list )  ;
extern int vfscanf  (FILE*, __const char *, __gnuc_va_list )  ;
extern int __vfscanf  (FILE*, __const char *, __gnuc_va_list )  ;
extern int vscanf  (__const char *, __gnuc_va_list )  ;
extern int vsscanf  (__const char *, __const char *, __gnuc_va_list )  ;
extern int __vsscanf  (__const char *, __const char *, __gnuc_va_list )  ;
extern int __fcloseall  (void)  ;
extern int fcloseall  (void)  ;
struct obstack;
extern int obstack_vprintf  (struct obstack *__obstack,
				 __const char *__fmt, __gnuc_va_list )  ;
extern int obstack_printf  (struct obstack *__obstack, __const char *__fmt,
				...)  ;
extern FILE *fdopen  (int, __const char *)  ;
extern int fileno  (FILE*)  ;
extern FILE* popen  (__const char*, __const char*)  ;
extern int pclose  (FILE*)  ;
extern char *ctermid  (char *__buf)  ;
extern char *cuserid  (char * __buf)  ;
extern int snprintf  (char *, size_t, __const char *, ...)  ;
extern int __snprintf  (char *, size_t, __const char *, ...)  ;
extern int vsnprintf  (char *, size_t, __const char *, __gnuc_va_list )  ;
extern int __vsnprintf  (char *, size_t, __const char *, __gnuc_va_list )  ;
extern __ssize_t   getdelim  (char **, size_t *, int, FILE*)  ;
extern __ssize_t   getline  (char **, size_t *, FILE *)  ;
extern __ssize_t   __getline  (char **, size_t *, FILE *)  ;
extern int asprintf  (char **, const char *, ...)  ;
extern int vasprintf  (char **, const char *, __gnuc_va_list )  ;
extern FILE *open_memstream  (char **__bufloc, size_t *__sizeloc)  ;
extern int __underflow  (struct _IO_FILE*)  ;
extern int __overflow  (struct _IO_FILE*, int)  ;
extern int sys_nerr;
extern const char *const sys_errlist[];
extern int _sys_nerr;
extern const char *const _sys_errlist[];
extern void clearerr_locked  (FILE *)  ;
extern void clearerr_unlocked  (FILE *)  ;
extern int feof_locked  (FILE *)  ;
extern int feof_unlocked  (FILE *)  ;
extern int ferror_locked  (FILE*)  ;
extern int ferror_unlocked  (FILE*)  ;
extern int fileno_locked  (FILE *)  ;
extern int fileno_unlocked  (FILE *)  ;
extern int fclose_unlocked  (FILE *)  ;
extern int fflush_locked  (FILE *)  ;
extern int fflush_unlocked  (FILE *)  ;
extern size_t fread_unlocked  (void *, size_t, size_t, FILE *)  ;
extern size_t fwrite_unlocked  (const void *, size_t, size_t, FILE *)  ;
extern int fputc_locked  (int, FILE*)  ;
extern int fputc_unlocked  (int, FILE*)  ;
extern int getc_locked  (FILE *)  ;
extern int getchar_locked  (void)  ;
extern int putc_locked  (int, FILE *)  ;
extern int putchar_locked  (int)  ;
extern void flockfile  (FILE *)  ;
extern void funlockfile  (FILE *)  ;
extern int ftrylockfile  (FILE *)  ;
extern int getc_unlocked  (FILE *)  ;
extern int getchar_unlocked  (void)  ;
extern int putc_unlocked  (int, FILE *)  ;
extern int putchar_unlocked  (int)  ;
}
class ARRAY_OBJ{
protected:
	char modified;
public:
	ARRAY_OBJ (void);
	virtual int edit (void);
	void rstmodified (void);
	void setmodified (void);
	virtual int was_modified (void);
	virtual ~ARRAY_OBJ (void);
};
class ARRAY: public ARRAY_OBJ{
protected:
	int is_owner;	 
	ARRAY_OBJ **tb;
	int nb;
	int maxtb;	 
	int increm;	 
public:
	ARRAY (void);
	void add (ARRAY_OBJ *pt);
	void delall (void);
	int editone (ARRAY_OBJ *e);
	int editone (int no);
protected:
	ARRAY_OBJ *getitem (int no)const;
public:
	int getnb (void)const;
protected:
	void grow (void);
public:
	void insert (int pos, ARRAY_OBJ *pt);
	int lookup (ARRAY_OBJ *o)const;
	int manage_edit (ARRAY_OBJ *e, int code);
	int manage_edit (ARRAY_OBJ *e, int code, int insertpos);
	void moveto (ARRAY_OBJ *o, int newpos);
	void neverdelete (void);
	int remove (ARRAY_OBJ *obj);
	void remove_all (void);
	int remove_del (ARRAY_OBJ *obj);
	int remove_del (int no);
	void rstmodified (void);
	void setgrowth (int _increm);
	void sort (int (*cmp)(const ARRAY_OBJ *, const ARRAY_OBJ *));
	virtual int was_modified (void);
	virtual int write (void);
	virtual ~ARRAY (void);
};
class SSTRING: public ARRAY_OBJ {
	char *str;
	int maxsiz;		 
public:
	SSTRING (const SSTRING&_str);
	SSTRING (const char *_str);
	SSTRING (const char *_str, int _maxsiz);
	SSTRING (void);
	void append (const char *app);
	int cmp (const SSTRING&other)const;
	int cmp (const char *other)const;
	void copy (SSTRING&dst)const;
	void copy (char *dst)const;
	char *copyword (const char *line);
	const char *get (void)const;
	int getlen (void)const;
	int getmaxsiz (void)const;
	int getval (void)const;
	double getvalf (void)const;
	int icmp (const SSTRING&other)const;
	int icmp (const char *other)const;
	int is_empty (void)const;
	int ncmp (const char *other, int len)const;
	SSTRING&operator = (const SSTRING&_str);
	void setfrom (const SSTRING&src);
	virtual void setfrom (const char *src);
	void setfrom (int val);
	void setmaxsiz (int size);
	const char *strchr (char carac)const;
	void strip_end (void);
	const char *strrchr (char carac)const;
	const char *strstr (const char *sub)const;
	~SSTRING (void);
};
class SSTRINGS: public ARRAY {
public:
	SSTRING *getitem (int no)const;
	int lookup (const SSTRING *str)const;
	int lookup (const char *str)const;
	void remove_dups (void);
	void remove_empty (void);
	void sort (void);
};
static int cmp (ARRAY_OBJ *o1, ARRAY_OBJ *o2)
{
	SSTRING *s1 = (SSTRING *)o1;
	SSTRING *s2 = (SSTRING *)o2;
	return s1->cmp(*s2);
}
  void SSTRINGS::sort ()
{
	ARRAY::sort (cmp);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]