bitcalc: Add check for compiler version

Some warnings are not available or useless on older versions of GCC. Add a check
for compiler version so these warnings are only enabled for newer version of
GCC.

Signed-off-by: Mats Liljegren <mats.liljegren@enea.com>