-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Asm "p" constraint rejected #10060
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
Labels
Comments
clang still rejects this today while gcc accepts it:
|
CC @AaronBallman do you have any opinions on whether we should accept this or not? |
I don't have strong opinions; assembly constraints are handled by the backend:
|
weliveindetail
pushed a commit
to weliveindetail/llvm-project
that referenced
this issue
Feb 26, 2025
…e interop mode (llvm#10060) (llvm#10103) For a __null_terminated pointer 'p', only a __null_terminated pointer, a string literal or a call to `std::string::c_str/data` can be assigned to (/passed to/used to initialize, etc.) 'p'. Otherwise, an error will be emitted. The implementation reuses Bounds Safety's diagnostics. (rdar://138798346)
qiongsiwu
pushed a commit
to qiongsiwu/llvm-project
that referenced
this issue
Mar 1, 2025
…e interop mode (llvm#10060) For a __null_terminated pointer 'p', only a __null_terminated pointer, a string literal or a call to `std::string::c_str/data` can be assigned to (/passed to/used to initialize, etc.) 'p'. Otherwise, an error will be emitted. The implementation reuses Bounds Safety's diagnostics. (rdar://138798346)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Extended Description
From gcc testcase asm-4.c:
Both clang and dragonegg reject this. See #8704 for discussion.
The text was updated successfully, but these errors were encountered: