Enable -Wconversion for GHC's C code
Because apparently none of -Wall, -Wextra or -pedantic of GCC imply -Wconversion or its subset -Wsign-conversion: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51625
That means currently you can call a function taking an unsigned int with a signed int without getting any warning.
That is very bad, because of course negative numbers will overflow.
Having -Wconversion would have caught overflow errors such as this one: https://phabricator.haskell.org/D3955#110993
We should probably have it for the C code.
Turning it on everywhere will be quite some work though because it creates lots of complaints such as long long int not being the same as long int (which is technically correct but in practice they are typically the same).
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.2.1 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | low |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | bgamari, nh2 |
| Operating system | |
| Architecture |