This is a repetition of a question that I posted to the general "Programing" topic and did not get a nice solution.
I would like to know if there is a way of disabling a specific warning in gcc. Normally I would do it with the preprocessor pragma, but cannot find the way of getting warning numbers. I neither can use a gcc option as it seems that none is suitable for my case.
The problem is that when one performs >=0 check against and unsigned short (but not unsigned int for example!) the gcc issues the warning:
"comparison is always 1 due to limited range of data type".
According to the manual it should only be displayed if you use -W option, but for unsigned short it is always displayed (of course unless using -w).
I cannot change the comparison itself, as it is inside the template - so it only for some instantiations when this comparison is always true. The warnings are quite annoying for template users.
I include a few lines of code with which you can check this behaviour.
Thanks a lot for your help,