FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.dg / warn / inline1.C
blob24836e744ebbff96e77af0f8720cc8096a0c03b1
1 // { dg-do compile }
3 // Copyright (C) 2002 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 26 Dec 2002 <nathan@codesourcery.com>
6 // PR 4803. Used inline functions must have a definition.
8 inline void Foo1 ();  // { dg-warning "inline function" "" }
9 inline void Bar1 ();
10 template <typename T> inline void Foo2(T);   // { dg-warning "inline function" "" }
11 template <typename T> inline void Bar2(T);
13 void Baz ()
15   Foo1 ();
16   Foo2 (1);
18   Bar1 ();
19   Bar2 (1);
22 inline void Bar1 () {}
23 template <typename T> inline void Bar2(T) {}