problem with compilation

P

pete

Tim said:
^^^^^^^^^^^^^^^^^ [snipped text restored]
N869
6.9 External definitions
[#5] An external definition is an external declaration that
is also a definition of a function or an object.

It's because I wanted to avoid the topic and not take a position on it
that I used the phrase "glossing over", together with "possible".

But I wanted to provide references anyway.
 
T

Tim Rentsch

pete said:
I'll admit that they get treated differently during translation
but I don't see why that is relevant.
(And they certainly don't fall into the
other three categories.) I feel a little bit uneasy referring
to \ NEWLINE as "white space".

N869
7.4.1.9 The isspace function
Description
[#2] The
standard white-space characters are the following: space
(' '), form feed ('\f'), new-line ('\n'), carriage return
('\r'), horizontal tab ('\t'), and vertical tab ('\v')

It's clear that \ NEWLINE sequences are not intended as white-space
in the language of the stanard document.

Here's the language of the standard document:
N869
5.1.1.2 Translation phases
3.
Whether each nonempty
sequence of white-space characters other than new-line
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
is retained or replaced by one space character is
implementation-defined.

It sure looks likes the language of the standard considers
newline, to be one of the white-space characters.

It almost seems as though you're trying to say
that a white-space character that gets treated differently
from the other white-space characters during translation,
shouldn't be considered a white-space character.

What I'm saying is, even though newline is a white-space character,
not all newlines in a program source have to be white-space.

The text cited above supports this statement -- a \ NEWLINE is not
replaced by a space during translation. For example

whi\
le

will turn into a 'while' keyword, not 'whi le'. See 5.1.1.2 p1#2. It
is only in 5.1.1.2 p1#3 (the containing paragraph of the text cited
above) that white-space is mentioned in the translation phases. Any
occurences of \ NEWLINE (not counting the disallowed case at the end
of the file) will have been deleted by that point, per 5.1.1.2 p1#2.
 
T

Tim Rentsch

pete said:
That might be better stated as "one or more, of only 4 things"



That is not a counter example to my original claim.
Right?

Oh, I think it is. The term "white space" is usually taken (in C) to
mean characters that can separate adjacent tokens. The \ NL here
doesn't do that. And the treatment of \ NL is discussed (in the C
standard document) as part of a different translation phase than
when "white space" is processed. So unless you're using the term
"white space" differently than how I'm used to seeing it, and also
differently than how it's used in the standard, the \ NL in the
text above seems not to fall in any of the four categories you
give.

Another example:

/\
* silly comment *\
/

It's true the \ NL's are textually within the comment, but I wouldn't
call them part of the comment. And certainly I wouldn't call them
white space.

I agree that the distinction is probably below threshold for most
people. Based on what I've seen in other postings of yours, however,
I would guess that you're one of the people who would notice the
distinction. So maybe you could think of it as me paying you a
compliment. :)


Oh, before I forget - I tried sending an email to you (on another
topic) at the email address <[email protected]>, and it bounced.
Was that just a glitch, or did I miss something?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top