From 3827829625528023814
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,bc2d9b2f726f122d
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-06-27 09:52:30 PST
Newsgroups: comp.std.c++
Path: bga.com!news.sprintlink.net!news.onramp.net!convex!news.duke.edu!news-feed-1.peachnet.edu!gatech!swrinde!ihnp4.ucsd.edu!agate!msuinfo!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!news
From: maxtal@physics.su.OZ.AU (John Max Skaller)
Subject: Re: #if sizeof( int ) == 2
Message-ID: <Cs2Cx7.93M@ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: physics.su.oz.au
Organization: School of Physics, University of Sydney, Australia
References: <BWH.94Jun24202306@kato.prl.ufl.edu>
Date: Mon, 27 Jun 1994 16:10:18 GMT
Lines: 24

In article <BWH.94Jun24202306@kato.prl.ufl.edu> bwh@kato.prl.ufl.edu (Brian Hook) writes:
>
>Borland C++ 3.1 compiles the following code 'correctly':
>
>#if sizeof( int ) == 2
>// assume 16-bit architecture
>#endif
>
>Watcom C/C++ 10.0 does not, erroring on this.
>
>as defined in $5.19, EXCEPT THAT TYPES INT AND UNSIGNED INT ARE TREATED AS
>LONG AND UNSIGNED LONG RESPECTIVELY, AND IT MAY NOT CONTAIN A CAST, A
>SIZEOF OPERATOR, OR AN ENUMERATION CONSTANT."
>
>Is there another approach that can be used to basically effect the same
>results?

	checkout the file <limits.h>

--
        JOHN (MAX) SKALLER,         INTERNET:maxtal@suphys.physics.su.oz.au
	Maxtal Pty Ltd,		    CSERVE:10236.1703 
        6 MacKay St ASHFIELD,	    Mem: SA IT/9/22,SC22/WG21 
        NSW 2131, AUSTRALIA	    


