Skip to content

[BUG] Function returning unnamed declaration needs extra semicolon #611

Closed

Description

@JohelEGP

Title: Function returning unnamed declaration needs extra semicolon.

Description:

This is the case when the function followed by Cpp1 code or EOF.

Minimal reproducer (https://cpp2.godbolt.org/z/cP1Gzrzad):

main: () = _ = :i32 = 0;
Commands:
cppfront main.cpp2
clang++17 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -I . main.cpp

Expected result: A well-formed program.

Actual result and error: main.cpp2: error: unexpected end of source file.

Activity

  1. JohelEGP commented on Oct 30, 2023

    @JohelEGP
    ContributorAuthor

    Doesn't reproduce anymore.

  2. gregmarr commented on Oct 30, 2023

    @gregmarr
    Contributor

    I suspect this was fixed by 785c44d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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