Skip to content

[BUG] Can't use sizeof #566

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

Closed
JohelEGP opened this issue Aug 1, 2023 · 1 comment
Closed

[BUG] Can't use sizeof #566

JohelEGP opened this issue Aug 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@JohelEGP
Copy link
Contributor

JohelEGP commented Aug 1, 2023

Title: Can't use sizeof.

Minimal reproducer (https://cpp2.godbolt.org/z/8bs65Tzcz): main: () -> int = sizeof(i32);

Commands:
cppfront main.cpp2
clang++17 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -fsanitize=undefined -Werror=unused-result -I . main.cpp

Expected result: Program returned: 4.

Actual result and error: main.cpp2(1,25): error: use 'sizeof(()', not 'sizeof ('.

@JohelEGP JohelEGP added the bug Something isn't working label Aug 1, 2023
ntrel added a commit to ntrel/cppfront that referenced this issue Aug 6, 2023
ntrel added a commit to ntrel/cppfront that referenced this issue Aug 6, 2023
@hsutter
Copy link
Owner

hsutter commented Aug 10, 2023

Thanks. That's a migration diagnostic, and it should check that the next character isn't ( before complaining!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants