Related articles |
---|
[2 earlier articles] |
Re: Pre-Parsers vbdis@aol.com (2000-09-13) |
Re: Pre-Parsers saroj@bear.com (2000-09-15) |
Re: Pre-Parsers vbdis@aol.com (2000-09-21) |
Re: Pre-Parsers broeker@physik.rwth-aachen.de (Hans-Bernhard Broeker) (2000-10-08) |
Re: Pre-Parsers fjh@cs.mu.OZ.AU (2000-10-10) |
Re: Pre-Parsers brynjulv.hauksson@sds.no (2000-10-12) |
Re: Pre-Parsers jthorn@galileo.thp.univie.ac.at (2000-10-12) |
From: | jthorn@galileo.thp.univie.ac.at (Jonathan Thornburg) |
Newsgroups: | comp.compilers |
Date: | 12 Oct 2000 22:22:50 -0400 |
Organization: | Universitaet Wien (Vienna, Austria) / Institut fuer Theoretische Physik |
References: | 00-09-119 00-09-155 00-10-044 00-10-076 |
Summary: | why C preprocessor can't properly grok sizeof() |
Keywords: | practice, C |
Fergus Henderson <fjh@cs.mu.OZ.AU> wrote:
[[various historical reasons why the C preprocessor doesn't grok sizeof()]]
The fundamental problem with putting sizeof() into the C preprocessor
is simply that sizeof() respects scope, and the preprocessor doesn't.
I suspect it would very tricky to define how sizeof() should work to
properly respect scope (which it must to be of any use), and still keep
the preprocessor semantics (historically completely unscoped) reasonably
sane and backwards-compatible.
--
-- Jonathan Thornburg <jthorn@thp.univie.ac.at>
http://www.thp.univie.ac.at/~jthorn/home.html
Universitaet Wien (Vienna, Austria) / Institut fuer Theoretische Physik
Return to the
comp.compilers page.
Search the
comp.compilers archives again.