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: ntpd IPv6 support on Windows? - comp.protocols.time.ntp... WspiapiGetAddrInfo If you scroll down to line 941 you can find the inline function ... If we can use late binding at runtime it should be possible to have a ... How to use Inline assembly on C64x+ - comp.dspHi, i am trying to write inline assembly in my C code using asm ... say, though I'll often start by compiling a small 'c' program with an "empty" function to ... Gfortran reort on subroutine inlining? - comp.lang.fortran ...Should the function have the PURE attribute, or could you ... IBM - United States He covers the basics of inline assembly and its various ... The strcpy function can be ... Static library created from MASM to link to Visual C++ app - comp ...I don't want to use inline assembly code in the ... Is there another way to declare the functions in the library > besides what I have (extern "C" void TestAPI())? I can't ... Undefined reference to public class method? - comp.lang.c++ ...So go ahead and make the function inline, and you can leave it where it is. If you had the same problem with a longer function, you should declare it in the .h file ... How can we define global but constant variable? - comp.soft-sys ...... Is there any way in Matlab to define global but constant variable, so we can access ... Like this: function c = speedoflight() c = 299792458; % in m/s Now from ... Const constructor - comp.lang.c++.moderated... Body* x_; }; Then we can have: void ... template<typename T> inline ... Yes we are. You only have to write one function, like in C. goto in expect scripts - comp.lang.tclHi, Is there any command in expect/tcl langauage similiar to goto in perl..? Can we write recursive functions in expect language? ... if-else-end in anonymous functions - comp.soft-sys.matlab ...The body of an anonymous function can be ONE and only one expression. That ... comp.soft-sys.matlab You are better off using anonymous functions rather than inline functions ... How to c the wavread function.. - comp.soft-sys.matlabHi all, Can i have your advise how can i c the background code of wavread function? ... to figure out how to write a C function that goes as follows: Suppose we ... icc inline assembly - comp.lang.asm.x86My current job is porting assembler sources to C. ... in scope of the coverted C functions which access it. ... icc inline assembly - comp.lang.asm.x86 C -> assembler ... SSE Programming - comp.lang.asm.x86We left this side blank so you can help." -- Dead Kennedys ... three-address math functions in c, use ... pentium4 -O -o bs.o -g -c bs.c bash-3.1$ objdump -d -S bs.o [...] inline ... MinGW and Inline Assembler - comp.os.ms-windows.programmer.win32 ...here we go: if you compile it with -Wall you'll get the following warning: cpumingw.c: In function `rdtsc': cpumingw.c ... struct - comp.lang.c MinGW and Inline ... Writing Assembly Code in x64 - comp.lang.asm.x861) I have a situation where my 32-bit inline assembly code ... better the > advice we can ... It can make it easier to write your assembly function when you have the calling ... C call C++ fuction and iostream - comp.lang.c++.moderated ...... C++ - comp.lang.fortran Use dll in C Mex S function - comp.soft-sys.matlab We call ... ... Calling C Functions in Inline Assembly An __asm block can call C functions, including C ... Can we have inline functions in c? - C / C++Can we have inline functions in c?. C / C++ Forums on Bytes. ... Hi, Can we have inline function in C or this feature is from C++. What does ANSI say about the use ... Inline Functions In C - The Green End OrganisationNotes on GCC and standard C inline functions ... Introduction. GNU C (and some other compilers) had inline functions long before standard C introduced them (in the ... 7/8/2012 11:27:38 AM
|