[libc-commits] [PATCH] D119002: [libc] Fix compilation with gcc

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Feb 7 09:45:40 PST 2022


sivachandra added a comment.

In D119002#3300263 <https://reviews.llvm.org/D119002#3300263>, @gchatelet wrote:

> For type punning not all compilers warn about it, do you mean we should ask developers to test their code against both Clang and GCC? I think we should have this covered by the CI.

You have kind of provided GCC compilation as the motivation for your changes. My view is that, all of your changes are good even without GCC in picture. So, couple of things about this:

1. We could add those flags by default when the compiler supports it. But if this has the potential to hinder the development cycle, for example it stops experimenting with type punning, then we should have a CMake flag to enable/disable the compiler flags. Iff we chose the route of providing a CMake flag, that is when my point about developer guidance becomes relevant.
2. The CI should cover them of course, but it also means that developers should know how to reproduce the errors when they happen.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119002/new/

https://reviews.llvm.org/D119002



More information about the libc-commits mailing list