Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!ll-xn!mit-eddie!genrad!decvax!minow
From: minow@decvax.UUCP (Martin Minow)
Newsgroups: comp.lang.c
Subject: ANSI C -- preprocessing
Message-ID: <109@decvax.UUCP>
Date: Sun, 14-Dec-86 11:15:59 EST
Article-I.D.: decvax.109
Posted: Sun Dec 14 11:15:59 1986
Date-Received: Tue, 16-Dec-86 02:14:56 EST
Lines: 38

This is one of a collection of comments on the Draft Standard, posted to
comp.lang.c for discussion before I mail a final draft to the Ansi C
committee.  Each message discusses one problem I have found with the Draft
Standard that I feel warrants a "no" vote.  Note that this message is my
personal opinion, and does not reflect on the opinions of my employer.

---- Problem:

Page 75, line 27.  An identifier not currently defined as a macro should
produce a diagnostic message.  Whether or not the diagnostic is fatal
should be implementation defined.

Page 75, line 32ff.  The result of preprocessing character constants should
be the same as the result of executing the equivalent statements.  A single
character constant shall have a negative value if it would have a negative
value according to the semantics for character constants given on page 25,
line 35.

Page 82, line 10ff.  An unrecognized #pragma should result in a diagnostic
message.


---- Motivation:

Page 75, line 27.  An identifier not currently defined as a macro should
produce a diagnostic message.  The "defined()" preprocessing expression
may be used to check for definition:

    #if (defined(foo) ? foo : 0) == 123

The standard should not encourage ``silent'' programming errors in the
preprocessor, when it forbids use of an undeclared variable in the language
proper.

----

Martin Minow
decvax!minow