473,416 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

stack

jt
hello everyone..

int fun()
{
/* anything */
}
int main(void)
{
fun();
}

in this program, when the control is transferred to function fun()..
the return address is pushed to the stack..
Is it possible to access this value..??
Aug 3 '08
62 2778
In article <g7**********@registered.motzarella.org>,
Richard <rg****@gmail.comwrote:
>ro******@ibd.nrc-cnrc.gc.ca (Walter Roberson) writes:
>In article <g7**********@registered.motzarella.org>,
Richard <rg****@gmail.comwrote:
>>>Richard Heathfield <rj*@see.sig.invalidwrites:
>>>Are you related to Robert Mugabe by any chance?
>In my opinion, that was a completely unnecessary and extreme insult.
>Get off your high horse. It was a quip.
Regardless of what you might have -thought- you were posting, what
you *did* post was (in my opinion) a distinct insult, not a quip.
Personally, I don't believe you intended it as humour.

>Heathfield trots out the vote thing time after time. The only people
interested enough were the usual c.l.c clique. It proved nothing.
If you re-examine the postings from that time, I believe you will
find that a large number of people contributed, including a number
that do not contribute very often. It was -not- "the usual c.l.c clique".

Your argument is treading close to the old claim of there being a
"silent majority" that support your position but whom didn't speak up.

If, hypothetically, the strict-topicality stance is what is desired
by the majority of readers, what evidence would you require to
be satisfied that that was the case? What evidence would
be you accept as "proving" something?
--
"Every intellectual product must be judged from the point of view
of the age and the people in which it was produced."
-- Walter Horatio Pater
Aug 5 '08 #51
Walter Roberson wrote:
In article <g7**********@registered.motzarella.org>,
Richard <rg****@gmail.comwrote:
Get off your high horse. It was a quip.

Regardless of what you might have -thought- you were posting, what
you did post was (in my opinion) a distinct insult, not a quip.
Personally, I don't believe you intended it as humour.
Trolls, feed, don't, please, yadda, yadda.


Brian
Aug 5 '08 #52
Walter Roberson said:
In article <g7**********@registered.motzarella.org>,
Richard <rg****@gmail.comwrote:
<snip>
>>Heathfield trots out the vote thing time after time. The only people
interested enough were the usual c.l.c clique. It proved nothing.

If you re-examine the postings from that time, I believe you will
find that a large number of people contributed, including a number
that do not contribute very often. It was -not- "the usual c.l.c clique".
Right, it wasn't. And several people (including myself) did express a view
that was not in accordance with the majority view. Richard NoSurname Riley
expressed a view in that thread, however, and so either he's mistaken in
his belief that the only ones interested were what he calls the clc
clique, or he believes that he's part of that clique. Either way, during
that debate he expressed an interest in topicality that was not
significantly more liberal than my own view.
Your argument is treading close to the old claim of there being a
"silent majority" that support your position but whom didn't speak up.
"The lurkers support me in email" is worth a Web search - sung to the tune
of "My bonny lies over the ocean".
If, hypothetically, the strict-topicality stance is what is desired
by the majority of readers, what evidence would you require to
be satisfied that that was the case? What evidence would
be you accept as "proving" something?
It is clear that no amount of evidence will convince him, because his
position is based not on logic but on a negative emotional reaction to the
posting styles of some of the people here - hence his pointlessly contrary
and vehemently held positions on so many issues.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Aug 5 '08 #53
CBFalconer <cb********@yahoo.comwrites:
Harold Aptroot wrote:
>"CBFalconer" <cb********@yahoo.comwrote in message
>>Harold Aptroot wrote:
... snip ...
>>>
On this newsgroup, there are no non-standard compliant ways to
do anything. Anything of that nature is off=topic, and may be
found on specialized news-groups dealing with the authors system.

You mean to say that any solution that requires non-standard
compliant code temporarily ceases to exist when talking on this
NG and everyone trying to predend they Do exist will be flamed
for OT-talk? That seems to be happening anyhow

You've got it.
MisterE's reply clearly implied that it cannot be done at all. Apart
from being factually incorrect, his reply was off-topic -- unless you
can cite chapter and verse in the ISO C standard to support his
assertion that you can't access a function's return address *even
using non-portable code*.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Aug 5 '08 #54
On 5 Aug 2008 at 18:18, Walter Roberson wrote:
Richard <rg****@gmail.comwrote:
>>ro******@ibd.nrc-cnrc.gc.ca (Walter Roberson) writes:
>>Richard <rg****@gmail.comwrote:
Richard Heathfield <rj*@see.sig.invalidwrites:
>>>>Are you related to Robert Mugabe by any chance?
>>In my opinion, that was a completely unnecessary and extreme insult.
>>Get off your high horse. It was a quip.

