delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/20/09:00:50

From: Cherniavsky Beni <cben AT crosswinds DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: calculating size (like sizeof in TurboC++)
Date: Tue, 20 Jun 2000 15:49:41 +0200
Organization: Technion
Lines: 26
Message-ID: <394F7675.360E66CF@crosswinds.net>
References: <w3L25.77278$yR DOT 1322670 AT news DOT chello DOT at> <642A954DD517D411B20C00508BCF23B0012B16CF AT mail DOT sauder DOT com> <394CDAD3 DOT 2B075EC3 AT crosswinds DOT net> <394cfdf2 DOT 35169241 AT news DOT freeserve DOT net>
NNTP-Posting-Host: 132.68.54.8
Mime-Version: 1.0
X-Mailer: Mozilla 4.06 [en] (WinNT; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Steamer wrote:
> 
> Cherniavsky Beni wrote:
> 
> >
> > It might be useful to emphasize that sizeof(expression) is not a function that
> > can be implemented by any library but an *operator*.  It is computed at
> > *compile time* as a property of the type of the expression (which is never
> > computed).
> 
> This is true in C89/C90.  But note that C99 has variable length arrays,
> and sizeof applied to such an array is computed at execution time.
> Moreover, DJGPP (or rather gcc) already supports this, even though it
> is as yet a long way from being C99-compliant.
> 
> S.

 Thanks for the information, I had no idea about it.  Anyway it's a long
way from a function that can be written in C which seemed to be
misunderstood by Kurt Aistinger.

-- 
Beni Cherniavsky <cben AT crosswinds DOT net>
                 (also scben AT t2 in technion)
What's the exterior of a domain?
When one takes a bath we shout "Man overboard!".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019