Can we have inline functions in c?

  • Follow


Hi,

Can we have inline function in C or this feature is from C++.
What does ANSI say about the use of inline functions?
Do gcc support it as a feature of C or C++?

Thanks!
Prafull Soni


0
Reply sprafull (2) 3/4/2005 3:27:25 AM

Prafull Soni wrote:
>
> Can we have inline function in C or this feature is from C++.
> What does ANSI say about the use of inline functions?

C99 has inline functions, earlier versions of Standard C
don't. Many C compilers support some form of inline
functions as extensions. Don't know about C++ - ask down
the hall for expert opinion.

> Do gcc support it as a feature of C or C++?

In a Standard way in C99-ish mode, as an extension in
other C modes, don't know about C++. Ask down the other
hall for details.

0
Reply jjf (517) 3/4/2005 3:37:26 AM


Prafull Soni wrote:
> 
> Can we have inline function in C.

Yes.

> Or this feature is from C++.

It's a little different in C++.

> What does ANSI say about the use of inline functions?
> Do gcc support it as a feature of C or C++?

Take a look at
Status of C99 features in GCC 4.0

	http://gcc.gnu.org/gcc-4.0/c99status.html
0
Reply E.Robert.Tisdale (2031) 3/4/2005 3:51:02 AM

E. Robert Tisdale wrote:
> Prafull Soni wrote:
> >
> > Can we have inline function in C.
>
> Yes.

Tisdale, I think you should stop giving such short "yes" or "no"
answers unless it's a black/white type situation. Do you do this on
purpose?  I've seen it in a couple of your posts lately, and it's very
misleading.

C99 does have inline functions but C89 doesn't.  As we all know, C99
adoption by compilers has been lacklustre, so a clear cut answer is
impossible- it depends on the specific implementation.  For portability
sake, I wouldn't count on inline code (in fact, my desktop compiler
doesn't support it).

Tisdale, stop with the "YES", or "NO" answers please.

0
Reply kiru.sengal (37) 3/4/2005 4:18:10 AM

In <1109907446.469099.301600@o13g2000cwo.googlegroups.com> jjf@bcs.org.uk writes:


>Prafull Soni wrote:
>>
>> Do gcc support it as a feature of C or C++?
>
>In a Standard way in C99-ish mode,

Make it: "in a non-standard way in C99-ish mode", because gcc's inline
is still broken in -std=c99 mode.

Dan
-- 
Dan Pop <Dan.Pop@ifh.de>
0
Reply Dan.Pop (3615) 3/4/2005 7:36:41 AM

Kiru Sengal wrote:
> 
> Tisdale, stop with the "YES", or "NO" answers please.

No.
0
Reply E.Robert.Tisdale (2031) 3/4/2005 3:30:32 PM

Kiru Sengal wrote:
> E. Robert Tisdale wrote:
>> Prafull Soni wrote:
>>>
>>> Can we have inline function in C.
>>
>> Yes.
> 
> Tisdale, I think you should stop giving such short "yes" or "no"
> answers unless it's a black/white type situation. Do you do this
> on purpose?  I've seen it in a couple of your posts lately, and
> it's very misleading.

He is known as "Trollsdale" around here, and he either does it on
purpose or has some serious mental deficencies.  The primary reason
for reading his posts is to defend against his tactic of editing
quoted material.

-- 
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on 
 "show options" at the top of the article, then click on the 
 "Reply" at the bottom of the article headers." - Keith Thompson


0
Reply cbfalconer (19183) 3/4/2005 3:42:30 PM

In article <d09uum$g30$1@nntp1.jpl.nasa.gov>, 
E.Robert.Tisdale@jpl.nasa.gov says...
> Kiru Sengal wrote:
> > 
> > Tisdale, stop with the "YES", or "NO" answers please.
> 
> No.

Then how about you stop editing people's posts and then
quoting your modified text as if it was the original?

-- 
Randy Howard (2reply remove FOOBAR)
"Making it hard to do stupid things often makes it hard
 to do smart ones too." -- Andrew Koenig
0
Reply randyhoward (3272) 3/4/2005 4:14:10 PM

CBFalconer wrote:
> 
> He is known as "Trollsdale" around here, [...]

     ... which is evidence enough of the immaturity of
some "around here."  Name-calling is the province of
politicians, third-grade schoolchildren, drunken sports
fans -- and, sadly, comp.lang.c.

     A pox on you, CBFuckover!  Bad cess to you, Brian
Blowmyhorn!  Pop off, Joona Joona Big Kahuna!  (And
even: Go c[f]ook yourself, Eric Saucepan ...)

     Refute the mistakes, dispute the errors, correct
the crazinesses -- but as you do so, try to maintain
the lofty dignity of, say, a prepubescent high-schooler.
It'd be an improvement.

-- 
Eric Sosman
esosman@acm-dot-org.invalid
0
Reply esosman (1335) 3/5/2005 2:41:03 AM

Eric Sosman <esosman@acm-dot-org.invalid> writes:
> CBFalconer wrote:
>> He is known as "Trollsdale" around here, [...]
>
>      ... which is evidence enough of the immaturity of
> some "around here."  Name-calling is the province of
> politicians, third-grade schoolchildren, drunken sports
> fans -- and, sadly, comp.lang.c.
[snip]
>      Refute the mistakes, dispute the errors, correct
> the crazinesses -- but as you do so, try to maintain
> the lofty dignity of, say, a prepubescent high-schooler.
> It'd be an improvement.

Name-calling is immature when it's undeserved.  When someone has a
years-long history of consistenly trollish behavior, it's nearly
inevitable.

We *do* refute the mistakes, one by one.  We spend far too much of our
time doing so, and it's frustrating.  I don't engage in much of the
namecalling myself, but I find it completely understandable.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst>
We must do something.  This is something.  Therefore, we must do this.
0
Reply kst-u (21469) 3/5/2005 8:04:16 AM

Eric Sosman wrote:
> CBFalconer wrote:
> >
> > He is known as "Trollsdale" around here, [...]
>
>      ... which is evidence enough of the immaturity of
> some "around here."  Name-calling is the province of
> politicians, third-grade schoolchildren, drunken sports
> fans -- and, sadly, comp.lang.c.
>
>      A pox on you, CBFuckover!  Bad cess to you, Brian
> Blowmyhorn!  Pop off, Joona Joona Big Kahuna!  (And
> even: Go c[f]ook yourself, Eric Saucepan ...)
>
>      Refute the mistakes, dispute the errors, correct
> the crazinesses -- but as you do so, try to maintain
> the lofty dignity of, say, a prepubescent high-schooler.
> It'd be an improvement.

Gee, thanks, Eric, all we need is another thread about manners.
Perhaps while we're at it, you can explain exactly why we're supposed
to care about your highfalutin ideals.

If Chuck wants to call Tisdale "Trollsdale", it's fine with me.
Getting your panties in a bunch over it seems like a waste of time, but
I suppose that's just my opinion.


Mark F. Haigh
mfhaigh@sbcglobal.net

0
Reply mfhaigh (154) 3/5/2005 9:04:40 AM

Eric Sosman wrote:
> CBFalconer wrote:
> 
>>
>> He is known as "Trollsdale" around here, [...]
> 
> 
>     ... which is evidence enough of the immaturity of
> some "around here."  Name-calling is the province of
> politicians, third-grade schoolchildren, drunken sports
> fans -- and, sadly, comp.lang.c.
> 
>     A pox on you, CBFuckover!  Bad cess to you, Brian
> Blowmyhorn!  Pop off, Joona Joona Big Kahuna!  (And
> even: Go c[f]ook yourself, Eric Saucepan ...)
> 
>     Refute the mistakes, dispute the errors, correct
> the crazinesses -- but as you do so, try to maintain
> the lofty dignity of, say, a prepubescent high-schooler.
> It'd be an improvement.
> 
This post was sent by "esosman@acm-dot-org.invalid". The Eric Sosman I 
know usually signs "eric.sosman@sun.com". Curious.

-- 
Joe Wright                            mailto:joewwright@comcast.net
"Everything should be made as simple as possible, but not simpler."
                     --- Albert Einstein ---
0
Reply joewwright (1737) 3/5/2005 2:26:25 PM

On Fri, 04 Mar 2005 21:41:03 -0500, in comp.lang.c , Eric Sosman
<esosman@acm-dot-org.invalid> wrote:

>CBFalconer wrote:
>> 
>> He is known as "Trollsdale" around here, [...]
>
>     ... which is evidence enough of the immaturity of

talking of Identity Theft....



-- 
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
0
Reply markmcintyre (4547) 3/5/2005 5:00:26 PM

Joe Wright wrote:

> Eric Sosman wrote:
>> [...]
> This post was sent by "esosman@acm-dot-org.invalid". The Eric Sosman I 
> know usually signs "eric.sosman@sun.com". Curious.

     He's my evil twin.

     More seriously, you "know" Eric Sosman by what I/he/we
write.  Read, and decide for yourself -- if it's important;
sometimes the message deserves more attention than the
messenger.

-- 
Eric Sosman
esosman@acm-dot-org.invalid

0
Reply esosman (1335) 3/6/2005 10:12:04 PM


Eric Sosman wrote:
> Joe Wright wrote:
> 
> 
>>Eric Sosman wrote:
>>
>>>[...]
>>
>>This post was sent by "esosman@acm-dot-org.invalid". The Eric Sosman I 
>>know usually signs "eric.sosman@sun.com". Curious.
> 
> 
>      He's my evil twin.

    Yes, I am -- but being evil, I always lie.

-- 
Eric.Sosman@sun.com

0
Reply Eric.Sosman (4228) 3/7/2005 4:43:07 PM

Eric Sosman wrote:
> 
> Eric Sosman wrote:
> 
>>Joe Wright wrote:
>>
>>
>>
>>>Eric Sosman wrote:
>>>
>>>
>>>>[...]
>>>
>>>This post was sent by "esosman@acm-dot-org.invalid". The Eric Sosman I 
>>>know usually signs "eric.sosman@sun.com". Curious.
>>
>>
>>     He's my evil twin.
> 
> 
>     Yes, I am -- but being evil, I always lie.
> 
Just trying to look out for you. Both of you.

-- 
Joe Wright                            mailto:joewwright@comcast.net
"Everything should be made as simple as possible, but not simpler."
                     --- Albert Einstein ---
0
Reply joewwright (1737) 3/7/2005 10:46:42 PM

15 Replies
39 Views

(page loaded in 0.294 seconds)

Similiar Articles:


















7/8/2012 11:27:38 AM


Reply: