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

fix building error for error: fallthrough annotation in unreachable code #100742

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

shushanhf
Copy link
Contributor

/home/qiao/work_qiao/runtime/src/coreclr/interop/comwrappers.cpp:740:21: error: fallthrough annotation in unreachable code [-Werror,-Wimplicit-fallthrough]
                    FALLTHROUGH;
                    ^
/home/qiao/work_qiao/runtime/src/native/minipal/utils.h:25:25: note: expanded from macro 'FALLTHROUGH'
#    define FALLTHROUGH [[fallthrough]]

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 7, 2024
@shushanhf
Copy link
Contributor Author

shushanhf commented Apr 7, 2024

Hi, @jkotas
Who can help reviewing this PR?
Thanks

I find @AaronRobinsonMSFT @jkoritzinsky by https://github.com/dotnet/runtime/blob/main/docs/area-owners.md

@AaronRobinsonMSFT
Copy link
Member

Is this on a Release or Debug/Checked build?

@AaronRobinsonMSFT
Copy link
Member

AaronRobinsonMSFT commented Apr 7, 2024

The problem here, and something the above code now doesn't handle, is this code is calling into a user defined ICustomQueryInterface.GetInterface(). The user could cast any int to CustomQueryInterfaceResult and then the above logic is flawed.

@jkotas jkotas added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Apr 7, 2024
@shushanhf
Copy link
Contributor Author

shushanhf commented Apr 8, 2024

Is this on a Release or Debug/Checked build?

On Debug build on the LoongArch64-linux with clang-13 and arm64 linux with clang-8.
I tested it on AMD64-linux that is also failed when building the coreclr.

@shushanhf shushanhf force-pushed the build_errors branch 2 times, most recently from bb7dcec to 2a1cc85 Compare April 9, 2024 00:46
…code`

when building on debug mode on loongarch64/arm64/amd64-linux by clang<14.

Also delete `#ifndef FALLTHROUGH` block as dotnet#98336 added after dotnet#98712.
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit fe6dc19 into dotnet:main Apr 9, 2024
92 checks passed
@shushanhf shushanhf deleted the build_errors branch April 9, 2024 04:17
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
…code` (dotnet#100742)

when building on debug mode on loongarch64/arm64/amd64-linux by clang<14.

Also delete `#ifndef FALLTHROUGH` block as dotnet#98336 added after dotnet#98712.
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Interop-coreclr community-contribution Indicates that the PR has been added by a community member NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants