• Resolved

Compiler: C2000 warnings #112 and #187 (unreachable code) issued for templated code

Tool/software: TI C/C++ Compiler

I'm seeing plenty of warnings #112 and #187 in templated code.

It is true that the code is unreachable for the template instances the warnings are issued for, however this is not true for all possible sets of template arguments.

I think unreachable code warnings should only be issued for code that is unreachable independent of template arguments. The whole point of templates for me is to provide abstractions that the compiler can see through and throw away.