This is the mail archive of the gcc@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]

A glibc or egcs bug?


This is from glibc 2.1:

# gcc -v
Reading specs from
/usr/lib/gcc-lib/i586-unknown-linux-gnulibc1/egcs-2.90.20/specs
gcc version egcs-2.90.20 971201 (gcc2-970802 experimental)
# gcc -S w.cc
w.cc: In function `int foo()':
w.cc:48: no matching function for call to `__WAIT_STATUS::._2 (int *)'
w.cc:38: candidates are: __WAIT_STATUS::._2(const {anonymous union} &)
w.cc:38:                 __WAIT_STATUS::._2()


-- 
H.J. Lu (hjl@gnu.org)
--w.cc--
union wait
  {
    int w_status;
    struct
      {

	unsigned int __w_termsig:7;  
	unsigned int __w_coredump:1;  
	unsigned int __w_retcode:8;  
	unsigned int:16;







      } __wait_terminated;
    struct
      {

	unsigned int __w_stopval:8;  
	unsigned int __w_stopsig:8;  
	unsigned int:16;






      } __wait_stopped;
  };

typedef union
  {
    union wait *__uptr;
    int *__iptr;
  } __WAIT_STATUS __attribute__ ((__transparent_union__));


extern int wait  (__WAIT_STATUS __stat_loc)  ;

int
foo ()
{
  int status;

  wait (&status);

  return status;
}


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