From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 23388 invoked from network); 2 Nov 1999 17:09:39 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 2 Nov 1999 17:09:39 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA03885 for ; Tue, 2 Nov 1999 12:09:38 -0500 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id KAA11620 for axp-list@redhat.com; Tue, 2 Nov 1999 10:09:35 -0700 From: Michal Jaegermann Message-Id: <199911021709.KAA11620@ellpspace.math.ualberta.ca> Subject: Re: Serious warnings from RH 6.1 SRPMs on alpha To: axp-list@redhat.com Date: Tue, 2 Nov 1999 10:09:35 -0700 (MST) In-Reply-To: from "Wessels, Hans" at Nov 2, 99 04:59:43 pm Content-Type: text Wessels, Hans wrote: > > An other way is: > void foo(char *p) > { > int alignment; > alignment = ((int) p) &0x0F; /* Get a warning */ > ... > } > > Anyone how to do this without getting a warning? int foo(char *p) { int alignment; long atmp; atmp = ((long) p) &0x0FL; return (alignment = atmp); } Actually a generated assembler will be much simpler than you can expect. See for yourself. :-) Michal