Failure of rootcint in 5.28/00a

I am having trouble building with Root 5.28/00a and VS2008.
This is a NEW issue with 5.28/00a and does not appear in 5.28/00 or other versions of root.

The problems is that during a build the rootcint preprocessor is failing, reporting a divide by 0 error in lines (2) and (4) below.

The problem starts with line (1) and apparently how it calculates EVENT_SIZE. If I replace (struct _gigadata) with a typedef of the same structure (GigaDataT) the preproccessor does not fail, although I am not sure that the preproccesor is generating the desired code.

(1) #define EVENT_SIZE (int)(sizeof (struct _gigadata)/DWORD_SIZE )
(2) #define EVENT_BLOCK_SIZE_EV ((FIFO_SIZE / DWORD_SIZE / EVENT_SIZE / 2) + 1)
(3) #define EVENT_BLOCK_SIZE_BY (EVENT_BLOCK_SIZE_EV * EVENT_SIZE * DWORD_SIZE )
(4) #define EVENT_BLOCK_SIZE_DW (EVENT_BLOCK_SIZE_BY / DWORD_SIZE)

For now I will use the work around but wanted to know if you had any reason you beleive this is failing suddenly

Thanks,

Glen

Hi Glen,

Indeed the problem is new ; however it is not clear whether rootcint was silently doing the wrong (but different) thing or is simply incorrect now. Either way, rather than fixing this issue, we prefer to focus our energy on potential replacement.

More importantly since your macro are a ‘bit’ complex and the CINT preprocessor is inherently ‘simple’ (i.e. it intentionally does not implement a full preprocessor), I recommend that you tell CINT to use an external preprocessor rather that its own by passing the option ‘-p’ to rootcint:rootcint -f dict.cxx -c -p myheader.h mylinkdef.h. This is guaranteed to correctly handle your macros.

Cheers,
Philippe.