https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69972
Bernd Schmidt <bernds at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernds at gcc dot gnu.org --- Comment #3 from Bernd Schmidt <bernds at gcc dot gnu.org> --- For C I'm thinking it should be straightforward to set/check TREE_NO_WARNING (I have an untested patch). For the C++ testcase the problem is that the first one is a warning, while the second one is an error - we can't really omit that. The C++ errors become even more entertaining when you add -fpermissive: 69972-b.cc:2:16: warning: integer overflow in expression [-Woverflow] 69972-b.cc:2:20: warning: overflow in constant expression [-fpermissive] 69972-b.cc:2:20: note: in template argument for type ‘int’ 69972-b.cc: In instantiation of ‘struct S<-2147483648>’: 69972-b.cc:2:22: required from here 69972-b.cc:1:27: warning: overflow in constant expression [-fpermissive] 69972-b.cc:1:27: note: in template argument for type ‘int’ 69972-b.cc:1:27: warning: overflow in constant expression [-fpermissive] 69972-b.cc:1:27: note: in template argument for type ‘int’ 69972-b.cc:1:27: warning: overflow in constant expression [-fpermissive] 69972-b.cc:1:27: note: in template argument for type ‘int’