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

Investigate behavior of __GNUC__ macro #1971

Open
czarny247 opened this issue Dec 21, 2023 · 1 comment
Open

Investigate behavior of __GNUC__ macro #1971

czarny247 opened this issue Dec 21, 2023 · 1 comment
Labels
janitorial build system, cleanups, project mgmt

Comments

@czarny247
Copy link
Contributor

Assumptions:

  • It's not clear if __GNUC__ is defined if you disable GNU extensions even if your compiler supports it. maybe we should open an issue to figure out what we really ought to be doing for these checks.

  • It is not defined for Clang if it is set up for MSVC (Windows)

Originally posted by @bradallred in #1969 (comment)

@lynxlynxlynx lynxlynxlynx added the janitorial build system, cleanups, project mgmt label Dec 21, 2023
@lynxlynxlynx
Copy link
Member

If we want to avoid using it, it's as simple as adding 5 more cmake tests for compiler features. Namely:

  • __attribute__ ((deprecated
  • __attribute__ ((visibility
  • __attribute__ ((warn_unused_result))
  • __attribute__ ((sentinel))
  • __attribute__ ((unused))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
janitorial build system, cleanups, project mgmt
Projects
None yet
Development

No branches or pull requests

2 participants