This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc c++ bug
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc c++ bug
- From: David Durham <david dot durham at wcom dot com>
- Date: Mon, 23 Jul 2001 17:53:01 -0500
I believe this is a bug in gcc 3.0
Forgive me if it's already known about...
The following code used to be valid ( <=2.95.3 ):
struct foo
{
char field[25];
static int getSize()
{
return(sizeof(field));
}
};
Here it reports that in foo::getSize, foo::field cannot be referenced
since it is non-static and foo::getSize is static, however the used of
sizeof/typeof/etc should make it valid. Is there something about ANSI
C99 and the fact that arrays can have non-constant sizes or something?
P.S. please reply back to this address because I'm not a member of any
gcc mailing list at the moment.. I will join one if necessary for fixing
the bug...
Thanks,
-- Davy