Undefined behavior?

N

nrk

Chris said:
I do not believe that he (specifically) did. I went back to the
referenced article, saved it into a file, and viewed that; and
discovered that the text delivered by my news server contained
ASCII horizontal-tab characters ('\t', code 0x09). The software
I use is not defective and retains such characters; the Newsguy
servers' software retains them; but the software used on some
systems -- readers and/or servers; which ones I am not sure -- *is*
defective and simply deletes them entirely.

You're right. Definitely not intentional, but guilty as charged
nevertheless. In this particular case, the server correctly delivers the
tab characters, and my reader correctly handles them *after* I configure it
to do so. My mistake was that I didn't take the time to go through the
settings to make sure that quoted text was not automatically rewrapped,
something that results in tabs being removed entirely from quoted text in
my reader.
In response to this problem, I modified my own news-posting software
(the Pnews and Rnmail scripts that come with trn) to expand tabs
into an appropriate number of space by default, adding an option
to suppress this. In other words, *I* use tabs, but I now make
sure that the text I write that goes to Usenet does *not*, because
too many readers and/or servers are broken and there is a simple
workaround. This is similar to the reason I do not use the word
"begin" followed by two blanks at the beginning of a line -- at
least one news reader (Outlook Express) misinterprets it. (Of course,
begin followed by multiple blanks could occur entirely naturally,
if one were careless about whitespace in text, so those who use
this defective newsreader are doing themselves a disservice. But
it is less likely than ASCII tabs.)

My reader does this as well. If I use tabs, they are converted to spaces
before the post is sent out. ERT has done his good deed for the day by
getting me to correct an incorrect configuration in my newsreader :)

-nrk.
 
J

Jack Klein

I can see now, why many regulars here are on ERT's case. In all likelihood,
I just haven't paid enough attention to his past posts where he has done
this egregious thing of editing the original post without marking his
changes. IMO this is worse than a troll, and probably the sneakiest thing
I've seen on usenet. If this is standard procedure for him, then plonking
is not an option, as one would have to point out to others who like me
might make the mistake of taking ERT's quotes of an OP as authentic.

-nrk.

You're right, that's an excellent reason for not plonking Tisdale.
But it's not the reason that I haven't plonked him long ago.

Amazingly enough, if you read enough of his replies, you will
occasionally come across one that is helpful, courteous, and correct,
perhaps even insightful.

I like to find these, as it proves even trolls and dilettantes can
have an off day. ;)

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
 
P

Peter Nilsson

Andrew Clark said:
char *p, *q;
p = malloc ( 16 );
if ( p ) {
q = p;
p = NULL;
free ( q );
}

Will this invoke UB?

You can even write it to file, then read it back later, and assuming I/O was
successful and you didn't free the pointer in the mean time, it will still
work. [This basically puts a potential stop on true complete garbage
collection within C.]
 
J

John Bode

E. Robert Tisdale said:
I am *not* quoting Andrew Clark.

Really? Then why do you have the quote marks ('>') by the code, the
"Andrew Clark wrote:" line, etc. It certainly *looks* like you are
quoting him.
I am paraphrasing Andrew Clark
to reflect *my* understanding of what Andrew Clark meant.

Okay. In the future, please note where and why you are "paraphrasing"
someone's code so it won't look like you're doing something dishonest.
Consult the comp.lang.c newsgroup archives:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=comp.lang.c

if you want to know exactly what Andrew Clark wrote.

Yes, I can see that article, which led me to ask why your version of
his code was different. I frankly can't understand why you felt the
need to "paraphrase" such a simple bit of code. If you had left the
original code intact, then added your "paraphrased" version, then it
wouldn't look so suspicious. But it looked for all the world like you
were deliberately misquoting the OP to make him look like he was
saying something he didn't.

[snip remainder on netiquette]
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top