Re: inline and glib.h (was Re: ObjC and `glib.h')
- From: Tim Janik <timj gtk org>
- To: gtk-devel-list redhat com
- Subject: Re: inline and glib.h (was Re: ObjC and `glib.h')
- Date: Fri, 2 Oct 1998 23:11:28 +0200 (CEST)
On 2 Oct 1998, Guillaume Laurent wrote:
> Elliot Lee <sopwith@redhat.com> writes:
>
> > Yes, 'id' is a reserved word. When naming functions/parameters/variables,
> > people might want to keep in mind the reserved words of ObjC and C++, both
> > of which can include C headers directly (instead of requiring wrappers
> > like, say, scheme).
>
> Speaking of which, there is a similar problem with glib.h :
>
> #else /* !G_HAVE_INLINE */
> # undef inline
> # if defined (G_HAVE___INLINE__)
> # define inline __inline__
> # else /* !inline && !__inline__ */
> # if defined (G_HAVE___INLINE)
> # define inline __inline
> # else /* !inline && !__inline__ && !__inline */
> # define inline /* don't inline, then */ <---- potential trouble here
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
how would that cause problems for a compiler that doesn't understand
"inline" at all?
this code has actually been tested with a compiler which is not inline
aware (lcc).
configure.in makes appropriate checks to figure whether the compiler
understands one of "inline", "__inline" and "__inline__", if you'd
use a non-inline aware compiler, that's properly been taken care of.
> # ifndef G_INLINE_FUNC
> # undef G_CAN_INLINE
>
> It seems trouble would occur if glib is configured for a C compiler
> which absolutely does not understand "inline", and glib.h is included
> from C++.
hm, could you extend on what the trouble actually is and provide a test
case (including information about the system and the C/C++ compiler
you are running)?
>
> --
> Guillaume.
> http://www.worldnet.fr/~glaurent
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]