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

Add a simple "hello fmt" project which tests the compiler flags #970

Closed
0x8000-0000 opened this issue Dec 8, 2018 · 5 comments
Closed

Comments

@0x8000-0000
Copy link
Contributor

There seem to be an ebb and flow of regressions when building with stricter compilation flags. I suggest adding a simple "hello fmt" project that is built using the following flags for GCC and Clang:

-Wall -Wextra -Werror -pedantic -Wconversion -Wsign-conversion -Wunused -Wshadow -Wdouble-promotion -Wcast-align -Wnull-dereference

With this small project the automated builders could catch the build breaks.

@0x8000-0000
Copy link
Contributor Author

In our huge code base at ${BIG_CO}, each of these flags would have pinpointed bug locations. Yes, some of them are very noisy. But we're working through getting them cleaned up, one dozen at a time.

@DanielaE
Copy link
Contributor

DanielaE commented Dec 8, 2018

We do the same in our $(SMALL_CO). We find real bugs by doing so.

@vitaut
Copy link
Contributor

vitaut commented Dec 12, 2018

Most of these warnings are already there: https://github.com/fmtlib/fmt/blob/master/CMakeLists.txt#L70 . PRs to enable and at the same time fix additional warnings (within reason, -Weverything is not a goal) are welcome provided that they don't obfuscate the code too much.

@0x8000-0000
Copy link
Contributor Author

Opened #983 .

We are close to enabling -Wsign-conversion warnings (interestingly enough it is not part of -Wconversion on GCC but it is part of -Wconversion on Clang).

@vitaut
Copy link
Contributor

vitaut commented Dec 20, 2018

Fixed by #989, thanks!

@vitaut vitaut closed this as completed Dec 20, 2018
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