From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NhQBL-0004Z7-4i for mharc-grub-devel@gnu.org; Tue, 16 Feb 2010 11:21:51 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NhQBJ-0004Xr-Ds for grub-devel@gnu.org; Tue, 16 Feb 2010 11:21:49 -0500 Received: from [140.186.70.92] (port=41264 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhQBI-0004XO-Si for grub-devel@gnu.org; Tue, 16 Feb 2010 11:21:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NhQBI-0002IK-D4 for grub-devel@gnu.org; Tue, 16 Feb 2010 11:21:48 -0500 Received: from mail-fx0-f215.google.com ([209.85.220.215]:63024) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NhQBI-0002IG-6s for grub-devel@gnu.org; Tue, 16 Feb 2010 11:21:48 -0500 Received: by fxm7 with SMTP id 7so6512875fxm.8 for ; Tue, 16 Feb 2010 08:21:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=Kt5ZDbOgq3Da4zOPvpoLqZSKcaw/kQ00zqSeGc9ITek=; b=XQtptRa5wyksRB0iX8BEqI21t1MOb//f+I+Lfzx3ukS6zWMnagiuddRZLo1UrhYXug HMVIQo+NLstOKZlL7dsx73LYYSVzB1LeTFo9MlsgQd6eN9tKRs1C1wGsYZnp0Ak7jx7e mUgsaHjJA8exyJdEpL6qGPXcbikE9OTJdaZi8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=CAVqlHFyvYwplVIqloKQUlhZqkwKxz+gHsbsl41GfHxhwe2v9z5hsZwIm6rZFOel1Z /9+UHXROclkL7hZH1G8Xkz19PPGtMCAVYezoUZ8osRgpTIuw5XqFNUMNwtpEcNkD7JmI 7QKv/gIgYpANQAjWGuRCJMMSbrmLkIPfJ3q98= Received: by 10.87.69.20 with SMTP id w20mr2632701fgk.78.1266337304396; Tue, 16 Feb 2010 08:21:44 -0800 (PST) Received: from debian.bg45.phnet ([81.62.76.105]) by mx.google.com with ESMTPS id d4sm9519213fga.3.2010.02.16.08.21.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Feb 2010 08:21:43 -0800 (PST) Message-ID: <4B7AC60B.1060804@gmail.com> Date: Tue, 16 Feb 2010 17:21:31 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <4B736F82.7010005@gmail.com> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigBE6771C591C5114205D41FD6" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [RFC] Framebuffer rotation patch X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 16:21:49 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBE6771C591C5114205D41FD6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Michal Suchanek wrote: >> With typeof macro this can be made type-neutral avoiding potential mis= takes. >> +static inline long >> +grub_min (long x, long y) >> +{ >> + if (x > y) >> + return y; >> + else >> + return x; >> +} >> + >> =20 > > I don't see how typeof would be used. As I understand the docs it can > only set types relative to something what is already defined (and in > some cases actually dereference/call it) and there is nothing defined > at the point these functions are declared to copy the type from. > =20 #include #define swap(a,b) {typeof (a) mytemp ## __LINE__; mytemp ## __LINE__ =3D b; b =3D a; a =3D mytemp ## __LINE__; } int main () { int x =3D 1, y =3D 2; swap (x,y); printf ("%d, %d\n", x, y); } --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigBE6771C591C5114205D41FD6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAkt6xhIACgkQNak7dOguQgn/RAEAsTLZryZoO/G9AGFYemGi7QGm BJqmZtzPJONaAJJsTwcBAJGJoyGsimCmt/bN6rr0PT9CzV2wOx7qLBzPsdCBuepO =vBxi -----END PGP SIGNATURE----- --------------enigBE6771C591C5114205D41FD6--