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

Fix warning due to usage of GNU extension ##__VA_ARGS__ #226

Open
thilinarmtb opened this issue Jul 4, 2023 · 0 comments
Open

Fix warning due to usage of GNU extension ##__VA_ARGS__ #226

thilinarmtb opened this issue Jul 4, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@thilinarmtb
Copy link
Contributor

thilinarmtb commented Jul 4, 2023

Currently, the only warning I see when building libnomp is the following:

In file included from /Users/thili/Repos/nomp-org/libnomp/src/nomp.c:1:
In file included from /Users/thili/Repos/nomp-org/libnomp/include/nomp-impl.h:26:
/Users/thili/Repos/nomp-org/libnomp/include/nomp-log.h:51:52: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]
  nomp_log_(desc, logno, type, __FILE__, __LINE__, ##__VA_ARGS__)

This is due to the usage of ##__VA_ARGS__ which is a GNU extension (although widely supported by different compilers).

Once this is fixed, we should treat warnings as errors in CMakeLists.txt:

set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
@thilinarmtb thilinarmtb added the good first issue Good for newcomers label Jul 4, 2023
This was referenced Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant