Topic: N2857: 2.2-p3 replacement of spaces
Author: "wolf.lammen" <wolf.lammen@googlemail.com>
Date: Sun, 29 Mar 2009 17:57:44 CST Raw View
Hello,
During translation phase 3, an implementation may or may not replace a
sequence of whitespaces other than newline by a single space. The
previous issue of the draft, N2800, required documentation of this
behavior, because it was implementation-defined (1.3.7). The current
draft, N2857, has changed this to 'unspecified behavior', so the
implementation need not specify its behavior any more (1.3.13).
Replacing several whitespaces (no newline included) by a single space
is a transformation of the source file, that possibly turns a
syntactically ill-formed program into a correct one.
For example, no form feed or vertical tab may be used within a
preprocessing directive (16 paragraph 4). Replacing them silently
'fixes' buggy software.
Implementations that cover up such errors, should IMHO at least inform
their users that they do so.
In this light, what was the reason to relax the documentation
requirements?
Shouldn't whitespace sequences containing form feed or vertical tab
rather be replaced by a form feed than by a space, if at all?
Wolf Lammen
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]