Re: using GTK_VERSION_CHECK in a preprocessor statement



jacob berkman <jacob ximian com> writes:

> On Mon, 2002-05-06 at 16:33, Owen Taylor wrote:
> > jacob berkman <jacob ximian com> writes:
> > 
> > > On Mon, 2002-05-06 at 15:15, Owen Taylor wrote:
> > > > jacob berkman <jacob ximian com> writes:
> > > > 
> > > > > On Mon, 2002-05-06 at 14:16, Owen Taylor wrote:
> > > > > > jacob berkman <jacob ximian com> writes:
> > > > > > 
> > > > > > > over the weekend, this got added to gtkdoc-scangobj:
> > > > > > > 
> > > > > > >     #ifdef GTK_IS_WIDGET_CLASS
> > > > > > >     #if GTK_CHECK_VERSION(2,1,0)
> > > > > > >         if (!style_prop && GTK_IS_WIDGET_CLASS (class)) {
> > > > > > > 
> > > > > > > when docs are built with this, i get an error:
> > > > > > > 
> > > > > > >     missing binary operator before 'EOL'
> > > > > > > 
> > > > > > > from the line with the GTK_CHECK_VERSION.
> > > > > > > 
> > > 
> > > also, forte on solaris gives me:
> > > 
> > >     "panel-applet-scan.c", line 705: unexpected "("
> > >     "panel-applet-scan.c", line 707: warning: improper pointer/integer
> > >     combination: op "="
> > 
> > Are you saying that this goes away when you combine the two lines?
> 
> on linux, yes.  didn't try on solaris - putting out other, bigger fires
> right now.

OK, well, when you have more time, I"d appreciate if you could investigate
further. I can believe that either GCC or Forte would be non-conformant
with the X standard in some odd cases, but I have trouble believing that
both of them would have have problem with exactly the same case.

So, there must be something else going on than compilers not being able
to handle a \ continuation line at a particular point in a macro definition.

(The reason I'm pursuing this is that it's a bad thing if the version
check macro itself is broken, so I want to really understand the problem
rather than just put in something that makes it go away.)

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]