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

Avoid use of reserved names. #114

Open
bangerth opened this issue Feb 23, 2022 · 2 comments
Open

Avoid use of reserved names. #114

bangerth opened this issue Feb 23, 2022 · 2 comments

Comments

@bangerth
Copy link

The page at https://github.com/LLNL/sundials/blob/develop/doc/shared/sundials/SUNContext.rst describes the Context structure as declared as follows:

struct _SUNContext *SUNContext

This is unfortunate: Both C and C++ reserve all names that (i) start with an underscore, followed by an uppercase letter, (ii) start with two underscores. See https://en.cppreference.com/w/cpp/language/identifiers .

I haven't checked whether that's the only name in SUNDIALS that has this problem, or whether that's a pattern. Either way, it's probably worth avoiding the issue, and because these names aren't part of the public interface, it shouldn't even be that difficult to rename things if you so chose.

@balos1
Copy link
Member

balos1 commented Feb 28, 2022

Unfortunately, SUNDIALS has used a leading underscore followed by an uppercase letter from the beginning so it is not limited to just _SUNContext. We can work towards changing these when they are not part of the public interface for now, and then look into fixing the others when a major release is on the horizon.

@balos1
Copy link
Member

balos1 commented Jun 19, 2024

I am noting that the specific example mentioned has been resolved, but there are still a number of other places in SUNDIALS with this issue (and are in the public API). All new development in SUNDIALS avoids the reserved names though. We could consider changing existing ones for SUNDIALS 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants