Topicality

  • Thread starter Anders Wegge Keller
  • Start date
C

Chris H

In message <[email protected]
s.com> said:
Last I checked GCC conforms to C90 and most of C99.

How did you check it?
Also the GCC team has a test suite for conformance to C90 and C99.
Check it out.

Really? Where?
The two industry test suites are Plum Hall and Perennial
GCC has a build test suit of sorts
Um? GCC targets ARM. I wouldn't use a C compiler for an 8051, but
then again I've developed programs for an 8051 so I know WTF I'm
talking about ...

Equivocation again. GCC fails the test you were using when I select a
different set of targets.
Because most processors on this planet don't run x86 natively?

No they run 8051....
Because if you want to have proprietary language extensions you ought
to target more than one platform.

Why?
 
J

jacob navia

Le 24/02/11 20:16, Tom St Denis a écrit :
Now suppose I used LCC-win32s "objects". Could I write a program such
that I both use objects and not use objects to work with both his and
C99 compliant compilers? No. A whole program re-write would be
required. Therefore, if I spend time developing apps with his non-
standard additions I get vendor locked in.

You are just speaking nonsense, as always. There are no "objects" in
lcc-win, there is no object oriented programming, either you do not
know what you are talking about or you are purposedly disseminating
false information.
 
R

Rui Maciel

Anders said:
Is there a general consensus(sp?) of what is and isn't topical in
this group? Appeals to the almighty orcle of google hints to the fact
that there isn't a firm definition. So I'd like to hear if talk about
C-analysis/parsing+modification tools like Coccinelle, clang, lint
etc. are frowned upon here or not?

I believe that the best course of action is to post any message that you
believe is related to the C programming language. If there are groups out
there which are better suited to discuss the subject you wish to discuss
then surely some people will point them out to you.

Nonetheless, even when the topicality is questionable it is possible to
get valuable replies among the "this is off-topic" posts.

So, to sum things up, when in doubt... post.


Rui Maciel
 
K

Keith Thompson

Including pathological code like:

float x = 3.0//* this is NOT a // comment */5.0;

Conforming means more than making an effort to do the right most of the
time.

Thanks, that's the corner case I was trying to think of.

Based on it, here's a program that's valid C90 and valid C99, but with
different semantics. It prints "C90" if compiled with a conforming C90
compiler, and "C99" if compiled with a conforming C99 compiler.

#include <stdio.h>
int main(void)
{
int x = 3//* ... */5;
;
if (x == 0) {
puts("C90");
}
else if (x == 3) {
puts("C99");
}
else {
printf("x = %d (?)\n", x);
}
return 0;
}

My expectation is that it will print "C99" under lcc-win32, but I'm
unable to try it.

To forestall the inevitable criticisms, I do not claim that anyone
should every write code like this outside the context of making this
specific point or as part of a compiler test suite. The only point is
that if a particular compiler generates code that prints "C99" for this
program, then that compiler does not "accept and correctly compile all
C89 code".

An earlier version of this program had
printf("x = %d (??)\n", x);
but I realized that ??) is the trigraph for ]. Trigraphs, of
course, are a feature of both C90 and C99. This isn't relevant to
the current discussion, I just found it amusing. I think it's the
first time I've ever accidentally used a trigraph.

If we want to discuss trigraphs, I suggest either starting a new
thread or going back and re-reading some of the old ones.
 
J

jacob navia

Le 24/02/11 19:44, Keith Thompson a écrit :
One more time, it doesn't bother me in the slightest if lcc-win32 isn't
a fully conforming C90 compiler.

OK, then let's leave it at that.

When I see a nice program FROM YOU that you contributed for the benefit
of all and you distribute for free, then (maybe) I will pay some
attention to what you say.

I have been distributing this compiler for free, together with the
thousands of pages of documentation that I wrote for it for more
than 10 years now, and I have more than a million downloads.

All this from my personal time and money. And I have to support
people like you or Heathfield or whatever, people that never do
anything else than brag about in this forum about the prototype of
main and the cast of malloc.

And YOU are going to tell me that I should not speak of my work
here?

But who the hell you think you are?
 
K

Keith Thompson

jacob navia said:
Le 24/02/11 19:44, Keith Thompson a ecrit :

OK, then let's leave it at that.

No, let's not.

You claimed, in so many words, that lcc-win32 "will accept and
correctly compile all C89 code". You didn't have to make that
claim, but you chose to. If you make a statement like that in a
public forum, and someone demonstrates it to be untrue -- well,
you're not required to do anything in response, but I think your
credibility would be improved if you at least acknowledged the point.
Expecially if you did so without stooping to personal insults.

I don't care whether lcc-win32 is a fully conforming C90 compiler or
not. I do care if you claim that it is, when it isn't. Feel free to
claim that it's close enough; I won't argue that point.

(Unless it actually does accept "restrict" and "inline" as
identifiers, and generates code that prints "C90" for the sample
program I posted elsethread, but I doubt it.)
When I see a nice program FROM YOU that you contributed for the benefit
of all and you distribute for free, then (maybe) I will pay some
attention to what you say.

I have in fact written some freely distributed software. You probably
wouldn't have any use for it, and it's not even vaguely topical here,
which is why I've never mentioned it.

But I wasn't aware that doing so was a prerequisite for being allowed to
speak. If I make a valid point, you can certainly ignore it, but
I fail to see why you'd want to.
I have been distributing this compiler for free, together with the
thousands of pages of documentation that I wrote for it for more
than 10 years now, and I have more than a million downloads.

And I don't believe I've ever criticized you for doing so.
All this from my personal time and money. And I have to support
people like you or Heathfield or whatever, people that never do
anything else than brag about in this forum about the prototype of
main and the cast of malloc.

Richard Heathfield hasn't posted here in quite some time; I suggest
leaving him out of this discussion.

No, you don't have to "support" me. I've never implied that you do,
and in fact I've stated as clearly as I possibly can that you don't.
Perhaps I'm misunderstanding your use of the word "support"?
And YOU are going to tell me that I should not speak of my work
here?

But who the hell you think you are?

Who the hell do I have to be?

I am not the arbiter of topicality for this newsgroup. I've merely
expressed my opinion.

You claimed that your compiler "will accept and correctly compile all
C89 code". I don't believe you.

I have nothing against you personally, apart from your tiresome
tendency to insult me for no good reason. I have nothing against
lcc-win32. I honestly don't know why you have such a problem
with me. I am not your enemy.
 
J

jacob navia

Le 24/02/11 23:31, Keith Thompson a écrit :
You claimed, in so many words, that lcc-win32 "will accept and
correctly compile all C89 code". You didn't have to make that
claim, but you chose to. If you make a statement like that in a
public forum, and someone demonstrates it to be untrue -- well,
you're not required to do anything in response, but I think your
credibility would be improved if you at least acknowledged the point.
Expecially if you did so without stooping to personal insults.

You are not worth even an insult Mr Thompson.

And if you develop a specially constructed code to make lcc-win reject
some code I do not care at all.

You can go on posting rubbish in this group of course, it is your freedom.
 
B

Ben Bacarisse

jacob navia said:
Le 24/02/11 23:31, Keith Thompson a écrit :

You are not worth even an insult Mr Thompson.

Please consider toning down your remarks or developing a thicker skin.
There's no reason why a technical exchange about compiler conformance
needs to turn into a blood feud.
And if you develop a specially constructed code to make lcc-win reject
some code I do not care at all.

You can go on posting rubbish in this group of course, it is your
freedom.

In my opinion it is not rubbish, but I doubt that carries a lot of
weight with you. But here is the reason I have been watching this
exchange with such a growing sense of disbelief: lcc's command-line
helps says it has this flag:

-ansic90 Conform to ANSI 1990 standard. This option will disallow all C99
and link with crtdll.dll, the C90 standard linbrary. Long long
support doesn't exist, there is no optimizer, but programs are
30K smaller than C99 programs. Use the driver "lc.exe" for this
option. Note that // comments are NOT recognized if you use this
option.

and this "specially constructed code" behaves entirely correctly:

#include <stdio.h>

int main(void)
{
int x = 2//* */ 2
- 1;
printf("C9%d\n", 9 * x);
return 0;
}

Z:\lcc>lc -ansic90 com.c

Z:\lcc>com
C90

Z:\lcc>lc com.c

Z:\lcc>com
C99

as does this:

#include <stdio.h>

int main(void)
{
int inline = 9, restrict = 10;
printf("C%d\n", inline * restrict);
return 0;
}

Z:\lcc>lc -ansic90 kw.c

Z:\lcc>kw
C90

Maybe you are aware of some other cases that don't work or you are just
concerned that someone will come up with one but, at least as far as the
issues raised in this thread are concerned, lcc-win32 behaves entirely
correctly for which I congratulate you.
 
B

Bart van Ingen Schenau

Anders said:
And for something neither covered by 1.3 What's topical
in comp.lang.c nor 1.4 What's not topical in comp.lang.c?

I would say a post is not topical in comp.lang.c if
- It does not discuss the C programming language or code written in that
language, or
- To answer the question, specific knowledge is needed about a particular
library, platform or tool(-set).

If it is about C and you think it can be answered/discussed by people that
are not familiar with the exact environment you work with, then it is most
likely on-topic.
Additionally, questions about topicality are always on-topic.
When in doubt, take the chance to post here anyway and hope for either a
good answer or a redirection to a more suitable place.

Bart v Ingen Schenau
 
K

kevin

Keith Thompson:
Richard Heathfield hasn't posted here in quite some time; I suggest
leaving him out of this discussion.

Of course he doesn't! He has achieved his aim of destroying the group.
With his work complete he's screwed off, leaving a smouldering pile of
rubble behind. Look at the pathetic husk this group has become - a
handful of threads each week prompting the same old turgid shit from the
tiny group of regulars who haven't left for less stale pastures.
I am not the arbiter of topicality for this newsgroup. I've merely
expressed my opinion.

Bullshit Thomson, utter bullshit. Along with Heathfield you are the
architect of the topicality laws that have throttled the life out of this
group over the past few years. I hope you're pleased with yourself.

You don't seem to see that Heathfield has played you for a fool - you
really believe in this group, it's your life. For Heathfield it was only
every a game - a toy to be played with and then destroyed.
 
J

jacob navia

Le 25/02/11 21:54, kevin a écrit :
Keith Thompson:

Of course he doesn't! He has achieved his aim of destroying the group.
With his work complete he's screwed off, leaving a smouldering pile of
rubble behind. Look at the pathetic husk this group has become - a
handful of threads each week prompting the same old turgid shit from the
tiny group of regulars who haven't left for less stale pastures.

I still try to discuss serious things, to develop a container library,
and some posters here have been helpful.

Never Mr Thompson or others like Seebs or St Denis.

When somebody proposes an interesting subject, Thomson never
fails to tell him that it is off topic. Anything serious is off
topic.

int main (void) {}

char *p = malloc (255); // You see? NO CAST!

This individual is always like that: apparently unconcerned,
always with apparent good manners. Pathetic.
Bullshit Thomson, utter bullshit. Along with Heathfield you are the
architect of the topicality laws that have throttled the life out of this
group over the past few years. I hope you're pleased with yourself.

He surely is. We have no more discussions here almost.
 
N

Nick Keighley

How could you forget the real meat of this group, namely, prototyping main()
and not casting the return value of malloc()?

Jacob already told that joke. It wasn't very funny then either.
 
K

Kenny McCormack

Jacob already told that joke. It wasn't very funny then either.

