🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools
Article #161

Bug in Borland C++ 3.1: demonstration included

#161
From: Hans van Oostrom
Date: Wed, 22 Jul 1992 18:38
36 lines
1570 bytes
I ran into a piece of code that will crash the Borland 3.1 compiler when
you compile it.  It gives a General Protection Fault Exception 0D in the
bcc and bc compilers (I haven't try the tcw one).  Try the following at home:

// file showbug.cpp

#include <stdio.h>

void main()
{
    stat();
}

void stat(void)
{
    printf("hello");
}

void another()
{
    stat();
}

I know that this is supposed to generate an error message because the stat
function doesn't have a prototype.  I also know that stat is defined as 
something else in the sys\stat.h file, but since I am not using that it
should be ok.  If you change the name of stat or include a prototype it
works ok.  

If anybody can shine some light on this I would be interested.
I will forward this to Borland.

Hans van Oostrom                    KD4MUJ
PO Box J-254, JHMHC                 hans@ufpine                (BITNET)
Gainesville, FL  32601, USA         hans@pine.circa.ufl.edu    (INTERNET)
>>>          Hoe ver je ook gaat, overal zie je landgenoten           <<<
Technical Details
Message-ID: <22JUL199213383471@pine.circa.ufl.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!mailer.cc.fsu.edu!uflorida!pine.circa.ufl.edu!hans

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!mailer.cc.fsu.edu!uflorida!pine.circa.ufl.edu!hans
From: hans@pine.circa.ufl.edu (Hans van Oostrom)
Newsgroups: comp.os.ms-windows.programmer.tools
Subject: Bug in Borland C++ 3.1: demonstration included
Message-ID: <22JUL199213383471@pine.circa.ufl.edu>
Date: 22 Jul 92 18:38:00 GMT
Sender: news@uflorida.cis.ufl.edu
Organization: University of Florida - Dept. of Anesthesiology
Lines: 36
Nntp-Posting-Host: pine.circa.ufl.edu
News-Software: VAX/VMS VNEWS 1.41