Regardless of what you might have -thought- you were posting, what
you *did* post was (in my opinion) a distinct insult, not a quip.
Personally, I don't believe you intended it as humour.
When humor cuts close to the bone, there's a fine line between being
funny and being all too true.

It's clear that there are definite parallels: the self-belief in their
unutterable correctness, as well as the nasty methods they use to attack
their enemies - Mugabe phsyically, Heathfield through a continued
undermining of the reputation of his "adversaries" (i.e. those who dare
to disagree with him).
>>Heathfield trots out the vote thing time after time. The only people
interested enough were the usual c.l.c clique. It proved nothing.

If you re-examine the postings from that time, I believe you will
find that a large number of people contributed, including a number
that do not contribute very often. It was -not- "the usual c.l.c clique".
By your estimation, how many lurkers does this group have for each
regular poster? What, therefore, was the percentage turnout at this
"election" in which Heathfield (like Mugabe) was judge, jury and the
only possible victor?
Your argument is treading close to the old claim of there being a
"silent majority" that support your position but whom didn't speak up.
No less true for being old.
If, hypothetically, the strict-topicality stance is what is desired
by the majority of readers, what evidence would you require to
be satisfied that that was the case? What evidence would
be you accept as "proving" something?
It's impossible to "prove" this either way, just as it's impossible to
say whether the number of babies born in Swaziland yesterday was even
or odd - we have no way of collecting the data.

Aug 5 '08 #55
On 5 Aug 2008 at 19:37, Default User wrote:
Trolls, feed, don't, please, yadda, yadda.
Screw, go, yourself, please, yadda, yadda.

Aug 5 '08 #56
Walter Roberson wrote:
Richard <rg****@gmail.comwrote:
>ro******@ibd.nrc-cnrc.gc.ca (Walter Roberson) writes:
>>Richard <rg****@gmail.comwrote:
.... snip ...
>>>
Are you related to Robert Mugabe by any chance?

In my opinion, that was a completely unnecessary and extreme
insult.

Get off your high horse. It was a quip.

Regardless of what you might have -thought- you were posting,
what you *did* post was (in my opinion) a distinct insult, not
a quip. Personally, I don't believe you intended it as humour.
I suggest plonking "Richard <rg****@gmail.com>". Then you will
only see his nonsense in others quotes.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Aug 5 '08 #57
On Tue, 05 Aug 2008 01:52:26 -0700, Nick Keighley wrote:
On 4 Aug, 23:25, Harald van Dijk <true...@gmail.comwrote:
>On Mon, 04 Aug 2008 17:42:31 -0400, CBFalconer wrote:
Harold Aptroot wrote:
"MisterE" <Mist...@nimga.comwrote in message
Is it possible to access [the return address] value..??
>>No.
>Of course it is. The OP did not request a standard compliant way to
do it after all
On this newsgroup, there are no non-standard compliant ways to do
anything. Anything of that nature is off=topic,

Please don't use topicality as an excuse or defence for lies.

its not a lie. It's a fact. Your statement is incorrect.
My statement?
There *is* no
standard way to do this and since the topic of this NG is standard C
there is no way to do it that is topical to this NG.
"There is no way to do it that is topical to this NG" and "There is no way
to do it" are very different. The former I have no problem with. The
latter I do, particularly because it suggests that there are no relevant
points to the question outside of the bounds of this group's topicality.
In other words, given "no" as an answer, there is no reason to try asking
on other groups.
Though I must admit
I'd have suggested trying another NG.
That's what I'm after.
Aug 5 '08 #58
On Tue, 05 Aug 2008 15:47:57 +0000, Richard Heathfield wrote:
>
It's considerably less than a year ago that we discussed topicality at some
length. Everyone had a chance to have their say, and many people availed
themselves of that opportunity.
MID please?
Aug 6 '08 #59
Anand Hariharan said:
On Tue, 05 Aug 2008 15:47:57 +0000, Richard Heathfield wrote:
>>
It's considerably less than a year ago that we discussed topicality at
some length. Everyone had a chance to have their say, and many people
availed themselves of that opportunity.

MID please?
Gladly.

<Q4******************************@bt.com(posted on 29 September 2007)
begins a thread of over 200 articles, most of which are from people whose
views on topicality are rather more strict than mine.

<ac******************************@bt.com(posted a few days later)
contains a brief tabulated summary of views expressed in the earlier
thread. You will be glad to hear that it has far fewer followups than the
first thread.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Aug 6 '08 #60
Keith Thompson wrote:
CBFalconer <cb********@yahoo.comwrites:
>Harold Aptroot wrote:
>>"CBFalconer" <cb********@yahoo.comwrote in message
... snip ...
>>>>
On this newsgroup, there are no non-standard compliant ways to
do anything. Anything of that nature is off=topic, and may be
found on specialized news-groups dealing with the authors system.

