Skip to content

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

Description

@thilinarmtb

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)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions