🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1529

Re: Turbo C++ Bug

#1529
From: Ron Henderson
Date: Thu, 28 Jun 1990 19:28
43 lines
1280 bytes
And yet Another TC C++ 1.00 bug.....

The following code when compiled in huge model (using tcc -mh file)
should print:

OK
ok


it instead prints:

OK
NOT ok

/*========================================================================*/
#define X (4 == sizeof(void *))

#if X
	void p(){printf("ok\n");}
#else
	void p(){printf("NOT ok\n");}
#endif

main()
{
#if X
	printf("OK\n");
#else
	printf("not OK\n");
#endif
	p();
}
/*========================================================================*/

The first '#if X' is not being processed correctly while the second
'#if X' is being processed correctly.

This error occurs with the IDE and command line compilers.  
This error has been reported to Borland.  The Borland tech compiled and 
executed the program.  He confirmed the problem.

Ron Henderson
crh@cv.hp.com
Technical Details
Message-ID: <16930003@hpcvmcdj.cv.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!usc!ucsd!ucbvax!hplabs!hp-pcd!hpcvmcdj!crh
References: <JACOBS.90Jun21104435@cmos.cs.utah.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!usc!ucsd!ucbvax!hplabs!hp-pcd!hpcvmcdj!crh
From: crh@hpcvmcdj.cv.hp.com (Ron Henderson)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Turbo C++ Bug
Message-ID: <16930003@hpcvmcdj.cv.hp.com>
Date: 28 Jun 90 19:28:55 GMT
References: <JACOBS.90Jun21104435@cmos.cs.utah.edu>
Organization: HP Corvallis, Oregon
Lines: 43