You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/08/03 23:09:08 UTC
Re: cvs commit: apache/src http_core.c
On Sun, 3 Aug 1997, Marc Slemko wrote:
> Fix location of inline in do_double_reverse function definition.
>
> -static void inline do_double_reverse (conn_rec *conn)
> +static inline void do_double_reverse (conn_rec *conn)
Hmm. I guess inline doesn't follow the rules that all the other
qualifiers do. Did something complain about this to you?
The general rule involving qualifiers like const and volatile is that they
should be placed as close to possible to the thing they qualify. So:
volatile int * foo; /* pointer to a volatile int */
int * volatile foo; /* volatile pointer to an int */
I assumed inline followed the same rules.
Dean
Re: cvs commit: apache/src http_core.c
Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
>
> On Sun, 3 Aug 1997, Marc Slemko wrote:
>
> > Fix location of inline in do_double_reverse function definition.
> >
> > -static void inline do_double_reverse (conn_rec *conn)
> > +static inline void do_double_reverse (conn_rec *conn)
>
> Hmm. I guess inline doesn't follow the rules that all the other
> qualifiers do. Did something complain about this to you?
>
> The general rule involving qualifiers like const and volatile is that they
> should be placed as close to possible to the thing they qualify. So:
>
> volatile int * foo; /* pointer to a volatile int */
> int * volatile foo; /* volatile pointer to an int */
Yeah, but what about:
int volatile * foo;
? And you don't say void static fred(), either. So, I guess inline is
more static-like than volatile-like.
> I assumed inline followed the same rules.
Someone said something clever about assuming things once, but I forget
it :-)
Cheers,
Ben.
--
Ben Laurie Phone: +44 (181) 994 6435 Email:
ben@algroup.co.uk
Freelance Consultant and Fax: +44 (181) 994 6472
Technical Director URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd, Apache Group member (http://www.apache.org)
London, England. Apache-SSL author
Re: cvs commit: apache/src http_core.c
Posted by Marc Slemko <ma...@worldgate.com>.
On Sun, 3 Aug 1997, Dean Gaudet wrote:
>
>
> On Sun, 3 Aug 1997, Marc Slemko wrote:
>
> > Fix location of inline in do_double_reverse function definition.
> >
> > -static void inline do_double_reverse (conn_rec *conn)
> > +static inline void do_double_reverse (conn_rec *conn)
>
> Hmm. I guess inline doesn't follow the rules that all the other
> qualifiers do. Did something complain about this to you?
in.c:1: warning: `inline' is not at beginning of declaration
gcc, although it is 2.6.3. 2.7.2.1 doesn't.
It could be argued that "void do_double_reverse ..." is what the inline
applies to I guess.
ISTR this being documented somewhere, but not sure where. Perhaps it was
part of the old standard that did inline and was changed?
>
> The general rule involving qualifiers like const and volatile is that they
> should be placed as close to possible to the thing they qualify. So:
>
> volatile int * foo; /* pointer to a volatile int */
> int * volatile foo; /* volatile pointer to an int */
>
> I assumed inline followed the same rules.
>
> Dean
>
>