Gcc vs Watcom

And I have question: where is good documentation on gcc?

start from here:
http://www.sunsite.ualberta.ca/Documentation/Gnu/gnu-docs.html

gcc-2.95.2:
http://www.sunsite.ualberta.ca/Documentation/Gnu/gcc-2.95.2/gcc.html

cheers,
Igor

“Igor Levko” <no_spam@nihrena.net> wrote in message
news:a1n054$3v3$1@inn.qnx.com

I wonder, why other compiler vendors do not support QNX.

Not enough money to be made would be the obvious reason. Plus
most vendor’s kit only runs on Windows or Solaris. Gcc is free, how
many people would pay 2000$-5000$ for a better compiler.


Check out:
http://partners.qnx.com/vendors/partner.qnx?company=MetaWare+Inc.&product=Hi
gh+C/C%2B%2B+Compiler+and+SeeCode+Debugger

As you will see this is date June 13th. From memory there was also a press
news about MetaWare compiler available for QNX6. However on MetaWare sites
there is no mention of a QNX version available. Probably gone vaporware
because of lack of demands.

  • Mario

“ed1k” <ed1k@yahoo.com> wrote in message
news:01c19ab0$c5fd06a0$106fa8c0@ED1K…

Igor Levko <> no_spam@nihrena.net> > wrote in article
a1httv$c1f$> 1@inn.qnx.com> >…
Thanks everybody.

I was playing around something very similar last night > :wink: > I tried to
compare execution speed for
different builds of the same mpeg3 encoder (BladeEnc 0.94.2)
There was faster code in case “gcc -O2” (not -O3)
The wav was about 30 Meg, bitrate and other setting of compression the
same, the same hardware:
p166mmx/64mb ram

  1. exec time 2:24, windows console application, Intel (R) C++ Compiler for
    32-bit
    applications,version 5.0, optimized for pentium;

Intel compiler is suppose to be very good.

  1. exec time 2:40, dos application with 32-bit extender, have no info on
    compiler, optimized for
    pentium;
  2. exec time 2:50, qnxrtp 6.1A, gcc -O2 -mcpu=pentium (I did not find
    anything yet to make it
    faster)
  3. exec time 3:15, qnxrtp 6.1A, gcc -O2 -mcpu=i386 or single -O2 > :wink:

Don’t forget that you may be also benchmarking the OS and mainly the
filesystem.
For example QNX may use more CPU time to read and write the file,
or read write performance may be lower on QNX.

Igor Levko wrote:

OS, thus It’s OS vendor who rules here and if it does not
want any competition with the “original” compiler no one will even try.
Which is fine only if OS vendor provides “state of the art” compiler
technology.
Unfortunaterly gcc 2.9 seems to be not this type of development tool.

State-of-the-art is by it’s nature a relative term; so my question is
this; if you feel that gcc 2.9 is not “state-of-the-art” to what “art”
are you comparing ? If VC++ is what you consider representative of the
current art of compiler design (it is certainly one of the most widely
used C++ compilers - along with gcc btw), then I would say that gcc 2.9
is at least as good as the current VC++, if not a little better
(depending on how you weigh features).

Rennie

“Mario Charest” <goto@nothingness.com> wrote in message
news:a1nah9$bnp$1@inn.qnx.com

“Igor Levko” <> no_spam@nihrena.net> > wrote in message
news:a1n054$3v3$> 1@inn.qnx.com> …
I wonder, why other compiler vendors do not support QNX.

Not enough money to be made would be the obvious reason. Plus
most vendor’s kit only runs on Windows or Solaris. Gcc is free, how
many people would pay 2000$-5000$ for a better compiler.

Not many. But I’ll bet many (maybe thousands) would pay $500 for a good

compiler (like Watcom both in price and quality).

Half a million dollars is pretty good insentive for ever a large company to
port an existing product to QNX RTP.


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net

