Path: utzoo!attcan!uunet!mcvax!diku!thorinn From: thorinn@diku.dk (Lars Henrik Mathiesen) Newsgroups: comp.lang.c Subject: Re: Re: Help me cast this! Message-ID: <3817@diku.dk> Date: 11 May 88 15:02:39 GMT References: <294@fedeva.UUCP> <7822@brl-smoke.ARPA>, <3802@diku.dk> <1988May6.165221.536@utzoo.uucp> Organization: DIKU, U of Copenhagen, DK Lines: 18 In article <1988May6.165221.536@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >There is still no fully portable way to say "maximally aligned pointer". >... >I'm not even quite sure how I would add this to the language: one wants >something that shares "void *"'s property of not needing explicit casts, >while also being maximally aligned (which may not be expressible as an >ordinary C type). Perhaps "struct *"? (Ugh.) How about some `prior art' : teach lint about /*MAXALIGN*/, it knows about so many special cases already. After all, it's not a language feature, it's a feature of malloc(), so llib-lc is a good place for the information. The next problem is with compiler writers who insist on warning about such things on compilation. They will have to put in support for /*MAXALIGN*/, and put that in(if it exists). Or use a #pragma. Or their users will have to live with the warnings (most probable?). -- Lars Mathiesen, DIKU, U of Copenhagen, Denmark [uunet!]mcvax!diku!thorinn Institute of Datalogy -- we're scientists, not engineers.