autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


From: Gabriel Dos Reis
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: 31 Dec 2006 19:31:06 +0100

address@hidden (Richard Kenner) writes:

| > And the idea that people were not used to thinking seriously about
| > language semantics is very odd, this book was published in 1978,
| > ten years after the algol-68 report, a year after the fortran
| > 77 standard, long after the COBOL 74 standard, and a year before the 
| > PL/1 standard. It's not that old!
| 
| I knew you were going to say something like that, which is why I edited
| my message to say "most people": yes, there were certainly groups (I 
| specifically had Algol 68 in mind) who were thinking of programming
| languages in very formal terms, but those represented an even smaller
| minority of the community than now and certainly the Unix/C community's
| view at that point was much more pragmatic than formal: that's the point
| that a lot of people in this thread are making.

No doubt most people in the unix room were very pragmatic; after all,
Dennis Ritchie is credited for having stated "some languages are
designed to prove a point, others are meant to solve a problem", at
the second HOPL conference.

It seems theoretical discussions were given importance to the extent
which they helped solve real problems.  For example,

 http://cm.bell-labs.com/cm/cs/who/dmr/chist.html

   [...]
   For all these reasons, it seemed that a typing scheme was necessary
   to cope with characters and byte addressing, and to prepare for the
   coming floating-point hardware. Other issues, particularly type
   safety and interface checking, did not seem as important then as
   they became later.

   [...]
   The language changes during this period, especially around 1977,
   were largely focused on considerations of portability and type
   safety, in an effort to cope with the problems we foresaw and
   observed in moving a considerable body of code to the new Interdata
   platform. C at that time still manifested strong signs of its
   typeless origins. Pointers, for example, were barely distinguished
   from integral memory indices in early language manuals or extant
   code; the similarity of the arithmetic properties of character
   pointers and unsigned integers made it hard to resist the
   temptation to identify them. The unsigned types were added to make
   unsigned arithmetic available without confusing it with pointer
   manipulation. Similarly, the early language condoned assignments
   between integers and pointers, but this practice began to be
   discouraged; a notation for type conversions (called `casts' from
   the example of Algol 68) was invented to specify type conversions
   more explicitly. Beguiled by the example of PL/I, early C did not
   tie structure pointers firmly to the structures they pointed to,
   and permitted programmers to write pointer->member almost without
   regard to the type of pointer; such an expression was taken
   uncritically as a reference to a region of memory designated by the
   pointer, while the member name specified only an offset and a type.


However, the community wasn't immune to formal terms.
Ravi Sethi published the first attempt to formalize C semantics in POPL'80 

   "A case study in specifying the semantics of a programming language",
 
    
http://portal.acm.org/citation.cfm?id=567458&coll=Portal&dl=GUIDE&CFID=10235106&CFTOKEN=61874737



-- Gaby




reply via email to

[Prev in Thread] Current Thread [Next in Thread]