“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:a1niap$gn2$1@inn.qnx.com

“Mario Charest” <> goto@nothingness.com> > wrote in message
news:a1nah9$bnp$> 1@inn.qnx.com> …

“Igor Levko” <> no_spam@nihrena.net> > wrote in message
news:a1n054$3v3$> 1@inn.qnx.com> …
I wonder, why other compiler vendors do not support QNX.

Not enough money to be made would be the obvious reason. Plus
most vendor’s kit only runs on Windows or Solaris. Gcc is free, how
many people would pay 2000$-5000$ for a better compiler.

Not many. But I’ll bet many (maybe thousands) would pay $500 for a good
compiler (like Watcom both in price and quality).

Half a million dollars is pretty good insentive for ever a large company
to
port an existing product to QNX RTP.

I think you are making it sound to easy :wink:

As you will see this is date June 13th. From memory there was also a press
news about MetaWare compiler available for QNX6. However on MetaWare sites
there is no mention of a QNX version available. Probably gone vaporware
because of lack of demands.

No, not a lack of demand. Not at all. Just wanted to clear that sort of
thing up.

chris

\

Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

“Chris McKillop” <cdm@qnx.com> wrote in message
news:a1oukb$mqj$1@nntp.qnx.com

As you will see this is date June 13th. From memory there was also a
press
news about MetaWare compiler available for QNX6. However on MetaWare
sites
there is no mention of a QNX version available. Probably gone vaporware
because of lack of demands.


No, not a lack of demand. Not at all. Just wanted to clear that sort of
thing up.

Hehe you teaser :wink:))

chris

\

Chris McKillop <> cdm@qnx.com> > “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

In article <a1f47k$aoh$1@inn.qnx.com>, Igor Levko <no_spam@nihrena.net> wrote:

… QSSL should have done this before adopting gcc as the primary
compiler of QNX RTP…

The problem is that Watcom is no longer a company, so pursuing
alternatives seems to make sense.

Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

In article <a1kfcn$81u$1@inn.qnx.com>,
Bill Caroselli <qtps@earthlink.net> wrote:

“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:a1kbfv$coh$> 1@nntp.qnx.com> …
Another issue is that watcom is x86 only and I don’t believe it would be
trivial to support any other processors. It’s probably a little easier to
have a fast compiler making fast code when you only have to support one
host
and one target. Not to take anything away from watcom but I think their
c++
support is several years behind and I also expect that trying to support
other targets would take them back to square one, quite a bit behind gcc.
Of course, that’s just my opinion and not based on any facts in
particular.
:wink:

Their 10.6 C++ was years behind. The 11.0 was very up to date (though I
won’t swear that it was completely up to date).

No C++ compiler is yet up to date, so Watcom certainly wasn’t.
There were always know for fast compilers and fast x86 code though.

I haven’t written a compiler since school and certainly not one as complex
as Watcom C/C++. But it seams to me that the parsing pass is most of the
work. Code generation shouldn’t be THAT difficult. Even so, for now, I’d
be happy with an X86 only Watcom compiler for QNX.

Ouch! That severely trivializes things.

Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==>
http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

In article <a1kir3$hfr$1@nntp.qnx.com>,
Brian Stecher <bstecher@qnx.com> wrote:

Bill Caroselli <> qtps@earthlink.net> > wrote:
I haven’t written a compiler since school and certainly not one as complex
as Watcom C/C++. But it seams to me that the parsing pass is most of the
work. Code generation shouldn’t be THAT difficult. Even so, for now, I’d
be happy with an X86 only Watcom compiler for QNX.

Parsing is easy.

Then why can’t compilers parse C or C++ yet?

Generating code is easy.

Then why can’t compilers generate correct code yet?

Generating good code (in a
reasonable amount of time) is very hard.

It’s all hard. It’s just a matter of some things being harder
than others.

Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

In article <a1kq1f$fgu$1@inn.qnx.com>,
Bill Caroselli <qtps@earthlink.net> wrote:

