cp/
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wparentheses-4.C
blob2048ed7c7f14613129902f2f9fa1dea90dd37888
1 // Test that -Wparentheses does not give bogus warnings in the
2 // presence of templates for non-plain assignment.  Bug 17120.
4 // { dg-do compile }
5 // { dg-options "-Wparentheses" }
7 template<typename _Tp>
8   inline _Tp
9   cmath_power(_Tp __x, unsigned int __n)
10   {
11     while (__n >>= 1)
12       ;
13     return __x;
14   }
16 int main()
18   cmath_power(1.0, 3);