what parallel C language does MIPS Pro C Compiler support?

J

jacob navia

Richard said:
jacob navia said:




Why is that ridiculous? I've worked on many projects where this "ridiculous
extreme" was a customer-imposed requirement. Are you saying my customers
were ridiculous for wanting portable programs?





Is that really the most useful portable C code you can imagine? I'd have
thought a well-known C compiler writer would have a better imagination than
that.
Look:

You do not use directories in your programs?
You always work in the current directory?

Because that is not covered by standard C.

You never do any other output to the screen but using printf/fwrite???
GUIs are not covered by standard C.

You do not use the mouse, nor any other kind of input
device?
That is not in standard C.

You never use the network?

The network is not in C89.

*ANY* useful program that DOES something MUST use the underlying OS in
some way or another.
 
J

jacob navia

Randy said:
Hmm, might want to return a value, especially since you are
claiming C89. Nice try though.

No. C99 specified that the default value of main() is zero.
Crazy isn't it?

But it is standard C.
 
J

Jordan Abel

Look:

You do not use directories in your programs?
You always work in the current directory?

Because that is not covered by standard C.

Neither are filenames, for that matter. Any filenames used must be
user-provided for this reason. Unless you use tmpfile/tmpname.
 
M

Michael Mair

jacob said:
Look:

You do not use directories in your programs?
You always work in the current directory?

Because that is not covered by standard C.

You never do any other output to the screen but using printf/fwrite???
GUIs are not covered by standard C.

You do not use the mouse, nor any other kind of input
device?
That is not in standard C.

You never use the network?

The network is not in C89.

*ANY* useful program that DOES something MUST use the underlying OS in
some way or another.

Nope. You can write, say, a finite element toolbox from triangulation
over assembly of matrices to solution of the resulting linear equations
(or the same for non-linear dynamic problems) completely in standard C.

Of course, some graphical preprocessing makes input of problems easier
and postprocessing makes the output easier to use but the question "will
this thing show non-elastic deformations or break?" can be answered
without.

Or think of command line tools.
You can write grep or sed (or at least the part of their functionality
I need) in standard C.


Cheers
Michael
 
W

Walter Roberson

