Skip to content
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

unaligned reference UB #224

Open
stsp opened this issue May 13, 2023 · 0 comments
Open

unaligned reference UB #224

stsp opened this issue May 13, 2023 · 0 comments

Comments

@stsp
Copy link
Member

stsp commented May 13, 2023

far_s& get_ref() { return ptr; }

This code is UB, as was explained to me here:
llvm/llvm-project#62358 (comment)
Possible solution suggested here:
llvm/llvm-project#62358 (comment)
I still don't know what to do with that just yet:
llvm/llvm-project#62358 (comment)

This all may became a problem (or a solution
of such) when/if clang starts checking for such
UB.

@stsp stsp added the postponed label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant