Article View: gnu.gcc.bug
Article #1554Can a varargs simple function be inlined?
From: Marty Leisner
Date: Wed, 16 Dec 1992 19:37
Date: Wed, 16 Dec 1992 19:37
46 lines
1557 bytes
1557 bytes
I'm running gcc 2.3.2 on sparcs, sunos 4.1.2
I have a simple function which I want to inline which uses varargs...
4 static void inline test_args( char *fmt, ...)
5 {
6 #if 0
7 va_list args;
8
9 va_start(args, fmt);
10
11 vfprintf(stderr, fmt, args);
12
13 va_end(args);
14 #endif
15 }
I used -finline-functions and received a warning:
"inline declaration ignored for function with `...'
So I played around and tried:
3 #ifndef 0
4 static void test_args()
5 {
6 }
7 #else
8 static void inline test_args( char *fmt, ...)
9 {
10 va_list args;
11
12 va_start(args, fmt);
13
14 vfprintf(stderr, fmt, args);
15
16 va_end(args);
17 }
18 #endif
and I can't seem to make an empty function inline (removing the call).
Hints?
--
marty
leisner.henr801c@xerox.com leisner@eso.mc.xerox.com
Member of the League for Programming Freedom
Technical Details
Message-ID:
<1992Dec16.193725.17942@spectrum.xerox.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!wrc.xerox.COM!leisnerShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!wrc.xerox.COM!leisner From: leisner@wrc.xerox.COM ( Marty Leisner) Subject: Can a varargs simple function be inlined? Message-ID: <1992Dec16.193725.17942@spectrum.xerox.com> Sender: gnulists@ai.mit.edu Reply-To: leisner@eso.mc.xerox.com Organization: Xerox Distribution: gnu Date: Wed, 16 Dec 1992 19:37:25 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 47