10000 Disable -Wreturn-type-c-linkage under clang-cl by georgthegreat · Pull Request #21505 · opencv/opencv · GitHub
[go: up one dir, main page]

Skip to content

Disable -Wreturn-type-c-linkage under clang-cl #21505

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

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

georgthegreat
Copy link
Contributor

clang-cl defines both clang and _MSC_VER, yet uses #pragma GCC to disable certain diagnostics.

At the time -Wreturn-type-c-linkage was reported by clang-cl.
This PR fixes this behavior by reordering defines.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • [ + ] I agree to contribute to the project under Apache 2 License.
  • [ + ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • [ + ] The PR is proposed to the proper branch
  • [ - ] There is a reference to the original bug report and related work
  • [ - ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • [ - ] The feature is well documented and sample code can be built with the project CMake

@alalek
Copy link
Member
alalek commented Jan 24, 2022

This patch should go into 3.4 branch first.
We will merge changes from 3.4 into 4.x regularly (weekly/bi-weekly).

Please:

  • change "base" branch of this PR: 4.x => 3.4 (use "Edit" button near PR title)
  • rebase your commits from 4.x onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/4.x
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@georgthegreat georgthegreat changed the base branch from 4.x to master January 24, 2022 08:35
clang-cl defines both __clang__ and _MSC_VER, yet uses `#pragma GCC` to disable certain diagnostics.

At the time `-Wreturn-type-c-linkage` was reported by clang-cl.
This PR fixes this behavior by reordering defines.
@georgthegreat georgthegreat changed the base branch from master to 3.4 January 24, 2022 08:42
@georgthegreat
Copy link
Contributor Author

@alalek, it should be fixed now.

@opencv-pushbot opencv-pushbot merged commit e675936 into opencv:3.4 Jan 24, 2022
@georgthegreat georgthegreat deleted the patch-1 branch January 24, 2022 14:07
@alalek alalek mentioned this pull request Jan 28, 2022
@alalek alalek mentioned this pull request Feb 22, 2022
@asmorkalov asmorkalov modified the milestones: 4.6.0, 3.4.17 Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0