By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,305 Members | 1,822 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,305 IT Pros & Developers. It's quick & easy.

ANSI -> K&R ?

P: n/a
Is there any tool that can do this transformation?

I want to feed my c code to the HP-UX compiler which i think is only
K&R.

Mar 17 '07 #1
Share this Question
Share on Google+
19 Replies


P: n/a
llothar wrote:
Is there any tool that can do this transformation?

I want to feed my c code to the HP-UX compiler which i think is only
K&R.
Install gcc on your HPUX machine, if you're unable to buy the standard C
compiler.
Mar 17 '07 #2

P: n/a
"llothar" <ll*****@web.dewrites:
Is there any tool that can do this transformation?

I want to feed my c code to the HP-UX compiler which i think is only
K&R.
There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mar 17 '07 #3

P: n/a

"Keith Thompson" <ks***@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
"llothar" <ll*****@web.dewrites:
>Is there any tool that can do this transformation?

I want to feed my c code to the HP-UX compiler which i think is only
K&R.

There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.
Also there's unprotoize, part of gcc

Bye, Jojo
Mar 17 '07 #4

P: n/a
Joachim Schmitz wrote:
"Keith Thompson" <ks***@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
>>"llothar" <ll*****@web.dewrites:
>>>Is there any tool that can do this transformation?

I want to feed my c code to the HP-UX compiler which i think is only
K&R.

There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.

Also there's unprotoize, part of gcc
Which requires installing gcc which solves the OP's original problem!

--
Ian Collins.
Mar 17 '07 #5

P: n/a
On 17 Mrz., 13:13, Ian Collins <ian-n...@hotmail.comwrote:
Joachim Schmitz wrote:
"Keith Thompson" <k...@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
>"llothar" <llot...@web.dewrites:
>>Is there any tool that can do this transformation?
>>I want to feed my c code to the HP-UX compiler which i think is only
K&R.
>There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.
Also there's unprotoize, part of gcc

Which requires installing gcc which solves the OP's original problem!
Sorry i had this discussion before. GCC on PA-RISC is very very bad,
generated code with HP's compile is almost twice as fast which is
important on this slow CPU's.

GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.

Mar 18 '07 #6

P: n/a
On 17 Mar 2007 23:18:58 -0700, "llothar" <ll*****@web.dewrote:
>On 17 Mrz., 13:13, Ian Collins <ian-n...@hotmail.comwrote:
>Joachim Schmitz wrote:
"Keith Thompson" <k...@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
>>"llothar" <llot...@web.dewrites:
>>>Is there any tool that can do this transformation?
>>>I want to feed my c code to the HP-UX compiler which i think is only
K&R.
>>There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.
Also there's unprotoize, part of gcc

Which requires installing gcc which solves the OP's original problem!

Sorry i had this discussion before. GCC on PA-RISC is very very bad,
generated code with HP's compile is almost twice as fast which is
important on this slow CPU's.

GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.
Microchip's MPLAB C30 compiler is gcc-based. So is the avr-gcc
compiler for Atmel devices. Neither suck, IMHO.

--
jay
Mar 18 '07 #7

P: n/a
llothar wrote:
On 17 Mrz., 13:13, Ian Collins <ian-n...@hotmail.comwrote:
>>Joachim Schmitz wrote:
>>>"Keith Thompson" <k...@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
>>>>"llothar" <llot...@web.dewrites:
>>>>>Is there any tool that can do this transformation?
>>>>>I want to feed my c code to the HP-UX compiler which i think is only
>K&R.
>>>>There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.
>>>Also there's unprotoize, part of gcc

Which requires installing gcc which solves the OP's original problem!


Sorry i had this discussion before. GCC on PA-RISC is very very bad,
generated code with HP's compile is almost twice as fast which is
important on this slow CPU's.

GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.
Works fine on sparc.

--
Ian Collins.
Mar 18 '07 #8

P: n/a
llothar wrote:
>
.... snip ...
>
Sorry i had this discussion before. GCC on PA-RISC is very very
bad, generated code with HP's compile is almost twice as fast
which is important on this slow CPU's.

GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.
If you don't like the code generation for some machine, you are
perfectly free to improve it. It doesn't affect the front end.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com

Mar 18 '07 #9

P: n/a
On 17 Mrz., 23:51, Ian Collins <ian-n...@hotmail.comwrote:
llothar wrote:
On 17 Mrz., 13:13, Ian Collins <ian-n...@hotmail.comwrote:
>Joachim Schmitz wrote:
>>"Keith Thompson" <k...@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
>>>"llothar" <llot...@web.dewrites:
>>>>Is there any tool that can do this transformation?
>>>>I want to feed my c code to the HP-UX compiler which i think is only
K&R.
>>>There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.
>>Also there's unprotoize, part of gcc
>Which requires installing gcc which solves the OP's original problem!
Sorry i had this discussion before. GCC on PA-RISC is very very bad,
generated code with HP's compile is almost twice as fast which is
important on this slow CPU's.
GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.

Works fine on sparc.
You are joking aren't you? If not you don't have any clue what you
talking about.

Sparc is on the worse list, look what Sun Studio does.

On Solaris Intel, as i said, it is okay to use GCC but not on Sparc.

Mar 18 '07 #10

P: n/a
On 18 Mrz., 00:02, CBFalconer <cbfalco...@yahoo.comwrote:
llothar wrote:

... snip ...
Sorry i had this discussion before. GCC on PA-RISC is very very
bad, generated code with HP's compile is almost twice as fast
which is important on this slow CPU's.
GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.

If you don't like the code generation for some machine, you are
perfectly free to improve it. It doesn't affect the front end.
If you pay me for this, i could try to do so.
But your argument is damned stupid.

Mar 18 '07 #11

P: n/a
"llothar" <ll*****@web.dewrites:
On 18 Mrz., 00:02, CBFalconer <cbfalco...@yahoo.comwrote:
>llothar wrote:

... snip ...
Sorry i had this discussion before. GCC on PA-RISC is very very
bad, generated code with HP's compile is almost twice as fast
which is important on this slow CPU's.
GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.

If you don't like the code generation for some machine, you are
perfectly free to improve it. It doesn't affect the front end.

If you pay me for this, i could try to do so.
But your argument is damned stupid.
If you want to be taken seriously, try showing a little politeness.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mar 18 '07 #12

P: n/a
"llothar" <ll*****@web.dewrote in message
>
Sorry i had this discussion before. GCC on PA-RISC is very very bad,
generated code with HP's compile is almost twice as fast which is
important on this slow CPU's.

GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.
I tried it on an N64 some years back. Then gcc tended to beat the commerical
compiler, except that it wouldn't do cross-function optimisation.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Mar 18 '07 #13

P: n/a

"llothar" <ll*****@web.dewrote in message
>If you don't like the code generation for some machine, you are
perfectly free to improve it. It doesn't affect the front end.

If you pay me for this, i could try to do so.
But your argument is damned stupid.
gcc is open source, and is designed so that it can quite quickly be
retargeted. This means that you can get a C compiler of sorts up and running
for minimal outlay. If you want a really top notch optimiser, someone
somewhere has to put extra effort in. Plenty of public-spirited people do
improve freeware tools for free.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Mar 18 '07 #14

P: n/a
llothar wrote:
On 17 Mrz., 13:13, Ian Collins <ian-n...@hotmail.comwrote:
>Joachim Schmitz wrote:
>>"Keith Thompson" <k...@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
"llothar" <llot...@web.dewrites:
Is there any tool that can do this transformation?
I want to feed my c code to the HP-UX compiler which i think is only
K&R.
There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.
Also there's unprotoize, part of gcc
Which requires installing gcc which solves the OP's original problem!

Sorry i had this discussion before. GCC on PA-RISC is very very bad,
generated code with HP's compile is almost twice as fast which is
important on this slow CPU's.

GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.
The free K&R compiler on HPUX optimized less than gcc, for any use I
made of it. Did you forget to set -O ?
Mar 18 '07 #15

