home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!uflorida!pine.circa.ufl.edu!hans
- From: hans@pine.circa.ufl.edu (Hans van Oostrom)
- Newsgroups: comp.lang.c++
- Subject: Bug in Borland C++ 3.1: demonstration included
- Message-ID: <22JUL199211253387@pine.circa.ufl.edu>
- Date: 22 Jul 92 16:25: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
-
- 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 <<<
-