Comments (5)
Thanks for the report! I presume this is caused by mingw-w64/mingw-w64@1652e92.
A later patch that is part of a larger patch set, that still is in progress, should fix this. I’ll let you know when a fix is available.
from llvm-mingw.
@markus-oberhumer Headsup - when testing a fix for this issue, I noticed another recent regression on the main branch of Clang; you should be able to try it out with https://github.com/mstorsjo/llvm-mingw/releases/nightly. (I don't provide nightly builds targeting msvcrt, but this regression is unrelated to the CRT choice.)
llvm/llvm-project@29d447a and llvm/llvm-project#90676 changed so that each time <stddef.h>
is included, it applies its contents. This seems to be somewhat intentional.
In upx, in compress_lzma.cpp
, at https://github.com/upx/upx/blob/devel/src/compress/compress_lzma.cpp#L209-L218, there seems to be attempts to redefine NULL
to nullptr
. However, when including other later files, many of them (re)include <stddef.h>
, which now will end up redefining NULL
back to 0
. This causes errors like these:
/home/martin/code/upx/vendor/lzma-sdk/C/7zip/Compress/LZMA/../../../Common/MyCom.h:84:26: error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant]
84 | CMyComBSTR() { m_str = NULL; }
| ^~~~
| nullptr
/home/martin/clang-nightly/lib/clang/19/include/__stddef_null.h:23:14: note:
expanded from macro 'NULL'
23 | #define NULL 0
| ^
from llvm-mingw.
@mstorsjo Thanks for that info!
As you have noticed this code is problematic for some other toolchains as well (I have never looked in detail why NULL
gets redefined under certain circumstances), so I've now opted for the easy solution:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
from llvm-mingw.
This issue should hopefully have been fixed in the latest release, at https://github.com/mstorsjo/llvm-mingw/releases/tag/20240518.
from llvm-mingw.
Fixed in 20240518, many thanks!
from llvm-mingw.
Related Issues (20)
- `fcloseall()` is missing (feature request) HOT 6
- DLLs should be available via --print-file-name HOT 8
- What is the difference between this llvm distribution and the one installed from msys2 pacman? HOT 3
- adding split debug info to the release? HOT 1
- -O2 -flto -fcs-profile-generate cause undefined symbol
- Missing `windmc.exe` Message Compiler
- Missing LLVM header files in resulting zip when building with FULL_LLVM=1 HOT 1
- Supporting passing .rc and .res files on command line
- Installation HOT 8
- ld.lld.exe segfaulting HOT 4
- Cannot link executable HOT 2
- [C++20] [Modules] ld.lld: error: undefined symbol: initializer for module HOT 11
- "unable to execute command: program not executable" on Windows HOT 4
- `<triple>-c++` wrappers are provided but `<triple>-cc` are not HOT 4
- Triple naming probably unorthodox HOT 4
- typo in python buildscript HOT 1
- error: no member named 'join_with' in namespace 'std::ranges::views' HOT 1
- clang-tidy is missing since llvm-mingw 16 HOT 7
- Package requests for libclang.dll HOT 4
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 llvm-mingw.