Hm, good idea, but unfortunately GDK_FAIl & GDK_SUCCESS are enums, not
macros, hence, I guess the C preporcessor does not know them, does it?
MonetDB/src/gdk/gdk.mx:642:typedef enum { GDK_FAIL, GDK_SUCCEED } gdk_return;
Stefan
On Tue, Dec 07, 2010 at 09:04:04PM +0100, Sjoerd Mullender wrote:
> Since all uses of ll_return seem to use constants, this could be handled
> by the C preprocessor.
>
> On 2010-12-07 19:42, Stefan Manegold wrote:
> > Changeset: b72768d848f0 for MonetDB
> > URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b72768d848f0
> > Modified Files:
> > pathfinder/runtime/ll_staircasejoin.mx
> > Branch: Oct2010
> > Log Message:
> >
> > avoid (disguise) self-comparison to fix compilation with clang 2.8 on
> > 64-bit Fedora 14:
> >
> > pathfinder/runtime/ll_staircasejoin.mx:376:26: error: self-comparison
> > always evaluates to true [-Wtautological-compare]
> > if (res && (GDK_FAIL == GDK_FAIL))
> > ^
> >
> >
> > diffs (15 lines):
> >
> > diff -r d88d208736b4 -r b72768d848f0 pathfinder/runtime/ll_staircasejoin.mx
> > --- a/pathfinder/runtime/ll_staircasejoin.mx Tue Dec 07 19:39:07
> > 2010 +0100
> > +++ b/pathfinder/runtime/ll_staircasejoin.mx Tue Dec 07 19:41:01
> > 2010 +0100
> > @@ -372,8 +372,9 @@
> > @
> >
> > @= ll_return
> > -{ if (del) BBPreclaim(del);
> > - if (res && (@1 == GDK_FAIL))
> > +{ int rtrn = @1;
> > + if (del) BBPreclaim(del);
> > + if (res && (rtrn == GDK_FAIL))
> > BBP_unfix_reclaim(res);
> > return @1; }
> > @c
> > _______________________________________________
> > Checkin-list mailing list
> > [email protected]
> > http://mail.monetdb.org/mailman/listinfo/checkin-list
>
>
> --
> Sjoerd Mullender
>
> _______________________________________________
> Checkin-list mailing list
> [email protected]
> http://mail.monetdb.org/mailman/listinfo/checkin-list
--
| Stefan.Manegold @ CWI.nl | DB Architectures (INS1) |
| http://CWI.nl/~manegold/ | Science Park 123 (L321) |
| Tel.: +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list