RE: [ROOT] rootcint typedef problem

From: Philippe Canal (pcanal@popgtw.fnal.gov)
Date: Wed Jul 19 2000 - 00:26:11 MEST


Hi Jacek

> extern NIVXI_HWSSECMD DefaultWSSEcmdHandler;            /* <- LINE:1600 */

You probably meant to type 

> extern NIVXI_HWSSECMD* DefaultWSSEcmdHandler;            /* <- LINE:1600 */

If you actually try to use the first example, a decent compiler would tell you:

line 15: error: expression must be a modifiable lvalue
    DefaultWSSEcmdHandler = func;

This is because you can NOT modify a variable of type function (your case).
you can only modify variables of type pointer to functions!

Philippe.

PS. I suspect that it would have been nice if the cin error message was

> 	Error: function type variable can not be declared FILE:NIVXI.h LINE:1600



> ----------------
> What I get from rootcint is :
> 	Error: void type variable can not be declared FILE:NIVXI.h LINE:1600
> It seems that it cannot properly handle NIVXI_HWSSECMD in the last
> presented line, which in turn possibly means that it also improperly
> handles all other lines related to NIVXI_HWSSECMD.
> As there are more similar typedefs in the source code I would need a smart
> solution.
> Thanks in advance,
> Jacek.
> 
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET