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

-Wreserved-identifier warnings in public API names #419

Closed
seanm opened this issue Nov 10, 2023 · 7 comments
Closed

-Wreserved-identifier warnings in public API names #419

seanm opened this issue Nov 10, 2023 · 7 comments

Comments

@seanm
Copy link
Contributor

seanm commented Nov 10, 2023

VTK almost builds cleanly with clang's -Wreserved-identifier. Some of the remaining warnings are from seacas, ex:

/Users/builder/external/VTK/ThirdParty/ioss/vtkioss/Ioss_Map.h:105:13: warning: identifier 'global_to_local__' is reserved because it contains '__' [-Wreserved-identifier]

This warning is admittedly very pedantic, but it's often easy to fix with a simple rename. I was going to do so, but noticed many of the symbols in question are public. So not sure how to proceed...

@gsjaardema
Copy link
Member

I thought that most were in the private section of the classes, so renaming should be fine. I will see if there are any in the public sections... If you have a list of the public ones, you could add to this issues.

@seanm
Copy link
Contributor Author

seanm commented Nov 10, 2023

Well the one quoted (global_to_local__) is in a public section.

I guess we could do a renaming, then do something like:

#define global_to_local__ new_name_for_global_to_local

to provide backwards compatibility.

@gsjaardema
Copy link
Member

global_to_local__ is in the private section of the Ioss::Map and Ioss::DatabaseIO classes in my code...

@gsjaardema
Copy link
Member

There are a couple xx__ in the public section of Iocgns::DatabaseIO, but I think they are just misplaced and can be moved to private...

@gsjaardema
Copy link
Member

Starting a PR to address this #420

@seanm
Copy link
Contributor Author

seanm commented Nov 10, 2023

global_to_local__ is in the private section of the Ioss::Map and Ioss::DatabaseIO classes in my code...

OK, I didn't look very deeply. I just see it under a public: section:

  class IOCGNS_EXPORT DatabaseIO : public Ioss::DatabaseIO
  {
  public:

  [... snip ...]

    int64_t node_global_to_local__(int64_t global, bool must_exist) const override;

Thanks for starting the PR!

@gsjaardema
Copy link
Member

I think the reference PR solves the issue. Please reopen if still problems.

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