Can we have inline functions in c?

P

Prafull Soni

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
 
J

jjf

Prafull said:
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.
 
K

Kiru Sengal

E. Robert Tisdale said:

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.
 
C

CBFalconer

Kiru said:
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.
 
E

Eric Sosman

CBFalconer said:
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.
 
K

Keith Thompson

Eric Sosman said:
CBFalconer said:
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.
 
M

Mark F. Haigh

Eric said:
CBFalconer said:
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
(e-mail address removed)
 
J

Joe Wright

Eric said:
CBFalconer said:
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 "(e-mail address removed)". The Eric Sosman I
know usually signs "(e-mail address removed)". Curious.
 
E

Eric Sosman

Joe said:
Eric said:
This post was sent by "(e-mail address removed)". The Eric Sosman I
know usually signs "(e-mail address removed)". 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.
 
J

Joe Wright

Eric said:
Eric said:
Joe Wright wrote:


Eric Sosman wrote:


[...]

This post was sent by "(e-mail address removed)". The Eric Sosman I
know usually signs "(e-mail address removed)". 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top