-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Superfluous parentheses in declarations are handled incorrectly #606
Comments
Hello @DivineWinds, thanks for spotting this! A fix is on its way. Andreas |
Fixed #606: Correct handling of parentheses in a variable declaration.
Thanks for the fix @andreasfertig. I'm sorry for being a nuisance but unfortunately I discovered a problem with it. EDIT: I don't know if this is useful in any way but turning any of the above examples into array declarations seems to fix them, e.g. |
Hello @DivineWinds, thanks for the testing. What is the use-case for all that? Is this production code? Andreas |
I'm not aware of any use case. I originally found this by just copying the
Most Vexing Parse example from Wikipedia and changing the type of my_dbl to
double*. There was no reason for me to do this other than to see what would
happen. After you fixed that, I tried some more complicated cases just to
see how robust the fix was. So, as far as I know, you can ignore this issue
and no production code would be affected.
Στις Τρί 13 Φεβ 2024, 16:22 ο χρήστης Andreas Fertig <
***@***.***> έγραψε:
… Hello @DivineWinds <https://github.com/DivineWinds>,
thanks for the testing. What is the use-case for all that? Is this
production code?
Andreas
—
Reply to this email directly, view it on GitHub
<#606 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2NIDFGBEIGH5RVTTQHVICDYTNZJJAVCNFSM6AAAAABCLF4QGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBRGYZDKOJYGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Input:
Output:
This is wrong and fails to compile. Ideally the unnecessary parentheses would be removed but leaving them untouched is also an option.
The text was updated successfully, but these errors were encountered: