[cfe-users] Macro for long long types

Simon Zehnder szehnder at uni-bonn.de
Sun Sep 15 12:17:09 PDT 2013


Jean-Daniel,

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

best

Simon


On Sep 15, 2013, at 9:11 PM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote:

> 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.
> 
> Le 15 sept. 2013 à 20:44, Simon Zehnder <szehnder at uni-bonn.de> a écrit :
> 
>> 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
>> _______________________________________________
>> cfe-users mailing list
>> cfe-users at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
> 
> -- Jean-Daniel
> 
> 
> 
> 





More information about the cfe-users mailing list