Because I want to support EFI C in clang. The main difference between ANSI C and EFI C(used in EFI Byte Code Virtual Machine) <div><br></div><div>is that int size is determined at running time (4-byte on 32-bit processor and 8-byte on 64-bit processor).</div>
<div><div><br></div><div><div class="gmail_quote">2010/12/15 David Chisnall <span dir="ltr"><<a href="mailto:csdavec@swan.ac.uk">csdavec@swan.ac.uk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 14 Dec 2010, at 21:18, Lu Mitnick wrote:<br>
<br>
> The main difference between<br>
><br>
> the variation and the original one is that I wish to view the "size of" as a<br>
><br>
> function.<br>
<br>
</div>Before anyone can help you, I think that you need to explain what you are trying to do a bit more clearly.  In C, sizeof is not implemented as a function because it is impossible to implement it as a function.  Consider two typical uses:<br>

<br>
sizeof(int)<br>
sizeof(a)<br>
<br>
In the first case, it can't be a function because int is not a variable or constant and so can't be passed to a function.  In the second case, it could be a function call, but the function would not know the type of a and so would not be able to return something useful.<br>

<br>
So, when you say that you want sizeof to be viewed as a function, what do you actually mean?<br>
<br>
David<br>
<br>
-- Sent from my PDP-11</blockquote></div><br></div></div>