Data type error for ISO C++ 1998

Hello Rooters,

I have a standalone program and I want to compile it with the flags:
CXXFLAGS += -pedantic -Wall -W

Then I get error message:
opt/root/root_v5.24.00/include/Rtypes.h:84: Fehler: ISO-C++ 1998 unterstützt nicht »long long«

In the corresponding header file:
typedef long long Long64_t; //Portable signed long integer 8 bytes

I am using gcc 4.3.3. Is this rather a C++ or a root problem?

Thanks, FWM

P.S.: leving out -pedantic flag compiles it without any prolems

thats because long long (guaranteed 64 bit integer) is not defined in the c++98 standard.
compilers define the 64 bit types but use different names.
long long is the name in the C99 Standard so for example g++ decided to use long long too where as Visual Studio (windows) uses __int64

so root typedefs these to a common name so the code can be compiled on different plattforms as long as the common name (e.g. Long64_t) is used.
so this “error” shouldn’t be a problem.

you can still compile with pedantic if you disable this error with -Wno-long-long
(another possiblity would be to compile with -std=c++0x but I doubt that would be wise as the new standard has not yet been finalized)

edit: made explanation a bit clearer.