C can be very literal.

Discussion in 'C Programming' started by Seebs, Nov 1, 2013.

  1. Seebs

    DSF Guest

    I'm well aware of that. At the time, speed (of finishing the
    project, not execution time) was of a priority. I don't recall right
    now what that code was part of, but I believe it's still a work in
    progress. (I was sick for over a month.)

    True. But that is bound to be a major undertaking and I have
    several projects in progress that I need yesterday! The time
    learning/getting used to a new compiler plus some code conversion
    would set me back months.
    No. Because it wasn't an exercise. I needed 16-bit character
    support and converting the 16-bit code to an 8-bit counterpart for
    each of the string functions I wrote was a simple matter.

    #define TONGUE_IN_CHEEK

    Who knows? It might still be incredibly faster than a current
    compiler. When I get the two remaining projects done and have some
    time to look into finding/learning a new compiler, I'll let you know.

    #undef TONGUE_IN_CHEEK
    DSF
    "'Later' is the beginning of what's not to be."
    D.S. Fiscus
     
    DSF, Apr 21, 2014
    #21
    1. Advertisements

  2. Seebs

    DSF Guest

    On Wed, 13 Nov 2013 08:57:21 -0500, James Kuyper

    {much snipped}
    It should have, but I didn't want all of the responses to be flames
    for being off-topic.

    There are times when I *WANT* the compiler to be literal. Some
    practical reasons: There are some optimizations in BC++ that cannot
    be turned of and make debugging difficult. There are occasions where
    I want the resulting code to be exactly how I wrote it. They're rare,
    but I've heard complaints of errant optimizations altering the intent
    of the code under certain conditions.

    DSF
    "'Later' is the beginning of what's not to be."
    D.S. Fiscus
     
    DSF, Apr 21, 2014
    #22
    1. Advertisements

  3. Seebs

    James Kuyper Guest

    The best way to avoid getting flamed for an off-topic post is to post it
    to a forum where it isn't off-topic (a Borland C++ forum would be such a
    one for this issue). Using a misleading "Subject:" header won't help
    much, most people pay more attention to the body of the message than to
    the "Subject:" header.
    Then, at those times, you should be using assembler, not C. C was never
    intended to specify precisely the generated machine code. It was
    intended to specify the resulting behavior, leaving implementations free
    to choose how they achieve that behavior.
     
    James Kuyper, Apr 21, 2014
    #23
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.