Path: utzoo!utgpu!water!watmath!clyde!rutgers!umd5!trantor.umd.edu!chris From: chris@trantor.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: sizeof(function) - preproposal survey Message-ID: <2296@umd5.umd.edu> Date: 14 Feb 88 09:37:02 GMT References: <11801@brl-adm.ARPA> Sender: ris@umd5.umd.edu Reply-To: chris@trantor.umd.edu (Chris Torek) Organization: University of Maryland, College Park Lines: 23 In article <11801@brl-adm.ARPA> LINNDR%VUENGVAX.BITNET@CUNYVM.CUNY.EDU writes: >... The gist [someone spelled `gist' right in netnews! hurrah!] >of my proposal is that the >sizeof operator, when applied to a function name, would return the >length of the function rather than the size of a pointer to a function. It might be nice, but it is a much larger change than you think. In particular, the compiler does not know the size of a function [*], hence the result would not be a constant. It is probably possible to implement this under most systems, although many might require work on the linker. ----- [*] Many architectures have span-dependent instructions. A good compiler/linker system will use the smallest instructions that fit, and this cannot be determined until link time. -- In-Real-Life: Chris Torek, Univ of MD Computer Science, +1 301 454 7163 (hiding out on trantor.umd.edu until mimsy is reassembled in its new home) Domain: chris@mimsy.umd.edu Path: not easily reachable