https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70057
Bug ID: 70057 Summary: duplicate integer overflow diagnostic in constant expressions Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: manu at gcc dot gnu.org CC: bernds at gcc dot gnu.org, mpolacek at gcc dot gnu.org, msebor at gcc dot gnu.org, unassigned at gcc dot gnu.org Depends on: 69972 Target Milestone: --- +++ This bug was initially created as a clone of Bug #69972 +++ G++ issues two similar kinds of diagnostics for the following code, one -Woverflow and another -fpermissive: $ cat t.c && /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -S -Wall -Wextra -Wpedantic -o/dev/null -xc++ t.c template <int N> struct S { }; S<(__INT_MAX__ + 1)> s; t.c:2:16: warning: integer overflow in expression [-Woverflow] S<(__INT_MAX__ + 1)> s; ~~~~~~~~~~~~^~~ t.c:2:20: error: overflow in constant expression [-fpermissive] S<(__INT_MAX__ + 1)> s; ^ t.c:2:20: note: in template argument for type ‘int’ Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69972 [Bug 69972] duplicate integer overflow diagnostic in constant expressions