Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In all environment, no "__LLP64__" macro #349

Open
SSDGADsss opened this issue Nov 3, 2024 · 3 comments
Open

In all environment, no "__LLP64__" macro #349

SSDGADsss opened this issue Nov 3, 2024 · 3 comments

Comments

@SSDGADsss
Copy link

When I compile VLFeat library, I compiled under CLANG64 and UCRT64, and I noticed that the compiled program data type is 32-bit. When I checked the code, I found that neither the clang nor mingw64 compilers pre-defined the __LLP64__ macro. This is a question about msys2 or the compiler, but I have tried all environments without defining this macro. This may be a problem, can anyone help me?

This is a test file I wrote to reproduce the issue

#include <iostream>

int main()
{
#ifdef __LLP64__
std::cout<<"LLP64"<<std::endl;
#endif
#ifdef __LP64__
std::cout<<"LP64"<<std::endl;
#endif
return 0;
}

This program has no output under clang64 and ucrt64 in msys2.

May I ask if anyone can provide assistance? I am happy to solve this problem and contribute to the project.

@lazka
Copy link
Member

lazka commented Nov 3, 2024

Where is __LLP64__ documented? I can't find anything specific.

@SSDGADsss
Copy link
Author

Sorry, I couldn't find a macro definition for "LLP64" online, but I saw it in some ancient code, which may be my problem. However, the macro definition for "LP64" is mentioned in the GCC documentation, and I think Mingw or Clang compilers should also have such macro definitions

GCC Document

I use Compiler Explorer check "LP64" macro is define on clang and gcc . but I don't know why this macro is not appear on msys environment.

@lazka
Copy link
Member

lazka commented Nov 3, 2024

Since both target Windows where "long int" is 32 bit and not 64 bit __LP64__ should not be defined.

It is defined in our cygwin env though (/usr/bin/gcc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants