Comments (4)
I had this issue with MSVC and was able to solve it with this in misc/platform.h
:
#if defined(_MSC_VER) && !defined(__clang__)
#if !defined(_MSVC_LANG) || _MSVC_LANG < 201703L
__forceinline uint32_t __builtin_clz(uint32_t x) {
unsigned long r = 0;
_BitScanReverse(&r, x);
return uint32_t(31 - r);
}
#endif
#endif
__builtin_clz
appears to be defined for C++17 in MSVC, so this prevents it from being redefined.
from dascript.
Hi, sorry to comment on a closed issue, but I just changed my project from c++14 to c++17 for a test and I am getting '__builtin_clz' not found.
I am using VS2019 Community Edition.
I had to revert the changes made here so that it compiles. Not sure what to make of it to be honest, but from what I tested, __builtin_clz is nowhere to be found in MSVC17 or MSVC20.
from dascript.
After a VS update I started seeing the same thing, but I've been unable to find anything in release notes to pin down what changed.
from dascript.
I guess that it could have been a fluke in MSVC at the time or something with the use case at the time you tested.
Just to make sure, I tried on an empty project and still the same result.
It might be good to revert this change and see if anyone gets an error in the future.
from dascript.
Related Issues (20)
- try to AOT
- Compilation error when exporting c++ class with ManagedStructureAnnotation
- what is the text encoding of daScript? HOT 11
- Is the compiler documented? HOT 1
- Named arguments improvements HOT 1
- How can I use daScript with Godot? HOT 3
- get_function_by_mangled_name_hash in unnamed modules
- cmake; make install; liblib HOT 3
- Infrastructure Documentation / Meta Documentation HOT 3
- Performance comparison with Cyber HOT 1
- Error while parsing struct that not exist in json HOT 1
- Evaluate using Profile-Guided Optimization (PGO) and LLVM BOLT
- Error building
- Bad floating point comparisons HOT 9
- Arrays
- Optimizing related_post_gen benchmark HOT 12
- null pointer passed as argument HOT 1
- It is recommended that compiled binaries be released for download.
- Compilation error using static linking HOT 1
- Is it possible to define a single module across multiple files? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dascript.