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]

Bug in egcs?


Hi,
i have a problem, which occurs while compiling octave:
I tracked it down to that snipped:

m.cc:
static int try_info ()
{
  int status = 0;

  if (((( (__extension__ ({ union { __typeof(  status  ) __in; int __i; } __u;	__u.__in = (  status  ); __u.__i; }))  ) & 0xff) == 0)  )
    status = ((( (__extension__ ({ union { __typeof(  status  ) __in; int __i; } __u;	__u.__in = (  status  ); __u.__i; }))  ) & 0xff00) >> 8)  ;
  else
    status = 127;

  return status;
}

Do a 'g++ -c m.cc' and you get:

m.cc: In function `int try_info()':
m.cc:5: `status' undeclared (first use this function)
m.cc:5: (Each undeclared identifier is reported only once
m.cc:5: for each function it appears in.)
m.cc:5: warning: ANSI C++ forbids declaration `__in' with no type
m.cc:6: warning: ANSI C++ forbids declaration `__in' with no type

Could you please tell me, where the problem is, since status is declared?

Thanks,
Martin.

g++ -v:
Reading specs from /sw/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.54/specs
gcc version egcs-2.91.54 19980816 (gcc2 ss-980609 experimental)


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