Is the output of the preprocessor deterministic ?

M

Mark McIntyre

(I apologise in advance, I propose to end this post with a small
insult, I dislike people being disingenuous without reason).

No, you weren't. You said "Then the question was strictly
meaningless". I didn't ask any question, so you could not have been
commenting about that. The question was asked by the OP.

Let me get this completely straight for the record:

I was commenting that the OP's question was strictly meaningless, if
he literally meant, as you said he did, the same headers.

If this is still hard for you to understand, and frankly I suspect it
never was, I suggest you take out your obstreperous nitwit earplugs.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
A

Al Balmer

(I apologise in advance, I propose to end this post with a small
insult, I dislike people being disingenuous without reason).
Odd. I was thinking the same about your pretending not to understand
the question.

As for your apology, I'll take it in the spirit given. The same back
at you. Talk about disingenuous!
 
P

Peter Nilsson

Keith said:
(e-mail address removed) (Gordon Burditt) writes:
The question above, ... was posted by <snip>
I mention this because Gordon Burditt is too rude to atttribute
quotations.

Gordon never posts attirbutions, AFAIK. But I'm not sure why it
would (or should) be considered rude.

Every netiquette guide talks about how to properly give attributions,
but I've yet to see a rationale for why attributions are considered
mandatory. Getting them wrong certainly causes problems, but
leaving them out altogether?!

I don't know Gordon's justification, but I can understand an ethos that
it doesn't really matter who posted what so long as the central issue
is
what is being addressed. Perhaps Gordon feels that leaving out
the attributions actually encourages people (or at least himself)
to focus on the issue. ["Watch the ball, not the man."]

If anything, not giving attributions is one form of preventing the
misunderstandings on who said what. And because it's harder to
directly see who said what, you're less likely to focus on the
who, and more likely to focus on the what.

That said, I'll continue to include attributions. If only for reasons
that I can't quite put my finger on!
 
K

Keith Thompson

Peter Nilsson said:
Gordon never posts attirbutions, AFAIK. But I'm not sure why it
would (or should) be considered rude.

It was discussed here at some length not too long ago.

Attributions make it easier to follow conversations. Gordon's claims
about why he deliberately snips them were, in my humble opinion,
unconvincing.
 
A

Al Balmer

Gordon never posts attirbutions, AFAIK. But I'm not sure why it
would (or should) be considered rude.
Odd. I don't understand why using someone else's words without
acknowledging the author could not be rude, unless he has asked for
anonymity. Worse, the practice makes it appear as if the current
author is claiming the writing as his own.
 
M

Mark McIntyre

Gordon never posts attirbutions, AFAIK. But I'm not sure why it
would (or should) be considered rude.

Its very important to know who said what. For example, I'd trust Chris
Torek more than I'd trust spinosa999, and hence I'd want to know who
Gordon were responding to, so that I could weigh his words
appropriately.

And personally, I dislike my words being quoted without my name
attached. If I say something dumb, I want people to know so they can
correct me. If I say something smart, likewise. And I don't like the
possibility that words might be mistaken for mine, or confused with
mine, or confused with someone elses. It feels kinda like claiming
someone else's work for your own.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
K

Keith Thompson

Al Balmer said:
Odd. I don't understand why using someone else's words without
acknowledging the author could not be rude, unless he has asked for
anonymity. Worse, the practice makes it appear as if the current
author is claiming the writing as his own.

It doesn't *quite* do that; the "> " and ">> " prefixes make it clear
enough that the material is quoted. But deliberately snipping
attributions is certainly rude, Gordon's questionable excuses
notwithstanding.
 
P

pete

Mark McIntyre wrote:
If I say something dumb, I want people to know so they can
correct me. If I say something smart, likewise.

OK, but it will require sophistry when you say something smart.
 
S

spibou

Mark said:
Then the question was strictly meaningless - you can't generally use
the same headers on different implementations.

Why not ? Note that I never stipulated that the output of
the preprocessor has to be compilable.
 
S

Skarmander

Is the output of the C preprocessor deterministic ? What I mean
by that is , given 2 compilers which conform to the same standard,
will their preprocessors produce identical output given as input
the same file ? If not then how much variation is allowed ? Is it
just a bit more or less white space here and there or could could
there be larger differences ?

If the output is not deterministic then is it possible that the output
of the preprocessor of one compiler can not be processed correctly
by another compiler ?
I've read the entire thread, and yet the thing I'd imagine people mentioned
first is not mentioned at all -- at least not directly. Maybe because it's
because it's so obviously not what you want to consider.

#pragma.

You're free to amend your question to "assuming we don't use #pragma", of
course. But I'll stop here.

S.
 
K

Keith Thompson

Why not ? Note that I never stipulated that the output of
the preprocessor has to be compilable.

For one thing, system headers are free to use non-portable compiler
extensions, some of which can be syntax errors for other compilers.
 
G

Guest

Why not ? Note that I never stipulated that the output of
the preprocessor has to be compilable.

"If the output is not deterministic then is it possible that the output
of the preprocessor of one compiler can not be processed correctly by
another compiler ?"

How do you want to process the output of the preprocessor other than by
compiling it?
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top