It is not a "joke" - in the sense in which that term is usually
understood. It is cold, hard fact.

And anyway:
1) Jacob got it from me.
2) It needs to be told over and over until people get it.

Besides, it's not like Kiki doesn't tell people over and over how to
prototype main(). Endless repetition doesn't seem to bother him...

--
Windows 95 n. (Win-doze): A 32 bit extension to a 16 bit user interface for
an 8 bit operating system based on a 4 bit architecture from a 2 bit company
that can't stand 1 bit of competition.

Modern day upgrade --> Windows XP Professional x64: Windows is now a 64 bit
tweak of a 32 bit extension to a 16 bit user interface for an 8 bit
operating system based on a 4 bit architecture from a 2 bit company that
can't stand 1 bit of competition.
 
M

Malcolm McLean

Keith Thompson:

You don't seem to see that Heathfield has played you for a fool - you
really believe in this group, it's your life. For Heathfield it was only
every a game - a toy to be played with and then destroyed.
I think comp.lang.c is a game for most people. Certainly I rarely post
anything serious serious here. It's more a place for floating ideas
and banter, though of course if a newbie comes along with a genuine
question I'll try to answer it as best as I can.
I'm sorry the threads have declined, but think the Heathfiled / Nilges
irriated at lot intermittents, if that's the level between reg and
newbie. I certainly stopped reading those threads myself - I only
really posed on one, Pete Seebach's review of Schildt, where I thought
Edward did have a point. Seeback accepted some of my criticisms and
rewrote the review.
 
S

Seebs

If I did need to build it from source, I could fire off the build
and work on something else until it's done. (It tooks several
hours last time I did it, but computers are faster these days.)

The issue is not the time the computer spends thinking, but effort getting
it built correctly. Especially when it's a cross-compiler, this is
hard. Like, hard enough that I've at least once put a day or so into it
and given up.

Which is why there are vendors who do it, and do it quite well.

-s
 
S

Seebs

Also, no offense, but your non-conforming compiler isn't all that
useful to most people. ?I sell C code for a living. ?Most customers
aren't even using the same processor let alone same compiler [or
version of the compiler] as I am.
No, the extensions are useless to you. Your situation isn't
particularly common.

I have never heard of someone using those extensions in a commercial
product or business-critical app. I'd guess that they are of low value
to most people. Not to say they're necessarily bad extensions, but as
long as only one compiler has them, and you don't have a pretty solid
guarantee that you can have maintainence for that compiler no matter what
happens...

-s
 
S

Seebs

Pete Seebach's review of Schildt, where I thought
Edward did have a point. Seeback accepted some of my criticisms and
rewrote the review.

I continue to think that, having gone through it in great detail, there was
not really a valid point in all those criticisms, and many of the things he
said about it were totally wrong. On the other hand, it was a good motivation
to clean something up and prove that not only was Schildt every bit as bad
as I'd previously said, he was actually substantially worse, and visibly
dishonest as well. So it did clarify things.

-s
 
J

jacob navia

Le 04/03/11 08:58, Seebs a écrit :
Also, no offense, but your non-conforming compiler isn't all that
useful to most people. ?I sell C code for a living. ?Most customers
aren't even using the same processor let alone same compiler [or
version of the compiler] as I am.
No, the extensions are useless to you. Your situation isn't
particularly common.

I have never heard of someone using those extensions in a commercial
product or business-critical app.

OK. You have never heared from my customers, and that is completely
OK, I will never give you any list of those.

Summarizing: You do not know anything.

I'd guess that they are of low value
to most people.

Here we have Seebs that opens his prejudices so that we all
can see them. Without any actual data he is just "guessing".
Not to say they're necessarily bad extensions, but as
long as only one compiler has them, and you don't have a pretty solid
guarantee that you can have maintainence for that compiler no matter what
happens...

My customers have bought the source code.
 

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

Staff online

Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top