OLD style function definition

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

OLD style function definition

ikorot
Hi, ALL,

One very supid question: What is the reason behind having the old style function declaration, other than not looking at the code for the lo-o-ong time and not compiling it with the "Level 4" warnings? ;-)

As an example code from the src/regex/regc_nfa.c:

static VOID
freenfa(nfa)
struct nfa *nfa;
{
}


Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: OLD style function definition

Stefan.Neis@t-online.de
        Hi,

> One very supid question: What is the reason behind having the old style function
> declaration, other than not looking at the code for the lo-o-ong time and not compiling
> it with the "Level 4" warnings? ;-) >

For the third party libs, it's easier to keep them in sync with upstream versions, if
don't apply lots of specific changes, so those essentially are left in whatever style
the authors of those third party libs prefer.

        Regards,
                Stefan




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: OLD style function definition (OT)

Michael Wetherell
On Sunday 15 Jan 2006 22:19, [hidden email] wrote:
> > One very supid question: What is the reason behind having the old
> > style function declaration, other than not looking at the code for
> > the lo-o-ong time and not compiling it with the "Level 4" warnings?
> > ;-) >
>
> For the third party libs, it's easier to keep them in sync with
> upstream versions, if don't apply lots of specific changes, so those
> essentially are left in whatever style the authors of those third
> party libs prefer.

Well, I'm wandering a bit OT wrt wxWidgets, but does anyone know why
some lib writers do this? Presumably they're trying to make their libs
as super-portable as possible, but where would you come across a
non-ansi C compiler?

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: OLD style function definition (OT)

ikorot
Michael,
Well, you could set a style even in the Visual Studio as K&R, but the real question is: who will do that? ;-)

Thank you.

-----Original Message-----

>From: Michael Wetherell <[hidden email]>
>Sent: Jan 16, 2006 10:45 AM
>To: [hidden email]
>Subject: Re: [wx-dev] OLD style function definition (OT)
>
>On Sunday 15 Jan 2006 22:19, [hidden email] wrote:
>> > One very supid question: What is the reason behind having the old
>> > style function declaration, other than not looking at the code for
>> > the lo-o-ong time and not compiling it with the "Level 4" warnings?
>> > ;-) >
>>
>> For the third party libs, it's easier to keep them in sync with
>> upstream versions, if don't apply lots of specific changes, so those
>> essentially are left in whatever style the authors of those third
>> party libs prefer.
>
>Well, I'm wandering a bit OT wrt wxWidgets, but does anyone know why
>some lib writers do this? Presumably they're trying to make their libs
>as super-portable as possible, but where would you come across a
>non-ansi C compiler?
>
>Mike
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: OLD style function definition (OT)

Stefan.Neis@t-online.de
In reply to this post by Michael Wetherell
        Hi,

> Well, I'm wandering a bit OT wrt wxWidgets, but does anyone know why
> some lib writers do this? Presumably they're trying to make their libs

> as super-portable as possible, but where would you come across a
> non-ansi C compiler?

IIRC, SUN boxes still are delivered with the very old pre-ANSI C
compiler
(I don't know for sure, as I don't have it installed, but "cc" gives me
  $ cc
  /usr/ucb/cc:  language optional software package not installed    )
Until relatively recently, that was about all you could get for free
from SUN.
Why anybody would want to use that beast instead of e.g. gcc is still
beyond me, but there apparently are developper insisting to support
that beast (and/or possibly other, similar ones).

          Regards,
                     Stefan



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: OLD style function definition (OT)

Michael Wetherell
On Tuesday 17 Jan 2006 09:33, [hidden email] wrote:

> IIRC, SUN boxes still are delivered with the very old pre-ANSI C
> compiler
> (I don't know for sure, as I don't have it installed, but "cc" gives
> me $ cc
>   /usr/ucb/cc:  language optional software package not installed    )
> Until relatively recently, that was about all you could get for free
> from SUN.
> Why anybody would want to use that beast instead of e.g. gcc is still
> beyond me, but there apparently are developper insisting to support
> that beast (and/or possibly other, similar ones).

Ah right, that would explain it. I didn't think Solaris came with a
compiler, but I could be wrong, and I notice that the bundled compiler
on HPUX 11i is indeed a non-ANSI one.

Regards,
Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: OLD style function definition (OT)

Alec Ross
In message <[hidden email]>, Michael
Wetherell <[hidden email]> writes

>On Tuesday 17 Jan 2006 09:33, [hidden email] wrote:
>> IIRC, SUN boxes still are delivered with the very old pre-ANSI C
>> compiler
>> (I don't know for sure, as I don't have it installed, but "cc" gives
>> me $ cc
>>   /usr/ucb/cc:  language optional software package not installed    )
>> Until relatively recently, that was about all you could get for free
>> from SUN.
>> Why anybody would want to use that beast instead of e.g. gcc is still
>> beyond me, but there apparently are developper insisting to support
>> that beast (and/or possibly other, similar ones).
>
>Ah right, that would explain it. I didn't think Solaris came with a
>compiler, but I could be wrong, and I notice that the bundled compiler
>on HPUX 11i is indeed a non-ANSI one.
>
FWIW I've noticed some things in a recent Boost thread about C++
compilers for Solaris.  Extracts from a couple of posts:

"
>> I've finally managed to get myself a decent spec SUN workstation and
>> thanks to SUN now providing SunStudio 11 for the cost of a download, the
>> latest compiler as well.
>>
>
> Is this a download available to the public?
>
Yes, I'm pretty sure it is - same page as the Solaris 10 download. You
have to be registered with SUN but that shouldn't cost you anything.
> By the way do you run a x86 based or SPARC based work station?  I belive
> Sun claim source compatibility on Solaris10 but it would be nice to know what
> you are working on.
"
and

"
The Sun compiler team is actively working on getting boost up and
running. This is the most recent thread on their forums
http://forum.sun.com/thread.jspa?threadID=28265&tstart=0

Quote from the most recent message on the thread: "Yesterday finaly
managed to get the newest Boost (1.33.1) compiled with the SUN Studio 11
compiler! This was after installing the newest patches for the C++
compiler (16-dec-2005)."
"
--
Alec Ross

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]