By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,136 Members | 1,204 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,136 IT Pros & Developers. It's quick & easy.

NOP pointer

P: n/a
Can someone please expain what is a NOP pointer, or give a good link?
Thanks.

Greg

Mar 12 '07 #1
Share this Question
Share on Google+
11 Replies


P: n/a
"TefJlives" <gm********@gmail.comwrites:
Can someone please expain what is a NOP pointer, or give a good link?
Thanks.
As far as I know, there's no such thing.

If you're asking about null pointers, see section 5 of the comp.lang.c
FAQ, <http://www.c-faq.com/>.

--
Keith Thompson (The_Other_Keith) ks***@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."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mar 12 '07 #2

P: n/a
"TefJlives" <gm********@gmail.comwrites:
Can someone please expain what is a NOP pointer, or give a good link?
Do you mean a "null pointer"? A null pointer is a pointer that
has been assigned a null pointer constant. The C99 standard
defines it like this:

3 An integer constant expression with the value 0, or such an
expression cast to type void *, is called a null pointer
constant.55) If a null pointer constant is converted to a
pointer type, the resulting pointer, called a null pointer,
is guaranteed to compare unequal to a pointer to any object
or function.

--
"It wouldn't be a new C standard if it didn't give a
new meaning to the word `static'."
--Peter Seebach on C99
Mar 12 '07 #3

P: n/a

"TefJlives" <gm********@gmail.comwrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
Can someone please expain what is a NOP pointer, or give a good link?
Thanks.
Not a clue.
Normally NOP refer to "no operation". So a function pointer that pointed to
an empty function might be what you are after.
For instance, say you are calling code written back in the 386 days which
used to take a minute to execute. So the caller provided a callback so you
could spin a line or update a progress bar. Now with your dual core Pentium
IV it takes less than a tenth of a second to execute, so the callback is no
longer useful. However you still need to provide something to call, so a
pointer to an empty function would be appropriate.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
Mar 12 '07 #4

P: n/a
Ben Pfaff <bl*@cs.stanford.eduwrites:
"TefJlives" <gm********@gmail.comwrites:
>Can someone please expain what is a NOP pointer, or give a good link?

Do you mean a "null pointer"? A null pointer is a pointer that
has been assigned a null pointer constant. The C99 standard
defines it like this:
[snip]

Assigning a null pointer constant is only one way to produce a null
pointer. (The standard's definition is unclear on this point.)

--
Keith Thompson (The_Other_Keith) ks***@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."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mar 12 '07 #5

P: n/a
TefJlives wrote:
>
Can someone please expain what is a NOP pointer, or give a good link?
No such beast in the C language.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com

Mar 12 '07 #6

P: n/a
On Mar 12, 4:53 pm, CBFalconer <cbfalco...@yahoo.comwrote:
TefJlives wrote:
Can someone please expain what is a NOP pointer, or give a good link?

No such beast in the C language.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account fromhttp://www.teranews.com
Thanks for all your replies. I was under a misunderstanding. I was
looking for a no-op command, but I thought it was some kind of
pointer. Which is why I couldn't find anything about it on the web.

Greg

Mar 13 '07 #7

P: n/a
"TefJlives" <gm********@gmail.comwrites:
On Mar 12, 4:53 pm, CBFalconer <cbfalco...@yahoo.comwrote:
>TefJlives wrote:
Can someone please expain what is a NOP pointer, or give a good link?

No such beast in the C language.
Please don't quote signatures.
Thanks for all your replies. I was under a misunderstanding. I was
looking for a no-op command, but I thought it was some kind of
pointer. Which is why I couldn't find anything about it on the web.
It sounds like you're looking for a null statement, which looks like
this:

;

Or you can use an empty compound statement:

{ }

What are you trying to do?

--
Keith Thompson (The_Other_Keith) ks***@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."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mar 13 '07 #8

P: n/a
"TefJlives" <gm********@gmail.comwrote:
Can someone please expain what is a NOP pointer, or give a good link?
A NOP pointer is a roadsign to the polder where I live.

HTH; HAND.

Richard
Mar 13 '07 #9

P: n/a
TefJlives wrote:
On Mar 12, 4:53 pm, CBFalconer <cbfalco...@yahoo.comwrote:
TefJlives wrote:
Can someone please expain what is a NOP pointer, or give a good link?
No such beast in the C language.

Thanks for all your replies. I was under a misunderstanding. I was
looking for a no-op command, but I thought it was some kind of
pointer. Which is why I couldn't find anything about it on the web.
The closest C comes to a NOP command is a null statement: a semicolon
all by itself. A self assignment may also qualify:

x = x;

The compiler will likely optimise both of them away, which is why they
can't really be considered as equivalent of an assembly language NOP.

Mar 13 '07 #10

P: n/a

"santosh" <sa*********@gmail.comwrote in message
The closest C comes to a NOP command is a null statement: a semicolon
all by itself.
It is also used quite a bit.

for loops with empty bodies that do their work in the condition or increment
part of the loop are not too uncommonly found. Personally I dislike them,
but som eprogrammers like to fit a lot of logic onto one line.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Mar 13 '07 #11

P: n/a
Malcolm McLean <re*******@btinternet.comwrote:
for loops with empty bodies that do their work in the condition or increment
part of the loop are not too uncommonly found. Personally I dislike them,
but som eprogrammers like to fit a lot of logic onto one line.
As imported spaces from China continue driving down their cost, more
and more programmers are forsaking the megafrugaldaysofthepast (along
with function names where every character is "prcius") in order to
explore the new vistas of understanding which unfold in the presence
of these new cheap spaces.

(For loops consisting of a single line, including the semicolon, are
ticking time bombs.)

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Mar 13 '07 #12

This discussion thread is closed

Replies have been disabled for this discussion.