Closed r-barnes closed 1 month ago
Thanks for the suggestion. This might be a good idea, but it would have to be done portably. I believe this attribute (and -Wimplicit-fallthrough
) is not supported prior to gcc 7, and presumably there are compilers other than MSVC that don't recognize it. In C++17, it's [[fallthrough]]
. I would prefer some macro mechanism that can be applied to both C and C++ code. Maybe add a fallthrough_
macro to include/zfp/internal/zfp/system.h
?
@r-barnes Take a look at 6814a4e and see if it meets your needs.
@lindstro - That looks good, thanks!
Using
allows the compiler to check for implicit fallthroughs with
-Wimplicit-fallthrough
, which has found many issues in the codebases I've used it on.It would be helpful if ZFP, as a core dependency, could use explicit fallthroughs to facilitate such checking.