Casting const void* const to const char* const produces the "ignored-qualifiers" warning, why?

I don’t understand why the following code gives the "type qualifiers ignored on cast result type" warning in GCC, can you please explain? #include <stdint.h> char f(const void* const a) noexcept { return static_cast<char>(*static_cast<const char* const>(a)); } https://godbolt.org/z/n8Ws9aTcq >Solution : A non-class non-array prvalue cannot be cv-qualified. This means that your static_cast<const char* const>(a) is… Read More Casting const void* const to const char* const produces the "ignored-qualifiers" warning, why?

warning C4244: 'return': conversion from 'double' to 'float', possible loss of data

Why do I get this compiler warning message on lines 2-6? warning C4244: ‘return’: conversion from ‘double’ to ‘float’, possible loss of data inline float SIGN(const double &a, const float &b) {return b >= 0 ? (a >= 0 ? a : -a) : (a >= 0 ? -a : a);} inline float pow (float… Read More warning C4244: 'return': conversion from 'double' to 'float', possible loss of data