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

Inconsistent handling of unrecognized _Generic type (possibly) #933

Open
davidozog opened this issue Feb 24, 2020 · 1 comment
Open

Inconsistent handling of unrecognized _Generic type (possibly) #933

davidozog opened this issue Feb 24, 2020 · 1 comment
Assignees
Milestone

Comments

@davidozog
Copy link
Member

When a C11 generic routine encounters an unrecognized type, most routines call an empty function, shmem_ctx_c11_generic_selection_failed, but some do not. For example, shmem_put, shmem_iput, shmem_get, shmem_iget and non-blocking variants do not default to the empty function, but shmem_p, shmem_g, the AMOs (and more) do.

I presume this strategy prevents nasty compilation errors when encountering unrecognized types, but I'm not quite sure whether the inconsistencies mentioned above could be cleaned up or not.

This came up in PR #929 when we considered combining several checks on __STDC_VERSION__ into one inside a unit test.

@jdinan
Copy link
Member

jdinan commented Feb 25, 2020

Your presumption is correct. We saw some pretty unintelligible compiler errors when the type was not recognized, and added shmem_ctx_c11_generic_selection_failed to give users a breadcrumb for the cause of the error. The compiler errors have gotten much better and it may now be fine to retire this function in favor of simplifying the C11 bindings.

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

No branches or pull requests

2 participants