Re: returning address of stack variable
- From: pete <pfiland@xxxxxxxxxxxxxx>
- Date: Fri, 12 May 2006 10:54:26 GMT
Richard Heathfield wrote:
pete said:
websnarf@xxxxxxxxx wrote:
This is probably true in exactly the same way that
Keith
thinks that variables are not part of the C programming language
(i.e., not at all
except that maybe you can't grep for it in the standard.)
Inapt analogy: You can grep on "variables" in the standard.
You won't get any hits, though.
Well, I didn't, in the C89 draft. Searching
for the singular, "variable", gave me 23 hits,
most of which were to do
with variable argument lists. But I did find these:
"the ``integral promotions'' require that the abstract machine promote
the value of each variable to int size and then add the two int s and
truncate the sum." (referring to a couple of char objects) - 2.1,
non-normative example
"Therefore, for full portability the variable
c should be declared as int."
- 3.3.16.1, non-normative example
"The following pair of declarations demonstrates the difference
between a ``variable pointer to a constant value'' and a ``constant
pointer to a variable value.''" - 3.5.4.1, non-normative example
"...assigning a value to a static storage
duration variable of type volatile
sig_atomic_t" - 4.7.1.1 - normative text.
"an enumeration variable that has the same type" - A.5, non-normative
appendix
I think the normative text of 4.7.1.1
shows that "variable" is indeed a C
concept. It's a shame, in a way, since it's such a woolly term.
Did this
usage in 4.7.1.1 survive into the final C89 standard?
Yes, they all survived.
C99 has the word "variables".
--
pete
.
- References:
- returning address of stack variable
- From: Manish Tomar
- Re: returning address of stack variable
- From: Ian Collins
- Re: returning address of stack variable
- From: Manish Tomar
- Re: returning address of stack variable
- From: pete
- Re: returning address of stack variable
- From: Suman
- Re: returning address of stack variable
- From: pete
- Re: returning address of stack variable
- From: websnarf
- Re: returning address of stack variable
- From: pete
- Re: returning address of stack variable
- From: Richard Heathfield
- returning address of stack variable
- Prev by Date: Re: Array and Pointer Tutorial
- Next by Date: Re: How to convert from a struct tm to a time_t ?
- Previous by thread: Re: returning address of stack variable
- Next by thread: Re: returning address of stack variable
- Index(es):
Relevant Pages
|
Loading