This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/82521] New: No -Wtype-limits warning when using templates


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]