473,383 Members | 1,952 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,383 software developers and data experts.

NOP pointer

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

Greg

Mar 12 '07 #1
11 3469
"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
"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

"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
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
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
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
"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
"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
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Carsten Spieß | last post by:
Hello all, i have a problem with a template constructor I reduced my code to the following (compiled with gcc 2.7.2) to show my problem: // a base class class Base{}; // two derived...
110
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object...
3
by: Bruno van Dooren | last post by:
Hi All, i have some (3) different weird pointer problems that have me stumped. i suspect that the compiler behavior is correct because gcc shows the same results. ...
35
by: tuko | last post by:
Hello kind people. Can someone explain please the following code? /* Create Storage Space For The Texture */ AUX_RGBImageRec *TextureImage; /* Line 1*/ /* Set The Pointer To NULL...
16
by: junky_fellow | last post by:
According to Section A6.6 Pointers and Integers (k & R) " A pointer to one type may be converted to a pointer to another type. The resulting pointer may cause addressing exceptions if the...
204
by: Alexei A. Frounze | last post by:
Hi all, I have a question regarding the gcc behavior (gcc version 3.3.4). On the following test program it emits a warning: #include <stdio.h> int aInt2 = {0,1,2,4,9,16}; int aInt3 =...
16
by: aegis | last post by:
Given the following: int a = 10; int *p; void *p1; unsigned char *p2; p = &a;
23
by: bluejack | last post by:
Ahoy... before I go off scouring particular platforms for specialized answers, I thought I would see if there is a portable C answer to this question: I want a function pointer that, when...
69
by: fieldfallow | last post by:
Hello all, Before stating my question, I should mention that I'm fairly new to C. Now, I attempted a small demo that prints out the values of C's numeric types, both uninitialised and after...
8
by: Martin Jørgensen | last post by:
Hi, "C primer plus" p.382: Suppose we have this declaration: int (*pa); int ar1; int ar2; int **p2;
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.