-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
use of undeclared identifier 'SIZE_MAX' #460
Comments
Can you isolate the individual source file from the build, triggering the issue? And can you reduce the included headers from there, to only including libc++ headers, triggering the issue? I would guess that there's some either command line or source level define somewhere that triggers this. Not saying it isn't a libc++ and/or mingw bug though, but we'd need a smaller reproduction to be able to say for sure. |
I found a smaller reproduction
|
Ok, I've reproed that. But when I try the same, I'm also getting another error, which also is present when building with a release:
I presume that's unrelated to the libcxx header issue anyway. |
I've reduced it down to a much smaller issue, and I would say that this isn't really the fault of libcxx. A minimal reproducer of the issue is this: #include <limits.h>
#include <stdint.h>
#undef SIZE_MAX
#include <string> Previously, When you look at it in this form, it obviously seems quite absurd, but this is that the attached example boils down to. See your #ifdef __MINGW32__
# undef SIZE_MAX
#endif // __MINGW32__ And all the other headers around end up having the same effect as in the reduced example above. |
I guess it could, maybe, be argued that libcxx internally shouldn't be using |
undef SIZE_MAX caused building aria2 with libc++20 to fail, because libc++ uses this definition internally. ref: mstorsjo/llvm-mingw#460 llvm/llvm-project#91798 (comment)
I will try to fix this in aria2 🤣. |
I'm sorry I couldn't find a smaller reproduction of this
This happens in llvm-mingw nightly, and is caused by llvm/llvm-project@18df9d2 to be exact, if I replace
SIZE_MAX
with__SIZE_MAX__
it doesn't cause a problem, but that commit itself doesn't look wrong. I don't know whySIZE_MAX
isn't defined, cstdint should end up include stdint.h from mingw.The text was updated successfully, but these errors were encountered: