Datatype 'long long'

Dear ROOT Talk,

I am trying to use ROOT within the event generator Herwig++, but failed due to the usage of ‘long long’ datatypes in ROOT.
As Herwig is compiled with ‘-pedantic’, it does not support ‘long long’. (which is only defined in the C99 standard)

Does anyone of you know a solution to that, where I don’t have to discard the ‘-pedantic’ flag?

Thanks a lot,
manuel

[quote=“manuel”]Dear ROOT Talk,

I am trying to use ROOT within the event generator Herwig++, but failed due to the usage of ‘long long’ datatypes in ROOT.
As Herwig is compiled with ‘-pedantic’, it does not support ‘long long’. (which is only defined in the C99 standard)

Does anyone of you know a solution to that, where I don’t have to discard the ‘-pedantic’ flag?

Thanks a lot,
manuel[/quote]

IMHO The simplest way is to remove -pedantic
g++ 3.2.3 -pedantic only gives a warning, not an error. So, you can still compile the code.

[quote=“tpochep”][quote=“manuel”]

Does anyone of you know a solution to that, where I don’t have to discard the ‘-pedantic’ flag?

[/quote]

IMHO The simplest way is to remove -pedantic
g++ 3.2.3 -pedantic only gives a warning, not an error. So, you can still compile the code.[/quote]

g++ 3.3.4 -pedantic leads to a real error.

Is it possible to change all the typedefs into long, or would that cause further problems??

[quote]g++ 3.3.4 -pedantic leads to a real error. [/quote]What do you mean?
Also try:
g++ 3.3.4 -pedantic -Wno-long-long
Cheers,
Philippe.

Yes, right, my g++ 3.4.4 cannot compile long long with -pedantic.
Philippe already answered how to supress this error.

IMHO no, it’s not possible - AFAIK ROOT uses Long64_t typedef for long long (or __int64), if you replace it with simple long you’ll have problems with overloading - ROOT has some overloaded functions with Long_t and Long64_t types.

Thanks a lot for your help.