2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / warn / noeffect2.C
blob7bd2925f542f0b78493cbe264f2c465c035762ee
1 // { dg-do compile }
2 // { dg-options "-Wall" }
4 // Copyright (C) 2003 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 18 Aug 2003 <nathan@codesourcery.com>
6 // Origin PR 11945 gerald@pfeifer.com
8 // PR 11945 inconsistent warnings
10 extern "C" void FormatDisk();
11   template <class T>
12   struct C {
13     C(){ FormatDisk(), 0; }  // { dg-warning "right-hand operand of comma" "" }
14   };
15   template <class T>
16   void f() { FormatDisk(), 0; } // { dg-warning "right-hand operand of comma" "" }
17 void g() { FormatDisk(), 0; } // { dg-warning "right-hand operand of comma" "" }