jacob navia said:
int main(void) {printf("PORTABLE PROGRAM :)"\n"); }
is portable but is it useful???

That's odd... I can't get it to compile under gcc or under SGI's cc.
gcc reports 2 errors, and SGI's cc reports 5.

Which compiler did you try it with, and which compile options?
 
K

Keith Thompson

jacob navia said:
Look:

You do not use directories in your programs?
You always work in the current directory?

Because that is not covered by standard C.

You never do any other output to the screen but using printf/fwrite???
GUIs are not covered by standard C.

You do not use the mouse, nor any other kind of input
device?
That is not in standard C.

You never use the network?

The network is not in C89.

*ANY* useful program that DOES something MUST use the underlying OS in
some way or another.

There are useful programs that do not use anything beyond what's
guaranteed by the C standard (C90, C99, whatever). (No, I don't have
an example off the top of my head.)

And yes, there are many useful programs that use features beyond what
the language guarantees -- but if they're well written, the
system-specific portions are separated from the portions that can be
ported with a simple recompilation. The latter portions are topical
for comp.lang.c. The system-specific portions are topical for a
newsgroup that deals with whatever system they're specific to.

Nobody here has claimed that there's anything wrong with writing
system-specific code when it's necessary. The only claim is that this
isn't the appropriate place to discuss it, and that there are plenty
of newsgroups where such things can be discussed.

I can write a C program that prints a message in Italian; that doesn't
make Italian grammar topical.

You advocate changing the topicality conventions for the newsgroup so
that system-specific discussions are allowed. That was tried some
years ago in comp.lang.c++, and it nearly destroyed the newsgroup.
 
C

Chris Torek

The cost [of a non-portable construct] must always be weighed
against the benefit.

The benefit is not quantifiable, here in comp.lang.c, because the
benefit achieved by non-standard code is not describable either.
(If you believe otherwise: What does adjSysIntObjPriority() do?
How much benefit is it to use it?)

The cost, here in comp.lang.c, is obvious: a program that calls
adjSysIntObjPriority() will not even compile.

Thus, in comp.lang.c, the quantified cost ("program does not
compile") always exceeds the unquantified benefit. If you want to
talk about the benefit, you need a different newsgroup.

You do not use directories in your programs?
You always work in the current directory?

This depends on the code. Much of my code does not use files at
all. Other code actually implements the underlying file system,
but to "use a directory" you do things like:

dvp = nd.ni_dvp;
error = VOP_READDIR(dvp, ...);

Do you believe I should post about this here in comp.lang.c? Will
you find such information useful?
Because that is not covered by C89.

I never said it was. I said: "the cost must be weighed against
the benefit." The benefit of the above (nonportable) code is not
quantifiable here in comp.lang.c, but the cost is clear: the above
will not work on Windows-based systems, nor on POSIX systems even
though it happens to be an internal implementation *of* a POSIX
system.
You never do any other output to the screen but using printf fwrite???

Many of the computers I program today do not even have a "screen".
(They do have serial ports.)
GUIs are not covered by C89

Indeed. But I have not programmed GUIs for almost a decade now.
You do not use the mouse, nor any other kind of input device?

Again, many of the computers I program today do not have a mouse
(or a keyboard, just a serial port).
You never use the network?

Not the way you think about it.
*ANY* useful program that DOES something MUST use the underlying OS in
some way or another.

Substitute "any useful hosted-implementation C program" for "any
useful program", and "underlying implementation" for "underlying
OS", and yes, it must -- but the only things guaranteed to be
*in* that underlying implementation are those in the standard(s)
to which it conforms. The only standards that are on topic here
in comp.lang.c are the C standards (C89, C95, and C99, mainly,
although even K&R-1 C is still reasonably topical, in my opinion).

And, as I said, the cost of a nonportable function must always be
weighed against the benefit. This equation is much clearer when
one is outside comp.lang.c: if you need to walk a directory, and
opendir(), readdir(), closedir() etc all exist because you are in
comp.unix.programmer, the benefit to using them is obvious. The
cost is also minimal, since they are POSIX-standard. The fact that
readdir() on vxWorks happens to be implemented via a "magic" ioctl()
is not important, and the cost of using the ioctl() directly is
clear (it does not work at all on Unix and Linux) while the benefit
is tiny. But in comp.lang.c, POSIX itself is off-topic, and only
the cost ("not available in the C standards") is clear.

Do you believe I should use comp.lang.c to talk about the benefit
of semBCreate() vs semMCreate()? Should I use this newsgroup to
describe the rtpSpawn() function? What will you get out of a
discussion of the parameters to ataDevCreate()?
 
R

Randy Howard

jacob navia wrote
(in article said:
No. C99 specified that the default value of main() is zero.

The return value you mean?
Crazy isn't it?

Which is why I was careful to point out your claim, which you
snipped, that it was "staying in C89". Which in point of fact,
it was not. If you can't even formulate a C89 compliant hello
world program, why should we expect you to understand any of the
rest of this thread?
 
M

Mark McIntyre

Clearly, it's either not agreed-on, or it's agreed-on but vague enough
that there are differences in interpretation.

I disagree - there are some people who believe the topic ought to be
different, but there's almost never a difference of opinion. Even if
there were, so what? We're grownups, we're allowed to disagree.
Not only has it not been
written down, it has never been subject to a vote.

it /was/ subject to a vote, back when the group was formed. I'm not
aware there's any requirement to revote.
 
M

Mark McIntyre

A group for general C discussion. If you want a group for talking about
ISO C only, why not make groups comp.lang.c.iso90 comp.lang.c.iso99?

Two reasons I can think of
1) why ?
2) we were here first.

If you want a group to talk about nonstandard general stuff, go form
one called comp.lang.c.generaldiscussion
This newsgroup's charter is not in writing and has never been subject to
a vote. From what does its authority derive?

From what does your authority to start bullying everyone derive?

Okay, seems you're a troll, You start getting treated like one.
 
M

Mark McIntyre

I've read, from a google archived thread on a similar issue, that there
are three,

Then you're hard of reading, and/or dense and/or being deliberately
obtuse and provocative. I know not which though I have my suspicions
Besides - C is still C even when there are extensions.

No its not, any more than water is still water after you add HNO3 or
NaCl, or some other small addition.
There's plenty of room in this newsgroup.

And there's plenty of room for new groups.
 
M

Mark McIntyre

Never a SINGLE user has EVER asked me:
Is your program portable?

Its self-evident that you work almost exclusively for a single
platform. So why would they ask for portability?
But never nobody asked for portability.

Not even from Win16 to Win32? Or Win32 to Win64? But then you may not
have been around long enough for that.
Software has to be ported to a new environment or to a changed
environment or whatever.

And it never occured to you to minimise the amount of work by writing
maximally portable code in the first place?
In this group, portability has been taken to the ridiculous extreme of
staying in the C89 standard, that is surely portable but at what cost???

This remark makes no sense as firstly its not a ridicolous extreme,
and secondly there is no cost.

(snip fatuous example which demonstrates only the lack of
understanding of the previous poster)..
 
M

Mark McIntyre

You do not use directories in your programs?

You always work in the current directory?

You pass an implementation-specific string to the stream IO routines,
and get back a file handle. It will astound you to know that this
works perfectly well without having to change directory.
GUIs are not covered by standard C.

Exactly, because on every single platform, the routines needed to
drive them are different. Why are you making our point for us?
*ANY* useful program that DOES something MUST use the underlying OS in
some way or another.

Irrelevant - it can still be entirely portable (consider a filter) or
largely portable with nonportable elements separated into different
modules.

It will astound you to realise that 90% of most programmes doesn't
need to access the hardware at all.
 
M

Mark McIntyre

Jordan Abel said:
On that subject - why does time() take a pointer argument? Even in UNIX
v7 [where K&R C grew up] the underlying system call returned a value
rather than placing it in memory at a pointer. [and even there, the
library call also took a pointer argument]

Not portable. Can't discuss it here. Blah, blah, blah.

While unix v7 certainly isn't portable by modern standards, the fact
that time() takes a pointer argument is part of the standard, and I
believe the question of why this is the case would be on-topic even by
the strictest definition.

It is - kenny is a troll.
 
K

Keith Thompson

Mark McIntyre said:
On Mon, 21 Nov 2005 02:00:33 +0000 (UTC), in comp.lang.c , Jordan Abel


From what does your authority to start bullying everyone derive?

Okay, seems you're a troll, You start getting treated like one.

Mark, since Usenet is an asynchronous medium, you probably missed
the followup in which Jordan wrote:

] I'm convinced. I am going to drop the subject now.
 
J

Jordan Abel

You're dead wrong.

I could quote the relevant section of the standard, but its more
instructive to leave you to find it yourself.

What filenames, other than those returned by tmpnam(), does the standard
guarantee refer to accessible files?

I found the relevant section myself.

C89, $4.9.3:
The rules for composing valid file names are implementation-defined.

It would appear that I wasn't wrong after all. The only filenames a
strictly conformant program can use are those returned by tmpnam(),
which you can use up to 25 times, the minimum maximum TMP_MAX.


You know what?

You seem to have decided you don't like me, based on a week-long
conversation that you walked in on the end of and decided to respond
with smart-ass quips to every single one of my messages, even though i
had since changed my position. I'm not sure why I should dignify
anything you say to me with a response.
 
J

Jordan Abel

From what does your authority to start bullying everyone derive?

"bullying"?

All I did was question whether non-ISO-strict-c89-pure code was really
off-topic, as people claim. I've since dropped the subject, but now you
had to make it personal.

Who was i "bullying"?
 

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,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top