Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Uncle Steve Newsgroups: comp.lang.c Subject: Re: Types in C Date: Tue, 24 May 2011 00:24:32 -0400 Organization: Friends of the Galactic Collective Lines: 84 Message-ID: <44ec339c84ce72a-9f787@gmail.com> References: <43d4ef5f7d2b0f9-0f635@gmail.com> <9401m9Ft2pU9@mid.individual.net> <50d915539d62563-19304@gmail.com> <5936f04f8e60065-d6df3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="job9yP/rmK/fxQbJrcqEcA"; logging-data="28055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RJT7iRccfFj/XnLQGqTyS" User-Agent: nn 6.7.3 Content-Length: 3221 Cancel-Lock: sha1:UCckj2NyotBv5zMl9c9oaHh6jaY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:4667 On Tue, May 24, 2011 at 03:46:54AM +0000, Seebs wrote: > On 2011-05-24, Uncle Steve wrote: > > Absolutely correct, but I think it may be an error to use the word > > "type" to mean several different things: 'basic' types, > > aggregates of basic types, enumerated types, unions, structures, and > > function definitions. All these things have wildly different > > semantics and varying syntax. They aren't all interchangable, and > > therefore are differing entities. We say 'type', but the definition > > changes depending on what we are discussing. > > No, it doesn't. The word "type" denotes the category into which all > of those things fit. > > It's like "number". The word "number" includes rationals and irrationals > and complexes and counting numbers... so what? It's a good word because > it lets us characterize the stuff they have in common. Until we trip over the hidden differences. > All the "types" have things in common in terms of their meaning to the > C type system. True. It's all about variables and differentiating them from each other. > > I have no real argument there except to say that an aggregate type is > > not the same thing as a basic type, > > That's right. > > > even if the way they are used in a > > program can be similar. For instance, everyone knows that the address > > of an integer, float, structure, or function can be taken. Yet, I > > cannot perform addition on functions. They are different things. > > Right. That is because function pointer types are not object pointer types. > > But function types and object types still have underlying commonalities. > It is useful to refer to those commonalities in some way; we use the word > "type". Yes, I noticed that. > > Again, there is a huge qualitative difference between defining a new > > integer type and a structure type. > > Sure. > > But they are differences *within* the concept of "defining a type". True, however the bare 'type' nomenclature conceals the differences, which are perhaps only of non-trivial interest to compiler-writers. > >> As pointed out: gmp is part of the bootstrap process for gcc. It compiles > >> on pretty old stuff, by necessity. > > > Which version of gmp does gcc use these days to support those old > > platforms? > > gcc 4.4 requires GMP 4.1+ and MPFR 2.3.2+. > > Just to clarify: My day job is toolchain tech lead. The actual hard > compiler stuff is outsourced to Code Sourcery (who are awesome), but I do > maintain a certain basic familiarity with compiler build stuff. Long > story short, the core tools like this are only relatively recently (I > think it's a gcc 4 decision) willing to assume that they have access to a > compiler which supports prototypes. So gcc 3 and earlier will compile stage one on such a compiler? That is scary. I think I saw one of those compilers back in the beginning of the nineties on the Amiga: Dice, Manx or Lattice C; I no longer recall the details. Never did much programming back then, and anyways the code I wrote is long gone. Regards, Uncle Steve -- Should a professional politician be charged with molestation if he kisses babies while attending political rallies?