Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!agate!pasteur!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Interesting Bug in Microsoft C Message-ID: <10594@dog.ee.lbl.gov> Date: 5 Mar 91 01:07:05 GMT References: <12541@pucc.Princeton.EDU> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 20 X-Local-Date: Mon, 4 Mar 91 17:07:05 PST In article <12541@pucc.Princeton.EDU> EGNILGES@pucc.Princeton.EDU writes: >A colleague wrote a program containing the value -2,147,483,648L (-2**31) >which compiled and ran on Borland Turbo-C but produced a diagnostic "con- >stant to long" on Microsoft QuickC. When he changed it, replacing >the value with -2,147,483,647L - 1 the program ran on QuickC. If this is a warning, not an error, the compiler is merely being helpful. The type and value of -2147483648L on a machine with 32-bit `long's is See X3.159-1989 for details. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov