https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82521
Bug ID: 82521 Summary: No -Wtype-limits warning when using templates Product: gcc Version: 5.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: enrique.fernandez.perdomo at gmail dot com Target Milestone: --- Inside templated functions or classes, even when the template arguments don't affect the type of the variables involved in the expression, the type-limits warnings don't show up. Example code and output (value == -1, with value uint8_t): https://wandbox.org/permlink/o3kbJSnQHta3d9Hw gcc 5.4.0 and newer version up to HEAD in wandbox.org are affected.