other than pragma

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • parag_paul@hotmail.com

    other than pragma

    is there any compiler directive that will enforce optimizations?
  • Eric Sosman

    #2
    Re: other than pragma

    parag_paul@hotm ail.com wrote:
    is there any compiler directive that will enforce optimizations?
    Define precisely what you mean by "optimizations. "

    --
    Eric Sosman
    esosman@ieee-dot-org.invalid

    Comment

    • parag_paul@hotmail.com

      #3
      Re: other than pragma

      On Feb 10, 9:09 pm, Eric Sosman <esos...@ieee-dot-org.invalidwrot e:
      parag_p...@hotm ail.com wrote:
      is there any compiler directive that will enforce optimizations?
      >
      Define precisely what you mean by "optimizations. "
      >
      --
      Eric Sosman
      esos...@ieee-dot-org.invalid
      Teh optmizations that cn be achived by the compile line options -O4 etc

      Comment

      • Walter Roberson

        #4
        Re: other than pragma

        In article <7ad8c954-eea0-4d08-bc0c-fe112e8743b2@p6 9g2000hsa.googl egroups.com>,
        parag_paul@hotm ail.com <parag_paul@hot mail.comwrote:
        >On Feb 10, 9:09 pm, Eric Sosman <esos...@ieee-dot-org.invalidwrot e:
        >parag_p...@hot mail.com wrote:
        is there any compiler directive that will enforce optimizations?
        > Define precisely what you mean by "optimizations. "
        >Teh optmizations that cn be achived by the compile line options -O4 etc
        The original article has not shown up here, so I am perhaps missing
        some key context, but the answer is three-fold:

        1) C has a very limited number of standard pragmas (and no
        standard pragmas at all in C90), none of which has to do with
        optimization. Any pragma along this lines that you happened to find
        would be non-portable (but ignored by other compilers that did not
        happen to have a pragma with the same name)

        2) pragmas -suggest- rather than -enforce- .

        3) I have never encountered a C compiler with a pragma that
        affected optimization.
        --
        "All is vanity." -- Ecclesiastes

        Comment

        • Eric Sosman

          #5
          Re: other than pragma

          parag_paul@hotm ail.com wrote:
          On Feb 10, 9:09 pm, Eric Sosman <esos...@ieee-dot-org.invalidwrot e:
          >parag_p...@hot mail.com wrote:
          >>is there any compiler directive that will enforce optimizations?
          > Define precisely what you mean by "optimizations. "
          >
          Teh optmizations that cn be achived by the compile line options -O4 etc
          If you think this is a "precise" definition, you should
          consider a career change ...

          Try again: Offer a *precise* definition of "optimizations, "
          using terms that are applicable to all systems where C is
          implemented, and that cover all (or at least most) possible
          optimality metrics. I think the effort of formulating such a
          definition will teach you something valuable, and I will applaud
          your sincere attempt enthusiasticall y by clapping one hand.

          --
          Eric Sosman
          esosman@ieee-dot-org.invalid

          Comment

          • christian.bau

            #6
            Re: other than pragma

            On Feb 10, 4:23 pm, rober...@ibd.nr c-cnrc.gc.ca (Walter Roberson)
            wrote:
            3) I have never encountered a C compiler with a pragma that
            affected optimization.
            Metrowerks Codewarrior used to do that. Quite useful at times.

            Comment

            Working...