RE:Can you explain this error ?

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Fri Nov 27 1998 - 15:07:17 MET


Yassino,

>System NT4.0 SP3 VC5.0 CINT513
>VC compiler is gorking on these
>G__memvar_setup((void*)(&FALSE),99,0,1,-1,G__defined_typename("bool"),-1,1,"
>>FALSE=",0,(char*)NULL);
>G__memvar_setup((void*)(&TRUE),99,0,1,-1,G__defined_typename("bool"),-1,1,"T
>RUE=",0,(char*)NULL);
>error_log
>C:\build\master\vsnmp\G__c_my_file.c(1142) : error C2101: '&' on constant
>C:\build\master\vsnmp\G__c_my_file.c(1143) : error C2101: '&' on constant

This usually does not happen.  My guess is that you have following declaration
in your header file.

 1)
  typedef int bool;
  bool FALSE=0;
  bool TRUE=1;

I think these symbols are predefined in VC as macro or enum.

 2)
  #define FALSE 0
  #define TRUE  1
       or
  enum bool { FALSE=0 , TRUE=1 };

By some reason, cint/makecint read 1) and VC++ read 2). Error occurs because
you can not get address of macro or enum. 

Masaharu Goto



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