Macro for long long types

Dear all,

We want to make available specific types in a library that rely on long long types. As users could have either gcc or clang, the header has to account for this. See here for a patch made by a user, which criticises, that when only looking for -std=c++0x on machines with clang you do not get 64bit support: http://www.stokely.org/patches/compiler.int64.diff.
On the other side the suggested macro (__LP64__) in the patch is too generous, as it gets turned on by gcc even if -std=c++0x is not.

Does anyone know? Or is there a website where the clang macros are all listed … couldn't find something promising.

Best

Simon

When I want to get a list of the macros, I use this command:

echo | clang -dM -E - | sort

You can pass any param like -std=c++11 to see specific macros.

echo | clang -x c++ -std=c++11 -dM -E - | sort

Maybe __LONG_LONG_MAX__ can be helpful for your case.

Jean-Daniel,

thank you very much for your answer! These commands help already a lot!

best

Simon