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.
You can control whether these diagnostics are emitted. One method is to use the build option --diag_suppress=112. Please see more details in the section titled Understanding DIagnostic Messages in the C28x compiler manual.
Thanks and regards,
TI C/C++ Compiler Forum ModeratorPlease click This Resolved My Issue on the best reply to your questionThe CCS Youtube Channel has short how-to videosThe Compiler Wiki answers most common questionsTrack an issue with SDOWP. Enter your bug id in the Search box.
In reply to George Mock:
I don't want to suppress the warnings, I just want them to make more sense. I have attached some code that demonstrates my issues:test.cpp
In reply to Dominic Fandrey:
Thank you for the test case. I used it to file CODEGEN-4153 in the SDOWP system to have this looked at. It is not filed as a defect, but as an enhancement request. You are welcome to follow it with the SDOWP link below in my signature.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.