On 05/15/2012 03:14 PM, Jason Merrill wrote:
OK.
Thanks. I applied the patch.

However, I just noticed that I somehow missed a small issue in the testsuite (sorry): we have a testcase which is now failing because in templates we don't warn anymore (the warning is produced by warn_for_div_by_zero which also uses c_inhibit_evaluation_warnings). Is the attached tweak Ok or we want something more sophisticated?

Thanks,
Paolo.

////////////////////////
Index: crash10.C
===================================================================
--- crash10.C   (revision 187551)
+++ crash10.C   (working copy)
@@ -3,7 +3,7 @@
 template<int M, int N>
 class GCD {
 public:
-  enum { val = (N == 0) ? M : GCD<N, M % N>::val }; // { dg-warning "division" 
"division" }
+  enum { val = (N == 0) ? M : GCD<N, M % N>::val };
 // { dg-error "constant expression" "valid" { target *-*-* } 6 }
 // { dg-message "template argument" "valid" { target *-*-* } 6 }
 };

Reply via email to