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

Variadic macros used in manner not compliant with ISO C++11 #107

Closed
judemille opened this issue Mar 21, 2024 · 3 comments
Closed

Variadic macros used in manner not compliant with ISO C++11 #107

judemille opened this issue Mar 21, 2024 · 3 comments
Labels
question Question

Comments

@judemille
Copy link

Compiling with -Wpedantic reveals a significant number of warnings surrounding the use of the assertion macros in utils/error.hpp. It seems that invoking such a macro without at least one argument for the ... is a violation of ISO C++11. It makes sense to me.

I can submit a PR to separate these macros out into versions with and without messages attached to them.

@jeremy-rifkin
Copy link
Owner

jeremy-rifkin commented Mar 21, 2024

Hi,
For any internal library code that is never included into end-user code I haven’t been concerned with -Wpedantic. Users FetchContnet’ing the library probably shouldn’t be imposing the flag on the library target and the library doesn't set it itself.

However, if this is the only thing, or one of few things, in the library that doesn’t get along with -Wpedantic and it would make a big difference for you I’d be happy to merge a PR.

@jeremy-rifkin jeremy-rifkin added the question Question label Apr 27, 2024
@marlowa
Copy link

marlowa commented Apr 28, 2024

I'd like to see this addressed in the cpptrace header please. Use of the pedantic flag opens one up to issues like this where it is desirable to see pedantic warnings in a project but we get distractions from pedantic warnings in third party headers. It's worse when one is trying to clean up a codebase and have the pedantic warnings treated as errors because it means the project fails to build even though the code of the project itself might be ok.

@jeremy-rifkin
Copy link
Owner

If this is affecting multiple users then it's reasonable to try to resolve and support. I can try to resolve this since I haven't heard back from OP.

@marlowa Are you seeing pedantic warnings in cpptrace public-facing headers? (i.e. cpptrace.hpp and ctrace.h) If so, what compiler are you using? I wasn't able to reproduce any with a brief test https://godbolt.org/z/Tnj1G3Wbz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

3 participants