Re: GtkSpinButton Patch
- From: "David Wheeler" <dwheeler ida org>
- To: gtk-devel-list redhat com
- Subject: Re: GtkSpinButton Patch
- Date: Tue, 2 May 2000 18:35:30 -0400
On May 2, 4:23pm, Nils Barth wrote:
> Subject: Re: GtkSpinButton Patch
>>>
>>>Side note: kernel-traffic's latest issue had a note on a possible
>>>problem with a simple MAX a la GLib, namely that it evaluates
>>>functions twice, which can be bad for some functions (say, if they
>>>return different values on repeated calls). Someone suggested
>>>replacing it with a dummy variable assignment, then
>>>comparing/assigning with those variables. This might also be a bit
>>>faster...
>>>The exact code was (for MIN):
>>>#define min(x, y) ({typeof (x) x_ = (x); \
>>> typeof (y) y_ = (y); \
>>> x_ < y_ ? x_ : y_;})
Problem is, "typeof" is a GNU gcc extension.
That's not a problem for the Linux kernel; they _specifically_
require GNU gcc, and are even very picky about compiler versions.
If you want GTK+ to run compile using compilers other than gcc,
you'll have to avoid "typeof".
--
--- David A. Wheeler
dwheeler@ida.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]