This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/82521] New: No -Wtype-limits warning when using templates
- From: "enrique.fernandez.perdomo at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Oct 2017 19:42:20 +0000
- Subject: [Bug c++/82521] New: No -Wtype-limits warning when using templates
- Auto-submitted: auto-generated
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.