[go: nahoru, domu]

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

PR #13819: Added struct in front of recursive struct PJRT_Extension_Base #69847

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

copybara-service[bot]
Copy link

PR #13819: Added struct in front of recursive struct PJRT_Extension_Base

Imported from GitHub PR openxla/xla#13819

In C the type alias of struct PJRT_Extension_Base to PJRT_Extension_Base (without "struct") is not created yet, and the .h file fails to compile (both in gcc and clang).

C++ compiles that because it does create the alias.

The change won't break C++, and it will allow the C version to work as well.

See #13733

Tested with bazel test //xla/pjrt/c:pjrt_c_api_cpu_test
Copybara import of the project:

--
bf5f6e0718cf6f9302a1d53c7bf1ddd1acdbf750 by Jan janpfeifer@users.noreply.github.com:

Added struct in front of recursive struct PJRT_Extension_Base

In C the type alias of struct PJRT_Extension_Base to PJRT_Extension_Base (without "struct") is not created yet, and the .h file fails to compile (both in gcc and clang).

C++ compiles that because it does create the alias.

The change won't break C++, and it will allow the C version to work as well.

See #13733

Merging this change closes #13819

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#13819 from janpfeifer:patch-1 bf5f6e0718cf6f9302a1d53c7bf1ddd1acdbf750

…_Base

Imported from GitHub PR openxla/xla#13819

In C the type alias of `struct PJRT_Extension_Base` to `PJRT_Extension_Base` (without "struct") is not created yet, and the .h file fails to compile (both in gcc and clang).

C++ compiles that because it does create the alias.

The change won't break C++, and it will allow the C version to work as well.

See #13733

Tested with `bazel test //xla/pjrt/c:pjrt_c_api_cpu_test`
Copybara import of the project:

--
bf5f6e0718cf6f9302a1d53c7bf1ddd1acdbf750 by Jan <janpfeifer@users.noreply.github.com>:

Added `struct` in front of recursive struct PJRT_Extension_Base

In C the type alias of `struct PJRT_Extension_Base` to `PJRT_Extension_Base` (without "struct") is not created yet, and the .h file fails to compile (both in gcc and clang).

C++ compiles that because it does create the alias.

The change won't break C++, and it will allow the C version to work as well.

See #13733

Merging this change closes #13819

PiperOrigin-RevId: 643886316
@copybara-service copybara-service bot closed this Jun 17, 2024
@copybara-service copybara-service bot merged commit 3f72d7d into master Jun 17, 2024
1 check passed
@copybara-service copybara-service bot deleted the exported_pr_643563568 branch June 17, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant