OSDN Git Service

2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / warn / inline1.C
1 // { dg-do compile }
2
3 // Copyright (C) 2002 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 26 Dec 2002 <nathan@codesourcery.com>
5
6 // PR 4803. Used inline functions must have a definition.
7
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);
12
13 void Baz ()
14 {
15   Foo1 ();
16   Foo2 (1);
17
18   Bar1 ();
19   Bar2 (1);
20 }
21
22 inline void Bar1 () {}
23 template <typename T> inline void Bar2(T) {}