🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.win32
Article #2114

Re: BUG REPORT: Microsoft Visual C++ 4.1

#2114
From: Michael Furman
Date: Fri, 05 Apr 1996 14:09
36 lines
1860 bytes
In article <316445a3.428887193@news.primenet.com>, gbe@primenet.com 
says...
>
>/* BugDemo.cpp
>
>   Here is a demonstration of a serious bug that I just found in 
Microsoft
>   Visual C++ Version 4.1. 

Debugging version of MS C/C++ compilerss of all versions have bugs - 
I find them each time when I forget to set options for using optimizing
version. Last time it happend yesterday on the following code fragment
(r defined as "long", bcode as "unsigned char []", compiler version is
1.52):

  // Next statement must be compiled with enabled optimizations
  // because of bug in MSVC 1.52 C++ compiler  
  if((r & 0xFF) != bcode[7] || ((r >> 8) & 0xFF) != bcode[6] ||
     ((r >> 16)  & 0xFF) != bcode[5])
    return -1; 

Address of bcode[7] was calculated incorrectly - actually it used
bcode[5] instead.

My practice to avoid that is to use only optimizing version of compiler
(even in case of all disabled optimizations).

-- 
<<< If you received it by E-mail: it is a copy of post to the newsgroup 
>>>
---------------------------------------------------------------
Michael Furman,                       (603)893-1109
Geophysical Survey Systems, Inc.  fax:(603)889-3984
13 Klein Drive - P.O. Box 97          engr@gssi.mv.com 
North Salem, NH 03073-0097            71543.1334@compuserve.com
---------------------------------------------------------------
Technical Details
Message-ID: <DpE7CB.26v@mv.mv.com>
Path: arc1-ca.pugleaf.net!in2.uu.net!world!mv!usenet
References: <316445a3.428887193@news.primenet.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.win32,comp.lang.c++
Path: arc1-ca.pugleaf.net!in2.uu.net!world!mv!usenet
From: ENGR@GSSI.MV.COM (Michael Furman)
Subject: Re: BUG REPORT: Microsoft Visual C++ 4.1
Message-ID: <DpE7CB.26v@mv.mv.com>
Mime-Version: 1.0
Content-Type: Text/Plain; charset=US-ASCII
Organization: GSSI
Date: Fri, 5 Apr 1996 14:09:47 GMT
References: <316445a3.428887193@news.primenet.com>
X-Newsreader: WinVN 0.99.7
X-Nntp-Posting-Host: gssi.mv.com