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

cgen: dump expr ignore ptr ampersands #22933

Closed
wants to merge 2 commits into from
Closed

Conversation

pektezol
Copy link

@pektezol pektezol commented Nov 21, 2024

Fixes #22794

Printing a pointer outputs only the value, but dumping it prepends '&'.

This pr removes the part in cgen::dump_expr_defintions that prepends ampersand for the number of '*'s, matching the same output as print. The part was added in #10912

Not sure if they should actually be removed from dump though. First time contributor :)

Huly®: V_0.6-21375

@spytheman
Copy link
Member

Dumping is intended for debugging. I think that it works better with showing the level of indirections that a pointer has, and so this PR should not be merged, and the issue should be just closed.

@medvednikov what do you think?

@medvednikov
Copy link
Member

I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dump and println act different
3 participants