Skip to content

[BUG] Can't use sizeof #566

@JohelEGP

Description

@JohelEGP

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 ('.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions