microsoft visual c++

C

CBFalconer

Hallvard said:
Then give correct information instead. I haven't browsed more than
a fraction of that thread, but the OP was clearly not thinking of
"the ISO C standard", just "C", there is no reason to assume the OP
there learned anything at all from your messages. He even had to
ask in which way you were being obnoxious just to understand your
reply.

What do you think defines "C". So you have your own private C
standard to which you refer? Is it accepted and approved by the
various worldwide standard bodies? The only document I can think
of that meets those criteria is the ISO C standrd, commonly known
as C99.
 
R

Richard Heathfield

Hallvard B Furuseth said:
Then give correct information instead.

I did.
I haven't browsed more than a
fraction of that thread, but the OP was clearly not thinking of "the ISO
C standard", just "C",

The one defines the other.
 
H

Hallvard B Furuseth

Richard said:
Hallvard B Furuseth said:

I did.

You are right for the first message, I've read that thread quite out of
order. Sorry about that. What you didn't do was answer the OP's
question. He made some assumptions - about the implementation he was
using, obviously, you could have said something about those particular
assumptions.

OTOH, your following "C&V please" responses did not give information at
all. The OP even had to post a followup just to learn what you meant.
The one defines the other.

In your mind, obviously. In the OP's and several others' minds,
obviously "C means something wider than that, or they don't have the
standard anyway.

BTW, I guess my mention of comp.unix.programmer was wrong. After all,
there is a definition of Unix too, it's even trademarked, so one
shouldn't refer to comp.unix.programmer for anything which not the
trademarked Unix, right?
 
R

Richard Heathfield

Hallvard B Furuseth said:
You are right for the first message, I've read that thread quite out of
order. Sorry about that.

Your apology is accepted.
What you didn't do was answer the OP's question.

That is because the OP's question didn't really have a C answer, except
perhaps "The C Standard doesn't require your implementation to have a bss
or a stack", which is what I said.
He made some assumptions - about the implementation he was
using, obviously, you could have said something about those particular
assumptions.

I did - by saying "The C Standard doesn't require your implementation to
have a bss or a stack" - i.e. I indicated that he was making incorrect
assumptions.
OTOH, your following "C&V please" responses did not give information at
all.

"C&V please" is a request for information, not an offer of information. Mr
Navia had claimed that the OP was correct to think that "it is stack", and
I was asking Mr Navia to give supporting evidence for his claim.
The OP even had to post a followup just to learn what you meant.

Fine, but I was asking Mr Navia, not the OP, to provide that supporting
information.
In your mind, obviously. In the OP's and several others' minds,
obviously "C means something wider than that,

Neither their view of what C is, nor mine, is normative.
or they don't have the standard anyway.

BTW, I guess my mention of comp.unix.programmer was wrong. After all,
there is a definition of Unix too, it's even trademarked, so one
shouldn't refer to comp.unix.programmer for anything which not the
trademarked Unix, right?

No idea. That's a question for comp.unix.programmer, not comp.lang.c.
 
Y

Yevgen Muntyan

Richard said:
Yevgen Muntyan said:




I'm happy for Mr Navia to have the last word, if it's a *correct* last word.

I believe your reply about Venus and Earth actually confirmed that
Jacob was right (he said something like "If I said ... then you would
...."), i.e. you didn't let him have last word even though it was
correct.
I explained my reasons for recommending a Web page rather than a newsgroup
at the time I made the recommendation.

You explained your reasons for recommending web page, but you didn't
tell why/if a link to some web page is as good as directing OP to an
appropriate newsgroup so that zillions of experts may correct possible
mistakes (this is the most popular excuse for "off-topic here, go to
foo.blah.something, and I won't tell anything" stuff).
Then it's well-misunderstood. I'm not interested in liking or disliking
Jacob Navia, and I'm not interested in his opinion of me. What I'm
interested in is people not being misled by incorrect information.

Oh yeah, your replies to Jacob's post show exactly this, that you
care only about the truth. Like, if Jacob says that he's not in
"heathfield something club", then you want to prevent people from
being misled by this Jacob's statement.
> That's why I post corrections when I notice people making mistakes -
> and it's why I apologise if I discover that I myself have given
> incorrect information. It has nothing to do with likes or dislikes.

What you're doing is way too often something in the range from feeding
trolls to simply being a jerk. It'd be silly to ask you not to be like
that, of course, but maybe you could at least cool a bit your replies?

Yevgen
 
K

Kenny McCormack

I believe your reply about Venus and Earth actually confirmed that
Jacob was right (he said something like "If I said ... then you would
..."), i.e. you didn't let him have last word even though it was
correct.

You are absolutely right, of course. (Now, let's count the minutes
until KT posts that I am not your friend...)

Actually, there's a lot to be said for the notion that the definition of
"East" is the direction of the rising sun - so if a planet spins in the
opposite direction of the Earth, then the definition of "East" changes
accordingly.

And, to any of the jobworths here who would say that sort of re-definition
isn't valid, well, I think we can all agree that much worse
re-definition goes on here all the time (starting with the nutsoid
contention that C == ISO C == C99 (oops, I mean, C89, oops, er, ...))
....
Oh yeah, your replies to Jacob's post show exactly this, that you
care only about the truth. Like, if Jacob says that he's not in
"heathfield something club", then you want to prevent people from
being misled by this Jacob's statement.

Ego just wouldn't allow letting that statement go unchallenged.
Even though it is, of course, dead on.
What you're doing is way too often something in the range from feeding
trolls to simply being a jerk.

Keep in mind that it has been pretty well established by now that "RH"
is just a pimply 17 year old (probably using Daddy's computer w/o
permission).
 
H

Hallvard B Furuseth

CBFalconer said:
What do you think defines "C". So you have your own private C
standard to which you refer? (...)

C has a standard which defines the offical language. Fine. But as for
"C", as a word, as something to discuss for programming: Well, a C
program is something which is intended to be accepted by a C compiler, I
guess. I.e. this is a C program:

void main() {}

It's a C program which uses a compiler extension which should be
taken out and shot, but still a C program.

Remove the 'v' in void and I'd still call it a C program. With a fatal
typo.
 
R

Richard Heathfield

Yevgen Muntyan said:
I believe your reply about Venus and Earth actually confirmed that
Jacob was right (he said something like "If I said ... then you would
..."), i.e. you didn't let him have last word even though it was
correct.

But it wasn't correct.
 
P

pete

Hallvard B Furuseth wrote:
void main() {}

It's a C program which uses a compiler extension which should be
taken out and shot, but still a C program.

Remove the 'v' in void and I'd still call it a C program.
With a fatal typo.

That wouldn't be a typo.
That would just be a form of main
which is acceptable to an implementation
which AFAIK has yet to be implemented.
Like this C program:
DoidyDoidyDoidyDoidyDoidyDoidyDoidyDoidyDoidyDoidy
 
H

Hallvard B Furuseth

pete said:
That wouldn't be a typo.
That would just be a form of main
which is acceptable to an implementation
which AFAIK has yet to be implemented.
Like this C program:
DoidyDoidyDoidyDoidyDoidyDoidyDoidyDoidyDoidyDoidy

Irony aside, that's a good point. I don't know where to draw the line,
but a deliberately non-compiling program seems as good limit as any.
So it'd not be a program if I deliberately removed the 'v' as above,
but it would be if I accidentally leaned on the delete key. Oh well.
Good enough, if one has to find a limit.
 
K

Keith Thompson

Hallvard B Furuseth said:
C has a standard which defines the offical language. Fine. But as for
"C", as a word, as something to discuss for programming: Well, a C
program is something which is intended to be accepted by a C compiler, I
guess. I.e. this is a C program:

void main() {}

It's a C program which uses a compiler extension which should be
taken out and shot, but still a C program.
[...]

It's a "conforming program" as defined in C99 4p7:

A _conforming program_ is one that is acceptable to a conforming
implementation.

I could grab a copy of any open-source conforming C compiler, modify
it to accept (as an extension) any arbitrary input I like, and cause
that input to become a "conforming program".

We don't often discuss the category of "conforming programs" here
because it's too broad to be useful. I believe it was included in the
standard for political reasons. (Not that there's anything wrong with
that.)
 
R

Richard Heathfield

Hallvard B Furuseth said:

C has a standard which defines the offical language. Fine. But as for
"C", as a word, as something to discuss for programming: Well, a C
program is something which is intended to be accepted by a C compiler, I
guess. I.e. this is a C program:

void main() {}

It's a C program which uses a compiler extension which should be
taken out and shot, but still a C program.

Remove the 'v' in void and I'd still call it a C program. With a fatal
typo.

How many typos do you allow before it stops being a C program?
 
H

Hallvard B Furuseth

Richard said:
Hallvard B Furuseth said:

Your apology is accepted.

Thank you. Er, partial apology anyway...
That is because the OP's question didn't really have a C answer,
except perhaps "The C Standard doesn't require your implementation to
have a bss or a stack", which is what I said.

Yup, that's one thing I'm complaining about. There is no way to tell if
the answer actually told him anything he needed/wanted to know. If he
was looking for "how to write a conforming C program", fine. The
posting didn't indicate that, however. If he was exploring his computer
and trying to learn how it worked at low level, it was a near useless
answer.

Just that it was posted here doesn't mean that it shall and must be
interpreted in terms on Standard C, in particular when it's obvious that
the poster is not thinking about Standard C.

Nor does an otherwise correct answer suddenly become incorrect just
because it is posted here instead of in some non-C group. The
"incorrect" answers you refer to _were_ correct. Just not Standard C
answers.
I did - by saying "The C Standard doesn't require your implementation
to have a bss or a stack" - i.e. I indicated that he was making
incorrect assumptions.

If he had asked the question it terms of standard C, that would be so.
He didn't, so you had no info to assume he was making incorrect
assumptions. Maybe he was, or maybe you are the one making incorrect
assumptions. The latter seems more likely in this case.
"C&V please" is a request for information, not an offer of information. Mr
Navia had claimed that the OP was correct to think that "it is stack", and
I was asking Mr Navia to give supporting evidence for his claim.

OK, you were _not_ interested in that point at seeing the OP "not being
misled by incorrect information", then. And you gave the same answer to
"MQ", who there was no reason to assume knew what you meant.
Fine, but I was asking Mr Navia, not the OP, to provide that supporting
information.

Except that you already knew there wasn't any, so that was not really
what you were asking for. That's where I see it as equivalent to
trolling, because you are asking for the thread to expand to an old
quarrel. Also it's a quarrel which is likely of no interest to the OP,
yet the OP will have to wade through it if he wants to find any posts
which _do_ interest him.
Neither their view of what C is, nor mine, is normative.
Fine:)


<shrug> It's available.

But possession of the Standard is not a required ticket to this
newsgroup.
No idea. That's a question for comp.unix.programmer, not comp.lang.c.

That was supposed to be a rhetorical question...
 
H

Hallvard B Furuseth

Richard said:
Hallvard B Furuseth said:

How many typos do you allow before it stops being a C program?

I neither know nor care. You run into the same problem of defining what
is and is not a C program whatever you call C anyway, like "this posting
is a C program because I intend to see how well it fits the ISO C
standard."

Point is though, that if one wants a definition of what is or is not C,
intent looks as reasonable as anything.
 
H

Hallvard B Furuseth

Keith said:
Hallvard B Furuseth said:
C has a standard which defines the offical language. Fine. But as for
"C", as a word, as something to discuss for programming: Well, a C
program is something which is intended to be accepted by a C compiler, I
guess. I.e. this is a C program:

void main() {}

It's a C program which uses a compiler extension which should be
taken out and shot, but still a C program.
[...]

It's a "conforming program" as defined in C99 4p7:

It is? OK, make that
__attribute__((pure)) int main() {return 0;}
then (a GCC extension, if it makes my point easier to understand.



(Note, I may be posting a bit irregularly this week, sorry about that.
Bad time to start a thread like this.)
 
K

Keith Thompson

Hallvard B Furuseth said:
Keith said:
Hallvard B Furuseth said:
C has a standard which defines the offical language. Fine. But as for
"C", as a word, as something to discuss for programming: Well, a C
program is something which is intended to be accepted by a C compiler, I
guess. I.e. this is a C program:

void main() {}

It's a C program which uses a compiler extension which should be
taken out and shot, but still a C program.
[...]

It's a "conforming program" as defined in C99 4p7:

It is? OK, make that
__attribute__((pure)) int main() {return 0;}
then (a GCC extension, if it makes my point easier to understand.

That's also a "conforming program", as far as I can tell, assuming
that (a) it's acceptable to gcc, and (b) gcc is a conforming
implementation. The standard's definition of "conforming program" is
specifically intended to allow for the use of extensions.

C99 4p6:

[...]
A conforming implementation may have extensions (including
additional library functions), provided they do not alter the
behavior of any strictly conforming program.

C99 4p7:

A _conforming program_ is one that is acceptable to a conforming
implementation.

with a footnote:

Strictly conforming programs are intended to be maximally portable
among conforming implementations. Conforming programs may depend
upon nonportable features of a conforming implementation.

My point is that the term "conforming program" is, IMHO, too broad to
be particularly useful. There should be a category of programs that
are acceptable to all possible conforming implementations without
necessarily being strictly conforming.

But the whole issue is mired in political requirements, and any
proposal for a change to the standard would likely generate more heat
than light.

But we were talking about, um, (looking back up to the Subject line)
topicality. So, to get back to that, in my opinion, discussion
of the fact that your program above is a "conforming program" is
certainly topical, but a discussion of the specific semantics of
"__attribute__((pure))" would not be. More generally, discussion
of the fact that extensions are allowed, and what form they can
take in a conforming implementation, is topical; discussion of
specific extensions is more appropriate in a system-specific or
compiler-specific newsgroup.

To go back to your earlier example, we can't just say that
"void main()" is invalid, illegal, bad, evil, etc. We have to
acknowledge that an implementation is allowed to support it, but it's
non-portable and there's rarely a good reason to use it in a program
intended for a hosted implementation.
 
C

CBFalconer

Hallvard said:
.... snip ...

Just that it was posted here doesn't mean that it shall and must be
interpreted in terms on Standard C, in particular when it's obvious
that the poster is not thinking about Standard C.

That is just an indication that the OP is ignorant of what is and
is not topical here. He needs to be informed. Answering the
off-topic question just encourages the bad behaviour by him or
others.
 
P

pete

Hallvard said:
Point is though,
that if one wants a definition of what is or is not C,
intent looks as reasonable as anything.

I consider a program which invokes undefined behavior,
to be not a C program,
because the code doesn't mean anything.
 
K

Keith Thompson

pete said:
I consider a program which invokes undefined behavior,
to be not a C program,
because the code doesn't mean anything.

Ok, but I'd call it a meaningless C program.

In fact, it can definitely be a "conforming program" as defined by the
standard.

I think the real conclusion is that "Is this a C program?" isn't
always a useful question to ask, much less answer.
 

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
474,260
Messages
2,571,039
Members
48,768
Latest member
first4landlord

Latest Threads

Top