Skip to content Skip to footer
0 items - $0.00 0

The earliest versions of the first C compiler known to exist by diginova

The earliest versions of the first C compiler known to exist by diginova

The earliest versions of the first C compiler known to exist by diginova

13 Comments

  • Post Author
    diginova
    Posted March 21, 2025 at 8:18 am
  • Post Author
    Joker_vD
    Posted March 24, 2025 at 9:23 am

    Funnily enough, it is emphatically not a single-pass compiler.

  • Post Author
    aap_
    Posted March 24, 2025 at 10:32 am

    Probably one of my favorite pieces of software of all times. Learned so much from this!

  • Post Author
    bluetomcat
    Posted March 24, 2025 at 10:43 am

    Interesting usage of "extern" and "auto". Quite different from contemporary C:

        tree() {
            extern symbol, block, csym[], ctyp, isn,
            peeksym, opdope[], build, error, cp[], cmst[],
            space, ospace, cval, ossiz, exit, errflush, cmsiz;
    
            auto op[], opst[20], pp[], prst[20], andflg, o, p, ps, os;
            ...
    

    Looks like "extern" is used to bring global symbols into function scope. Everything looks to be "int" by default. Some array declarations are specifying a size, others are not. Are the "sizeless" arrays meant to be used as pointers only?

  • Post Author
    tanelpoder
    Posted March 24, 2025 at 10:49 am

    The first publicly available version of Oracle Database (v2 released in 1979) was written in assembly for PDP-11. Then Oracle rewrote v3 in C (1983) for portability across platforms. The mainframes at the time didn't have C compilers, so instead of writing a mainframe-specific database product in a different language (COBOL?), they just wrote a C compiler for mainframes too.

  • Post Author
    dark-star
    Posted March 24, 2025 at 10:51 am

    My favorite function, which some might say even made it into Windows ;-)

        waste()  /* waste space */
        {
         waste(waste(waste),waste(waste),waste(waste));
         waste(waste(waste),waste(waste),waste(waste));
         waste(waste(waste),waste(waste),waste(waste));
         waste(waste(waste),waste(waste),waste(waste));
         waste(waste(waste),waste(waste),waste(waste));
         waste(waste(waste),waste(waste),waste(waste));
         waste(waste(waste),waste(waste),waste(waste));
         waste(waste(waste),waste(waste),waste(waste));
        }

  • Post Author
    ChrisMarshallNY
    Posted March 24, 2025 at 12:07 pm
  • Post Author
    FeistySkink
    Posted March 24, 2025 at 12:10 pm

    Missed opportunity not calling it LegaC.

  • Post Author
    smackay
    Posted March 24, 2025 at 12:29 pm

    1972 is the answer to the question on the lips of everybody too busy to look at the source files.

  • Post Author
    ModernMech
    Posted March 24, 2025 at 1:24 pm

    I thought the first C compiler was written in B.

  • Post Author
    90s_dev
    Posted March 24, 2025 at 1:41 pm

    The thing I always loved about C was its simplicity, but in practice it's actually very complex with tons of nuance. Are there any low level languages like C that actually are simple, through and through? I looked into Zig and it seems to approach that simplicity, but I have reservations that I can't quite put my finger on…

  • Post Author
    tempodox
    Posted March 24, 2025 at 1:57 pm

    Highly interesting!

      main(argc, argv)
      int argv[];
    

    This is a culture shock. Did the PDP-11 not distinguish between `char` and `int`?

  • Post Author
    ZhiqiangWang
    Posted March 24, 2025 at 2:32 pm

    Can't stop thinking about Ken Thompson Hack. This should be a clean one …

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.