1 // { dg-do compile } 2 // { dg-options "-Wall" } 3 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 7 8 // PR 11945 inconsistent warnings 9 10 extern "C" void FormatDisk(); 11 template <class T> 12 struct C { CC13 C(){ FormatDisk(), 0; } // { dg-warning "right operand of comma" } 14 }; 15 template struct C<int>; // { dg-message "required" } 16 template <class T> 17 void f() { FormatDisk(), 0; } // { dg-warning "right operand of comma" } 18 template void f<int> (); // { dg-message "required" } 19 void g() { FormatDisk(), 0; } // { dg-warning "right operand of comma" } 20 21