* GCC and CC questions
@ 2003-07-04 6:11 Greg Rudd
2003-07-09 6:04 ` SUMMARY: " Greg Rudd
0 siblings, 1 reply; 2+ messages in thread
From: Greg Rudd @ 2003-07-04 6:11 UTC (permalink / raw)
Hi All
Sorry if this might have been answered answered before but I am trying to get
the compaq cc compiler to perfrom the in the same way as gcc. My sort
understanding that the default behaviour of gcc is that of relaxed K&R with
relaxed ansi. Also another thing that I have noticed that gcc is far less
strict with type checking than the compaq cc compiler . What flag should I
use to get the exact or simmilar behaviour of gcc with cc.
BTW What would be a good wish list would be for cc in a future version of
tru64 to have a -gnu flag so as you get the benefits of the compaq cc
optimisation when compiling some open source software.
Thanks in advance
-greg
--
Greg Rudd
Computer Systems Officer
Information Technology Services
University Of Sydney
PH: +61 2 9351 5531
Fax +61 2 0351 6004
email: grudd@mail.usyd.edu.au
-------------------------------------------------
/"\ ASCII Ribbon Campaign against HTML
\ / email
X
/ \
-------------------------------------------------
For more info on why you should not send html in email go to
http://www.american.edu/cas/econ/htmlmail.htm
^ permalink raw reply [flat|nested] 2+ messages in thread
* SUMMARY: GCC and CC questions
2003-07-04 6:11 GCC and CC questions Greg Rudd
@ 2003-07-09 6:04 ` Greg Rudd
0 siblings, 0 replies; 2+ messages in thread
From: Greg Rudd @ 2003-07-09 6:04 UTC (permalink / raw)
Cc: esu-staff
Thanks to both Nikola Milutinovic and Tom Webster for their swift and helpfull
replies!! :-)
The basic consensis is that as a C compiller GCC is far to relaxed in type
checking hence a program that will compile with out error or warning on GCC
will most likely bomb out on Compaq CC.
To get simmilar behaviour to GCC with the standard Compaq CC compiler the
following flags will have to be given to the C compiler
For 4.0x and 5.1x systems the flag would be -std
On the other hand Tom pointed me to the Developers Tool Kit version of the
Compaq C compiler. Which has GCC mode compatibility switched on by default.
To get GNU G++ compatibility with the Compaq C++ compiler you will have to
issue the following flag to the compiler.
"-std gnu"
However the is one catch if you want to use the DTK version of the Compaq C
compiler in that it requires the OSF-DEV licence as Tom points out which you
should this licence installed if you are compiling anything other than the
kernel.
Also if you are compiling a lot of open source software it is recomended that
you install GNU make which is avalible from http://www.gnu.org
To download the DTK version of the Compaq CC compiler you can go to
http://h30097.www3.hp.com/tools.html#application
Also worth noting that they three standards of C at the moment with two formal
standards ( ANSI and K&R) and one informal ( GNU C) which is widely spread.
As Nickola replies to my wish list "An even better wish-list would be to
attempt standardising GNU C syntax. If it is coherent, if it brings further
abilities, then let's push it as a formal standard. This way we have 3 formal
standards and one informal, but widely spread." Which I tend to agree with.
-greg
Original Question
Friday 04 July 2003 16:11, Greg Rudd wrote:
> Hi All
>
> Sorry if this might have been answered answered before but I am trying to
> get the compaq cc compiler to perfrom the in the same way as gcc. My sort
> understanding that the default behaviour of gcc is that of relaxed K&R with
> relaxed ansi. Also another thing that I have noticed that gcc is far less
> strict with type checking than the compaq cc compiler . What flag should I
> use to get the exact or simmilar behaviour of gcc with cc.
> BTW What would be a good wish list would be for cc in a future version of
> tru64 to have a -gnu flag so as you get the benefits of the compaq cc
> optimisation when compiling some open source software.
>
>
> Thanks in advance
>
> -greg
--
Greg Rudd
Computer Systems Officer
Information Technology Services
University Of Sydney
PH: +61 2 9351 5531
Fax +61 2 0351 6004
email: grudd@mail.usyd.edu.au
-------------------------------------------------
/"\ ASCII Ribbon Campaign against HTML
\ / email
X
/ \
-------------------------------------------------
For more info on why you should not send html in email go to
http://www.american.edu/cas/econ/htmlmail.htm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-09 6:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-04 6:11 GCC and CC questions Greg Rudd
2003-07-09 6:04 ` SUMMARY: " Greg Rudd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox