NOP pointer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TefJlives

    #1

    NOP pointer

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

    Greg

  • Keith Thompson

    #2
    Re: NOP pointer

    "TefJlives" <gmarkowsky@gma il.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_Keit h) kst-u@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"

    Comment

    • Ben Pfaff

      #3
      Re: NOP pointer

      "TefJlives" <gmarkowsky@gma il.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

      Comment

      • Malcolm McLean

        #4
        Re: NOP pointer


        "TefJlives" <gmarkowsky@gma il.comwrote in message
        news:1173729054 .151146.208530@ j27g2000cwj.goo glegroups.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.



        Comment

        • Keith Thompson

          #5
          Re: NOP pointer

          Ben Pfaff <blp@cs.stanfor d.eduwrites:
          "TefJlives" <gmarkowsky@gma il.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_Keit h) kst-u@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"

          Comment

          • CBFalconer

            #6
            Re: NOP pointer

            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

            Comment

            • TefJlives

              #7
              Re: NOP pointer

              On Mar 12, 4:53 pm, CBFalconer <cbfalco...@yah oo.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.co m
              Thanks for all your replies. I was under a misunderstandin g. 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

              Comment

              • Keith Thompson

                #8
                Re: NOP pointer

                "TefJlives" <gmarkowsky@gma il.comwrites:
                On Mar 12, 4:53 pm, CBFalconer <cbfalco...@yah oo.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 misunderstandin g. 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_Keit h) kst-u@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"

                Comment

                • Richard Bos

                  #9
                  Re: NOP pointer

                  "TefJlives" <gmarkowsky@gma il.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

                  Comment

                  • santosh

                    #10
                    Re: NOP pointer

                    TefJlives wrote:
                    On Mar 12, 4:53 pm, CBFalconer <cbfalco...@yah oo.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 misunderstandin g. 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.

                    Comment

                    • Malcolm McLean

                      #11
                      Re: NOP pointer


                      "santosh" <santosh.k83@gm ail.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.


                      Comment

                      • Christopher Benson-Manica

                        #12
                        Re: NOP pointer

                        Malcolm McLean <regniztar@btin ternet.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 megafrugaldayso fthepast (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)gma il.com | don't, I need to know. Flames welcome.

                        Comment

                        Working...