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

Warnings when building with clang on Mac OS X #58

Open
njh opened this issue Jul 23, 2016 · 3 comments
Open

Warnings when building with clang on Mac OS X #58

njh opened this issue Jul 23, 2016 · 3 comments

Comments

@njh
Copy link
Contributor

njh commented Jul 23, 2016

Hi,

I have just started using libcheck again for a new project. While the tests are working file, I am getting complier warnings with clang:

/usr/local/Cellar/check/0.10.0/include/check.h:454:75: error: token pasting of ',' and __VA_ARGS__ is a GNU extension
  [-Werror,-Wgnu-zero-variadic-macro-arguments]
 _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)

The hacky way to work round this is using the -Wno-gnu-zero-variadic-macro-arguments compiler flag. But I think it would be better to not have to do this.

check: stable 0.10.0 (bottled)
Clang: Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0

Also slightly surprised nobody else seems to have reported this.

nick.

@brarcher
Copy link
Contributor

I think that the following pull request attempts to resolve this:

#40

However, the proposed changes do not yet test successfully when using MSVC on Windows. If you happen to have access to Windows and want to take a stab at it, I would be grateful. (: Though, if you are reporting this from OSX, you may not have Windows with MSVC installed.

@njh
Copy link
Contributor Author

njh commented Jul 23, 2016

Yeah, sorry I don't have access to Windows.

timber-they added a commit to timber-they/PfN-Project that referenced this issue Jun 4, 2020
See [this issue](libcheck/check#58) for more information - this is basically a bug in check.
@iasonov
Copy link

iasonov commented Apr 18, 2024

Same issue on my Mac (M1). I have Parallels (so I can try test proposed changes with MSVC on Win 11).

check: 0.15.2
gcc:
Apple clang version 15.0.0 (clang-1500.3.9.4)
target: arm64-apple-darwin23.4.0

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

3 participants