RE:Small glitch with character initializ

From: O'NEEL Bruce (bruce.oneel@obs.unige.ch)
Date: Mon Feb 01 1999 - 14:16:46 MET


Hi,
  No problem.  I just noticed this when porting some existing code to
Root.  Thanks!

cheers

bruce

Masaharu Goto writes:
 > Bruce,
 > 
 > >  There seems to be a small glitch in Root 2.21/03 with character
 > >initializers.  The two cases:
 > >
 > >char msg[] = "warning";
 > >
 > >and
 > >
 > >char msg1[] = {"warning"};
 > >
 > >seem to be dealt with differently.  I belive both are valid C but I
 > >don't have a recent enough ARM to check if they are both still valid
 > >in C++.  egcs 1.1.1 run with -Wall -pedantic seems content though.
 > 
 > Thank you for reporting this problem. I did not expect {"warning"} to come
 > with this kind of initialization. Cint takes it wrong.  Unfortunately, CINT
 > implementation of array initialization is very complex. Especially this one
 > is not easy. Would you bear with using 'char msg[]="xxx";'?
 > 
 > Mashaaru Goto



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:28 MET