PR #13819: Added struct
in front of recursive struct PJRT_Extension_Base
#69847
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #13819: Added
struct
in front of recursive struct PJRT_Extension_BaseImported from GitHub PR openxla/xla#13819
In C the type alias of
struct PJRT_Extension_Base
toPJRT_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_BaseIn C the type alias of
struct PJRT_Extension_Base
toPJRT_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