-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Avoid a warning in clang that IS_64BIT is already defined #4485
base: master
Are you sure you want to change the base?
Avoid a warning in clang that IS_64BIT is already defined #4485
Conversation
…ined by checking whether it was defined earlier, before defining it
The comment above says |
The |
This is how clang is called:
As you see, |
No, the problem is we're trying to have some code trying to support compiling without Makefile / supporting MSCV, other compilers trying to behave like MSCV while using Makefile. |
What if we define something like GENUINE_MSVC in an appropriate .h file that will be only defined if _MSC_VER is defined but not |
Can we instead modify line 66 to read like that?
|
@maximmasiutin what would you think about the above solution? :-) |
I am OK with any solution as long as there will be no warning in clang that IS_64BIT is already defined. |
Can you confirm that this would fix the warning for you? :-) |
We avoid a warning in clang (LLVM) compiler that IS_64BIT is already defined by checking whether IS_64BIT was defined earlier. If it was already defined, we do not define it again, thus avoiding the warning.
To reproduce it, run
make.exe build ARCH=x86-64-vnni512 COMP=clang
ormake.exe build ARCH=x86-64-vnni512 COMP=icx
under Windows. Prerequisite: LLVM Windows binary, Cygwin make.