J
jrdacc.i
what is the difference between the tree storage
durations(static,automatic and dynamic) in C?
durations(static,automatic and dynamic) in C?
Richard Heathfield said:(e-mail address removed) said:
Firstly, there are only two:
++++++++++++++++++++++++++++++++++++++++++++++++++
3.1.2.4 Storage durations of objects
An object has a storage duration that determines its lifetime.
There are two storage durations: static and automatic.
Richard said:(e-mail address removed) said:
Firstly, there are only two:
++++++++++++++++++++++++++++++++++++++++++++++++++
3.1.2.4 Storage durations of objects
An object has a storage duration that determines its lifetime.
There are two storage durations: static and automatic.
++++++++++++++++++++++++++++++++++++++++++++++++++
jacob navia said:
No, Heathfield lives in the real world where almost no conforming C99
implementations exist, but where almost every platform in existence is
targetted by at least one of the very many conforming C90 implementations..
Heathfield refuses to live in a fantasy land in which the pretence is made
that non-portable constructs will work everywhere just because ISO says
that they are "standard".
jacob navia said:
No, Heathfield lives in the real world where almost no conforming C99
implementations exist, but where almost every platform in existence is
targetted by at least one of the very many conforming C90 implementations.
Heathfield refuses to live in a fantasy land in which the pretence is
made that non-portable constructs will work everywhere just because
ISO says that they are "standard".
Richard said:(e-mail address removed) said:
Firstly, there are only two:
++++++++++++++++++++++++++++++++++++++++++++++++++
3.1.2.4 Storage durations of objects
An object has a storage duration that determines its lifetime.
There are two storage durations: static and automatic.
++++++++++++++++++++++++++++++++++++++++++++++++++
How is that relevant in regard to what jacob said?
James said:If C90 didn't have "allocated" storage duration, how were the corresponding
concepts described in C90?
what is the difference between the tree storage
durations(static,automatic and dynamic) in C?
(e-mail address removed) said:
He claimed I was living in the past. I'm not. I'm living in the present.
He, on the other hand, appears to be living in hope.
Yes, he did, and yes, he's de jure right. But he's de facto wrong.
I suppose it depends on what you mean by "portable". If by "portable" you
mean "implementations exist for four or five platforms",
then yes, of
course C99 is portable. But if you mean "implementations exist for the
vast majority of platforms", then I would argue that it isn't.
Do *you* use a conforming C99 implementation? You probably don't - but
maybe, just maybe, you do. Most people, however, don't.
Huibert said:This was addressed in DR138, the real question is: does this make it part
of the offical standard.
(e-mail address removed) said:
Then you are in no position to make an argument about C99's portability
or otherwise.
I think the OS390 and VM/CMS folks might cough and splutter a bit if
they heard you say that. But since you don't actually know whether the
platforms you name have C99 implementations available for them, your
point lacks force.
Richard said:(e-mail address removed) said:
Then you are in no position to make an argument about C99's
portability or otherwise.
I think the OS390 and VM/CMS folks might cough and splutter a bit if
they heard you say that. But since you don't actually know whether the
platforms you name have C99 implementations available for them, your
point lacks force.
I would certainly include mainframes and mid-range computers, which
you seem to have ignored completely. I would also include the more
powerful DSPs, the kind you find in home entertainment hardware
(set-top boxes, DVD players, etc). It is easy to dismiss these, but
they are powerful enough to run email clients, Web browsers, all kinds
of cool stuff. Not a market one ought to dismiss too easily.
The important thing to you, maybe - but here, we discuss ISO C, not
notquiteISO C.
(e-mail address removed) said:
C99, presumably.
He's right only in a completely useless and almost meaningless way.
"de jure": in law.
"de facto": in reality.
A government passes a law that as of now, nobody may breathe. De jure,
people no longer breathe. De facto, however, they still do.
De jure, C99
is the C Standard. De facto, C90 is the C Standard.
Then you are in no position to make an argument about C99's portability or
otherwise.
I think the OS390 and VM/CMS folks might cough and splutter a bit if they
heard you say that.
But since you don't actually know whether the
platforms you name have C99 implementations available for them, your point
lacks force.
I would certainly include mainframes and mid-range computers, which you
seem to have ignored completely.
I would also include the more powerful
DSPs, the kind you find in home entertainment hardware (set-top boxes, DVD
players, etc). It is easy to dismiss these, but they are powerful enough
to run email clients, Web browsers, all kinds of cool stuff. Not a market
one ought to dismiss too easily.
So no, then. If C99 isn't even portable to *your* desktop, it is hard to
see how you can sustain a claim to general portability.
The important thing to you, maybe - but here, we discuss ISO C, not
notquiteISO C.
If it doesn't implement the language correctly, the extensions are a moot
point.
Yes, that is one legal outcome of undefined behaviour.
You seem to be arguing that it's the compiler's fault if the program is
incorrectly written. I don't agree.
Richard said:(e-mail address removed) said:
Then you are in no position to make an argument about C99's portability or
otherwise.
I think the OS390 and VM/CMS folks might cough and splutter a bit if they
heard you say that.
How do you know that?Richard said:(e-mail address removed) said:
Then you are in no position to make an argument about C99's portability or
otherwise.
I think the OS390 and VM/CMS folks might cough and splutter a bit if they
heard you say that. But since you don't actually know whether the
platforms you name have C99 implementations available for them, your point
lacks force.
How do you know that? How do you know he doesn't use one of the 5So no, then. If C99 isn't even portable to *your* desktop, it is hard to
see how you can sustain a claim to general portability.
Which is why I prefer to use 'c99' on my platform of choice.The important thing to you, maybe - but here, we discuss ISO C, not
notquiteISO C.
Richard said:The important thing to you, maybe - but here, we discuss ISO C, not
notquiteISO C.
Intel's compiler is available for Windows and Linux, and the other
three conform to SUSv3. In other words, the platforms all have
conforming C99 implementations.
Antoninus said:I don't believe for a second that Heathfield wasn't fully aware of that.
He's a proven liar who chooses to spread FUD about the current C
standards for his own reasons.
But how often is it the case that a single application needs to be
portable across mainframes, desktops, and DSPs? Subroutines could
easily port across all these (depending of course on what exactly the
routine does), but I have yet to encounter a complete, real world,
application that ports without modification to all these diverse
systems.
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.