Memory allocated during run time

J

jameskuyper

Richard said:
Yes, I know. But he wasn't talking about the current Standard. He was
explicitly discussing _C90_. Now, regardless of which is the _current_
Standard, C90 still is C90.

As far as ISO is concerned, C90 ceased to be a standard when C99 was
approved. Asking whether something IS a syntax error in C90 is, from
that point of view, just as poorly worded a question as asking whether
driving on the left side of the road IS legal in the Soviet Union, and
for essentially the same reason. C90 is no longer a standard, just as
the Soviet Union is no longer a political entity, so both questions
require the past tense in order to make sense.

That point of view may be seriously out of touch with the reality that
C90 is, de-facto, still a current standard - that's the "can of
worms". But there most definitely is a debatable point of view which
would mandate the use of the past tense for such questions.
 
K

Keith Thompson

Yes, I know. But he wasn't talking about the current Standard. He was
explicitly discussing _C90_. Now, regardless of which is the _current_
Standard, C90 still is C90.

*sigh*

The topic I was discussing was whether the code in question is
a syntax error in C90. It was a straightforward question with a
straightforward answer, not a "can of worms" (a colloquial English
expression for which Wikipedia has a reasonably good description).

The potential "can of worms" was the question of whether C90 or
C99 is the current standard. I anticipated that the debate might
be re-opened as a side effect of the discussion, and was trying to
avoid that.
 
R

Richard Tobin

jameskuyper said:
As far as ISO is concerned, C90 ceased to be a standard when C99 was
approved. Asking whether something IS a syntax error in C90 is, from
that point of view, just as poorly worded a question as asking whether
driving on the left side of the road IS legal in the Soviet Union,

No, it's like asking whether it's legal according to the Soviet Union's
laws of (say) 1975, which is a perfectly reasonable question. C90
is C90 whether or not it's still an ISO standard.

Suppose I write a document defining a language, and never make it a
standard at all. What tense would you use when referring to that?

-- Richard
 
P

Peter Nilsson

Richard Heathfield said:
Peter said:
Richard Heathfield said:
Sortie wrote:
srand(time(NULL));
int size=rand();
printInteger(size);
char a[size];
printf("%d", sizeof a);

...in C90 the above is a syntax error).

Nit: I don't believe it violates syntax since C's grammar
is context insensitive. Although it certainly violates a
constraint.

Bearing in mind that I was talking specifically about C90, I
think it /is/ a syntax error, because it violates the
following syntax rule:
...
    compound-statement:
            {  declaration-list<opt> statement-list<opt> }

In the same paragraph (which I snipped) you referred to VLAs.
So I thought you where referring to...

char a[size];

....as a syntax error. I missed the compound statement. My bad.
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top