You mean to say that any solution that requires non-standard
compliant code temporarily ceases to exist when talking on this
NG and everyone trying to predend they Do exist will be flamed
for OT-talk? That seems to be happening anyhow

You've got it.

MisterE's reply clearly implied that it cannot be done at all.
Apart from being factually incorrect, his reply was off-topic --
unless you can cite chapter and verse in the ISO C standard to
support his assertion that you can't access a function's return
address *even using non-portable code*.
I disagree. First, there is nothing from MisterE in the quotes
above, so anything he said is not applicable (nor in my earlier
here-quoted messages). I said 'on this newsgroup' and 'specialized
news-groups dealing with'. I then agreed with Mr. Aptroots
non-enthusiastic comment.

The quotation attributions above seem accurate to me.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Aug 6 '08 #61
Richard wrote:
Are you related to Robert Mugabe by any chance?
Any doubts I had about you being a deliberate trouble-maker
have been smashed, burnt, and the smoke thrown into the Sun.

If you thought that was /funny/, I have no hope for you.

--
'It changed the future .. and it changed us.' /Babylon 5/

Hewlett-Packard Limited registered no:
registered office: Cain Road, Bracknell, Berks RG12 1HN 690597 England

Aug 6 '08 #62
On 3 Aug 2008 23:50:24 GMT, Chris Torek <no****@torek.netwrote:
In article <38**********************************@v1g2000pra.g ooglegroups.com>
jt <ka**********@gmail.comwrote:
<snip>
the return address is pushed to the stack..

Actually, it is put in the register "lr" (PPC), "ra" (MIPS), "%o7"
(SPARC), or 14 (IBM S/390; spelled %r14 in GNU assembler). As
S/360,370,390 by convention only; the hardware is equally happy with
any GPR except 0. IIUC zSeries has some new options (insns) also.
others have noted, if fun() is expanded in line, there is no control
transfer at all. But on the VAX and PDP-11, it is indeed placed
on the (hardware) stack.
In PDP-11 it can be pushed, or stored to any of R0 .. R5 and that
register's previous contents pushed (instead). I believe that C on
early-Unix -- around 6/7ed? -- used R5, although if I ever knew why
I've forgotten. (And that's why at most 3 'register' declarations were
effective, using R2..R4, with at least R0&R1 left for expr eval.)

PDP-8 stores it into the first word of the callee routine. But since
the -8 supports at most 48K-octets of storage a conforming C89
implementation would be challenging and C99 out of the question.

- formerly david.thompson1 || achar(64) || worldnet.att.net
Aug 18 '08 #63

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Andrew | last post by:
Last night I was reading about implementing my own stack. The example given pushes items on and off the stack at the start and end of each procedure (ie. in a std module). What's not so clear is...
14
by: Kevin Grigorenko | last post by:
Hello, I couldn't find an obvious answer to this in the FAQ. My basic question, is: Is there any difference in allocating on the heap versus the stack? If heap or stack implementation is not...
4
by: Chris Mabee | last post by:
Hello all, and Merry Christmas, I'm having a problem understanding an example of an array based implementation of a stack in a textbook of mine. The code in question is written below. The syntax...
4
by: anonymous | last post by:
Thanks your reply. The article I read is from www.hakin9.org/en/attachments/stackoverflow_en.pdf. And you're right. I don't know it very clearly. And that's why I want to understand it; for it's...
8
by: LedZep | last post by:
What up everyone, I have to write a program that uses a stack to determine whether a string is a palindrome (a string that is spelled identically backward and forward). The program has to...
4
by: alisaee | last post by:
plz check what i have made wrong what is requierd her is to creat class queue and class stack and run the push,pop operation . #include<iostream.h> #include<conio.h> #include<stdio.h> class...
16
by: sarathy | last post by:
Hi all, I need a few clarifications regarding memory allocaion in C++. I apologize for the lengthy explanation. 1. In C++, Objects are allocated in heap. What does heap refer to? Is it an area...
24
by: John | last post by:
I know this is a very fundamental question. I am still quite confused if the program call stack stack should always grows upwards from the bottom, or the opposite, or doesn't matter?? That means...
1
by: alfie27 | last post by:
I currently have a working program that is a stack that stores integers. Now i have to convert it to store strings instead of integers. I have been working on this for hours and just keep getting...
11
by: tom | last post by:
Hi! Im new to Python and doing exercise found from internet. It is supposed to evaluate expression given with postfix operator using Stack() class. class Stack: def __init__(self): self.items...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.