[ROOT] sizeof BUG ??

From: Mikhail Oukhanov (ukhanov@rampexa.ihep.su)
Date: Tue Jun 05 2001 - 16:10:29 MEST


Dear C++Root'ers,

Have you ever met the thing like this?
How should it be handled in a streamer?
Any hint is appreciated.

Regards, Mikhail Ukhanov.

------------------------------------------------
ukhanov@rampexa:~/mwpc$ cat qq.cxx

#include <stdio.h>

class B {
public:
  B();
private:
static long int a;
};

long int B::a=0;

B::B() {;}

int main(int argc, char **argv)
{
  B b[100];
  printf("sizeof  B=%d b=%d \n",sizeof(B),sizeof(b));
  return 1;
}

ukhanov@rampexa:~/mwpc$ g++ qq.cxx -o qq
ukhanov@rampexa:~/mwpc$ ./qq

sizeof  B=1 b=100 

ukhanov@rampexa:~/mwpc$ g++ -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs
gcc version 2.95.2 20000220 (Debian GNU/Linux)

ukhanov@rampexa:~/mwpc$ uname -a
Linux rampexa 2.2.17 #9 Tue Jan 30 17:54:11 MSK 2001 i686 unknown
-----------------------------------------------



This archive was generated by hypermail 2b29 : Fri Jun 08 2001 - 11:51:26 MEST