P: n/a
llothar wrote:
On 17 Mrz., 23:51, Ian Collins <ian-n...@hotmail.comwrote:
>>llothar wrote:
>>>GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.

Works fine on sparc.

You are joking aren't you? If not you don't have any clue what you
talking about.
Check your facts before posting defamatory comments:

http://www.sun.com/download/products.xml?id=43fb4c75

--
Ian Collins.
Mar 18 '07 #16

P: n/a
jaysome wrote:
On 17 Mar 2007 23:18:58 -0700, "llothar" <ll*****@web.dewrote:
>On 17 Mrz., 13:13, Ian Collins <ian-n...@hotmail.comwrote:
>>Joachim Schmitz wrote:
"Keith Thompson" <k...@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
"llothar" <llot...@web.dewrites:
>Is there any tool that can do this transformation?
>I want to feed my c code to the HP-UX compiler which i think is only
>K&R.
There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.
Also there's unprotoize, part of gcc
Which requires installing gcc which solves the OP's original problem!
Sorry i had this discussion before. GCC on PA-RISC is very very bad,
generated code with HP's compile is almost twice as fast which is
important on this slow CPU's.

GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.

Microchip's MPLAB C30 compiler is gcc-based. So is the avr-gcc
compiler for Atmel devices. Neither suck, IMHO.
.... and HP and AIX, where it works fine for us.
Mar 19 '07 #17

P: n/a
On 18 Mrz., 11:32, Ian Collins <ian-n...@hotmail.comwrote:
llothar wrote:
On 17 Mrz., 23:51, Ian Collins <ian-n...@hotmail.comwrote:
>llothar wrote:
>>GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.
>Works fine on sparc.
You are joking aren't you? If not you don't have any clue what you
talking about.

Check your facts before posting defamatory comments:

http://www.sun.com/download/products.xml?id=43fb4c75

--
Ian Collins.
I know about this but this is Sun Studio and has little to do with
gcc.

Mar 19 '07 #18

P: n/a
llothar wrote:
On 18 Mrz., 11:32, Ian Collins <ian-n...@hotmail.comwrote:
>>llothar wrote:
>>>On 17 Mrz., 23:51, Ian Collins <ian-n...@hotmail.comwrote:
>>>>llothar wrote:
>>>>>GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.
>>>>Works fine on sparc.
>>>You are joking aren't you? If not you don't have any clue what you
talking about.

Check your facts before posting defamatory comments:

http://www.sun.com/download/products.xml?id=43fb4c75
*Please* don't quote signatures.
>
I know about this but this is Sun Studio and has little to do with
gcc.
No, it's "GCC For SPARC(tm) Systems". A perfect example of how to
improve gcc code generation for a particular machine.

--
Ian Collins.
Mar 19 '07 #19

P: n/a
On Sun, 18 Mar 2007 01:18:58 -0500, llothar wrote
(in article <11**********************@e65g2000hsc.googlegroups .com>):
On 17 Mrz., 13:13, Ian Collins <ian-n...@hotmail.comwrote:
>Joachim Schmitz wrote:
>>"Keith Thompson" <k...@mib.orgschrieb im Newsbeitrag
news:ln************@nuthaus.mib.org...
>>>"llothar" <llot...@web.dewrites:
>>>>Is there any tool that can do this transformation?
>>>>I want to feed my c code to the HP-UX compiler which i think is only
K&R.
>>>There's an old tool called "ansi2knr", but you should consider whether
this is really what you want to do. Tim Prince suggested installing
gcc; I second the recommendation.
>>Also there's unprotoize, part of gcc

Which requires installing gcc which solves the OP's original problem!

Sorry i had this discussion before. GCC on PA-RISC is very very bad,
generated code with HP's compile is almost twice as fast which is
important on this slow CPU's.

GCC is only acceptable on Intel/PPC's. Everywhere else it sucks.
Not true, it works quite well on a number of embedded processors as
well.

--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Mar 20 '07 #20

This discussion thread is closed

Replies have been disabled for this discussion.