I would venture to guess that so far X86 is still by far the most popular
processor that RTP is being used on. (Though it has certainly outgrown it’s
usefullness.) So, let’s pretend for a moment that QSSL ports Open Watcom
and gets it to work for X86. Then, I’ll bet a bunch of us would try it and
say, “Oh my gosh this Watcom compiler is much better, faster and produces
better code than the GNU compiler.” Then, I’ll bet the folks using the
other hardware platforms would say, “Oh golly gee. If only the Watcom
compiler were available for my patform too!”

The problem of course though is not just creating back ends,
which is a job in and of itself, but in supporting C and C++ as well,
and all that means, which are both evolving.

Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

In article <a1n054$3v3$1@inn.qnx.com>, Igor Levko <no_spam@nihrena.net> wrote:

I wonder, why other compiler vendors do not support QNX.
Look, there was one compiler for QNX4 and again Gcc is
the only compiler available for QNX RTP (as far as I know).

IMHO, I doubt it’s such a big task to port any commercial unix x86 compiler
to QNX 6 x86. Though, I understand, that normally /usr/include & libC come
with
OS, thus It’s OS vendor who rules here and if it does not
want any competition with the “original” compiler no one will even try.
Which is fine only if OS vendor provides “state of the art” compiler
technology.
Unfortunaterly gcc 2.9 seems to be not this type of development tool.

Speaking as a vendor:
It’s a mixed bag, and who rules is across the board.
Porting a compiler is a big task. And it’s not just the act
of recompiling. Too much other stuff needs to occur.
Anyway, the costs are astronomical. It would cost me
5 figures just to do an inhouse port, and certainly 6 figures
to release it. That’s quite an investment to recoup.
Sure, it can be amoritized and funded in various ways,
but the underlying issues stil remain.

Anyway, I’m not saying we’d never do a QNX port, in fact,
I have said I’m interested in such a possibility. But it
would need to occur as a custom port or some committment
or in some such manner first.

Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

Greg Comeau <comeau@panix.com> wrote:

In article <a1kir3$hfr$> 1@nntp.qnx.com> >,
Brian Stecher <> bstecher@qnx.com> > wrote:
Parsing is easy.

Then why can’t compilers parse C or C++ yet?

Generating code is easy.

Then why can’t compilers generate correct code yet?

'cause us humans are idiots :slight_smile:. Though I will give you that parsing
C++ is not the most straightforward thing in the known universe (FORTRAN
is pretty … ‘interesting’ as well :slight_smile:.


Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8

In article <a1upn8$sat$1@nntp.qnx.com>,
Brian Stecher <bstecher@qnx.com> wrote:

Greg Comeau <> comeau@panix.com> > wrote:
In article <a1kir3$hfr$> 1@nntp.qnx.com> >,
Brian Stecher <> bstecher@qnx.com> > wrote:
Parsing is easy.

Then why can’t compilers parse C or C++ yet?

Generating code is easy.

Then why can’t compilers generate correct code yet?

'cause us humans are idiots > :slight_smile:> .

Exactly!

Though I will give you that parsing
C++ is not the most straightforward thing in the known universe (FORTRAN
is pretty … ‘interesting’ as well > :slight_smile:> .

It’s no picnic with C either, unless you write it for a subset.

Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

I don’t care about VC++? Is there VC++ version for QNX?
Ok, here are key points I consider a compiler to be a “state of the art”

  1. Quality of the generated code, optimisation abilities.
  2. Environment (debugger, profiler)
  3. Following ANSI standards
  4. Fast code generation, time to produce code (cpp + cc + link)
  5. Support (patches, new releases)

Gcc is free and it comes with source code. I guess that the main feature
dustiguishes gcc from other compilers and makes it so popular.

cheers,
Igor

“Rennie Allen” <rallen@csical.com> wrote in message
news:3C3F4993.7070400@csical.com

Igor Levko wrote:

OS, thus It’s OS vendor who rules here and if it does not
want any competition with the “original” compiler no one will even try.
Which is fine only if OS vendor provides “state of the art” compiler
technology.
Unfortunaterly gcc 2.9 seems to be not this type of development tool.


State-of-the-art is by it’s nature a relative term; so my question is
this; if you feel that gcc 2.9 is not “state-of-the-art” to what “art”
are you comparing ? If VC++ is what you consider representative of the
current art of compiler design (it is certainly one of the most widely
used C++ compilers - along with gcc btw), then I would say that gcc 2.9
is at least as good as the current VC++, if not a little better
(depending on how you weigh features).

Rennie
\

“Greg Comeau” <comeau@panix.com> wrote in message
news:a1s9rb$daj$1@panix3.panix.com

In article <a1kfcn$81u$> 1@inn.qnx.com> >,
Bill Caroselli <> qtps@earthlink.net> > wrote:
“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:a1kbfv$coh$> 1@nntp.qnx.com> …
Another issue is that watcom is x86 only and I don’t believe it would
be
trivial to support any other processors. It’s probably a little easier
to
have a fast compiler making fast code when you only have to support one
host
and one target. Not to take anything away from watcom but I think
their
c++
support is several years behind and I also expect that trying to
support
other targets would take them back to square one, quite a bit behind
gcc.
Of course, that’s just my opinion and not based on any facts in
particular.
:wink:

Their 10.6 C++ was years behind. The 11.0 was very up to date (though I
won’t swear that it was completely up to date).

No C++ compiler is yet up to date, so Watcom certainly wasn’t.
There were always know for fast compilers and fast x86 code though.

I haven’t written a compiler since school and certainly not one as
complex
as Watcom C/C++. But it seams to me that the parsing pass is most of the
work. Code generation shouldn’t be THAT difficult. Even so, for now,
I’d
be happy with an X86 only Watcom compiler for QNX.

Ouch! That severely trivializes things.

It’s always easy if someone else does it…:wink:

Kris


Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==> >
http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

In article <a1v2v6$5ut$1@nntp.qnx.com>,
Kris Warkentin <kewarken@qnx.com> wrote:

“Greg Comeau” <> comeau@panix.com> > wrote in message
news:a1s9rb$daj$> 1@panix3.panix.com> …
Ouch! That severely trivializes things.

It’s always easy if someone else does it…> :wink:

I always used to chuckle when at a meeting somebody would
tell a user or the boss that they could have something
available in 5 minutes. More often than not, it took
them 2-3 days straight to do it.

Greg Comeau What’s next: additional Windows backends and ‘export’!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware’s Libraries… Have you tried it?

Greg Comeau <comeau@panix.com> wrote:
: In article <a1v2v6$5ut$1@nntp.qnx.com>,
: Kris Warkentin <kewarken@qnx.com> wrote:
:>“Greg Comeau” <comeau@panix.com> wrote in message
:>news:a1s9rb$daj$1@panix3.panix.com
:>> Ouch! That severely trivializes things.
:>
:>It’s always easy if someone else does it…:wink:

: I always used to chuckle when at a meeting somebody would
: tell a user or the boss that they could have something
: available in 5 minutes. More often than not, it took
: them 2-3 days straight to do it.

There a rule for this, do not remember exactly:

  • if you can not make it an hour it will take a weekend
  • not a weekend … a month
    and so on…

:>It’s always easy if someone else does it…> :wink:

: I always used to chuckle when at a meeting somebody would
: tell a user or the boss that they could have something
: available in 5 minutes. More often than not, it took
: them 2-3 days straight to do it.

There a rule for this, do not remember exactly:

  • if you can not make it an hour it will take a weekend
  • not a weekend … a month
    and so on…

I like: “devil is the in the details”. Everybody knows how
sneaky the devil can be…