Skip to content

[libspirv] Avoid macro redefinition #18670

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 2 commits into from
May 26, 2025

Conversation

frasercrmck
Copy link
Contributor

The macro __CLC_FUNCTION is special and is used in CLC headers. Defining it here in an implementation file - nextafter.cl - for another purpose then including half_nextafter.inc which pulls in the SPIR-V headers results in a macro redefinition, which is warned about.

Sicne the name isn't important and is local to this one file, this commit just changes the macro definition to fix the issue.

The macro __CLC_FUNCTION is special and is used in CLC headers. Defining
it here in an implementation file - nextafter.cl - for another purpose
then including half_nextafter.inc which pulls in the SPIR-V headers
results in a macro redefinition, which is warned about.

Sicne the name isn't important and is local to this one file, this
commit just changes the macro definition to fix the issue.
@frasercrmck frasercrmck requested a review from a team as a code owner May 26, 2025 14:56
@frasercrmck frasercrmck requested review from npmiller and wenju-he May 26, 2025 14:56
@frasercrmck
Copy link
Contributor Author

@intel/llvm-gatekeepers this can be merged, thanks. The failure is unrelated and is tracked in #18668.

@martygrant martygrant merged commit 8500738 into intel:sycl May 26, 2025
23 of 24 checks passed
@frasercrmck frasercrmck deleted the libspirv-fix-macro-redef branch May 26, 2025 16:31
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.

3 participants